{#
Overview.
What an operator wants on opening the panel, in order: is anything broken,
is anything happening right now, what is deployed, and what just finished.
Everything else is one click away and does not belong here.
#}
{% extends "base.html" %}
{% import "_macros.html" as m %}
{% block title %}Overview{% endblock %}
{% block content %}
{{ m.page_head("Overview", machine.hostname) }}
{#
Attention first. When nothing is wrong this section is absent entirely,
rather than showing a green "all systems operational" panel that trains
people to ignore the top of the page.
#}
{% if attention %}
Needs attention
{% for item in attention %}
{% call m.row(item.domain, item.state, item.meta, item.href, "row-" ~ item.id,
none, item.state_text) %}
Open
{% endcall %}
{% endfor %}
{% endif %}
{# In flight, and only when there is something in flight: an empty "running"
panel on every page load is furniture. #}
{% if running %}
{% endif %}
{#
The machine's vital signs over time. The history comes from
/api/metrics/{metric} and the live edge rides the metrics event on the
shared /events stream; panel.js owns both, keyed off the data-chart hooks.
The buttons are read by the client rather than being links: switching the
window re-reads history without a navigation, and a plain data attribute is
all the delegated click listener needs under script-src 'self'.
#}
{% else %}
{{ m.empty(
"No applications yet",
"Deploy one from a Git repository, an archive or a local directory.",
command="wasm create -d example.com -s https://github.com/you/app") }}
{% endif %}