Permalink
Browse files

Make tables responsive

  • Loading branch information...
frankurcrazy authored and sammy007 committed Jun 27, 2017
1 parent 3d79762 commit 27781c12a84f1d312c937c65ed099304ca8ed092
@@ -1,26 +1,28 @@
<div class="container">
{{#if model.workers}}
<h4>Your Workers</h4>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>ID</th>
<th>Hashrate (rough, short average)</th>
<th>Hashrate (accurate, long average)</th>
<th>Last Share</th>
</tr>
</thead>
<tbody>
{{#each-in model.workers as |k v|}}
<tr class="{{if v.offline "warning" "success"}}">
<td>{{k}}</td>
<td>{{format-hashrate v.hr}}</td>
<td>{{format-hashrate v.hr2}}</td>
<td>{{format-relative (seconds-to-ms v.lastBeat)}}</td>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>ID</th>
<th>Hashrate (rough, short average)</th>
<th>Hashrate (accurate, long average)</th>
<th>Last Share</th>
</tr>
{{/each-in}}
</tbody>
</table>
</thead>
<tbody>
{{#each-in model.workers as |k v|}}
<tr class="{{if v.offline "warning" "success"}}">
<td>{{k}}</td>
<td>{{format-hashrate v.hr}}</td>
<td>{{format-hashrate v.hr2}}</td>
<td>{{format-relative (seconds-to-ms v.lastBeat)}}</td>
</tr>
{{/each-in}}
</tbody>
</table>
</div>
{{else}}
<h3>No workers online</h3>
{{/if}}
@@ -1,26 +1,28 @@
<div class="container">
{{#if model.payments}}
<h4>Your Latest Payouts</h4>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Time</th>
<th>Tx ID</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
{{#each model.payments as |tx|}}
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<td>{{format-date-locale tx.timestamp}}</td>
<td>
<a href="https://etherscan.io/tx/{{tx.tx}}" class="hash" rel="nofollow" target="_blank">{{tx.tx}}</a>
</td>
<td>{{format-balance tx.amount}}</td>
<th>Time</th>
<th>Tx ID</th>
<th>Amount</th>
</tr>
{{/each}}
</tbody>
</table>
</thead>
<tbody>
{{#each model.payments as |tx|}}
<tr>
<td>{{format-date-locale tx.timestamp}}</td>
<td>
<a href="https://etherscan.io/tx/{{tx.tx}}" class="hash" rel="nofollow" target="_blank">{{tx.tx}}</a>
</td>
<td>{{format-balance tx.amount}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{else}}
<h3>No payouts yet</h3>
{{/if}}
@@ -1,21 +1,24 @@
{{#if model.immature}}
<h4>Immature Blocks</h4>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Height</th>
<th>Block Hash</th>
<th>Time Found</th>
<th>Variance</th>
<th>Reward</th>
</tr>
</thead>
<tbody>
{{#each model.immature as |block|}}
{{partial "blocks/block"}}
{{/each}}
</tbody>
</table>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Height</th>
<th>Block Hash</th>
<th>Time Found</th>
<th>Variance</th>
<th>Reward</th>
</tr>
</thead>
<tbody>
{{#each model.immature as |block|}}
{{partial "blocks/block"}}
{{/each}}
</tbody>
</table>
</div>
{{else}}
<h3>No immature blocks yet</h3>
{{/if}}
@@ -1,21 +1,23 @@
{{#if model.matured}}
<h4>Matured Blocks</h4>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Height</th>
<th>Block Hash</th>
<th>Time Found</th>
<th>Variance</th>
<th>Reward</th>
</tr>
</thead>
<tbody>
{{#each model.matured as |block|}}
{{partial "blocks/block"}}
{{/each}}
</tbody>
</table>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Height</th>
<th>Block Hash</th>
<th>Time Found</th>
<th>Variance</th>
<th>Reward</th>
</tr>
</thead>
<tbody>
{{#each model.matured as |block|}}
{{partial "blocks/block"}}
{{/each}}
</tbody>
</table>
</div>
{{else}}
<h3>No matured blocks yet</h3>
{{/if}}
@@ -1,29 +1,31 @@
{{#if model.candidates}}
<h4>Recently Found Blocks</h4>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Height</th>
<th>Time Found</th>
<th>Variance</th>
</tr>
</thead>
<tbody>
{{#each model.candidates as |block|}}
<tr>
<td><a href="https://etherscan.io/block/{{block.height}}" rel="nofollow" target="_blank">{{format-number block.height}}</a></td>
<td>{{format-date-locale block.timestamp}}</td>
<td>
{{#if block.isLucky}}
<span class="label label-success">{{format-number block.variance style='percent'}}</span>
{{else}}
<span class="label label-info">{{format-number block.variance style='percent'}}</span>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Height</th>
<th>Time Found</th>
<th>Variance</th>
</tr>
</thead>
<tbody>
{{#each model.candidates as |block|}}
<tr>
<td><a href="https://etherscan.io/block/{{block.height}}" rel="nofollow" target="_blank">{{format-number block.height}}</a></td>
<td>{{format-date-locale block.timestamp}}</td>
<td>
{{#if block.isLucky}}
<span class="label label-success">{{format-number block.variance style='percent'}}</span>
{{else}}
<span class="label label-info">{{format-number block.variance style='percent'}}</span>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{else}}
<h3>No new blocks yet</h3>
{{/if}}
View
@@ -1,20 +1,22 @@
<table class="table table-condensed table-striped">
<thead>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Blocks</th>
<th>Shares/Diff</th>
<th>Uncle Rate</th>
<th>Orphan Rate</th>
</tr>
</thead>
<tbody>
{{#each-in model.luck as |total row|}}
<tr>
<th>Blocks</th>
<th>Shares/Diff</th>
<th>Uncle Rate</th>
<th>Orphan Rate</th>
<td>{{total}}</td>
<td>{{format-number row.luck style='percent'}}</td>
<td>{{format-number row.uncleRate style='percent'}}</td>
<td>{{format-number row.orphanRate style='percent'}}</td>
</tr>
</thead>
<tbody>
{{#each-in model.luck as |total row|}}
<tr>
<td>{{total}}</td>
<td>{{format-number row.luck style='percent'}}</td>
<td>{{format-number row.uncleRate style='percent'}}</td>
<td>{{format-number row.orphanRate style='percent'}}</td>
</tr>
{{/each-in}}
</tbody>
</table>
{{/each-in}}
</tbody>
</table>
</div>
@@ -7,24 +7,26 @@
<div class="container">
{{#if model.miners}}
<h4>Miners</h4>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Login</th>
<th>Hashrate</th>
<th>Last Beat</th>
</tr>
</thead>
<tbody>
{{#each model.miners as |m|}}
<tr class="{{if m.offline "warning"}}">
<td>{{#link-to 'account' m.login class='hash'}}{{m.login}}{{/link-to}}</td>
<td>{{format-hashrate m.hr}}</td>
<td>{{format-date-locale m.lastBeat}}</td>
</tr>
{{/each}}
</tbody>
</table>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Login</th>
<th>Hashrate</th>
<th>Last Beat</th>
</tr>
</thead>
<tbody>
{{#each model.miners as |m|}}
<tr class="{{if m.offline "warning"}}">
<td>{{#link-to 'account' m.login class='hash'}}{{m.login}}{{/link-to}}</td>
<td>{{format-hashrate m.hr}}</td>
<td>{{format-date-locale m.lastBeat}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{else}}
<h3>No miners</h3>
{{/if}}
@@ -7,30 +7,32 @@
<div class="container">
{{#if model.payments}}
<h4>Latest Payouts</h4>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Time</th>
<th>Amount</th>
<th>Address</th>
<th>Tx ID</th>
</tr>
</thead>
<tbody>
{{#each model.payments as |tx|}}
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<td>{{format-date-locale tx.timestamp}}</td>
<td>{{format-number tx.formatAmount}}</td>
<td>
<a href="https://etherscan.io/address/{{tx.address}}" class="hash" rel="nofollow" target="_blank">{{tx.address}}</a>
</td>
<td>
<a href="https://etherscan.io/tx/{{tx.tx}}" class="hash" rel="nofollow" target="_blank">{{format-tx tx.tx}}</a>
</td>
<th>Time</th>
<th>Amount</th>
<th>Address</th>
<th>Tx ID</th>
</tr>
{{/each}}
</tbody>
</table>
</thead>
<tbody>
{{#each model.payments as |tx|}}
<tr>
<td>{{format-date-locale tx.timestamp}}</td>
<td>{{format-number tx.formatAmount}}</td>
<td>
<a href="https://etherscan.io/address/{{tx.address}}" class="hash" rel="nofollow" target="_blank">{{tx.address}}</a>
</td>
<td>
<a href="https://etherscan.io/tx/{{tx.tx}}" class="hash" rel="nofollow" target="_blank">{{format-tx tx.tx}}</a>
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{else}}
<h3>No payouts yet</h3>
{{/if}}

0 comments on commit 27781c1

Please sign in to comment.