consensus/cmd/web/views/tpl_payouts.qtpl

26 lines
1.5 KiB
Plaintext

{% import "git.gammaspectra.live/P2Pool/p2pool-observer/index" %}
{% func TemplatePayouts(ctx *GlobalRequestContext, payouts []*index.Payout) %}
<table class="center datatable" style="max-width: calc(8em + 8em + 8em + 10em + 10em + 7em + 12em + 10em)">
<tr>
<th style="width: 8em;">Monero Height</th>
<th style="width: 8em;">P2Pool Height</th>
<th style="width: 8em;">Age <small>[h:m:s]</small></th>
<th style="width: 10em;">Reward</th>
<th style="width: 10em;">Global Output Index</th>
<th style="width: 12em;">Coinbase Transaction</th>
<th style="width: 10em;">Payout Proof</th>
</tr>
{% for _, p := range payouts %}
<tr>
<th title="{%= hex(p.MainId) %}"><a href="/b/{%s benc(p.MainHeight) %}">{%dul p.MainHeight %}</a></th>
<th title="{%= hex(p.TemplateId) %}"><a href="/share/{%= hex(p.TemplateId) %}">{%dul p.SideHeight %}</a></th>
<td title="{%s utc_date(p.Timestamp) %}">{%s date_diff_short(p.Timestamp) %}</td>
<td>{%s monero_to_xmr(p.Reward) %} XMR</td>
<td>{%dul p.GlobalOutputIndex %}</td>
<td title="{%= hex(p.CoinbaseId) %}" class="mono small"><a href="/t/{%= henc(p.CoinbaseId) %}">{%= shorten(p.CoinbaseId, 10) %}</a></td>
<td><a href="/proof/{%= hex(p.MainId) %}/{%dul uint64(p.Index) %}" title="Prove you have a matching output for your address on this transaction">[Payout Proof #{%dul uint64(p.Index) %}]</a></td>
</tr>
{% endfor %}
</table>
{% endfunc %}