{#- A subject's series on the node that stands for it (ADR-0092 decision 6): the curves of its measures, drawn on the server as SVG with no script of its own, and its readings as a table. `_node_facts.html` shows the curves and the newest `reading_cap` rows; the History page shows every row and no curve. The geometry is `little_sister.curves`' — every number below is its, and this only writes it down. What is drawn, and what says so in words: * the value axis — a hairline per step, its reading on the left, and a free-text unit once above them; a span unit names itself in every step instead; * the line, broken wherever a reading had no value or nothing was read for longer than the node's freshness tolerance, and a dot for a reading that stands alone between two breaks and for the newest one; * a reading without a value, marked at its instant in the lane beneath the baseline — never as a zero — and counted beside the title with the mark as its key; a hole is counted too, and has no mark of its own; * the oldest and the newest time, in the configured zone and format; * each reading's time and value where the pointer is: the plot is cut between each two neighbors' midpoints, so the pointer finds a time, not a line. `role="img"` keeps the per-reading titles from being read out one by one: the table is the accessible twin, and the caption says what the drawing shows. -#} {%- from '_status_cue.html' import status_cue %} {%- macro summary(c) -%} {%- if c.lowest -%} newest {{ c.newest }} · lowest {{ c.lowest }} · highest {{ c.highest }} {%- endif -%} {%- if c.unvalued -%} {%- if c.lowest %} · {% endif -%} {{ c.unvalued }} without a value {%- endif -%} {%- if c.holes %} · {{ c.holes }} {{ "stretch" if c.holes == 1 else "stretches" }} without readings{% endif -%} {%- endmacro %} {%- macro curve(c) -%}
{{ c.label }} {{ summary(c) }}
{%- for tick in c.ticks %} {{ tick.text }} {%- endfor %} {%- if c.unit_label %} {{ c.unit_label }} {%- endif %} {%- for d in c.paths %} {%- endfor %} {%- for dot in c.dots %} {%- endfor %} {%- if c.end and c.end not in c.dots %} {%- endif %} {%- for mark in c.marks %} {%- endfor %} {%- if c.first == c.last %} {{ c.last }} {%- else %} {{ c.first }} {{ c.last }} {%- endif %} {%- for strip in c.hover %} {{ strip.title }} {%- endfor %}
{%- endmacro %} {#- The readings, newest first, as the ADR lists a row: the time on the series' clock, the code the reading stood with as a cue — its column's header is for a screen reader only, since a record's own `status` field often stands beside it and a second visible *Status* would read as the same thing — a column per field as the record list writes it, and the sentence as it stood. -#} {%- macro readings_table(view) -%}
{% for column in view.columns %}{% endfor %} {%- for row in view.rows %} {%- for column in view.columns %} {%- set field = row.fields.get(column) %} {%- endfor %} {%- endfor %}
TimeStatus{{ column }}Reason
{% if row.code %}{{ status_cue(row.code, labeled=true) }}{% endif %}{% if field %}{% if field.kind == 'instant' %}{% else %}{{ field.text }}{% endif %}{% endif %}{{ row.texts | join('; ') | markdown_inline }}
{%- endmacro %}