Browse Source

wallet settings debug log (wip)

master
pbca26 8 years ago
parent
commit
b310a60417
  1. 30
      assets/scripts/walletsettings.js
  2. 30
      index.html

30
assets/scripts/walletsettings.js

@ -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);
}
});
}

30
index.html

@ -1930,10 +1930,40 @@
</div>
<div class="panel">
<div class="panel-heading" id="DebugLog" role="tab">
<a class="panel-title collapsed" data-toggle="collapse" href="#DebugLogTab"
data-parent="#SettingsAccordion" aria-expanded="false"
aria-controls="DebugLogTab">
<i class="icon md-info" aria-hidden="true"></i>Debug Log
</a>
</div>
<div class="panel-collapse collapse" id="DebugLogTab" aria-labelledby="DebugLog"
role="tabpanel">
<div class="panel-body">
<p>This section allows you to read last N lines from debug log file.</i></b></p>
<div class="col-sm-12"></div>
<form class="wifkeys-import-form" method="post" action="javascript:;" autocomplete="off" onsubmit="return false;">
<div class="form-group form-material floating">
<input type="text" class="form-control" name="import_wifkey" id="import_wifkey">
<label class="floating-label" for="import_wifkey">Input Private Key</label>
</div>
<div class="col-sm-12 col-xs-12" style="text-align: center;">
<button type="submit" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="read_debug_log_btn" onclick="Settings_LoadDebugLog()">Load debug log</button>
</div>
</form>
<div class="col-sm-12" style="padding-top: 15px;">
<div class="row" id="wif-priv-keys" data-plugin="masonry">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Iguana Wallet Settings Box -->
</div>
</div>

Loading…
Cancel
Save