fix(norms): templates grade by the cutoffs when handed no grade; the parts test reads inside transactions (#5742)
CI 9128: the host vitals and monitor templates required the new grades, so callers (and tests) that render them without one failed; they now fall back to status_class. The new integration test read outside begin(), which autobegan the session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
{% if d.state in ('down', 'paused', 'pending') %}{{ status_badge(d.state) }}
|
||||
{% elif latest.response_ms is not none %}
|
||||
{% if d.spark %}<span class="mon-spark" title="Response time over the last 30 checks">{{ d.spark|safe }}</span>{% endif %}
|
||||
<span class="tone-{{ d.latency }}"{% if d.latency_usual %} title="{{ d.latency_usual|capitalize }}"{% endif %}>{{ "%.0f"|format(latest.response_ms) }} ms</span>
|
||||
<span class="tone-{{ d.latency or status_class(latest.response_ms, 'latency') }}"{% if d.latency_usual %} title="{{ d.latency_usual|capitalize }}"{% endif %}>{{ "%.0f"|format(latest.response_ms) }} ms</span>
|
||||
{% elif m.type == 'dns' and latest.resolved_ip %}<span class="tone-ok">{{ latest.resolved_ip }}</span>
|
||||
{% else %}{{ status_badge('up') }}{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user