48 lines
2.7 KiB
Plaintext
48 lines
2.7 KiB
Plaintext
{% import "git.gammaspectra.live/P2Pool/p2pool-observer/index" %}
|
|
|
|
{% func TemplateShares(ctx *GlobalRequestContext, shares []*index.SideBlock, isMiner bool, efforts *[]float64) %}
|
|
<table class="center datatable" style="max-width: calc(8em + 12em + 8em + 8em{% if efforts != nil %} + 8em{% endif %}{% if isMiner %}{% else %} + 12em{% endif %} + 10em + 8em + 12em)">
|
|
<tr>
|
|
<th style="width: 8em;">P2Pool Height</th>
|
|
<th style="width: 12em;">P2Pool Id</th>
|
|
<th style="width: 8em;">Monero Height</th>
|
|
<th style="width: 8em;">Age <small>[h:m:s]</small></th>
|
|
{% if efforts != nil %}
|
|
<th style="width: 8em;" title="Effort is estimated based on your daily hash rate. To be more accurate, specify your local hash rate below.">Estimated Effort</th>
|
|
{% endif %}
|
|
{% if !isMiner %}
|
|
<th style="width: 12em;" title="The P2Pool miner who found this share">Found by</th>
|
|
{% endif %}
|
|
<th style="width: 10em;" title="The consensus implementation name and version of the miner who found this share">Software</th>
|
|
<th style="width: 8em;" title="Weight is the difficulty of mined share, with any uncle adjustments. It is variable, and is used in reward calculations">Weight</th>
|
|
<th style="width: 12em;">Valuation</th>
|
|
</tr>
|
|
{% for i, s := range shares %}
|
|
<tr{% if s.MinedMainAtHeight %} class="hl-found"{% endif %}>
|
|
<th><a href="/share/{%= hex(s.TemplateId) %}">{%dul s.SideHeight %}</a></th>
|
|
<td class="mono smaller"><a href="/share/{%= hex(s.TemplateId) %}">{%= shorten(s.TemplateId, 10) %}</a></td>
|
|
{% if s.MinedMainAtHeight %}
|
|
<th title="{%= hex(s.MainId) %}"><a href="/b/{%s benc(s.MainHeight) %}">{%dul s.MainHeight %}</a></th>
|
|
{% else %}
|
|
<td title="{%= hex(s.MainId) %}">{%dul s.MainHeight %}</td>
|
|
{% endif %}
|
|
<td title="{%s utc_date(s.Timestamp) %}">{%s date_diff_short(s.Timestamp) %}</td>
|
|
{% if efforts != nil %}
|
|
{% if effort := (*efforts)[i]; effort >= 0 %}
|
|
<td style="font-weight:bolder; color: {%s effort_color(effort) %};">
|
|
{%f.2 effort %}%
|
|
</td>
|
|
{% else %}
|
|
<td>unknown</td>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if !isMiner %}
|
|
{%= TemplateRowMiner(s.MinerAddress, s.MinerAlias) %}
|
|
{% endif %}
|
|
<td>{%s software_info(s.SoftwareId, s.SoftwareVersion) %}</td>
|
|
<td title="{%dul side_block_weight(s, s.SideHeight, ctx.Consensus.ChainWindowSize, ctx.Consensus) %}">{%s si_units(side_block_weight(s, s.SideHeight, ctx.Consensus.ChainWindowSize, ctx.Consensus), 2) %}</td>
|
|
<td>{%s side_block_valuation(s, ctx.Consensus) %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endfunc %} |