Skip to content

Commit

Permalink
Replace definition lists with tables
Browse files Browse the repository at this point in the history
  • Loading branch information
selaux committed May 10, 2014
1 parent baced3b commit 900274a
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 64 deletions.
8 changes: 3 additions & 5 deletions frontend/stylesheets/style.styl
Expand Up @@ -20,7 +20,7 @@ dt
.graph-element
position: relative
.graph
height: 120px
height: 149px
margin-bottom: 20px
strong
position: absolute
Expand Down Expand Up @@ -59,11 +59,9 @@ dt
margin-bottom: 15px
td
&:nth-child(1)
width: 20%
&:nth-child(2)
width: 10%
&:nth-child(3)
width: 30%
&:nth-child(2)
width: 35%
.revenue
.value
@extend .graph-element
Expand Down
1 change: 0 additions & 1 deletion lib/views/mixins/renderHistoricalDataGraph.js
Expand Up @@ -34,7 +34,6 @@ module.exports = function (attributes, element, graphOptions, hoverOptions) {

this.graph = new Rickshaw.Graph(_.extend({
element: this.$(element)[0],
height: 120,
renderer: 'area',
interpolation: 'linear',
stroke: true,
Expand Down
14 changes: 7 additions & 7 deletions templates/market.hbs
@@ -1,16 +1,16 @@
<header class="panel-heading">
<h2 class="panel-title">{{ title }}</h2>
</header>
<div class="panel-body">
<div class="panel-body row">
<div class="latestTrade col-xs-12 col-md-3">
<div class="graph"></div>
<strong>Latest Trade: {{number close}} {{currency}}</strong>
</div>
<dl class="dl-horizontal col-xs-12 col-md-3">
<dt>Best Bid:</dt>
<dd>{{number bid}} {{currency}}</dd>
<dt>Best Ask:</dt>
<dd>{{number ask}} {{currency}}</dd>
</dl>
<div class="col-xs-12 col-md-3">
<table class="table table-bordered">
<tr><td>Best Bid</td><td>{{number bid}} {{currency}}</td></tr>
<tr><td>Best Ask</td><td>{{number ask}} {{currency}}</td></tr>
</table>
</div>
</div>
<footer class="text-muted">Updated: {{time lastUpdated}}</footer>
60 changes: 27 additions & 33 deletions templates/miner.hbs
Expand Up @@ -7,39 +7,34 @@
{{#if connected}}
<div class="panel-body">
<h4>Overview</h4>
<div class="row">
<div class="row overview">
<div class="hashrate col-xs-12 col-md-3">
<div class="graph"></div>
<strong>Current Hashrate: {{hashrate currentHashrate}}</strong>
</div>
<dl class="dl-horizontal col-xs-12 col-md-3">
<dt>Hardware Errors:</dt>
<dd>{{number hardwareErrors}}</dd>
<dt>Hardware Error Rate:</dt>
<dd>{{number hardwareErrorRate precision="2"}}%</dd>
<dt>Uptime:</dt>
<dd>{{timespan elapsed}}</dd>
<dt>Software:</dt>
<dd>{{description}}</dd>
</dl>
<dl class="dl-horizontal col-xs-12 col-md-3">
<dt>Accepted Shares:</dt>
<dd>{{number shares.accepted}}</dd>
<dt>Rejected Shares:</dt>
<dd>{{number shares.rejected}} ({{number shares.rejectedPercentage precision="2"}}%)</dd>
<dt>Stale Shares:</dt>
<dd>{{number shares.stale}} ({{number shares.stalePercentage precision="2"}}%)</dd>
<dt>Discarded Shares:</dt>
<dd>{{number shares.discarded}}</dd>
</dl>
<dl class="dl-horizontal col-xs-12 col-md-3">
<dt>Difficulty Accepted:</dt>
<dd>{{number difficulty.accepted precision="2"}}</dd>
<dt>Difficulty Rejected:</dt>
<dd>{{number difficulty.rejected precision="2"}}</dd>
<dt>Difficulty Stale:</dt>
<dd>{{number difficulty.stale precision="2"}}</dd>
</dl>
<div class="col-xs-12 col-md-3">
<table class="table table-bordered">
<tr><td>Hardware Errors</td><td>{{number hardwareErrors}}</td></tr>
<tr><td>Hardware Error Rate</td><td>{{number hardwareErrorRate precision="2"}}%</td></tr>
<tr><td>Uptime</td><td>{{timespan elapsed}}</td></tr>
<tr><td>Software</td><td>{{description}}</td></tr>
</table>
</div>
<div class="col-xs-12 col-md-3">
<table class="table table-bordered">
<tr><td>Accepted Shares</td><td>{{number shares.accepted}}</td></tr>
<tr><td>Rejected Shares</td><td>{{number shares.rejected}} ({{number shares.rejectedPercentage precision="2"}}%)</td></tr>
<tr><td>Stale Shares</td><td>{{number shares.stale}} ({{number shares.stalePercentage precision="2"}}%)</td></tr>
<tr><td>Discarded Shares</td><td>{{number shares.discarded}}</td></tr>
</table>
</div>
<div class="col-xs-12 col-md-3">
<table class="table table-bordered">
<tr><td>Difficulty Accepted</td><td>{{number difficulty.accepted precision="2"}}</td></tr>
<tr><td>Difficulty Rejected</td><td>{{number difficulty.rejected precision="2"}}</td></tr>
<tr><td>Difficulty Stale</td><td>{{number difficulty.stale precision="2"}}</td></tr>
</table>
</div>
</div>
{{#if pools}}
<h4>Pools</h4>
Expand Down Expand Up @@ -70,16 +65,15 @@
<h4>Devices</h4>
<div class="row devices">
{{#each devices}}
<div class="col-xs-12 col-md-4">
<div class="col-xs-12 col-md-3">
<table class="table table-bordered">
<tr>
<td class="{{#if connected}}success{{else}}danger{{/if}}">Device {{id}}</td>
<td>{{description}}</td>
<td class="{{#if connected}}success{{else}}danger{{/if}}">{{description}}-{{id}}</td>
<td>{{hashrate currentHashrate}}</td>
{{#if temperature}}
<td>{{number temperature precision="1"}}&deg;C</td>
{{/if}}
<td>{{number hardwareErrorRate precision="2"}}% HW Error Rate</td>
<td>{{number hardwareErrorRate precision="2"}}% HWE</td>
</tr>
</table>
</div>
Expand Down
36 changes: 18 additions & 18 deletions templates/technical.hbs
Expand Up @@ -2,23 +2,23 @@
<h2 class="panel-title">{{ title }}</h2>
</header>
<div class="panel-body row">
<dl class="dl-horizontal col-xs-12 col-md-4">
<dt>Total Hashrate:</dt>
<dd>{{hashrate networkHashrate}}</dd>
<dt>Difficulty:</dt>
<dd>{{number difficulty precision="2"}}</dd>
</dl>
<dl class="dl-horizontal col-xs-12 col-md-4">
<dt>Blockchain Length:</dt>
<dd>{{number blockChainLength}}</dd>
<dt>Time between Blocks:</dt>
<dd>{{number timeBetweenBlocks precision="2"}} Minutes</dd>
</dl>
<dl class="dl-horizontal col-xs-12 col-md-4">
<dt>Number of Transactions:</dt>
<dd>{{number numberOfTransactions}}</dd>
<dt>Total Output Volume:</dt>
<dd>{{number totalTransactionValue}} BTC</dd>
</dl>
<div class="col-xs-12 col-md-3">
<table class="table table-bordered">
<tr><td>Total Hashrate</td><td>{{hashrate networkHashrate}}</td></tr>
<tr><td>Difficulty</td><td>{{number difficulty precision="2"}}</td></tr>
</table>
</div>
<div class="col-xs-12 col-md-3">
<table class="table table-bordered">
<tr><td>Blockchain Length</td><td>{{number blockChainLength}}</td></tr>
<tr><td>Time between Blocks</td><td>{{number timeBetweenBlocks precision="2"}} Minutes</td></tr>
</table>
</div>
<div class="col-xs-12 col-md-3">
<table class="table table-bordered">
<tr><td>Number of Transactions</td><td>{{number numberOfTransactions precision="1"}}</td></tr>
<tr><td>Total Output Volume</td><td>{{number totalTransactionValue}} BTC</td></tr>
</table>
</div>
</div>
<footer class="text-muted">Updated: {{time lastUpdated}}</footer>

0 comments on commit 900274a

Please sign in to comment.