{# One window of usage: the selector, the charts, the strip, the failures. An ordinary template rather than a macro, like the server list: it is also returned on its own, as the answer to a range button and to the timer, and a macro rendered as a response would produce an empty body. Its context is what ``monitoring.context`` builds. All of it lives inside ``usage_id`` on purpose. Everything here describes one span of time, so everything here is replaced at once — a swap that left the failures list from the previous range beside the new charts would be two answers to two different questions on one screen. The selector is inside the region too, because which range is current is part of the answer: the button that lights up has to change with the charts. Each is a real link as well as an htmx request, so a browser running no script at all still changes range, by loading the whole page. #}
{{ view.covers }}, one point per {{ view.resolution }}.
{{ stale }}
{{ chart.note }}
{{ no_charts }}
{% if chart.empty %}{{ chart.empty_note }}
{% endif %}| Server | Status | Last spec download | Calls | Errors | Sent | Received |
|---|---|---|---|---|---|---|
| {% if row.detail_path %} {{ row.name }} {% else %} {{ row.name }} {% endif %} | {% if row.deleted %} {{ status_badge("removed", label="Deleted") }} {% else %} {{ status_badge("enabled" if row.enabled else "disabled") }} {% if row.needs_attention %} {{ status_badge("attention") }} {% endif %} {% endif %} | {% if row.deleted %} {{ not_recorded }} {% else %} {# One badge carrying the age, exactly as the server list writes it: the two pages answer the same question and must look like it. #} {{ status_badge(row.state, label=row.refreshed, title=row.refreshed_at) }} {% endif %} | {{ row.totals.calls }} | {{ row.totals.errors }} | {{ row.sent }} | {{ row.received }} |
{{ no_servers }}
{% endif %}| When | Server | Tool | Status | What happened |
|---|---|---|---|---|
| {{ failure.when }} | {% if failure.server_path %} {{ failure.server }} {% else %} {{ failure.server }} {% endif %} | {{ failure.tool }} |
{{ failure.status }} | {{ failure.message }} |
{{ no_failures }}
{% endif %}