Implement daily stats
This commit is contained in:
45
templates/daily_stats.html
Normal file
45
templates/daily_stats.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{{ define "title" }}Daily Stats{{ end }} {{ define "header" }}📊 Pool Daily
|
||||
Stats{{ end }} {{ define "content" }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date (UTC)</th>
|
||||
<th>Share Count</th>
|
||||
<th>Top Share Diff</th>
|
||||
<th>Pool Hashrate</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .DailyStats }}
|
||||
<tr>
|
||||
<td>{{ .Date }}</td>
|
||||
<td>{{ .ShareCount }}</td>
|
||||
<td>{{ humanDiff .TopShare.SDiff }}</td>
|
||||
<td>{{ formatHashrate .PoolHashrate }}</td>
|
||||
</tr>
|
||||
{{ else }}
|
||||
<tr>
|
||||
<td colspan="4">No stats found for this date range.</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
{{ if .PrevPageAvailable }}
|
||||
<a class="page-link" href="?start={{ .PrevPageStart }}&end={{ .PrevPageEnd }}"
|
||||
>« Prev</a
|
||||
>
|
||||
{{ end }}
|
||||
|
||||
<a class="page-link current" href="?start={{ .Start }}&end={{ .End }}"
|
||||
>{{ .Start }} - {{ .End }}</a
|
||||
>
|
||||
|
||||
{{ if .NextPageAvailable }}
|
||||
<a class="page-link" href="?start={{ .NextPageStart }}&end={{ .NextPageEnd }}"
|
||||
>Next »</a
|
||||
>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }} {{ template "layout" . }}
|
||||
@@ -63,5 +63,6 @@
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/shares">View Shares</a></li>
|
||||
<li><a href="/top-shares">Top Shares</a></li>
|
||||
<li><a href="/daily-stats">Daily Stats</a></li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user