display system startup mode

This commit is contained in:
glyph 2022-01-27 11:01:12 +02:00
parent c7cc310a32
commit f715644e25
1 changed files with 9 additions and 1 deletions

View File

@ -31,10 +31,18 @@
{% if sbot_stats.state == "active" %}
<label class="label-small font-gray" for="sbotUptime" title="go-sbot uptime" style="margin-top: 0.5rem;">UPTIME</label>
<p id="sbotUptime" class="card-text" title="Uptime">{{ sbot_stats.uptime }}</p>
{%- else -%}
{# render downtime element if downtime is `Some(time)` #}
{# downtime will be `None` if service is stopped and disabled #}
{%- elif sbot_stats.downtime -%}
<label class="label-small font-gray" for="sbotDowntime" title="go-sbot downtime" style="margin-top: 0.5rem;">DOWNTIME</label>
<p id="sbotDowntime" class="card-text" title="Downtime">{{ sbot_stats.downtime }}</p>
{%- endif -%}
<label class="label-small font-gray" for="sbotBootState" title="go-sbot boot state" style="margin-top: 0.5rem;">RUN ON STARTUP</label>
{% if sbot_stats.boot_state == "enabled" %}
<p id="runOnStartup" class="card-text" title="Enabled">Enabled</p>
{% else %}
<p id="runOnStartup" class="card-text" title="Disabled">Disabled</p>
{%- endif -%}
</div>
</div>
<hr style="color: var(--light-gray);">