From 7bd76de76252331d672a95ca6408447e3ea98e1b Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Tue, 21 Jan 2020 22:29:30 -0600 Subject: [PATCH] Add more service status info to settings page --- rootfs/standard/var/www/mynode/settings.py | 8 ++++- .../var/www/mynode/templates/settings.html | 30 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/rootfs/standard/var/www/mynode/settings.py b/rootfs/standard/var/www/mynode/settings.py index b4f4fb82..38fa79f8 100644 --- a/rootfs/standard/var/www/mynode/settings.py +++ b/rootfs/standard/var/www/mynode/settings.py @@ -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(), diff --git a/rootfs/standard/var/www/mynode/templates/settings.html b/rootfs/standard/var/www/mynode/templates/settings.html index c3e39133..3fede8f0 100644 --- a/rootfs/standard/var/www/mynode/templates/settings.html +++ b/rootfs/standard/var/www/mynode/templates/settings.html @@ -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 @@ +
+ +
BTCPayServer Status
+
+
+ {{ btcpayserver_status }} +
+ + +
+ +
Mempool.Space Status
+
+
+ {{ mempoolspace_status }} +
+ + + +