Service page: - The header carries the verdict, mode, stack, image and when it was reported. 'In trouble since' shows only while the service is in trouble; once recovered, 'Last failed X ago · its logs'. - The failure card shows only while the service is down, degraded or crash-looping. - The tile strip and the kv card are gone. - One Tasks table: running tasks first with CPU, memory and since when, then Swarm's record. The node is named as its Steward host throughout, and 'N failed in 24h' sits in the caption. Container page: - Same shape: header verdict, a 'Last exit' card only while it is stopped after a failing exit, set-up and I/O in one kv card, and lifecycle as a table. - A swarm task's breadcrumb goes through its service. Both pages: - Resource history is the one fragment (_usage_history.html): now and peak in cores and bytes, drawn with a floor of 1 core / 1 GiB (sparkline_svg floor=), so idle noise draws flat. - The container page's old % sparklines, its private _sparkline and the unused bucket()/container_history() helpers are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
1.2 KiB
HTML
24 lines
1.2 KiB
HTML
{# docker/_usage_history.html — CPU and memory over the selected range, for a
|
|
service (summed across its replicas, #5302) or one container (#5310): the
|
|
latest and the peak, over a line that spans its half. The line is drawn
|
|
against at least cpu_floor / mem_floor, so idling near zero draws flat. #}
|
|
{% from "docker/_usage.html" import cores %}
|
|
{% if have_data %}
|
|
<div class="history-pair">
|
|
<div>
|
|
<div class="section-title">CPU</div>
|
|
<div style="font-variant-numeric:tabular-nums;">{{ cores(cpu_now) }} <span class="tone-dim">now · peak {{ cores(cpu_peak) }}</span></div>
|
|
<div class="spark" title="Drawn from zero to its peak, or to {{ cores(cpu_floor)|striptags }} when the peak is lower">{{ spark_cpu|safe }}</div>
|
|
</div>
|
|
<div>
|
|
<div class="section-title">Memory</div>
|
|
<div style="font-variant-numeric:tabular-nums;">{{ mem_now|bytes }} <span class="tone-dim">now · peak {{ mem_peak|bytes }}</span></div>
|
|
<div class="spark" title="Drawn from zero to its peak, or to {{ mem_floor|bytes }} when the peak is lower">{{ spark_mem|safe }}</div>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<p class="tone-muted" style="margin:0;font-size:0.85rem;">
|
|
Not enough samples in the last {{ range_key }} yet. History fills in as the agent reports.
|
|
</p>
|
|
{% endif %}
|