{% from "_macros.html" import service_error, bar, disk_state, disk_row %} {#- ── Array ───────────────────────────────────────────────────── Its own partial (rather than inline in system.html) so the refresh button can re-fetch and swap in just this section via `/api/array/refresh` without a full page reload — Unraid's stats aren't cached (see get_unraid_stats), so a stale reading here only ever means "haven't reloaded the page since", and the button exists purely for the peace-of-mind of confirming that in place. -#} {% if unraid.status != 'ok' %}
Array unreachable
{{ service_error('Unraid', unraid.error) }} {% else %} {%- set apct = unraid.array_used_pct | default(0) | float -%}
Array {{ unraid.array_state | default('') }} {%- if unraid.parities %} · parity {%- for p in unraid.parities %} {{ p.temp if p.temp is not none else '—' }}°C{% endfor %} {%- endif %}
{{ apct | round | int }}%
Used
{{ unraid.array_free | default('—') }}
Free
{{ unraid.array_total | default('—') }}
Total
{{ unraid.disk_count | default(0) }}
Disks
{% if unraid.disks %} {#- Desktop: a real table — columns line up, a new metric is a new column. Hidden below 560px, where six columns stop fitting and a horizontal scroll would hide the bar and the temperature, the two readings that matter most on this page. -#}
{% for dk in unraid.disks %} {% endfor %} {% for ck in unraid.caches | default([]) %} {% endfor %}
Disk Device Size Free Usage Temp
{{ dk.name }} {{ dk.device | default('—') }} {{ dk.total | default('—') }} {{ dk.free | default('—') }} {{ bar(dk.used_pct | default(0)) }} {{ dk.used_pct | default(0) | round | int }}% {{ disk_state(dk) }}
{{ ck.name }} {{ ck.device | default('—') }} {{ ck.total | default('—') }} {{ ck.free | default('—') }} {{ bar(ck.used_pct | default(0)) }} {{ ck.used_pct | default(0) | round | int }}% {{ disk_state(ck) }}
{#- Phone (≤560px): the .tt-row-derived reflow — name, the shared 20-cell bar and the temperature on one line, device/size/free beneath. Hidden above 560px in favour of the table. -#}
{% for dk in unraid.disks %}{{ disk_row(dk) }}{% endfor %} {% for ck in unraid.caches | default([]) %}{{ disk_row(ck) }}{% endfor %}
{% endif %} {% endif %}