Switching computers.

This commit is contained in:
Perry Woodin 2016-07-27 09:16:06 -04:00
parent aea899750b
commit d08420321f
3 changed files with 46 additions and 1 deletions

View file

@ -9,6 +9,8 @@ name: Dash
url: https://www.dash.org url: https://www.dash.org
description: Digital Cash description: Digital Cash
api: http://localhost:9090
languages: ["en", "es"] languages: ["en", "es"]
exclude_from_localizations: ["assets"] exclude_from_localizations: ["assets"]

View file

@ -10,10 +10,53 @@ description: pages.currency.description
<h2>{% t pages.currency.markets-heading %}</h2> <h2>{% t pages.currency.markets-heading %}</h2>
<div id="exchanges"></div>
<h2>{% t pages.currency.governance-heading %}</h2> <h2>{% t pages.currency.governance-heading %}</h2>
<h2>{% t pages.currency.network-heading %}</h2> <h2>{% t pages.currency.network-heading %}</h2>
<div id="masternodes_count"></div>
<div id="masternodes_max"></div>
<h2>{% t pages.currency.blockchain-heading %}</h2> <h2>{% t pages.currency.blockchain-heading %}</h2>
</div> </div>
<script type="text/javascript">
$( document ).ready(function(){
// Get the exchange data
$.ajax({
url: "{{ site.api }}/exchange/",
error: function(jqXHR, textStatus, errorThrown) {
console.log(jqXHR);
console.log(textStatus);
console.log('errorThrown:');
}
})
.done(function(response){
console.log(response);
var exchanges = response;
// for( i = 0; i < exchanges.length ; i++ ){
// $("#exchanges").prepend('<div>Exchange line item</div>')
// }
});
// Get the current number of masternodes.
$.ajax({
url: "{{ site.api }}/masternodes/stats/"
})
.done(function(response){
console.log('masternode stats', response.stats);
var masternodes_count = response.stats['count'].toFixed(0).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
var masternodes_max = response.stats['max'].toFixed(0).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$("#masternodes_count").text(masternodes_count);
$("#masternodes_max").text(masternodes_max);
});
});
</script>