diff --git a/plugins/host_agent/templates/host_detail.html b/plugins/host_agent/templates/host_detail.html index 9b18f86..14c63f3 100644 --- a/plugins/host_agent/templates/host_detail.html +++ b/plugins/host_agent/templates/host_detail.html @@ -12,6 +12,8 @@ {% endmacro %} {% macro fmt_bytes(v) %} {%- if v is none -%}— +{%- elif v >= 1125899906842624 -%}{{ "%.1f"|format(v / 1125899906842624) }} PB +{%- elif v >= 1099511627776 -%}{{ "%.1f"|format(v / 1099511627776) }} TB {%- elif v >= 1073741824 -%}{{ "%.1f"|format(v / 1073741824) }} GB {%- elif v >= 1048576 -%}{{ "%.0f"|format(v / 1048576) }} MB {%- else -%}{{ "%.0f"|format(v / 1024) }} KB @@ -148,16 +150,16 @@ {% endif %} -{# ── Interfaces / disks / sensors current detail ──────────────────────────── #} -{% if nets or disks_io or temps %} -
+{# ── Interfaces / disks (short panels, side by side at natural height) ─────── #} +{% if nets or disks_io %} +
{% if nets %}
Interfaces
{% for iface, m in nets.items() %} -
+
{{ iface }} - ↓ {{ fmt_bps(m.get('net_rx_bps')) }} · ↑ {{ fmt_bps(m.get('net_tx_bps')) }} + ↓ {{ fmt_bps(m.get('net_rx_bps')) }} · ↑ {{ fmt_bps(m.get('net_tx_bps')) }}
{% endfor %}
@@ -166,24 +168,29 @@
Disks
{% for dev, m in disks_io.items() %} -
+
{{ dev }} - rd {{ fmt_bps(m.get('disk_read_bps')) }} · wr {{ fmt_bps(m.get('disk_write_bps')) }} + rd {{ fmt_bps(m.get('disk_read_bps')) }} · wr {{ fmt_bps(m.get('disk_write_bps')) }}
{% endfor %}
{% endif %} - {% if temps %} -
-
Temperatures
+
+{% endif %} + +{# ── Temperatures (full width; cores flow into a compact multi-column grid so a + many-core CPU reads wide-and-short instead of one very tall column) ─────── #} +{% if temps %} +
+
Temperatures
+
{% for label, c in temps.items() %} -
- {{ label }} +
+ {{ label }} {% if c is not none %}{{ "%.0f"|format(c) }}°C{% else %}—{% endif %}
{% endfor %}
- {% endif %}
{% endif %}