Browse Source

Epoch + DAG Size info

master
yuriy0803 2 years ago
parent
commit
c3e08e1265
  1. 14
      www/app/controllers/index.js
  2. 23
      www/app/templates/index.hbs

14
www/app/controllers/index.js

@ -286,5 +286,19 @@ export default Ember.Controller.extend({
}; };
return a; return a;
} }
}),
dag: Ember.computed("stats", "model", {
get() {
var percent = (this.get("epoch") * 8192) / 1024 / 1024 + 1;
if (!percent) {
return 0;
}
return percent;
},
}),
epoch: Ember.computed("model.stats", {
get() {
return parseInt(this.get("applicationController.height") / 60000); /* etchash 60000 ethash 30000 */
},
}) })
}); });

23
www/app/templates/index.hbs

@ -16,20 +16,29 @@
</div> </div>
</div> </div>
<div class="col-md-3 stats"> <div class="col-md-3 stats">
<div><i class="fa fa-users"></i> Miners Online: <span id="poolHashrate">{{format-number stats.model.minersTotal}}</span></div> <div><i class="fa fa-users"></i> Miners Online: <span id="poolHashrate">{{format-number
<div><i class="fa fa-tachometer"></i> Pool Hash Rate: <span id="poolHashrate">{{format-hashrate stats.model.hashrate}}</span></div> stats.model.minersTotal}}</span></div>
<div><i class="fa fa-money"></i> Pool Fee: <span id="poolFee" class="label label-success">{{config.PoolFee}}</span></div> <div><i class="fa fa-tachometer"></i> Pool Hash Rate: <span id="poolHashrate">{{format-hashrate
stats.model.hashrate}}</span></div>
<div><i class="fa fa-money"></i> Pool Fee: <span id="poolFee"
class="label label-success">{{config.PoolFee}}</span></div>
{{#if stats.model.stats.lastBlockFound}} {{#if stats.model.stats.lastBlockFound}}
<div><i class="fa fa-clock-o"></i> Last Block Found: <span>{{format-relative (seconds-to-ms stats.model.stats.lastBlockFound)}}</span></div> <div><i class="fa fa-clock-o"></i> Last Block Found: <span>{{format-relative (seconds-to-ms
stats.model.stats.lastBlockFound)}}</span></div>
{{/if}} {{/if}}
<div><i class="fa fa-clock-o"></i> AVG BLOCK TIME: <span>{{format-number stats.blockTime}} s</span></div> <div><i class="fa fa-clock-o"></i> AVG BLOCK TIME: <span>{{format-number stats.blockTime}} s</span></div>
</div> </div>
<div><i class="fa fa-gears"></i>Epoch: <span>{{format-number epoch}}</span> DAG Size: <span>{{format-number
dag}} GB</span></div>
<div class="col-md-4 stats"> <div class="col-md-4 stats">
<div><i class="fa fa-unlock-alt"></i> Network Difficulty: <span>{{with-metric-prefix stats.difficulty}}</span></div> <div><i class="fa fa-unlock-alt"></i> Network Difficulty: <span>{{with-metric-prefix stats.difficulty}}</span>
</div>
<div><i class="fa fa-tachometer"></i> Network Hash Rate: <span>{{format-hashrate stats.hashrate}}</span></div> <div><i class="fa fa-tachometer"></i> Network Hash Rate: <span>{{format-hashrate stats.hashrate}}</span></div>
<div><i class="fa fa-bars"></i> Blockchain Height: <span>{{format-number stats.height}}</span></div> <div><i class="fa fa-bars"></i> Blockchain Height: <span>{{format-number stats.height}}</span></div>
<div><i class="fa fa-clock-o"></i> Current Round Variance: <span>{{format-number stats.roundVariance style='percent'}}</span></div> <div><i class="fa fa-clock-o"></i> Current Round Variance: <span>{{format-number stats.roundVariance
<div><i class="fa fa-credit-card-alt fa-fw"></i> Current price: <span>$ {{model.exchangedata.current_price}}</span></div> style='percent'}}</span></div>
<div><i class="fa fa-credit-card-alt fa-fw"></i> Current price: <span>$
{{model.exchangedata.current_price}}</span></div>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save