Files
FabledSteward/steward/templates/alerts/_metric_preview.html
T
bvandeusenandClaude Opus 5.5 73cfbda1da
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m10s
CI / unit (push) Successful in 1m26s
CI / publish (push) Successful in 1m5s
fix(alerts): a rule's page doesn't wait for its metric preview (#5485); Send test up top (#5486)
#5485 "A rule's page waits up to 25 s for its metric preview: a cold 24 h
series read from plugin_metrics". Opening "Agent offline" took 25.6 s; a
cold day of one series measured 18.3 s over MCP, a warm one 63 ms. The
pickers still come with the page from plugin_metric_latest; the preview is
its own request (hx-trigger=load), showing "Reading the last day…" until it
lands. Picker swaps no longer read it either.

#5486 "Send test where it can be found": the button moves from inside "What
happens" to the page header beside History, its result under the verdict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:44:19 -04:00

21 lines
1020 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{# alerts/_metric_preview.html — what the chosen metric reads (#5475), so a
threshold is set against real numbers: now, and the last day's hourly
averages with the lowest and highest reading. A rule covering hosts
previews on the host picked above it, or none. #}
{% if preview %}
<div class="metric-preview">
<span>Now <strong>{{ metric_value(metric, preview.now) }}</strong>
<span class="tone-dim" title="{{ preview.at|when }}">{{ preview.at|ago }}</span></span>
{% if preview.series|length > 1 %}
<span class="metric-preview-day">
<span class="tone-dim">last 24 h</span> {{ metric_value(metric, preview.low) }} – {{ metric_value(metric, preview.high) }}
<span class="metric-preview-spark" aria-hidden="true">{{ preview.spark|safe }}</span>
</span>
{% endif %}
</div>
{% elif metric and resource and not preview_read %}
<p class="field-hint">Reading the last day…</p>
{% elif metric and resource %}
<p class="field-hint">No reading of this yet from {{ resource }}.</p>
{% endif %}