From b310a604176e7e59361f83d567bab577fdec84ba Mon Sep 17 00:00:00 2001 From: pbca26 Date: Fri, 17 Feb 2017 10:01:50 +0300 Subject: [PATCH] wallet settings debug log (wip) --- assets/scripts/walletsettings.js | 36 ++++++++++++++++++-- index.html | 56 ++++++++++++++++++++++++-------- 2 files changed, 76 insertions(+), 16 deletions(-) diff --git a/assets/scripts/walletsettings.js b/assets/scripts/walletsettings.js index 42e350a..7f35867 100644 --- a/assets/scripts/walletsettings.js +++ b/assets/scripts/walletsettings.js @@ -21,7 +21,7 @@ var WalletSettings = function() { console.log("wait till peer ip added to selected coin...") var Getwifkeys_passphrase = $("#wifkeys_passphrase").val(); - + var WifKeyDivContent = ''; //First check which coins are active. Execute API for each mode of wallet @@ -189,7 +189,7 @@ jQuery(document).ready(function() { // DOM Ready ============================================================= $(document).ready(function() { - + }); // Functions ============================================================= @@ -223,7 +223,7 @@ function Settings_ShowCoinPeers() { success: function(data, textStatus, jqXHR) { var getCoinPeers = JSON.parse(data); console.log(getCoinPeers); - + if (getCoinPeers.supernet[0].peers !== undefined ) { var supernet_peers_list = getCoinPeers.supernet[0].peers; if (supernet_peers_list != 0 ) { @@ -292,3 +292,33 @@ function Settings_AddCoinPeers() { } }); } + +function Settings_LoadDebugLog() { + console.log("wait till peer ip added to selected coin...") + var settings_selected_coinname_code_val = $("option:selected","#settings_select_coin_addpeer_options").val(); + var settings_add_peer_ip_val = $("#settings_add_peer_ip").val(); + var ajax_data = { 'herdname': 'iguana', 'lastLines': 5 }; + $.ajax({ + type: 'POST', + data: JSON.stringify(ajax_data), + url: 'http://127.0.0.1:17777/shepherd/debuglog', + //dataType: 'text', + success: function(data, textStatus, jqXHR) { + //var getAddCoinPeers = JSON.parse(data); + console.log(data); + /*if ( getAddCoinPeers.result == 'addnode submitted' ) { + toastr.success(settings_add_peer_ip_val + " added to " + settings_selected_coinname_code_val + " Successfully", "Coin Notification"); + $("#settings_add_peer_ip").val(''); + }*/ + }, + error: function(xhr, textStatus, error) { + console.log('failed getting.'); + console.log(xhr.statusText); + if ( xhr.readyState == 0 ) { + Iguana_ServiceUnavailable(); + } + console.log(textStatus); + console.log(error); + } + }); +} \ No newline at end of file diff --git a/index.html b/index.html index de6db25..563b2a6 100755 --- a/index.html +++ b/index.html @@ -204,7 +204,7 @@ - + @@ -732,7 +732,7 @@ - + - + - + @@ -1022,7 +1022,7 @@ - + - + @@ -1160,7 +1160,7 @@ @@ -1705,7 +1705,7 @@
- +
@@ -1930,7 +1930,37 @@
+
+ +
+
+

This section allows you to read last N lines from debug log file.

+
+
+
+ + +
+
+ +
+
+ +
+
+
+
+
+
+