diff --git a/public/templates/bootstrap/dashboard/js/api.tpl b/public/templates/bootstrap/dashboard/js/api.tpl index d030403c..980d3d21 100644 --- a/public/templates/bootstrap/dashboard/js/api.tpl +++ b/public/templates/bootstrap/dashboard/js/api.tpl @@ -83,7 +83,11 @@ $(document).ready(function(){ $('#b-poolworkers').html(number_format(data.getdashboarddata.data.pool.workers)); $('#b-hashrate').html((number_format(data.getdashboarddata.data.personal.hashrate, 2))); $('#b-poolhashrate').html(number_format(data.getdashboarddata.data.pool.hashrate, 2)); - $('#b-nethashrate').html(number_format(data.getdashboarddata.data.network.hashrate, 2)); + if (data.getdashboarddata.data.network.hashrate > 0) { + $('#b-nethashrate').html(number_format(data.getdashboarddata.data.network.hashrate, 2)); + } else { + $('#b-nethashrate').html('n/a'); + } $('#b-sharerate').html((parseFloat(data.getdashboarddata.data.personal.sharerate).toFixed(2))); $('#b-yvalid').html(number_format(data.getdashboarddata.data.personal.shares.valid)); $('#b-yivalid').html(number_format(data.getdashboarddata.data.personal.shares.invalid)); @@ -100,8 +104,13 @@ $(document).ready(function(){ $('#b-pefficiency').html(number_format(0, 2) + "%"); } $('#b-diff').html(number_format(data.getdashboarddata.data.network.difficulty, 8)); - $('#b-nextdiff').html(number_format(data.getdashboarddata.data.network.nextdifficulty, 8)); - $('#b-nextdiffc').html(" Change in " + data.getdashboarddata.data.network.blocksuntildiffchange + " Blocks"); + if (data.getdashboarddata.data.network.hashrate > 0) { + $('#b-nextdiff').html(number_format(data.getdashboarddata.data.network.nextdifficulty, 8)); + $('#b-nextdiffc').html(" Change in " + data.getdashboarddata.data.network.blocksuntildiffchange + " Blocks"); + } else { + $('#b-nextdiff').html('n/a'); + $('#b-nextdiffc').html(' No Estimates'); + } var minutes = Math.floor(data.getdashboarddata.data.network.esttimeperblock / 60); var seconds = Math.floor(data.getdashboarddata.data.network.esttimeperblock - minutes * 60); $('#b-esttimeperblock').html(minutes + " minutes " + seconds + " seconds"); // <- this needs some nicer format diff --git a/public/templates/bootstrap/dashboard/overview/_with_price_graph.tpl b/public/templates/bootstrap/dashboard/overview/_with_price_graph.tpl index da9e95aa..7f2a6e44 100644 --- a/public/templates/bootstrap/dashboard/overview/_with_price_graph.tpl +++ b/public/templates/bootstrap/dashboard/overview/_with_price_graph.tpl @@ -78,7 +78,7 @@
Net Hashrate
Net Hashrate
{$NETWORK.EstNextDifficulty|number_format:"8"}
-Change in {$NETWORK.BlocksUntilDiffChange} Blocks
+{if $GLOBAL.nethashrate > 0}{$NETWORK.EstNextDifficulty|number_format:"8"}{else}n/a{/if}
+{if $GLOBAL.nethashrate > 0}Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}
Est Next Difficulty
diff --git a/public/templates/bootstrap/dashboard/round_statistics/pps/round.tpl b/public/templates/bootstrap/dashboard/round_statistics/pps/round.tpl index f95b63ac..4aa1f226 100644 --- a/public/templates/bootstrap/dashboard/round_statistics/pps/round.tpl +++ b/public/templates/bootstrap/dashboard/round_statistics/pps/round.tpl @@ -32,7 +32,7 @@{$GLOBAL.userdata.pps.unpaidshares}
+Unpaid Shares
{$NETWORK.EstNextDifficulty|number_format:"8"}
-Change in {$NETWORK.BlocksUntilDiffChange} Blocks
+{if $GLOBAL.nethashrate > 0}{$NETWORK.EstNextDifficulty|number_format:"8"}{else}n/a{/if}
+{if $GLOBAL.nethashrate > 0}Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}
Est Next Difficulty
{$NETWORK.EstNextDifficulty|number_format:"8"}
-Change in {$NETWORK.BlocksUntilDiffChange} Blocks
+{if $GLOBAL.nethashrate > 0}{$NETWORK.EstNextDifficulty|number_format:"8"}{else}n/a{/if}
+{if $GLOBAL.nethashrate > 0}Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}
Est Next Difficulty