The host page's link to the full metrics sat in the Agent card, under the anomaly card and the vitals strip, and was missed. It now heads the vitals strip at the top of the page. The anomaly card on the host, monitor, container and Traefik pages listed every anomaly of the last 30 days with its review form, reviewed ones included, and took over the top of the page. It is now one line: how many wait for review, which are out of their normal now, and a Review button to Alerts → Anomalies narrowed to that resource (?source=&resource=), where a review returns. It is hidden when nothing waits and nothing is going on. The callers fetch up to 100 rows so the count isn't capped at 10 or 20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
2.1 KiB
HTML
44 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_macros.html" import crumbs, page_header %}
|
|
{% from "_anomaly.html" import anomaly_row with context %}
|
|
{% block title %}Metric Anomalies — Steward{% endblock %}
|
|
{% block breadcrumb %}{{ crumbs([("Alerts", "/alerts/"), ("Anomalies", "")]) }}{% endblock %}
|
|
{% block content %}
|
|
{% call page_header("Metric anomalies", "A metric that left what is normal for it at that hour. Mark each normal, so its hours are learned, or a real problem, so they are not.") %}
|
|
<a class="btn btn-ghost" href="/alerts/history">History</a>
|
|
{% endcall %}
|
|
|
|
{% macro divided(items) %}
|
|
{% for item in items %}
|
|
{% if item.opens_group %}<h3 class="table-divider" style="font-size:0.78rem;font-weight:500;color:var(--text);background:var(--bg-elevated);padding:0.35rem 0.75rem;margin:0.75rem -0.75rem 0;border-top:1px solid var(--border-mid);border-bottom:1px solid var(--border-mid);">{{ item.group }}</h3>{% endif %}
|
|
{{ anomaly_row(item.v, back=here|default("/alerts/anomalies"), show_resource=not resource or item.v.anomaly.resource_name != resource) }}
|
|
{% endfor %}
|
|
{% endmacro %}
|
|
|
|
{% if source or resource %}
|
|
<p class="field-hint" style="margin:0.75rem 0 0;">
|
|
Only {% if resource %}<strong>{{ resource }}</strong>{% if source %} ({{ source_label(source) }}){% endif %}{% else %}{{ source_label(source) }}{% endif %}.
|
|
<a href="/alerts/anomalies">Show every anomaly</a>
|
|
</p>
|
|
{% endif %}
|
|
|
|
<div class="card" style="margin-top:1rem;">
|
|
<h2 class="section-title" style="margin-bottom:0.35rem;">
|
|
{% if to_review %}{{ to_review|length }} to review{% else %}Nothing to review{% endif %}
|
|
</h2>
|
|
<p style="font-size:0.8rem;color:var(--text-muted);margin:0;">
|
|
An ended anomaly nobody reviews within {{ review_days }} day{{ "s" if review_days != 1 }} lapses:
|
|
it leaves this list, stays below as not reviewed, and is never learned.
|
|
The window is in Settings → Thresholds.
|
|
</p>
|
|
{{ divided(to_review) }}
|
|
</div>
|
|
|
|
{% if past %}
|
|
<div class="card" style="margin-top:1rem;">
|
|
<h2 class="section-title" style="margin-bottom:0.35rem;">Reviewed and lapsed</h2>
|
|
{{ divided(past) }}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|