mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-14 01:19:16 +00:00
Add Bitcoin debug log on settings page
This commit is contained in:
parent
31902b4437
commit
a8f9e44973
|
@ -138,12 +138,20 @@ def page_settings():
|
|||
local_ip = get_local_ip()
|
||||
public_ip = get_public_ip()
|
||||
|
||||
# Get QuickSync Status
|
||||
quicksync_status = ""
|
||||
try:
|
||||
quicksync_status = subprocess.check_output(["mynode-get-quicksync-status"])
|
||||
except:
|
||||
quicksync_status = "ERROR"
|
||||
|
||||
# Get Bitcoin Status
|
||||
bitcoin_status = ""
|
||||
try:
|
||||
bitcoin_status = subprocess.check_output(["tail","-n","200","/mnt/hdd/mynode/bitcoin/debug.log"])
|
||||
except:
|
||||
bitcoin_status = "ERROR"
|
||||
|
||||
templateData = {
|
||||
"title": "myNode Settings",
|
||||
"password_message": "",
|
||||
|
@ -156,6 +164,7 @@ def page_settings():
|
|||
"product_key_error": pk_error,
|
||||
"changelog": changelog,
|
||||
"quicksync_status": quicksync_status,
|
||||
"bitcoin_status": bitcoin_status,
|
||||
"is_quicksync_disabled": not is_quicksync_enabled(),
|
||||
"is_uploader_device": is_uploader(),
|
||||
"uptime": uptime,
|
||||
|
|
|
@ -186,6 +186,11 @@
|
|||
$("#quicksync_status").show();
|
||||
});
|
||||
|
||||
$("#show_bitcoin_status").on("click", function() {
|
||||
$("#show_bitcoin_status").hide(0);
|
||||
$("#bitcoin_status").show();
|
||||
});
|
||||
|
||||
$("#show_mynode_changelog").on("click", function() {
|
||||
if (showChangelog)
|
||||
{
|
||||
|
@ -309,10 +314,14 @@
|
|||
</form>
|
||||
<div class="divider"></div>
|
||||
|
||||
|
||||
<div class="settings_block_subheader">QuickSync Status</div>
|
||||
<button id="show_quicksync_status" class="ui-button ui-widget ui-corner-all settings_button">Show</button>
|
||||
<div id="quicksync_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{quicksync_status}}</pre></div>
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="settings_block_subheader">Bitcoin Status</div>
|
||||
<button id="show_bitcoin_status" class="ui-button ui-widget ui-corner-all settings_button">Show</button>
|
||||
<div id="bitcoin_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{bitcoin_status}}</pre></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user