Browse Source

Merge pull request #47 from pbca26/master

added debug log tab in wallet settings
master
Satinder Grewal 8 years ago
committed by GitHub
parent
commit
946d702982
  1. 33
      assets/scripts/walletsettings.js
  2. 67
      index.html

33
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,30 @@ function Settings_AddCoinPeers() {
}
});
}
function Settings_LoadDebugLog() {
var settings_selected_targed_val = $("option:selected","#settings_select_debuglog_options").val();
var numLinesToRead = $('#read_debug_log_lines').val();
var ajax_data = { 'herdname': settings_selected_targed_val, 'lastLines': numLinesToRead };
$.ajax({
type: 'POST',
data: ajax_data,
url: 'http://127.0.0.1:17777/shepherd/debuglog',
//dataType: 'text',
success: function(data, textStatus, jqXHR) {
$('#read_debug_log_textarea').text(JSON.parse(data).result.replace('\n', '<br/>'));
console.log(data);
},
error: function(xhr, textStatus, error) {
console.log('failed getting debug.log');
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
Iguana_ServiceUnavailable();
}
console.log(textStatus);
console.log(error);
$('#read_debug_log_textarea').text(error);
}
});
}

67
index.html

@ -204,7 +204,7 @@
<!--<button type="button" class="btn btn-info btn-lg btn-block waves-effect waves-light" data-target="#AddCoinDilogModel" data-toggle="modal">Activate Coin</button>-->
</div>
<!-- START ADD COIN DIV -->
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
@ -732,7 +732,7 @@
<button type="button" class="btn btn-dark waves-effect waves-light" data-edexcoinmenu="COIN" id="btn_edexcoin_dashboard" style="display: none;"><i class="icon md-view-dashboard" aria-hidden="true"></i> Dashboard</button>
<button type="button" class="btn btn-primary waves-effect waves-light" data-edexcoinmenu="COIN" id="btn_edexcoin_send"><i class="icon fa-send" aria-hidden="true"></i> Send</button>
<button type="button" class="btn btn-info waves-effect waves-light" data-edexcoinmenu="COIN" id="btn_edexcoin_recieve"><i class="icon fa-inbox" aria-hidden="true"></i> Receive</button>
<!--<button type="button" id="edexcoin_wallet_menu" class="btn btn-floating btn-primary btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="icon md-plus" aria-hidden="true"></i></button>
<ul class="dropdown-menu animate dropdown-menu-right" aria-labelledby="edexcoin_wallet_menu" role="menu" style="">
<li role="presentation"><a href="javascript:void(0)" role="menuitem" data-edexcoinmenu="COIN" id="btn_edexcoin_dashboard">Dashboard</a></li>
@ -781,7 +781,7 @@
</div>
<!-- End EasyDEX Total Balance Widget -->
</div>
<div class="col-lg-4 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_interest" style="display: none;">
<!-- EasyDEX Interest Balance Widget-->
<div class="widget widget-shadow" id="widgetLineareaOne">
@ -829,7 +829,7 @@
<!-- Panel FixedHeader -->
<div class="panel">
<header class="panel-heading" style="z-index: 10">
<div class="panel-actions">
<a href="javascript:void(0)" class="dropdown-toggle white btn-xs btn-info btn_refresh_edexcoin_dashboard" data-edexcoin="COIN" aria-expanded="false" role="button"><i class="icon fa-refresh margin-right-10" aria-hidden="true"></i> Refresh</a>
<div class="dropdown">
@ -837,11 +837,11 @@
aria-expanded="false" role="button" style="display: none;"><i class="icon fa-magic margin-right-10" aria-hidden="true"></i> Basilisk Actions <span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="btn_edexcoin_basilisk"
role="menu">
<li role="presentation"><a href="javascript:void(0)" class="btn_edexcoin_dashboard_getnotaries" data-edexcoin="COIN" id="btn_edexcoin_dashboard_getnotaries" role="menuitem"><i class="icon fa-sitemap" aria-hidden="true"></i> Get Notary Nodes List</a></li>
<li role="presentation"><a href="javascript:void(0)" class="btn_edexcoin_dashboard_refresh_basilisk_conn" data-edexcoin="COIN" id="btn_edexcoin_dashboard_refresh_basilisk_conn" role="menuitem"><i class="icon wb-refresh" aria-hidden="true"></i> Refresh Basilisk Connections</a></li>
<li data-edexcoin="COIN" role="presentation"><a href="javascript:void(0)" class="btn_edexcoin_dashboard_register" data-edexcoin="COIN" id="btn_edexcoin_dashboard_register" role="menuitem"><i class="icon fa-sign-in" aria-hidden="true"></i> Register All Wallet Address</a></li>
<!--<li data-edexcoin="COIN" role="presentation"><a href="javascript:void(0)" class="btn_edexcoin_dashboard_validate" data-edexcoin="COIN" id="btn_edexcoin_dashboard_validate" role="menuitem"><i class="icon fa-check" aria-hidden="true"></i> Validate Address on Network</a></li>-->
@ -849,7 +849,7 @@
</div>
</div>
<h4 class="panel-title">Transactions History<!--<br><span class="label label-default font-size-10 margin-left-0"></span>--></h4>
</header>
<div class="panel-body">
@ -955,13 +955,13 @@
</div>
<div class="col-lg-12">
<button type="submit" class="btn btn-primary waves-effect waves-light pull-right">Send <span data-edexcoin="COIN"></span></button>
</div>
</div>
</div>
</form>
</div>
</div>
@ -1022,7 +1022,7 @@
</div>
<!-- End EasyDEX Panel send -->
<div data-edexcoin="COIN" id="edexcoin_recieve" style="display: none;">
@ -1150,7 +1150,7 @@
</div>
<!-- END DASHBOARD CONTENT BODY -->
@ -1160,7 +1160,7 @@
<!-- End Page -->
<!-- Footer -->
<!--<footer class="site-footer" id="edex-footer" data-edexcoin="COIN">
</footer>-->
<!-- BEGIN EASYDEX CONTENT BODY -->
@ -1705,7 +1705,7 @@
<div class="page-content" id="section-iguana-wallet-settings">
<div class="row" id="iguana-wallet-settings" data-plugin="masonry">
<div class="col-xlg-12 col-md-12">
<!-- Iguana Wallet Settings Box -->
<div class="row" id="iguana-wallet-settings" data-plugin="masonry">
<div class="col-xlg-12 col-md-12">
@ -1930,7 +1930,48 @@
</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="read-debug-log-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="read_debug_log_lines" id="read_debug_log_lines" value="10">
<label class="floating-label" for="read_debug_log_lines">Input number of lines to read</label>
</div>
<div class="form-group form-material floating">
<select class="form-control form-material" id="settings_select_debuglog_options">
<option value="iguana">Iguana</option>
<option value="komodo">Komodo</option>
</select>
<label class="floating-label" for="settings_select_debuglog_options">Target</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>
<div class="col-sm-12 col-xs-12" style="text-align: center;">
<br/>
<textarea id="read_debug_log_textarea" style="width:100%;height:200px"></textarea>
</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>

Loading…
Cancel
Save