Add more service status info to settings page

This commit is contained in:
Taylor Helsper 2020-01-21 22:29:30 -06:00
parent ca18cf795f
commit 7bd76de762
2 changed files with 37 additions and 1 deletions

View File

@ -111,7 +111,7 @@ def page_settings():
# Get Docker Image Build Status
docker_image_build_status_log = get_journalctl_log("docker_images")
# Get QuickSync Rates
upload_rate = 100
download_rate = 100
@ -153,6 +153,12 @@ def page_settings():
"docker_image_build_status_log": docker_image_build_status_log,
"docker_image_build_status": get_docker_image_build_status(),
"docker_image_build_status_color": get_docker_image_build_status_color(),
"btcpayserver_status_log": get_journalctl_log("btcpayserver"),
"btcpayserver_status": get_service_status_basic_text("btcpayserver"),
"btcpayserver_status_color": get_service_status_color("btcpayserver"),
"mempoolspace_status_log": get_journalctl_log("mempoolspace"),
"mempoolspace_status": get_service_status_basic_text("mempoolspace"),
"mempoolspace_status_color": get_service_status_color("mempoolspace"),
"is_quicksync_disabled": not quicksync_enabled,
"is_netdata_enabled": is_netdata_enabled(),
"is_uploader_device": is_uploader(),

View File

@ -204,6 +204,16 @@
$("#docker_image_build_status").show();
});
$("#show_btcpayserver_status").on("click", function() {
$("#show_btcpayserver_status").hide(0);
$("#btcpayserver_status").show();
});
$("#show_mempoolspace_status").on("click", function() {
$("#show_mempoolspace_status").hide(0);
$("#mempoolspace_status").show();
});
$("#show_mynode_changelog").on("click", function() {
if (showChangelog)
{
@ -506,6 +516,26 @@
</div>
<button id="show_docker_image_build_status" class="ui-button ui-widget ui-corner-all settings_button">Show</button>
<div id="docker_image_build_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{docker_image_build_status_log}}</pre></div>
<div class="divider"></div>
<div class="settings_block_subheader">BTCPayServer Status</div>
<div class="settings_block_subheader_status">
<div class="settings_block_subheader_status_icon {{ btcpayserver_status_color }}"></div>
{{ btcpayserver_status }}
</div>
<button id="show_btcpayserver_status" class="ui-button ui-widget ui-corner-all settings_button">Show</button>
<div id="btcpayserver_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{btcpayserver_status_log}}</pre></div>
<div class="divider"></div>
<div class="settings_block_subheader">Mempool.Space Status</div>
<div class="settings_block_subheader_status">
<div class="settings_block_subheader_status_icon {{ mempoolspace_status_color }}"></div>
{{ mempoolspace_status }}
</div>
<button id="show_mempoolspace_status" class="ui-button ui-widget ui-corner-all settings_button">Show</button>
<div id="mempoolspace_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{mempoolspace_status_log}}</pre></div>
</div>
<div class="settings_block">