dashboard/templates/disks.html

50 lines
2 KiB
HTML

<div id="disks" class="panel" hx-get="/api/disks" hx-trigger="dash-poll from:#tab-disks" hx-swap="outerHTML">
<h2>Filesystems</h2>
<div class="part-list">
{% for p in partitions %}
<div class="part">
<div class="part-head">
<span class="mono">{{ p.device }}</span>
<span class="muted">{{ p.fstype }}</span>
<span class="muted part-mounts" title="{{ p.mounts | join("\n") }}">{{ p.mounts_disp }}</span>
<span class="part-usage">{{ p.used | humanize }} / {{ p.total | humanize }} ({{ p.pct | round(0) }}%)</span>
</div>
<div class="bar"><div class="bar-fill{% if p.pct > 90 %} hot{% elif p.pct > 75 %} warm{% endif %}" style="width: {{ p.pct }}%"></div></div>
</div>
{% else %}
<div class="muted">no partitions found</div>
{% endfor %}
</div>
<h2>Device I/O</h2>
<div class="table-wrap">
<table class="table">
<colgroup>
<col style="width: 110px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 110px">
<col style="width: 110px">
</colgroup>
<thead>
<tr><th>Device</th><th class="num">Read</th><th class="num">Write</th><th class="num">Read rate</th><th class="num">Write rate</th><th class="num">Reads</th><th class="num">Writes</th></tr>
</thead>
<tbody>
{% for d in per_disk %}
<tr>
<td class="mono cell-clip" title="{{ d.device }}">{{ d.device }}</td>
<td class="num">{{ d.read_bytes | humanize }}</td>
<td class="num">{{ d.write_bytes | humanize }}</td>
<td class="num">{{ d.read_rate | rate }}</td>
<td class="num">{{ d.write_rate | rate }}</td>
<td class="num">{{ d.reads }}</td>
<td class="num">{{ d.writes }}</td>
</tr>
{% else %}
<tr><td colspan="7" class="muted">no block devices</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>