{%- macro smart_cell(smart) -%}
{%- if smart.state == 'running' -%}
{{ smart.percent or 0 }}%
{%- if smart.eta_seconds %}
{{ smart.eta_seconds | format_eta }}
{%- endif %} {%- elif smart.state == 'passed' -%} Passed {%- elif smart.state == 'failed' -%} Failed {%- elif smart.state == 'aborted' -%} Aborted {%- else -%} {%- endif -%}
{%- endmacro -%} {%- macro burnin_cell(bi) -%}
{%- if bi is none -%} {%- elif bi.state == 'queued' -%} Queued {%- elif bi.state == 'running' -%}
{{ bi.percent or 0 }}%
{%- if bi.stage_name %} {{ bi.stage_name | replace('_', ' ') | title }} {%- endif %} {%- if bi.started_at %} {{ bi.started_at | format_elapsed }} {%- endif %}
{%- elif bi.state == 'passed' -%} Passed {%- elif bi.state == 'failed' -%} Failed{% if bi.stage_name %} ({{ bi.stage_name | replace('_',' ') }}){% endif %} {%- elif bi.state == 'cancelled' -%} Cancelled {%- elif bi.state == 'unknown' -%} Unknown {%- else -%} {%- endif -%}
{%- endmacro -%} {%- if drives %} {%- for drive in drives %} {%- set bi_active = drive.burnin and drive.burnin.state in ('queued', 'running') %} {%- set short_busy = drive.smart_short and drive.smart_short.state == 'running' %} {%- set long_busy = drive.smart_long and drive.smart_long.state == 'running' %} {%- set selectable = not bi_active and not short_busy and not long_busy %} {%- endfor %} {%- else %} {%- endif %}
Drive Serial Size Temp Health Short SMART Long SMART Burn-In Actions
{%- if selectable %} {%- endif %} {{ drive.devname }} {{ drive.model or "Unknown" }} {%- if drive.location %} {{ drive.location }} {%- else %} + location {%- endif %} {{ drive.serial or "—" }} {{ drive.size_bytes | format_bytes }} {%- if drive.temperature_c is not none %} {{ drive.temperature_c }}°C {%- else %} {%- endif %} {{ drive.smart_health }} {{ smart_cell(drive.smart_short) }} {{ smart_cell(drive.smart_long) }} {{ burnin_cell(drive.burnin) }}
{%- if bi_active %} {%- else %} {%- if short_busy %} {%- else %} {%- endif %} {%- if long_busy %} {%- else %} {%- endif %} {%- endif %}
No drives found. Waiting for first poll…