mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-27 06:54:00 +00:00
Add initial status page
This commit is contained in:
parent
4f21241035
commit
2d4c5bc1bd
|
@ -110,15 +110,6 @@ def page_settings():
|
||||||
except:
|
except:
|
||||||
bitcoin_status_log = "ERROR"
|
bitcoin_status_log = "ERROR"
|
||||||
|
|
||||||
# Get Status
|
|
||||||
lnd_status_log = get_journalctl_log("lnd")
|
|
||||||
lndhub_status_log = get_journalctl_log("lndhub")
|
|
||||||
tor_status_log = get_journalctl_log("tor@default")
|
|
||||||
electrs_status_log = get_journalctl_log("electrs")
|
|
||||||
netdata_status_log = get_journalctl_log("netdata")
|
|
||||||
rtl_status_log = get_journalctl_log("rtl")
|
|
||||||
docker_status_log = get_journalctl_log("docker")
|
|
||||||
docker_image_build_status_log = get_journalctl_log("docker_images")
|
|
||||||
|
|
||||||
# Get QuickSync Rates
|
# Get QuickSync Rates
|
||||||
upload_rate = 100
|
upload_rate = 100
|
||||||
|
@ -147,6 +138,100 @@ def page_settings():
|
||||||
"product_key_skipped": pk_skipped,
|
"product_key_skipped": pk_skipped,
|
||||||
"product_key_error": pk_error,
|
"product_key_error": pk_error,
|
||||||
"changelog": changelog,
|
"changelog": changelog,
|
||||||
|
"is_bitcoin_synced": is_bitcoind_synced(),
|
||||||
|
"firewall_rules": get_firewall_rules(),
|
||||||
|
"is_quicksync_disabled": not quicksync_enabled,
|
||||||
|
"is_netdata_enabled": is_netdata_enabled(),
|
||||||
|
"is_uploader_device": is_uploader(),
|
||||||
|
"download_rate": download_rate,
|
||||||
|
"upload_rate": upload_rate,
|
||||||
|
"is_btc_lnd_tor_enabled": is_btc_lnd_tor_enabled(),
|
||||||
|
"uptime": uptime,
|
||||||
|
"date": date,
|
||||||
|
"public_ip": public_ip,
|
||||||
|
"local_ip": local_ip,
|
||||||
|
"drive_usage": get_drive_usage(),
|
||||||
|
"cpu_usage": get_cpu_usage(),
|
||||||
|
"ram_usage": get_ram_usage(),
|
||||||
|
"device_temp": get_device_temp(),
|
||||||
|
"ui_settings": read_ui_settings()
|
||||||
|
}
|
||||||
|
return render_template('settings.html', **templateData)
|
||||||
|
|
||||||
|
@mynode_settings.route("/status")
|
||||||
|
def page_status():
|
||||||
|
check_logged_in()
|
||||||
|
|
||||||
|
current_version = get_current_version()
|
||||||
|
latest_version = get_latest_version()
|
||||||
|
current_beta_version = get_current_beta_version()
|
||||||
|
latest_beta_version = get_latest_beta_version()
|
||||||
|
|
||||||
|
changelog = get_device_changelog()
|
||||||
|
serial_number = get_device_serial()
|
||||||
|
device_type = get_device_type()
|
||||||
|
device_ram = get_device_ram()
|
||||||
|
product_key = get_product_key()
|
||||||
|
pk_skipped = skipped_product_key()
|
||||||
|
pk_error = not is_valid_product_key()
|
||||||
|
uptime = get_system_uptime()
|
||||||
|
date = get_system_date()
|
||||||
|
local_ip = get_local_ip()
|
||||||
|
public_ip = get_public_ip()
|
||||||
|
|
||||||
|
|
||||||
|
# Get Startup Status
|
||||||
|
startup_status_log = get_journalctl_log("mynode")
|
||||||
|
|
||||||
|
# Get QuickSync Status
|
||||||
|
quicksync_enabled = is_quicksync_enabled()
|
||||||
|
quicksync_status = "Disabled"
|
||||||
|
quicksync_status_color = "gray"
|
||||||
|
quicksync_status_log = "DISABLED"
|
||||||
|
if quicksync_enabled:
|
||||||
|
quicksync_status = get_service_status_basic_text("quicksync")
|
||||||
|
quicksync_status_color = get_service_status_color("quicksync")
|
||||||
|
try:
|
||||||
|
quicksync_status_log = subprocess.check_output(["mynode-get-quicksync-status"]).decode("utf8")
|
||||||
|
except:
|
||||||
|
quicksync_status_log = "ERROR"
|
||||||
|
|
||||||
|
# Get Bitcoin Status
|
||||||
|
bitcoin_status_log = ""
|
||||||
|
try:
|
||||||
|
bitcoin_status_log = subprocess.check_output(["tail","-n","200","/mnt/hdd/mynode/bitcoin/debug.log"]).decode("utf8")
|
||||||
|
lines = bitcoin_status_log.split('\n')
|
||||||
|
lines.reverse()
|
||||||
|
bitcoin_status_log = '\n'.join(lines)
|
||||||
|
except:
|
||||||
|
bitcoin_status_log = "ERROR"
|
||||||
|
|
||||||
|
# Get Status
|
||||||
|
lnd_status_log = get_journalctl_log("lnd")
|
||||||
|
lndhub_status_log = get_journalctl_log("lndhub")
|
||||||
|
tor_status_log = get_journalctl_log("tor@default")
|
||||||
|
electrs_status_log = get_journalctl_log("electrs")
|
||||||
|
netdata_status_log = get_journalctl_log("netdata")
|
||||||
|
rtl_status_log = get_journalctl_log("rtl")
|
||||||
|
docker_status_log = get_journalctl_log("docker")
|
||||||
|
docker_image_build_status_log = get_journalctl_log("docker_images")
|
||||||
|
|
||||||
|
templateData = {
|
||||||
|
"title": "myNode Status",
|
||||||
|
"password_message": "",
|
||||||
|
"current_version": current_version,
|
||||||
|
"latest_version": latest_version,
|
||||||
|
"current_beta_version": current_beta_version,
|
||||||
|
"latest_beta_version": latest_beta_version,
|
||||||
|
"upgrade_error": did_upgrade_fail(),
|
||||||
|
"upgrade_logs": get_recent_upgrade_logs(),
|
||||||
|
"serial_number": serial_number,
|
||||||
|
"device_type": device_type,
|
||||||
|
"device_ram": device_ram,
|
||||||
|
"product_key": product_key,
|
||||||
|
"product_key_skipped": pk_skipped,
|
||||||
|
"product_key_error": pk_error,
|
||||||
|
"changelog": changelog,
|
||||||
"startup_status_log": startup_status_log,
|
"startup_status_log": startup_status_log,
|
||||||
"startup_status": get_service_status_basic_text("mynode"),
|
"startup_status": get_service_status_basic_text("mynode"),
|
||||||
"startup_status_color": get_service_status_color("mynode"),
|
"startup_status_color": get_service_status_color("mynode"),
|
||||||
|
@ -196,9 +281,6 @@ def page_settings():
|
||||||
"firewall_rules": get_firewall_rules(),
|
"firewall_rules": get_firewall_rules(),
|
||||||
"is_quicksync_disabled": not quicksync_enabled,
|
"is_quicksync_disabled": not quicksync_enabled,
|
||||||
"is_netdata_enabled": is_netdata_enabled(),
|
"is_netdata_enabled": is_netdata_enabled(),
|
||||||
"is_uploader_device": is_uploader(),
|
|
||||||
"download_rate": download_rate,
|
|
||||||
"upload_rate": upload_rate,
|
|
||||||
"is_btc_lnd_tor_enabled": is_btc_lnd_tor_enabled(),
|
"is_btc_lnd_tor_enabled": is_btc_lnd_tor_enabled(),
|
||||||
"uptime": uptime,
|
"uptime": uptime,
|
||||||
"date": date,
|
"date": date,
|
||||||
|
@ -210,7 +292,7 @@ def page_settings():
|
||||||
"device_temp": get_device_temp(),
|
"device_temp": get_device_temp(),
|
||||||
"ui_settings": read_ui_settings()
|
"ui_settings": read_ui_settings()
|
||||||
}
|
}
|
||||||
return render_template('settings.html', **templateData)
|
return render_template('status.html', **templateData)
|
||||||
|
|
||||||
@mynode_settings.route("/settings/upgrade")
|
@mynode_settings.route("/settings/upgrade")
|
||||||
def upgrade_page():
|
def upgrade_page():
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
© myNode | <a href="https://www.mynodebtc.com" target="_blank">mynodebtc.com</a> | <a href="/about">about</a> | <a href="/settings">settings</a> | <a href="/help">help</a>
|
© myNode | <a href="https://www.mynodebtc.com" target="_blank">mynodebtc.com</a> | <a href="/about">about</a> | <a href="/status">status</a> | <a href="/settings">settings</a> | <a href="/help">help</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -201,7 +201,10 @@
|
||||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/settings.png")}}"/></div>
|
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/settings.png")}}"/></div>
|
||||||
<div class="app_title">Settings</div>
|
<div class="app_title">Settings</div>
|
||||||
<div class="app_status"></div>
|
<div class="app_status"></div>
|
||||||
<div class="app_contents"><a class="ui-button ui-widget ui-corner-all mynode_button" href="/settings">Settings</a></div>
|
<div class="app_contents">
|
||||||
|
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/status">Status</a>
|
||||||
|
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/settings">Settings</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="app_tile">
|
<div class="app_tile">
|
||||||
<div class="app_status_icon"></div>
|
<div class="app_status_icon"></div>
|
||||||
|
|
|
@ -192,91 +192,6 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#show_startup_status").on("click", function() {
|
|
||||||
$("#show_startup_status").hide(0);
|
|
||||||
$("#startup_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_quicksync_status").on("click", function() {
|
|
||||||
$("#show_quicksync_status").hide(0);
|
|
||||||
$("#quicksync_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_bitcoin_status").on("click", function() {
|
|
||||||
$("#show_bitcoin_status").hide(0);
|
|
||||||
$("#bitcoin_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_lnd_status").on("click", function() {
|
|
||||||
$("#show_lnd_status").hide(0);
|
|
||||||
$("#lnd_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_lndhub_status").on("click", function() {
|
|
||||||
$("#show_lndhub_status").hide(0);
|
|
||||||
$("#lndhub_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_tor_status").on("click", function() {
|
|
||||||
$("#show_tor_status").hide(0);
|
|
||||||
$("#tor_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_electrs_status").on("click", function() {
|
|
||||||
$("#show_electrs_status").hide(0);
|
|
||||||
$("#electrs_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_rtl_status").on("click", function() {
|
|
||||||
$("#show_rtl_status").hide(0);
|
|
||||||
$("#rtl_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_docker_status").on("click", function() {
|
|
||||||
$("#show_docker_status").hide(0);
|
|
||||||
$("#docker_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_docker_image_build_status").on("click", function() {
|
|
||||||
$("#show_docker_image_build_status").hide(0);
|
|
||||||
$("#docker_image_build_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_netdata_status").on("click", function() {
|
|
||||||
$("#show_netdata_status").hide(0);
|
|
||||||
$("#netdata_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_dojo_status").on("click", function() {
|
|
||||||
$("#show_dojo_status").hide(0);
|
|
||||||
$("#dojo_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_upgrade_status").on("click", function() {
|
|
||||||
$("#show_upgrade_status").hide(0);
|
|
||||||
$("#upgrade_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_upgrade_status_beta").on("click", function() {
|
|
||||||
$("#show_upgrade_status_beta").hide(0);
|
|
||||||
$("#upgrade_status_beta").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_firewall_status").on("click", function() {
|
|
||||||
$("#show_firewall_status").hide(0);
|
|
||||||
$("#firewall_status").show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#show_firewall_rules").on("click", function() {
|
$("#show_firewall_rules").on("click", function() {
|
||||||
$("#show_firewall_rules").hide(0);
|
$("#show_firewall_rules").hide(0);
|
||||||
$("#firewall_rules").show();
|
$("#firewall_rules").show();
|
||||||
|
@ -586,151 +501,6 @@
|
||||||
</table>
|
</table>
|
||||||
<input type="submit" id="password_submit" value="Change Password" class="ui-button ui-widget ui-corner-all settings_button"/>
|
<input type="submit" id="password_submit" value="Change Password" class="ui-button ui-widget ui-corner-all settings_button"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="settings_block">
|
|
||||||
<div class="settings_block_header">Service Status</div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">myNode Startup Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ startup_status_color }}"></div>
|
|
||||||
{{ startup_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_startup_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="startup_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{startup_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">QuickSync Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ quicksync_status_color }}"></div>
|
|
||||||
{{ quicksync_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_quicksync_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="quicksync_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{quicksync_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">Tor Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ tor_status_color }}"></div>
|
|
||||||
{{ tor_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_tor_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="tor_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{tor_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">Bitcoin Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ bitcoin_status_color }}"></div>
|
|
||||||
{{ bitcoin_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_bitcoin_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="bitcoin_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{bitcoin_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
{% if is_bitcoin_synced %}
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">LND Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ lnd_status_color }}"></div>
|
|
||||||
{{ lnd_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_lnd_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="lnd_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{lnd_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">Electrum Server Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ electrs_status_color }}"></div>
|
|
||||||
{{ electrs_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_electrs_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="electrs_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{electrs_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">LNDHub Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ lndhub_status_color }}"></div>
|
|
||||||
{{ lndhub_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_lndhub_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="lndhub_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{lndhub_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">RTL Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ rtl_status_color }}"></div>
|
|
||||||
{{ rtl_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_rtl_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="rtl_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{rtl_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">Docker Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ docker_status_color }}"></div>
|
|
||||||
{{ docker_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_docker_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="docker_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{docker_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">Docker Image Build Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ docker_image_build_status_color }}"></div>
|
|
||||||
{{ docker_image_build_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_docker_image_build_status" class="ui-button ui-widget ui-corner-all settings_button_small">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">Dojo Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ dojo_status_color }}"></div>
|
|
||||||
{{ dojo_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_dojo_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="dojo_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{dojo_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">BTCPay Server 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_small">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 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_small">Show</button>
|
|
||||||
<div id="mempoolspace_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{mempoolspace_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
{% if is_netdata_enabled %}
|
|
||||||
<div class="settings_block_subheader">Netdata Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ netdata_status_color }}"></div>
|
|
||||||
{{ netdata_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_netdata_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="netdata_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{netdata_status_log}}</pre></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="settings_block_subheader">Firewall Status</div>
|
|
||||||
<div class="settings_block_subheader_status">
|
|
||||||
<div class="settings_block_subheader_status_icon {{ firewall_status_color }}"></div>
|
|
||||||
{{ firewall_status }}
|
|
||||||
</div>
|
|
||||||
<button id="show_firewall_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
|
||||||
<div id="firewall_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{firewall_status_log}}</pre></div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="settings_block">
|
<div class="settings_block">
|
||||||
|
|
379
rootfs/standard/var/www/mynode/templates/status.html
Normal file
379
rootfs/standard/var/www/mynode/templates/status.html
Normal file
|
@ -0,0 +1,379 @@
|
||||||
|
<!DOCTYPE html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>{{ title }}</title>
|
||||||
|
{% include 'includes/head.html' %}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$("#show_startup_status").on("click", function() {
|
||||||
|
$("#show_startup_status").hide(0);
|
||||||
|
$("#startup_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_quicksync_status").on("click", function() {
|
||||||
|
$("#show_quicksync_status").hide(0);
|
||||||
|
$("#quicksync_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_bitcoin_status").on("click", function() {
|
||||||
|
$("#show_bitcoin_status").hide(0);
|
||||||
|
$("#bitcoin_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_lnd_status").on("click", function() {
|
||||||
|
$("#show_lnd_status").hide(0);
|
||||||
|
$("#lnd_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_lndhub_status").on("click", function() {
|
||||||
|
$("#show_lndhub_status").hide(0);
|
||||||
|
$("#lndhub_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_tor_status").on("click", function() {
|
||||||
|
$("#show_tor_status").hide(0);
|
||||||
|
$("#tor_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_electrs_status").on("click", function() {
|
||||||
|
$("#show_electrs_status").hide(0);
|
||||||
|
$("#electrs_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_rtl_status").on("click", function() {
|
||||||
|
$("#show_rtl_status").hide(0);
|
||||||
|
$("#rtl_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_docker_status").on("click", function() {
|
||||||
|
$("#show_docker_status").hide(0);
|
||||||
|
$("#docker_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_docker_image_build_status").on("click", function() {
|
||||||
|
$("#show_docker_image_build_status").hide(0);
|
||||||
|
$("#docker_image_build_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_netdata_status").on("click", function() {
|
||||||
|
$("#show_netdata_status").hide(0);
|
||||||
|
$("#netdata_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_dojo_status").on("click", function() {
|
||||||
|
$("#show_dojo_status").hide(0);
|
||||||
|
$("#dojo_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_upgrade_status").on("click", function() {
|
||||||
|
$("#show_upgrade_status").hide(0);
|
||||||
|
$("#upgrade_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_upgrade_status_beta").on("click", function() {
|
||||||
|
$("#show_upgrade_status_beta").hide(0);
|
||||||
|
$("#upgrade_status_beta").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_firewall_status").on("click", function() {
|
||||||
|
$("#show_firewall_status").hide(0);
|
||||||
|
$("#firewall_status").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#show_product_key").on("click", function() {
|
||||||
|
$("#show_product_key").hide(0);
|
||||||
|
$("#product_key").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#glances").on("click", function() {
|
||||||
|
url = 'http://'+location.hostname+':61208'
|
||||||
|
window.open(url,'_blank');
|
||||||
|
})
|
||||||
|
|
||||||
|
$("#netdata").on("click", function() {
|
||||||
|
url = 'http://'+location.hostname+':19999'
|
||||||
|
window.open(url,'_blank');
|
||||||
|
})
|
||||||
|
|
||||||
|
$("#linux_terminal").on("click", function() {
|
||||||
|
url = 'http://'+location.hostname+':2222/ssh/host/'+"{{local_ip}}"
|
||||||
|
window.open(url,'_blank');
|
||||||
|
})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
{% include 'includes/logo_header.html' %}
|
||||||
|
<div class="mynode_back_div">
|
||||||
|
<a class="ui-button ui-widget ui-corner-all mynode_back" href="/"><span class="ui-icon ui-icon-home"></span>home </a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main_header">Status</div>
|
||||||
|
|
||||||
|
{% include 'includes/message_display.html' %}
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div class="settings_block">
|
||||||
|
<div class="settings_block_header">myNode</div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Version</div>
|
||||||
|
<table border="0">
|
||||||
|
<tr>
|
||||||
|
<td>Current Version</td>
|
||||||
|
<td>{{current_version}}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Info</div>
|
||||||
|
<table border="0">
|
||||||
|
<tr>
|
||||||
|
<td>Serial Number</td>
|
||||||
|
<td style="padding-left: 20px;">{{serial_number}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Product Key</td>
|
||||||
|
<td style="padding-left: 20px;">
|
||||||
|
{% if product_key_skipped %}
|
||||||
|
{{product_key}}
|
||||||
|
{% else %}
|
||||||
|
<button id="show_product_key" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<span id="product_key" style="display: none;">{{product_key}}</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Device Type</td>
|
||||||
|
<td style="padding-left: 20px;">{{device_type}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Device RAM</td>
|
||||||
|
<td style="padding-left: 20px;">{{device_ram}} GB</td>
|
||||||
|
</tr>
|
||||||
|
<!--
|
||||||
|
<tr>
|
||||||
|
<td>Public IP</td>
|
||||||
|
<td style="padding-left: 20px;">
|
||||||
|
{{public_ip}}
|
||||||
|
{% if 'Failed to find' in public_ip %}
|
||||||
|
<a href="/settings/check-in" class="ui-button ui-widget ui-corner-all settings_button_small">Refresh</a>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
-->
|
||||||
|
<tr>
|
||||||
|
<td>Local IP</td>
|
||||||
|
<td style="padding-left: 20px;">{{local_ip}}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Status</div>
|
||||||
|
<table border="0">
|
||||||
|
<tr>
|
||||||
|
<td>Details</td>
|
||||||
|
<td style="padding-left: 20px;">
|
||||||
|
{% if is_netdata_enabled and is_bitcoin_synced %}
|
||||||
|
<a id="netdata" class="ui-button ui-widget ui-corner-all settings_button_small" href="#">Open Netdata</a>
|
||||||
|
{% endif %}
|
||||||
|
<a id="glances" class="ui-button ui-widget ui-corner-all settings_button_small" href="#">Open Glances</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Manage</td>
|
||||||
|
<td style="padding-left: 20px;">
|
||||||
|
<a id="linux_terminal" class="ui-button ui-widget ui-corner-all settings_button_small" href="#">Linux Terminal</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Disk Usage</td>
|
||||||
|
<td style="padding-left: 20px;">{{drive_usage}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>CPU</td>
|
||||||
|
<td style="padding-left: 20px;">{{cpu_usage}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>RAM</td>
|
||||||
|
<td style="padding-left: 20px;">{{ram_usage}}</td>
|
||||||
|
</tr>
|
||||||
|
{% if device_temp != '...' %}
|
||||||
|
<tr>
|
||||||
|
<td>Temperature</td>
|
||||||
|
<td style="padding-left: 20px;">{{device_temp}} °C</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
<tr>
|
||||||
|
<td>Uptime</td>
|
||||||
|
<td style="padding-left: 20px;">{{uptime}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Date</td>
|
||||||
|
<td style="padding-left: 20px;">{{date}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="settings_block">
|
||||||
|
<div class="settings_block_header">Service Status</div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">myNode Startup Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ startup_status_color }}"></div>
|
||||||
|
{{ startup_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_startup_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="startup_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{startup_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">QuickSync Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ quicksync_status_color }}"></div>
|
||||||
|
{{ quicksync_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_quicksync_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="quicksync_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{quicksync_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Tor Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ tor_status_color }}"></div>
|
||||||
|
{{ tor_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_tor_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="tor_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{tor_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Bitcoin Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ bitcoin_status_color }}"></div>
|
||||||
|
{{ bitcoin_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_bitcoin_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="bitcoin_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{bitcoin_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
{% if is_bitcoin_synced %}
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">LND Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ lnd_status_color }}"></div>
|
||||||
|
{{ lnd_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_lnd_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="lnd_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{lnd_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Electrum Server Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ electrs_status_color }}"></div>
|
||||||
|
{{ electrs_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_electrs_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="electrs_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{electrs_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">LNDHub Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ lndhub_status_color }}"></div>
|
||||||
|
{{ lndhub_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_lndhub_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="lndhub_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{lndhub_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">RTL Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ rtl_status_color }}"></div>
|
||||||
|
{{ rtl_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_rtl_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="rtl_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{rtl_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Docker Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ docker_status_color }}"></div>
|
||||||
|
{{ docker_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_docker_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="docker_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{docker_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Docker Image Build Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ docker_image_build_status_color }}"></div>
|
||||||
|
{{ docker_image_build_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_docker_image_build_status" class="ui-button ui-widget ui-corner-all settings_button_small">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">Dojo Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ dojo_status_color }}"></div>
|
||||||
|
{{ dojo_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_dojo_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="dojo_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{dojo_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">BTCPay Server 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_small">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 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_small">Show</button>
|
||||||
|
<div id="mempoolspace_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{mempoolspace_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
{% if is_netdata_enabled %}
|
||||||
|
<div class="settings_block_subheader">Netdata Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ netdata_status_color }}"></div>
|
||||||
|
{{ netdata_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_netdata_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="netdata_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{netdata_status_log}}</pre></div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="settings_block_subheader">Firewall Status</div>
|
||||||
|
<div class="settings_block_subheader_status">
|
||||||
|
<div class="settings_block_subheader_status_icon {{ firewall_status_color }}"></div>
|
||||||
|
{{ firewall_status }}
|
||||||
|
</div>
|
||||||
|
<button id="show_firewall_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show</button>
|
||||||
|
<div id="firewall_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{firewall_status_log}}</pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{% include 'includes/footer.html' %}
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user