Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
interestingLSY committed Nov 30, 2021
1 parent 1bede5f commit c2d6264
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions website/views/coinIndex.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,29 @@ <h4><b>您的矿机在过去 24 小时内没有任何提交</b></h4>
<% if(!workers.length){ %>
<p> 当前没有活跃的矿工 </p>
<% }else{ %>
<table class="ui celled collapsing table">
<% var hashrateSum = {};
for( var worker of workers ){
if( !(worker.label in hashrateSum) ) hashrateSum[worker.label] = 0;
hashrateSum[worker.label] += worker.hr;
}
%>
<thead>
<tr>
<th> 矿机名 </th>
<% for( var label in hashrateSum ){ %><th><%= label %></th><% } %>
<th> 总和 </th>
</tr>
</thead>
<tbody>
<tr>
<td> 当前算力 </td>
<% var totalHr = 0; for( var label in hashrateSum ) totalHr += hashrateSum[label]; %>
<% for( var label in hashrateSum ){ %><td><%= GetReadableHr(hashrateSum[label]); %></td><% } %>
<td> <%= GetReadableHr(totalHr) %> </td>
</tr>
</tbody>
</table>
<table class="ui celled collapsing table">
<thead>
<tr>
Expand Down

0 comments on commit c2d6264

Please sign in to comment.