4790764e2c
-Restructured the settings.json.template and settings.js files with better groupings -Added better comments for improved explanations of all settings -Better handling of page length options on all datatables; Page length options are now configurable and also only display options based on limits set by certain items_per_page and max_items_per_query settings -Markets have been extended to support unlimited trading pairs for each exchange -Added coin_symbol and pair_symbol to the markets schema to support multiple trading pairs -Added a burned field to the richlist schema for tracking burned coin addresses -Added a locale string for the new richlist wealth distribution "Top 1-100 Total" table row -Updated a couple locale strings that were incomplete or needed fixing (api_getblockhash and api_getnextrewardwhenstr) -Added a new css class to remove some redundant inline styles for the richlist wealth distribution color boxes -Richlist page now allows better separation of the top list(s) and the wealth distribution table and chart (you can now hide or show sections as desired) -Richlist page now allows for better burned coin support (Hide burned coin addresses from lists and totals even when the burned coin amounts are still included in the total coin supply value) -Block page now only displays the raw block link if the api_page.public_apis.rpc.getblock.enabled settings is set to true -Transaction page now only displays the raw tx link if the api_page.public_apis.rpc.getrawtransaction.enabled setting is set to true -Rate limiting class has been made global and is now used to limit market requests -getnetworkhashps rpc call now returns a '-' if shared_pages.show_hashrate is not set to true -Searching for unsycned blocks/txs no longer saves the data locally but instead still shows the data on screen. This helps prevent syncing data out-of-order (This eliminates the need for db_index.pid which has been removed) -Coin supply is now always taken from the stats collection database instead of from the wallet via rpc command in all cases except when syncing -Lots of misc fixes and code cleanup changes -List of changed settings: -title -> shared_pages.page_title -coin -> coin.name -symbol -> coin.symbol -logo -> shared_pages.logo -headerlogo -> shared_pages.page_header.home_link_logo -favicon -> shared_pages.favicon -homelink -> shared_pages.page_header.home_link -logoheight -> shared_pages.page_header.home_link_logo_height -sticky_header -> shared_pages.page_header.sticky_header -sticky_footer -> shared_pages.page_footer.sticky_footer -footer_height_desktop -> shared_pages.page_footer.footer_height_desktop -footer_height_tablet -> shared_pages.page_footer.footer_height_tablet -footer_height_mobile -> shared_pages.page_footer.footer_height_mobile -social_link_percent_height_desktop -> shared_pages.page_footer.social_link_percent_height_desktop -social_link_percent_height_tablet -> shared_pages.page_footer.social_link_percent_height_tablet -social_link_percent_height_mobile -> shared_pages.page_footer.social_link_percent_height_mobile -theme -> shared_pages.theme -port -> webserver.port -update_timeout -> sync.update_timeout -check_timeout -> sync.check_timeout -block_parallel_tasks -> sync.block_parallel_tasks -use_rpc -> api_cmds.use_rpc -confirmations -> shared_pages.confirmations -display.api -> api_page.enabled -display.markets -> markets_page.enabled -display.richlist -> richlist_page.enabled -display.search -> shared_pages.page_header.show_search -display.movement -> movement_page.enabled -display.network -> network_page.enabled -display.masternodes -> masternodes_page.enabled -display.claim_address -> claim_address_page.enabled -display.claim_address_header_menu -> claim_address_page.show_header_menu -display.page_header_bgcolor -> shared_pages.page_header.bgcolor -display.page_footer_bgcolor -> shared_pages.page_footer.bgcolor -display.table_header_bgcolor -> shared_pages.table_header_bgcolor -display.networkpnl -> shared_pages.page_header.panels.network_panel.display_order -display.difficultypnl -> shared_pages.page_header.panels.difficulty_panel.display_order -display.masternodespnl -> shared_pages.page_header.panels.masternodes_panel.display_order -display.coinsupplypnl -> shared_pages.page_header.panels.coin_supply_panel.display_order -display.pricepnl -> shared_pages.page_header.panels.price_panel.display_order -display.marketcappnl -> shared_pages.page_header.panels.market_cap_panel.display_order -display.logopnl -> shared_pages.page_header.panels.logo_panel.display_order -index.show_last_updated -> index_page.show_last_updated -index.show_hashrate -> shared_pages.show_hashrate -index.difficulty -> shared_pages.difficulty -index.last_txs -> api_page.public_apis.ext.getlasttxs.max_items_per_query -index.txs_per_page -> index_page.transaction_table.items_per_page (for index page) AND movement_page.movement_table.items_per_page (for movement page) -reward_page.show_last_updated -> blockchain_specific.heavycoin.reward_page.show_last_updated -api.blockindex -> api_page.sample_data.blockindex -api.blockhash -> api_page.sample_data.blockhash -api.txhash -> api_page.sample_data.txhash -api.address -> api_page.sample_data.address -markets.exchange -> markets_page.default_exchange.trading_pair -markets.default -> markets_page.default_exchange.exchange_name -markets.market_dropdown_menu -> markets_page.show_market_dropdown_menu -markets.market_select_visible -> markets_page.show_market_select -richlist.distribution -> richlist_page.wealth_distribution.show_distribution_chart -richlist.received -> richlist_page.show_received_coins -richlist.balance -> richlist_page.show_current_balance -movement.min_amount -> movement_page.movement_table.min_amount -movement.low_flag -> movement_page.movement_table.low_warning_flag -movement.high_flag -> movement_page.movement_table.high_warning_flag -social_links -> shared_pages.page_footer.social_links -social_links[x].image_url -> shared_pages.page_footer.social_links[x].image_path -genesis_tx -> transaction_page.genesis_tx -genesis_block -> block_page.genesis_block -heavy -> blockchain_specific.heavycoin.enabled -save_stats_after_sync_blocks -> sync.save_stats_after_sync_blocks -txcount -> api_page.public_apis.ext.getaddresstxs.max_items_per_query -txcount_per_page -> address_page.history_table.items_per_page -show_sent_received -> address_page.show_sent_received -supply -> sync.supply -nethash -> shared_pages.page_header.panels.network_panel.nethash -nethash_units -> shared_pages.page_header.panels.network_panel.nethash_units -usecors -> webserver.cors.enabled -corsorigin -> webserver.cors.corsorigin -burned_coins -> richlist_page.burned_coins.addresses -public_api.rpc.getdifficulty -> api_page.public_apis.rpc.getdifficulty.enabled -public_api.rpc.getconnectioncount -> api_page.public_apis.rpc.getconnectioncount.enabled -public_api.rpc.getblockcount -> api_page.public_apis.rpc.getblockcount.enabled -public_api.rpc.getblockhash -> api_page.public_apis.rpc.getblockhash.enabled -public_api.rpc.getblock -> api_page.public_apis.rpc.getblock.enabled -public_api.rpc.getrawtransaction -> api_page.public_apis.rpc.getrawtransaction.enabled -public_api.rpc.getnetworkhashps -> api_page.public_apis.rpc.getnetworkhashps.enabled -public_api.rpc.getvotelist -> api_page.public_apis.rpc.getvotelist.enabled -public_api.rpc.getmasternodecount -> api_page.public_apis.rpc.getmasternodecount.enabled -public_api.rpc.getmaxmoney -> blockchain_specific.heavycoin.public_apis.getmaxmoney.enabled -public_api.rpc.getmaxvote -> blockchain_specific.heavycoin.public_apis.getmaxvote.enabled -public_api.rpc.getvote -> blockchain_specific.heavycoin.public_apis.getvote.enabled -public_api.rpc.getphase -> blockchain_specific.heavycoin.public_apis.getphase.enabled -public_api.rpc.getreward -> blockchain_specific.heavycoin.public_apis.getreward.enabled -public_api.rpc.getsupply -> blockchain_specific.heavycoin.public_apis.getsupply.enabled -public_api.rpc.getnextrewardestimate -> blockchain_specific.heavycoin.public_apis.getnextrewardestimate.enabled -public_api.rpc.getnextrewardwhenstr -> blockchain_specific.heavycoin.public_apis.getnextrewardwhenstr.enabled -public_api.ext.getmoneysupply -> api_page.public_apis.ext.getmoneysupply.enabled -public_api.ext.getdistribution -> api_page.public_apis.ext.getdistribution.enabled -public_api.ext.getaddress -> api_page.public_apis.ext.getaddress.enabled -public_api.ext.getaddresstxs -> api_page.public_apis.ext.getaddresstxs.enabled -public_api.ext.gettx -> api_page.public_apis.ext.gettx.enabled -public_api.ext.getbalance -> api_page.public_apis.ext.getbalance.enabled -public_api.ext.getlasttxs -> api_page.public_apis.ext.getlasttxs.enabled -public_api.ext.getcurrentprice -> api_page.public_apis.ext.getcurrentprice.enabled -public_api.ext.getbasicstats -> api_page.public_apis.ext.getbasicstats.enabled -public_api.ext.getsummary -> api_page.public_apis.ext.getsummary.enabled -public_api.ext.getnetworkpeers -> api_page.public_apis.ext.getnetworkpeers.enabled -public_api.ext.getmasternodelist -> api_page.public_apis.ext.getmasternodelist.enabled -public_api.ext.getmasternoderewards -> api_page.public_apis.ext.getmasternoderewards.enabled -public_api.ext.getmasternoderewardstotal -> api_page.public_apis.ext.getmasternoderewardstotal.enabled -api_cmds.heavies.getmaxmoney -> blockchain_specific.heavycoin.api_cmds.getmaxmoney -api_cmds.heavies.getmaxvote -> blockchain_specific.heavycoin.api_cmds.getmaxvote -api_cmds.heavies.getvote -> blockchain_specific.heavycoin.api_cmds.getvote -api_cmds.heavies.getphase -> blockchain_specific.heavycoin.api_cmds.getphase -api_cmds.heavies.getreward -> blockchain_specific.heavycoin.api_cmds.getreward -api_cmds.heavies.getnextrewardestimate -> blockchain_specific.heavycoin.api_cmds.getnextrewardestimate -api_cmds.heavies.getnextrewardwhenstr -> blockchain_specific.heavycoin.api_cmds.getnextrewardwhenstr -api_cmds.heavies.getsupply -> blockchain_specific.heavycoin.api_cmds.getsupply -List of new settings: -shared_pages.page_header.panels.network_panel.enabled: allow enabling/disabling of the network panel -shared_pages.page_header.panels.difficulty_panel.enabled: allow enabling/disabling of the difficulty panel -shared_pages.page_header.panels.masternodes_panel.enabled: allow enabling/disabling of the masternodes panel -shared_pages.page_header.panels.coin_supply_panel.enabled: allow enabling/disabling of the coin supply panel -shared_pages.page_header.panels.price_panel.enabled: allow enabling/disabling of the price panel -shared_pages.page_header.panels.market_cap_panel.enabled: allow enabling/disabling of the market cap panel -shared_pages.page_header.panels.logo_panel.enabled: allow enabling/disabling of the logo panel -index_page.transaction_table.page_length_options: specify the page length options that determine how many items/records to display in the table at any given time -index_page.transaction_table.reload_table_seconds: the time in seconds to automatically reload the table data from the server -address_page.history_table.page_length_options: specify the page length options that determine how many items/records to display in the table at any given time -masternodes_page.masternode_table.page_length_options: specify the page length options that determine how many items/records to display in the table at any given time -masternodes_page.masternode_table.items_per_page: the default amount of items/records to display in the table at any given time -movement_page.movement_table.page_length_options: specify the page length options that determine how many items/records to display in the table at any given time -movement_page.movement_table.reload_table_seconds: the time in seconds to automatically reload the table data from the server -network_page.connections_table.page_length_options: specify the page length options that determine how many items/records to display in the table at any given time -network_page.connections_table.items_per_page: the default amount of items/records to display in the table at any given time -network_page.addnodes_table.page_length_options: specify the page length options that determine how many items/records to display in the table at any given time -network_page.addnodes_table.items_per_page: the default amount of items/records to display in the table at any given time -network_page.onetry_table.page_length_options: specify the page length options that determine how many items/records to display in the table at any given time -network_page.onetry_table.items_per_page: the default amount of items/records to display in the table at any given time -richlist_page.wealth_distribution.show_distribution_table: show/hide the wealth distribution summary table -richlist_page.wealth_distribution.colors: a list of html color codes to represent the top 100 groupings in the wealth distribution table and pie chart -richlist_page.burned_coins.include_burned_coins_in_distribution: determine whether to include burned coins in the wealth distribution section or not -markets_page.exchanges.altmarkets.enabled: enable/disable the altmarkets exchange -markets_page.exchanges.altmarkets.trading_pairs: a list of market trading pair symbols -markets_page.exchanges.bittrex.enabled: enable/disable the bittrex exchange -markets_page.exchanges.bittrex.trading_pairs: a list of market trading pair symbols -markets_page.exchanges.bleutrade.enabled: enable/disable the bleutrade exchange -markets_page.exchanges.bleutrade.trading_pairs: a list of market trading pair symbols -markets_page.exchanges.crex.enabled: enable/disable the crex exchange -markets_page.exchanges.crex.trading_pairs: a list of market trading pair symbols -markets_page.exchanges.poloniex.enabled: enable/disable the poloniex exchange -markets_page.exchanges.poloniex.trading_pairs: a list of market trading pair symbols -markets_page.exchanges.stex.enabled: enable/disable the stex exchange -markets_page.exchanges.stex.trading_pairs: a list of market trading pair symbols -markets_page.exchanges.yobit.enabled: enable/disable the yobit exchange -markets_page.exchanges.yobit.trading_pairs: a list of market trading pair symbols -claim_address_page.enable_bad_word_filter: enable/disable the "bad word" filter for claimed addresses, so that trying to claim an address with a bad word will fail -sync.show_sync_msg_when_syncing_more_than_blocks: show the sync msg at the top of all pages during index syncronization if there are more than this many blocks to process -labels[x].enabled: allow enabling/disabling of specific wallet address labels -blockchain_specific.heavycoin.reward_page.enabled: enable/disable the reward page -blockchain_specific.zksnarks.enabled: enable/disable Zcash zk-SNARKs private transaction support (WIP - 90% complete) -List of deleted settings -address: unnecessary setting has been replaced by dynamic values via http request -markets.coin: replaced by a richer set of settings that allow choosing the coin for each market -markets.enabled -> replaced by a richer set of settings that allow enabling/disabling each market specifically -lock_during_index: no longer possible to save unsynced blocks/txs via search so this settings is now obsolete/unused
439 lines
25 KiB
Plaintext
439 lines
25 KiB
Plaintext
doctype html
|
|
html(lang='en')
|
|
head
|
|
meta(charset='UTF-8')
|
|
meta(name='viewport' content='width=device-width, initial-scale=1')
|
|
meta(http-equiv='Content-Language', content='en')
|
|
title=settings.shared_pages.page_title
|
|
link(rel='stylesheet', href='/css/themes/' + settings.shared_pages.theme + '/bootstrap.min.css')
|
|
link(rel='stylesheet', href='//use.fontawesome.com/releases/v5.15.1/css/all.css')
|
|
if active == 'markets' || active == 'richlist'
|
|
link(rel='stylesheet', href='/css/jquery.jqplot.min.css')
|
|
if active == 'network'
|
|
link(rel='stylesheet', href='/css/flag-icon.min.css')
|
|
link(rel='stylesheet', type='text/css', href='//cdn.datatables.net/v/bs4/dt-1.10.22/datatables.min.css')
|
|
link(rel='stylesheet', href='/css/style.min.css')
|
|
script(type='text/javascript', src='//cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js', integrity='sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==', crossorigin='anonymous')
|
|
script(type='text/javascript', src='//cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js', integrity='sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx', crossorigin='anonymous')
|
|
if active == 'markets' || active == 'richlist'
|
|
script(type='text/javascript', src='/js/jquery.jqplot.min.js')
|
|
if active == 'markets'
|
|
script(type='text/javascript', src='/js/jqplot.dateAxisRenderer.min.js')
|
|
script(type='text/javascript', src='/js/jqplot.ohlcRenderer.min.js')
|
|
script(type='text/javascript', src='/js/jqplot.highlighter.min.js')
|
|
if active == 'richlist'
|
|
script(type='text/javascript', src='/js/jqplot.pieRenderer.min.js')
|
|
script(type='text/javascript', src='//cdn.datatables.net/v/bs4/dt-1.10.22/datatables.min.js')
|
|
if active == 'reward'
|
|
script(type='text/javascript', src='/js/Chart.min.js')
|
|
script.
|
|
/* Special thanks to the stackoverflow community for the getParameterByName function: https://stackoverflow.com/a/901144/3038650 */
|
|
function getParameterByName(name, url = window.location.href) {
|
|
name = name.replace(/[\[\]]/g, '\\$&');
|
|
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
|
|
results = regex.exec(url);
|
|
if (!results) return null;
|
|
if (!results[2]) return '';
|
|
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
}
|
|
function fixFooterHeightAndPosition() {
|
|
var screenWidth = $(window).width();
|
|
|
|
if (screenWidth <= 575) {
|
|
// Mobile
|
|
$('#footer-container').css('height', '!{settings.shared_pages.page_footer.footer_height_mobile}');
|
|
} else if (screenWidth >= 576 && screenWidth <= 991) {
|
|
// Tablet
|
|
$('#footer-container').css('height', '!{settings.shared_pages.page_footer.footer_height_tablet}');
|
|
} else {
|
|
// Desktop
|
|
$('#footer-container').css('height', '!{settings.shared_pages.page_footer.footer_height_desktop}');
|
|
}
|
|
|
|
if (!#{settings.shared_pages.page_footer.sticky_footer}) {
|
|
// Wait a tick before fixing footer position to give time for elements to be rendered
|
|
var nonStickyFooterSetIntervalID = setInterval(function() {
|
|
// Stop setInterval from running again
|
|
clearInterval(nonStickyFooterSetIntervalID);
|
|
// Ensure footer is shown at the bottom of the viewport
|
|
var offset = (window.innerHeight - $('#footer-container').position().top - $('#footer-container').outerHeight());
|
|
$('#footer-container').css('margin-top', (offset > 0 ? offset : '10') + 'px');
|
|
}, 1, "tmrFixFooter");
|
|
} else {
|
|
// Add spacing to the bottom of the body for the sticky footer
|
|
$('body').css('margin-bottom', ($('#footer-container').outerHeight() + 10) + 'px');
|
|
}
|
|
|
|
fixSocialLinkFontSize();
|
|
}
|
|
function fixSocialLinkFontSize() {
|
|
var fontSize = $('#footer-container').height() * (getSocialLinkHeight() / 100);
|
|
$('#footer-container .social-link').css('font-size', fontSize);
|
|
$('#footer-container .social-link > img').css('width', fontSize + 'px').css('height', fontSize + 'px');
|
|
}
|
|
function getSocialLinkHeight() {
|
|
var retVal = 70;
|
|
var screenWidth = $(window).width();
|
|
|
|
if (screenWidth <= 575) {
|
|
// Mobile
|
|
retVal = !{settings.shared_pages.page_footer.social_link_percent_height_mobile};
|
|
} else if (screenWidth >= 576 && screenWidth <= 991) {
|
|
// Tablet
|
|
retVal = !{settings.shared_pages.page_footer.social_link_percent_height_tablet};
|
|
} else {
|
|
// Desktop
|
|
retVal = !{settings.shared_pages.page_footer.social_link_percent_height_desktop};
|
|
}
|
|
|
|
return retVal;
|
|
}
|
|
function enableTooltips() {
|
|
if ($().tooltip) {
|
|
// Enable tooltips only if browser supports them
|
|
$('[data-toggle="tooltip"]').tooltip();
|
|
}
|
|
}
|
|
function fixDataTableColumns() {
|
|
// Wait 2 ticks before adjusting table columns to give time for elements to be rendered (1 tick doesn't seem to be enough for some tables)
|
|
var ColumnAdjustSetIntervalID = setInterval(function() {
|
|
// Stop setInterval from running again
|
|
clearInterval(ColumnAdjustSetIntervalID);
|
|
// Ensure columns are properly aligned
|
|
$($.fn.dataTable.tables(true)).DataTable().columns.adjust();
|
|
}, 2, 'adjustTableColumns');
|
|
}
|
|
$(document).ready(function() {
|
|
if ('#{active}' != '')
|
|
$('##{active}').addClass('active');
|
|
function showTopPanelData(dataElement, loadingElement) {
|
|
if ($('#' + loadingElement).length) {
|
|
$('#' + loadingElement).fadeOut('slow', function() {
|
|
$('#' + loadingElement).remove();
|
|
$('#' + dataElement).fadeIn();
|
|
});
|
|
}
|
|
}
|
|
function update_stats() {
|
|
$.ajax({url: '/ext/getsummary', headers: {Accept: 'application/json, text/javascript, */*; q=0.01'}, success: function(json) {
|
|
if (json.masternodeCountOnline == null)
|
|
json.masternodeCountOnline = '-';
|
|
if (json.masternodeCountOffline == null)
|
|
json.masternodeCountOffline = '-';
|
|
|
|
var mnOnlineText = json.masternodeCountOnline+" node"+(json.masternodeCountOnline == 1 ? "" : "s")+" online";
|
|
var mnOfflineText = json.masternodeCountOffline+" unreachable node"+(json.masternodeCountOffline == 1 ? "" : "s");
|
|
|
|
$("#masternodeCountOnline").text(json.masternodeCountOnline).prop("alt", mnOnlineText).prop("title", mnOnlineText).attr("data-original-title", mnOnlineText);
|
|
$("#masternodeCountOffline").text(json.masternodeCountOffline).prop("alt", mnOfflineText).prop("title", mnOfflineText).attr("data-original-title", mnOfflineText);
|
|
$("#spnMasternodeCountOnline").prop("alt", mnOnlineText).prop("title", mnOnlineText).attr("data-original-title", mnOnlineText);
|
|
$("#spnMasternodeCountOffline").prop("alt", mnOfflineText).prop("title", mnOfflineText).attr("data-original-title", mnOfflineText);
|
|
showTopPanelData('masternodepanel', 'masternodePanelLoading');
|
|
|
|
var supplyString = json.supply;
|
|
var diffString = json.difficulty;
|
|
var hashrateString = json.hashrate;
|
|
var splitValue, splitParts;
|
|
|
|
if (!isNaN(json.difficulty))
|
|
diffString = Number(json.difficulty).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
|
if (!isNaN(json.supply))
|
|
supplyString = parseInt(parseFloat(json.supply).toFixed(0)).toLocaleString('en');
|
|
if (!isNaN(json.hashrate))
|
|
hashrateString = Number(json.hashrate).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
|
|
|
$("#supply").text(supplyString);
|
|
splitValue = Number(parseFloat(json.lastPrice).toFixed(8) * parseInt(parseFloat(json.supply).toFixed(0))).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
|
splitParts = splitValue.split('.');
|
|
showTopPanelData('supplypanel', 'supplyPanelLoading');
|
|
|
|
$("#marketCap").html(splitParts[0] + '.<span class="decimal">' + splitParts[1] + '</span>');
|
|
showTopPanelData('marketCapPanel', 'marketCapPanelLoading');
|
|
|
|
splitParts = diffString.split('.');
|
|
$("#difficulty").html(splitParts[0] + '.<span class="decimal">' + splitParts[1] + '</span>');
|
|
|
|
if (json.difficultyHybrid == null || json.difficultyHybrid == '')
|
|
$("#difficultyHybrid").html('-');
|
|
else {
|
|
splitParts = json.difficultyHybrid.split('.');
|
|
$("#difficultyHybrid").html(splitParts[0] + '.<span class="decimal">' + splitParts[1] + '</span>');
|
|
}
|
|
|
|
showTopPanelData('difficultypanel', 'difficultyPanelLoading');
|
|
|
|
if (hashrateString == null || hashrateString == '' || hashrateString == '-')
|
|
$("#hashrate").html('-');
|
|
else {
|
|
splitParts = hashrateString.split('.');
|
|
$("#hashrate").html(splitParts[0] + '.<span class="decimal">' + splitParts[1] + '</span>');
|
|
}
|
|
showTopPanelData('hashratepanel', 'hashratePanelLoading');
|
|
|
|
splitValue = Number(json.lastPrice).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
|
splitParts = splitValue.split('.');
|
|
$("#lastPrice").html(splitParts[0] + '.<span class="decimal">' + splitParts[1] + '</span>');
|
|
showTopPanelData('pricepanel', 'pricePanelLoading');
|
|
|
|
$("#lblConnections").text(json.connections + ' connections');
|
|
$("#lblBlockcount").text(json.blockcount + ' blocks');
|
|
}});
|
|
}
|
|
$('.iquidus').css('color',$('.table').css('color'));
|
|
$(window).resize(function () {
|
|
fixDataTableColumns();
|
|
fixFooterHeightAndPosition();
|
|
});
|
|
setInterval(function() {
|
|
update_stats();
|
|
}, 60000);
|
|
update_stats();
|
|
function getNetworkPanel() {
|
|
var networkSuffix='';
|
|
switch ('#{settings.shared_pages.page_header.panels.network_panel.nethash_units}') {
|
|
case "K":
|
|
networkSuffix='(KH/s)';
|
|
break;
|
|
case "M":
|
|
networkSuffix='(MH/s)';
|
|
break;
|
|
case "G":
|
|
networkSuffix='(GH/s)';
|
|
break;
|
|
case "T":
|
|
networkSuffix='(TH/s)';
|
|
break;
|
|
case "P":
|
|
networkSuffix='(PH/s)';
|
|
break;
|
|
case "H":
|
|
networkSuffix='(H/s)';
|
|
break;
|
|
}
|
|
var hashRateType='<label id="hashrate"></label>';
|
|
return '<div class="card-header"><strong>#{settings.locale.network} <span class="small">'+networkSuffix+'</span></strong></div><div class="card-body"><div id="hashratePanelLoading" class="header-panel"><i class="fa fa-spinner fa-pulse"></i></div><div id="hashratepanel" class="header-panel" style="display:none;"><span class="fa fa-cogs"></span>'+hashRateType+'</div></div>';
|
|
}
|
|
function getDifficultyPanel() {
|
|
var difficultyType='<label id="difficulty"></label>';
|
|
if ('#{settings.shared_pages.difficulty}' == 'Hybrid') difficultyType+='<br /><span class="fas fa-sliders-h"></span><label id="difficultyHybrid"></label>';
|
|
return '<div class="card-header"><strong>#{settings.locale.difficulty}</strong></div><div class="card-body"><div id="difficultyPanelLoading" class="header-panel"><i class="fa fa-spinner fa-pulse"></i></div><div id="difficultypanel" class="header-panel" style="display:none;"><span class="fas fa-sliders-h"></span>'+difficultyType+'</div></div>';
|
|
}
|
|
function getMasternodesPanel() {
|
|
return '<div class="card-header"><strong>#{settings.locale.masternodecount}</strong></div><div class="card-body"><div id="masternodePanelLoading" class="header-panel"><i class="fa fa-spinner fa-pulse"></i></div><div id="masternodepanel" class="header-panel" style="display:none;"><span id="spnMasternodeCountOnline" class="fa fa-check-circle" data-toggle="tooltip" data-placement="top"></span><label id="masternodeCountOnline" data-toggle="tooltip" data-placement="top"></label><label> / </label><label id="masternodeCountOffline" data-toggle="tooltip" data-placement="top"></label><span id="spnMasternodeCountOffline" class="fa fa-exclamation-triangle" data-toggle="tooltip" data-placement="top"></span></div></div>';
|
|
}
|
|
function getCoinSupplyPanel() {
|
|
var supplyType='<label id="supply"></label>';
|
|
return '<div class="card-header"><strong>#{settings.locale.ex_supply} <span class="small">(#{settings.coin.symbol})</span></strong></div><div class="card-body"><div id="supplyPanelLoading" class="header-panel"><i class="fa fa-spinner fa-pulse"></i></div><div id="supplypanel" class="header-panel" style="display:none;"><span class="fa fa-chart-pie"></span>'+supplyType+'</div></div>';
|
|
}
|
|
function getPricePanel() {
|
|
var priceType='<label id="lastPrice">-</label>';
|
|
return '<div class="card-header"><strong>Price <span class="small">(#{settings.markets_page.default_exchange.trading_pair.split('/')[1]})</span></strong></div><div class="card-body"><div id="pricePanelLoading" class="header-panel"><i class="fa fa-spinner fa-pulse"></i></div><div id="pricepanel" class="header-panel" style="display:none;"><span class="fa fa-rocket"></span>'+priceType+'</div></div>';
|
|
}
|
|
function getMarketCapPanel() {
|
|
return '<div class="card-header"><strong>Market Cap <span class="small">(#{settings.markets_page.default_exchange.trading_pair.split('/')[1]})</span></strong></div><div class="card-body"><div id="marketCapPanelLoading" class="header-panel"><i class="fa fa-spinner fa-pulse"></i></div><div id="marketCapPanel" class="header-panel" style="display:none;"><span class="fas fa-chart-line"></span><label id="marketCap"></label></div></div>';
|
|
}
|
|
function getLogoPanel() {
|
|
return '<img src="#{settings.shared_pages.logo}" style="margin-top:-15px;height:128px;" alt="#{settings.coin.name} Logo" title="#{settings.coin.name} Logo" />';
|
|
}
|
|
function getActivePanel(panelName) {
|
|
var sReturn='';
|
|
switch (panelName) {
|
|
case "network_panel":
|
|
sReturn=getNetworkPanel();
|
|
break;
|
|
case "difficulty_panel":
|
|
sReturn=getDifficultyPanel();
|
|
break;
|
|
case "masternodes_panel":
|
|
sReturn=getMasternodesPanel();
|
|
break;
|
|
case "coin_supply_panel":
|
|
sReturn=getCoinSupplyPanel();
|
|
break;
|
|
case "price_panel":
|
|
sReturn=getPricePanel();
|
|
break;
|
|
case "market_cap_panel":
|
|
sReturn=getMarketCapPanel();
|
|
break;
|
|
case "logo_panel":
|
|
sReturn=getLogoPanel();
|
|
break;
|
|
}
|
|
return sReturn;
|
|
}
|
|
function hideShowPanel(panelID, panelName) {
|
|
var oPanel = document.getElementById(panelName);
|
|
if (typeof(oPanel) != 'undefined' && oPanel != null) {
|
|
document.getElementById(panelName).innerHTML=getActivePanel(panelID);
|
|
|
|
if (panelID == 'logo_panel') {
|
|
// Remove css classes from logo panel
|
|
$(oPanel).removeClass();
|
|
}
|
|
}
|
|
}
|
|
$(document).on('click', 'button.close', function (e) {
|
|
e.preventDefault();
|
|
fixFooterHeightAndPosition();
|
|
});
|
|
hideShowPanel('#{settings.panel1}', 'pnlOne');
|
|
hideShowPanel('#{settings.panel2}', 'pnlTwo');
|
|
hideShowPanel('#{settings.panel3}', 'pnlThree');
|
|
hideShowPanel('#{settings.panel4}', 'pnlFour');
|
|
hideShowPanel('#{settings.panel5}', 'pnlFive');
|
|
fixFooterHeightAndPosition();
|
|
enableTooltips();
|
|
});
|
|
body
|
|
- var navbarClasses = ['nav','navbar','navbar-expand-lg'];
|
|
- var footerClasses = ['nav','navbar','navbar-default','d-none','d-md-flex','d-flex','footer'];
|
|
if settings.shared_pages.page_header.sticky_header == true
|
|
- navbarClasses.push('fixed-top');
|
|
if settings.shared_pages.page_footer.sticky_footer == true
|
|
- footerClasses.push('fixed-bottom');
|
|
if settings.shared_pages.page_header.bgcolor != null && settings.shared_pages.page_header.bgcolor != ''
|
|
- navbarClasses.push('bg-' + settings.shared_pages.page_header.bgcolor);
|
|
if settings.shared_pages.page_header.bgcolor.toString().toLowerCase() == 'dark' || settings.shared_pages.page_header.bgcolor.toString().toLowerCase() == 'light'
|
|
- navbarClasses.push('navbar-' + settings.shared_pages.page_header.bgcolor);
|
|
else
|
|
- navbarClasses.push('bg-primary');
|
|
- navbarClasses.push('navbar-dark');
|
|
if settings.shared_pages.page_footer.bgcolor != null && settings.shared_pages.page_footer.bgcolor != ''
|
|
- footerClasses.push('bg-' + settings.shared_pages.page_footer.bgcolor);
|
|
if settings.shared_pages.page_footer.bgcolor.toString().toLowerCase() == 'dark' || settings.shared_pages.page_footer.bgcolor.toString().toLowerCase() == 'light'
|
|
- footerClasses.push('navbar-' + settings.shared_pages.page_footer.bgcolor);
|
|
else
|
|
- footerClasses.push('bg-primary');
|
|
- footerClasses.push('navbar-dark');
|
|
div(class=navbarClasses, role='navigation', style=settings.shared_pages.page_header.home_link == 'logo' ? 'padding-left:0;' : '')
|
|
.navbar-header
|
|
button.navbar-toggler(type='button', data-toggle='collapse', data-target='#navbar-collapse')
|
|
span.navbar-toggler-icon
|
|
if settings.shared_pages.page_header.home_link == 'title'
|
|
a.navbar-brand(href='/', style='order:-1;') #{settings.shared_pages.page_title}
|
|
else if settings.shared_pages.page_header.home_link == 'coin'
|
|
a.navbar-brand(href='/', style='order:-1;') #{settings.coin.name}
|
|
else if settings.shared_pages.page_header.home_link == 'logo'
|
|
a(href='/', alt=settings.coin.name + ' Home', title=settings.coin.name + ' Home', style='order:-1;', data-toggle='tooltip', data-placement='bottom')
|
|
img.logo-main(src=(settings.shared_pages.page_header.home_link_logo == null || settings.shared_pages.page_header.home_link_logo == '' ? settings.shared_pages.logo : settings.shared_pages.page_header.home_link_logo), style='margin:0;max-height:' + settings.shared_pages.page_header.home_link_logo_height + 'px;')
|
|
.collapse.navbar-collapse(id='navbar-collapse')
|
|
ul.navbar-nav.mr-auto
|
|
li#home
|
|
a.nav-link(href='/')
|
|
span.fa.fa-search
|
|
span.margin-left-5 #{settings.locale.menu_explorer}
|
|
if settings.blockchain_specific.heavycoin.enabled == true && settings.blockchain_specific.heavycoin.reward_page.enabled == true
|
|
li#reward
|
|
a.nav-link(href='/reward')
|
|
span.fa.fa-star
|
|
span.margin-left-5 #{settings.locale.menu_reward}
|
|
if settings.masternodes_page.enabled == true
|
|
li#masternodes
|
|
a.nav-link(href='/masternodes')
|
|
span.fa.fa-share-alt
|
|
span.margin-left-5 Masternodes
|
|
if settings.movement_page.enabled == true
|
|
li#movement
|
|
a.nav-link.loading(href='/movement')
|
|
span.far.fa-money-bill-alt
|
|
span.margin-left-5 #{settings.locale.menu_movement}
|
|
if settings.network_page.enabled == true
|
|
li#network
|
|
a.nav-link(href='/network')
|
|
span.fas.fa-network-wired
|
|
span.margin-left-5 #{settings.locale.menu_network}
|
|
if settings.richlist_page.enabled == true
|
|
li#richlist
|
|
a.nav-link(href='/richlist')
|
|
span.fab.fa-btc
|
|
span.margin-left-5 #{settings.locale.menu_richlist}
|
|
if settings.markets_page.enabled == true
|
|
if settings.markets_page.show_market_dropdown_menu == true && settings.market_count > 1
|
|
li#markets.dropdown
|
|
a.nav-link.dropdown-toggle(data-toggle='dropdown', href='#' role='button' aria-haspopup='true' aria-expanded='false')
|
|
span.fas.fa-chart-line
|
|
span.margin-left-5 #{settings.locale.menu_markets}
|
|
div.dropdown-menu
|
|
each mkt in settings.market_data
|
|
if mkt != null && mkt.id != null
|
|
each pair in mkt.trading_pairs
|
|
a.dropdown-item.loading(href='/markets/' + mkt.id + '/' + pair)
|
|
if mkt.logo != null && mkt.logo != ''
|
|
img.market-logo(src='data:image/png;base64,' + mkt.logo, title=mkt.name + ' (' + pair + ')', alt=mkt.name + ' (' + pair + ')')
|
|
else
|
|
i.market-logo.fas.fa-question-circle
|
|
span #{mkt.name}
|
|
span.small (#{pair})
|
|
else
|
|
li#markets
|
|
a.nav-link.loading(href='/markets/' + settings.markets_page.default_exchange.exchange_name + '/' + settings.markets_page.default_exchange.trading_pair)
|
|
span.fas.fa-chart-line
|
|
span.margin-left-5 #{settings.locale.menu_markets}
|
|
if settings.api_page.enabled == true
|
|
li#info
|
|
a.nav-link(href='/info')
|
|
span.fa.fa-info-circle
|
|
span.margin-left-5 #{settings.locale.menu_api}
|
|
if settings.claim_address_page.show_header_menu == true && settings.claim_address_page.enabled == true
|
|
li#claim-address
|
|
a.nav-link.loading(href='/claim')
|
|
span.far.fa-address-card
|
|
span.margin-left-5 #{settings.locale.menu_claim_address}
|
|
div#body-container(style='margin-top:' + (settings.shared_pages.page_header.sticky_header == true ? '80px;' : '20px'))
|
|
if showSync != null && showSync == true
|
|
.col-lg-12
|
|
.alert.alert-warning
|
|
.cardSpacer
|
|
span.fas.fa-exclamation-triangle(style='margin-right:5px')
|
|
strong #{settings.locale.ex_warning}
|
|
div #{settings.locale.initial_index_alert}
|
|
.col-lg-12
|
|
.row.text-center.d-flex.justify-content-center
|
|
div(class="col-lg-2 col-lg-offset-" + settings.paneloffset)
|
|
- if(settings.panel1 != '') {
|
|
.card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlOne')
|
|
- }
|
|
- if(settings.panel2 != '') {
|
|
.col-lg-2
|
|
.card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlTwo')
|
|
- }
|
|
- if(settings.panel3 != '') {
|
|
.col-lg-2
|
|
.card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlThree')
|
|
- }
|
|
- if(settings.panel4 != '') {
|
|
.col-lg-2
|
|
.card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlFour')
|
|
- }
|
|
- if(settings.panel5 != '') {
|
|
.col-lg-2
|
|
.card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlFive')
|
|
- }
|
|
if settings.shared_pages.page_header.show_search == true
|
|
div#search-row.row.text-center
|
|
form.form-inline.col-12.d-flex.justify-content-center(method='post', action='/search')
|
|
#index-search.form-group.d-flex.justify-content-center
|
|
input.form-control(type='text', name='search', placeholder=settings.locale.ex_search_message, style='min-width:80%;margin-right:5px;')
|
|
button.btn.btn-success(type='submit') #{settings.locale.ex_search_button}
|
|
block content
|
|
div#footer-container(class=footerClasses, role='navigation')
|
|
.col-4.navbar-nav
|
|
ul.nav.justify-content-left
|
|
each social in settings.shared_pages.page_footer.social_links
|
|
if social.enabled
|
|
li.float-left
|
|
a.nav-link.social-link.border-0(href=social.url, target='_blank', alt=settings.coin.name + ' ' + social.tooltip_text, title=settings.coin.name + ' ' + social.tooltip_text, data-toggle='tooltip', data-placement='top')
|
|
if social.fontawesome_class != null && social.fontawesome_class != ''
|
|
span(class='vertical-align-middle ' + social.fontawesome_class)
|
|
else
|
|
img(class='vertical-align-middle', src=social.image_path)
|
|
.col-4.navbar-nav
|
|
ul.nav.justify-content-center
|
|
li.text-center
|
|
p
|
|
a.nav-link.poweredby.border-0(href='https://github.com/team-exor/eiquidus', target='_blank') eIquidus Explorer v#{settings.explorer_version}
|
|
.col-4.navbar-nav
|
|
ui.nav.justify-content-end
|
|
label#lblBlockcount.badge.badge-secondary.nav-link.border-0.float-right
|
|
label#lblConnections.badge.badge-secondary.nav-link.border-0.float-right |