Add active swarm count to service node list
This commit is contained in:
parent
1a1b74ba79
commit
5c18cd3325
|
@ -352,6 +352,7 @@ def main(refresh=None, page=0, per_page=None, first=None, last=None, style=None)
|
||||||
emission=coinbase.get(),
|
emission=coinbase.get(),
|
||||||
hf=hfinfo.get(),
|
hf=hfinfo.get(),
|
||||||
active_sns=active_sns,
|
active_sns=active_sns,
|
||||||
|
active_swarms=len(set(x['swarm_id'] for x in active_sns)),
|
||||||
inactive_sns=inactive_sns,
|
inactive_sns=inactive_sns,
|
||||||
awaiting_sns=awaiting_sns,
|
awaiting_sns=awaiting_sns,
|
||||||
blocks=blocks,
|
blocks=blocks,
|
||||||
|
@ -385,6 +386,7 @@ def sns():
|
||||||
return flask.render_template('service_nodes.html',
|
return flask.render_template('service_nodes.html',
|
||||||
info=info.get(),
|
info=info.get(),
|
||||||
active_sns=active,
|
active_sns=active,
|
||||||
|
active_swarms=len(set(x['swarm_id'] for x in active)),
|
||||||
awaiting_sns=awaiting,
|
awaiting_sns=awaiting,
|
||||||
inactive_sns=inactive,
|
inactive_sns=inactive,
|
||||||
)
|
)
|
||||||
|
|
|
@ -467,7 +467,7 @@ td span.checkpoint-not-signed { color: #c50022; }
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 .sn-count {
|
h3 .sn-count, h4 .sn-count {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
|
|
||||||
<h2 style="margin-bottom: 0px">Active Service Nodes <span class="sn-count">({{active_sns | count}})</span></h2>
|
<h2 style="margin-bottom: 0px">Active Service Nodes <span class="sn-count">({{active_sns | count}})</span></h2>
|
||||||
|
<h4 class="Subtitle">Current storage swarm count:
|
||||||
|
<span class="sn-count" title="= {{"%.2f"|format(active_sns | count / active_swarms)}} SNs per swarm">{{active_swarms}}</span>
|
||||||
|
</h4>
|
||||||
<div class="TitleDivider sn-active"></div>
|
<div class="TitleDivider sn-active"></div>
|
||||||
{%include 'include/sn_active.html'%}
|
{%include 'include/sn_active.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue