{% macro queue_table(rows, unit_label="host", unit_label_plural=None, score_axis="lower-is-worse") %} {% set ns = namespace(last_state="") %} {% set noun = unit_label %} {% set noun_plural = unit_label_plural or (noun ~ "s") %}
Triage queue

{{ rows | length }} {{ noun if rows | length == 1 else noun_plural }}, ordered by what to do

{% for r in rows %} {% if r.verdict_state != ns.last_state %} {% set ns.last_state = r.verdict_state %} {% endif %} {% endfor %}
Verdict {{ noun | title_case_label }} Score Δ Primary domain Top evidence
{{ r.verdict_label }}
{{ r.verdict_label }} {{ r.entity_display }} {{ r.score }} {{ score_bar(r.score) }} {% if r.delta == 0 %}±0 {% elif r.delta > 0 %}+{{ r.delta }} {% else %}{{ r.delta }}{% endif %} {{ r.primary_domain_label }} {{ r.evidence_top | normalize_percents }}
{% endmacro %}