[CLEANUP] Major structure overhaul for dashboard

This commit is contained in:
Sebastian Grewe 2014-03-11 09:32:28 +01:00
parent a54ba1ea99
commit fbf8036d72
18 changed files with 108 additions and 230 deletions

View File

@ -0,0 +1,15 @@
{if !$DISABLED_DASHBOARD and !$DISABLED_DASHBOARD_API}
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Worker</th>
<th>Hashrate</th>
<th>Difficulty</th>
</tr>
</thead>
<tbody id="b-workers">
<td colspan="3" class="text-center">No worker information available</td>
</tbody>
</tr>
</table>
{/if}

View File

@ -41,21 +41,8 @@
</tr>
</tbody>
</table>
{if !$DISABLED_DASHBOARD and !$DISABLED_DASHBOARD_API}
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Worker</th>
<th>Hashrate</th>
<th>Difficulty</th>
</tr>
</thead>
<tbody id="b-workers">
<td colspan="3" class="text-center">No worker information available</td>
</tbody>
</tr>
</table>
{/if}
{* Load our worker information template for live-updates on worker status *}
{include file="dashboard/account_data/_workers.tpl"}
</div>
</div>
</div>

View File

@ -1,12 +1,15 @@
{if $smarty.session.AUTHENTICATED|default}
<div class="row">
{include file="dashboard/overview.tpl"}
{include file="dashboard/round_stats.tpl"}
{include file="dashboard/account_data.tpl"}
{* Load our payout system so we can load some payout specific templates *}
{assign var=PAYOUT_SYSTEM value=$GLOBAL.config.payout_system}
{include file="dashboard/overview/default.tpl"}
{include file="dashboard/round_statistics/$PAYOUT_SYSTEM/default.tpl"}
{include file="dashboard/account_data/default.tpl"}
</div>
{* Include our JS libraries, we allow a live updating JS and a static one *}
{if !$DISABLED_DASHBOARD and !$DISABLED_DASHBOARD_API}
{include file="dashboard/js_api.tpl"}
{include file="dashboard/js/api.tpl"}
{else}
{include file="dashboard/js_static.tpl"}
{include file="dashboard/js/static.tpl"}
{/if}
{/if}

View File

@ -1,15 +0,0 @@
<tr>
<td colspan="4" class="text-center"><b>Network Info</b></td>
</tr>
<tr>
<td><b>Difficulty</b></td>
<td id="b-diff" class="text-left">{$NETWORK.difficulty|number_format:"8"}</td>
<td><b>Est Next Difficulty</b></td>
<td id="b-nextdiff" class="text-left">{$NETWORK.EstNextDifficulty|number_format:"8"} (Change in {$NETWORK.BlocksUntilDiffChange} Blocks)</td>
</tr>
<tr>
<td><b>Est. Avg. Time per Block</b></td>
<td id="b-esttimeperblock" class="text-left">{$NETWORK.EstTimePerBlock|seconds_to_words}</td>
<td><b>Current Block</b></td>
<td id="b-nblock" class="text-left">{$NETWORK.block}</td>
</tr>

View File

@ -5,10 +5,11 @@
</div>
<div class="panel-body text-center">
<div class="row show-grid">
{* Depending on the price option we need to load a different template so it aligns properly *}
{if $GLOBAL.config.price.enabled}
{include file="dashboard/overview_price.tpl"}
{include file="dashboard/overview/_with_price_graph.tpl"}
{else}
{include file="dashboard/overview_no_price.tpl"}
{include file="dashboard/overview/_without_price_graph.tpl"}
{/if}
</div>
</div>

View File

@ -1,36 +0,0 @@
<tr>
<td colspan="4" class="text-center"><b>{$GLOBAL.config.currency} Estimates</b></td>
</tr>
{if $GLOBAL.config.payout_system != 'pps'}
<tr>
<td><b>Block</b></td>
<td id="b-block" class="text-left">{$GLOBAL.userdata.estimates.block|number_format:"8"}</td>
<td><b>Fees</b></td>
<td id="b-fee" class="text-left">{$GLOBAL.userdata.estimates.fee|number_format:"8"}</td>
</tr>
<tr>
<td><b>Donation</b></td>
<td id="b-donation" class="text-left">{$GLOBAL.userdata.estimates.donation|number_format:"8"}</td>
<td><b>Payout<b/></td>
<td id="b-payout" class="text-left">{$GLOBAL.userdata.estimates.payout|number_format:"8"}</td>
</tr>
{else}
<tr>
<td>in 1 hour</td>
<td id="b-est1hour" class="text-right">{$GLOBAL.userdata.estimates.hours1|number_format:"8"}</td>
<td>in 24 hours</td>
<td id="b-est24hours" class="text-right">{($GLOBAL.userdata.estimates.hours24)|number_format:"8"}</td>
</tr>
<tr>
<td>in 7 days</td>
<td id="b-est7days" class="text-right">{($GLOBAL.userdata.estimates.days7)|number_format:"8"}</td>
<td>in 14 days</td>
<td id="b-est14days" class="text-right">{($GLOBAL.userdata.estimates.days14)|number_format:"8"}</td>
</tr>
<!--
<tr>
<td>in 30 days</td>
<td id="b-est30days" class="text-right">{($GLOBAL.userdata.estimates.days30)|number_format:"8"}</td>
</tr>
!-->
{/if}

View File

@ -1,19 +0,0 @@
<tr>
<td colspan="4" class="text-center"><b>Round Shares</b></td>
</tr>
<tr>
<td colspan="1"><b>Est. Shares</b></td>
<td colspan="3" id="b-target" class="text-left">{$ESTIMATES.shares|number_format} (done: {$ESTIMATES.percent}%)</td>
</tr>
<tr>
<td><b>Pool Valid</b></td>
<td id="b-pvalid" class="text-left">{$GLOBAL.roundshares.valid|number_format}</td>
<td><b>Your Valid</b></td>
<td id="b-yvalid" class="text-left">{$GLOBAL.userdata.shares.valid|number_format}</td>
</tr>
<tr>
<td><b>Pool Invalid</b></td>
<td id="b-pivalid" class="text-left">{$GLOBAL.roundshares.invalid|number_format} {if $GLOBAL.roundshares.valid > 0}({($GLOBAL.roundshares.invalid / ($GLOBAL.roundshares.valid + $GLOBAL.roundshares.invalid) * 100)|number_format:"2"}%){else}(0.00%){/if}</td></td>
<td><b>Your Invalid</b></td>
<td id="b-yivalid" class="text-left">{$GLOBAL.userdata.shares.invalid|number_format} {if $GLOBAL.userdata.shares.valid > 0}({($GLOBAL.userdata.shares.invalid / ($GLOBAL.userdata.shares.valid + $GLOBAL.userdata.shares.invalid) * 100)|number_format:"2"}%){else}(0.00%){/if}</td>
</tr>

View File

@ -0,0 +1,26 @@
<table class="table borderless m-b-none text-small">
<thead>
<tr>
<th><h4><i class="fa fa-cloud fa-fw"></i> Round Shares</h4></th>
<th><h4><i class="fa fa-thumbs-up fa-hw"></i> Valid</h4></th>
<th><h4><i class="fa fa-thumbs-down fa-hw"></i> Invalid</h4></th>
<th><h4><i class="fa fa-dot-circle-o fa-hw"></i> Efficiency</h4></th>
</tr>
<tr>
<th><h4><i class="fa fa-user fa-fw"></i> My Shares</h4></td>
<th><h4 id="b-yvalid">{$GLOBAL.userdata.shares.valid|number_format}</h4></th>
<th><h4 id="b-yivalid">{$GLOBAL.userdata.shares.invalid|number_format}</h4></th>
<th>
<h4 id="b-yefficiency">{if $GLOBAL.userdata.shares.valid > 0}{(100 - ($GLOBAL.userdata.shares.invalid / ($GLOBAL.userdata.shares.valid + $GLOBAL.userdata.shares.invalid) * 100))|number_format:"2"}%{else}0.00%{/if}</h4>
</th>
</tr>
<tr>
<th><h4><i class="fa fa-users fa-fw"></i> Pool Shares</h4></th>
<th><h4 id="b-pvalid">{$GLOBAL.roundshares.valid|number_format}</h4></th>
<th><h4 id="b-pivalid">{$GLOBAL.roundshares.invalid|number_format}</h4></th>
<th>
<h4 id="b-pefficiency">{if $GLOBAL.roundshares.valid > 0}{(100 - ($GLOBAL.roundshares.invalid / ($GLOBAL.roundshares.valid + $GLOBAL.roundshares.invalid) * 100))|number_format:"2"}%{else}0.00%{/if}<h4>
</th>
</tr>
</thead>
</table>

View File

@ -0,0 +1,19 @@
<div class="panel-footer">
<div class="row text-center">
<div class="col-xs-4 b-r">
<i class="fa fa-map-marker fa-2x"></i>
<p id="b-diff" class="h4 font-bold m-t">{$NETWORK.difficulty|number_format:"8"}</p>
<p class="text-muted">Difficulty</p>
</div>
<div class="col-xs-4 b-r">
<i class="fa fa-sitemap fa-2x"></i>
<p id="b-nextdiff" class="h4 font-bold m-t">{$NETWORK.EstNextDifficulty|number_format:"8"} (Change in {$NETWORK.BlocksUntilDiffChange} Blocks)</p>
<p class="text-muted">Est Next Difficulty</p>
</div>
<div class="col-xs-4 b-r">
<i class="fa fa-clock-o fa-2x"></i>
<p id="b-esttimeperblock" class="h4 font-bold m-t">{$NETWORK.EstTimePerBlock|seconds_to_words}</p>
<p class="text-muted">Est. Avg. Time per Block</p>
</div>
</div>
</div>

View File

@ -0,0 +1,19 @@
<div class="panel-footer">
<div class="row text-center">
<div class="col-xs-4 b-r">
<i class="fa fa-th-large fa-2x"></i>
<p id="b-nblock" class="h4 font-bold m-t">{$NETWORK.block}</p>
<p class="text-muted">Current Block</p>
</div>
<div class="col-xs-4 b-r">
<i class="fa fa-bar-chart-o fa-flip-horizontal fa-2x"></i>
<p id="b-roundprogress" class="h4 font-bold m-t">{$ESTIMATES.percent|number_format:"2"}%</p>
<p class="text-muted">Of Expected Shares</p>
</div>
<div class="col-xs-4 b-r">
<i class="fa fa-money fa-2x"></i>
<p id="b-payout" class="h4 font-bold m-t">{$GLOBAL.userdata.estimates.payout|number_format:"8"}</p>
<p class="text-muted">{$GLOBAL.config.currency} Estimated Earnings</p>
</div>
</div>
</div>

View File

@ -0,0 +1,16 @@
<div class="col-lg-8">
<div class="panel panel-info">
<div class="panel-heading">
<h4 class="panel-title">
<i class="fa fa-align-left fa-fw"></i> Round statistics
</h4>
</div>
{assign var=PAYOUT_SYSTEM value=$GLOBAL.config.payout_system}
{include file="dashboard/round_statistics/$PAYOUT_SYSTEM/_header.tpl"}
{include file="dashboard/round_statistics/$PAYOUT_SYSTEM/_content.tpl"}
{include file="dashboard/round_statistics/$PAYOUT_SYSTEM/_footer.tpl"}
<div class="panel-footer">
Refresh interval: {$GLOBAL.config.statistics_ajax_refresh_interval|default:"10"} seconds.
</div>
</div>
</div>

View File

@ -1,76 +0,0 @@
<div class="col-lg-8">
<div class="panel panel-info">
<div class="panel-heading">
<h4 class="panel-title">
<i class="fa fa-align-left fa-fw"></i> Round statistics
</h4>
</div>
<div class="panel-footer">
<div class="row text-center">
<div class="col-xs-4 b-r">
<i class="fa fa-th-large fa-2x"></i>
<p id="b-nblock" class="h4 font-bold m-t">{$NETWORK.block}</p>
<p class="text-muted">Current Block</p>
</div>
<div class="col-xs-4 b-r">
<i class="fa fa-bar-chart-o fa-flip-horizontal fa-2x"></i>
<p id="b-roundprogress" class="h4 font-bold m-t">{$ESTIMATES.percent|number_format:"2"}%</p>
<p class="text-muted">Of Expected Shares</p>
</div>
<div class="col-xs-4 b-r">
<i class="fa fa-money fa-2x"></i>
<p id="b-payout" class="h4 font-bold m-t">{$GLOBAL.userdata.estimates.payout|number_format:"8"}</p>
<p class="text-muted">{$GLOBAL.config.currency} Estimated Earnings</p>
</div>
</div>
</div>
<table class="table borderless m-b-none text-small">
<thead>
<tr>
<th><h4><i class="fa fa-cloud fa-fw"></i> Round Shares</h4></th>
<th><h4><i class="fa fa-thumbs-up fa-hw"></i> Valid</h4></th>
<th><h4><i class="fa fa-thumbs-down fa-hw"></i> Invalid</h4></th>
<th><h4><i class="fa fa-dot-circle-o fa-hw"></i> Efficiency</h4></th>
</tr>
<tr>
<th><h4><i class="fa fa-user fa-fw"></i> My Shares</h4></td>
<th><h4 id="b-yvalid">{$GLOBAL.userdata.shares.valid|number_format}</h4></th>
<th><h4 id="b-yivalid">{$GLOBAL.userdata.shares.invalid|number_format}</h4></th>
<th>
<h4 id="b-yefficiency">{if $GLOBAL.userdata.shares.valid > 0}{(100 - ($GLOBAL.userdata.shares.invalid / ($GLOBAL.userdata.shares.valid + $GLOBAL.userdata.shares.invalid) * 100))|number_format:"2"}%{else}0.00%{/if}</h4>
</th>
</tr>
<tr>
<th><h4><i class="fa fa-users fa-fw"></i> Pool Shares</h4></th>
<th><h4 id="b-pvalid">{$GLOBAL.roundshares.valid|number_format}</h4></th>
<th><h4 id="b-pivalid">{$GLOBAL.roundshares.invalid|number_format}</h4></th>
<th>
<h4 id="b-pefficiency">{if $GLOBAL.roundshares.valid > 0}{(100 - ($GLOBAL.roundshares.invalid / ($GLOBAL.roundshares.valid + $GLOBAL.roundshares.invalid) * 100))|number_format:"2"}%{else}0.00%{/if}<h4>
</th>
</tr>
</thead>
</table>
<div class="panel-footer">
<div class="row text-center">
<div class="col-xs-4 b-r">
<i class="fa fa-map-marker fa-2x"></i>
<p id="b-diff" class="h4 font-bold m-t">{$NETWORK.difficulty|number_format:"8"}</p>
<p class="text-muted">Difficulty</p>
</div>
<div class="col-xs-4 b-r">
<i class="fa fa-sitemap fa-2x"></i>
<p id="b-nextdiff" class="h4 font-bold m-t">{$NETWORK.EstNextDifficulty|number_format:"8"} (Change in {$NETWORK.BlocksUntilDiffChange} Blocks)</p>
<p class="text-muted">Est Next Difficulty</p>
</div>
<div class="col-xs-4 b-r">
<i class="fa fa-clock-o fa-2x"></i>
<p id="b-esttimeperblock" class="h4 font-bold m-t">{$NETWORK.EstTimePerBlock|seconds_to_words}</p>
<p class="text-muted">Est. Avg. Time per Block</p>
</div>
</div>
</div>
<div class="panel-footer">
Refresh interval: {$GLOBAL.config.statistics_ajax_refresh_interval|default:"10"} seconds.
</div>
</div>
</div>

View File

@ -1,39 +0,0 @@
<div class="col-lg-8">
<div class="panel panel-info">
<div class="panel-heading">
<h4 class="panel-title"><i class="fa fa-refresh fa-fw"></i> Round Statistics</h4>
</div>
<div class="panel-body no-padding">
<table class="table table-bordered table-hover table-striped">
<tbody>
{if $GLOBAL.config.payout_system == 'pplns'}
<tr>
<td><b>PPLNS Target</b></td>
<td id="b-pplns" class="text-left" colspan="4">{$GLOBAL.pplns.target}</td>
</tr>
{elseif $GLOBAL.config.payout_system == 'pps'}
<tr>
<td><b>Unpaid Shares</b></td>
<td id="b-ppsunpaid">{$GLOBAL.userdata.pps.unpaidshares}</td>
</tr>
<tr>
<td><b>Baseline PPS Rate</b></td>
<td>{$GLOBAL.ppsvalue|number_format:"12"} {$GLOBAL.config.currency}</td>
</tr>
<tr>
<td><b>Pools PPS Rate</b></td>
<td>{$GLOBAL.poolppsvalue|number_format:"12"} {$GLOBAL.config.currency}</td>
</tr>
<tr>
<td><b>PPS Difficulty</b></td>
<td id="b-ppsdiff">{$GLOBAL.userdata.sharedifficulty|number_format:"2"}</td>
</tr>
{/if}
{include file="dashboard/round_shares.tpl"}
{include file="dashboard/payout_estimates.tpl"}
{include file="dashboard/network_info.tpl"}
</tbody>
</table>
</div>
</div>
</div>

View File

@ -1,23 +0,0 @@
<div class="col-lg-4">
<div class="panel panel-info">
<div class="panel-heading">
<h3>Active Worker Information</h3>
</div>
<div class="panel-body no-padding">
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th>Worker</th>
<th>Hashrate</th>
<th>Difficulty</th>
</tr>
</thead>
<tbody id="b-workers">
<tr>
<td colspan="3">Loading worker information</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>