#5212 "Plain labels: no raw ids, scopes, metric keys or unexplained jargon", batch 1: - Audit log: each action reads as a sentence ("paused monitor"), with the code as its tooltip. Detail shows flags as yes/no, lists joined, a run's scope by name, spans as spans, and no ids the entity column already gives. The filter is now a picker of areas. - Alert rules, history and Status say the condition in words: "is down", "Fullest disk >= 85%". Readings use metric_value, and history times use |ago. - Rule form: sources and metrics by name, the threshold's unit, "fires when it is down/up" for an up/down metric instead of 0.5, and a metric reference built from the catalog. - Schedules and Maintenance: viewers no longer see Run now, Pause, Edit, Delete or New. Intervals and next runs read as "every 2h" and "in 3h"; a scope reads "Every alert on Host agent". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.5 KiB
HTML
35 lines
1.5 KiB
HTML
{# alerts/_rule_fields.html — the resource and metric pickers for one source;
|
|
the rule form includes it and swaps it in again when the source changes. #}
|
|
<div class="form-group">
|
|
<label>Resource</label>
|
|
{% if resources %}
|
|
<select name="resource_name" required>
|
|
{% if not current_resource %}<option value="" disabled selected>— pick a resource —</option>{% endif %}
|
|
{% for r in resources %}
|
|
<option value="{{ r }}" {% if r == current_resource %}selected{% endif %}>{{ r }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% else %}
|
|
<select name="resource_name" required disabled>
|
|
<option value="">Nothing has reported from this source yet</option>
|
|
</select>
|
|
<p class="field-hint">
|
|
The list fills from readings this source has recorded. Come back once it has reported.
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Metric</label>
|
|
<select name="metric_name" required data-metric-picker>
|
|
{% if not current_metric %}<option value="" disabled selected>— pick a metric —</option>{% endif %}
|
|
{% for m in metrics %}
|
|
<option value="{{ m }}" data-unit="{{ metric_unit(m) }}" data-about="{{ metric_about(m) }}" {% if m in ("is_up", "is_healthy") %}data-binary{% endif %}
|
|
{% if m == current_metric %}selected{% endif %}>{{ metric_label(m) }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% if current_metric and metric_about(current_metric) %}
|
|
<p class="field-hint" data-metric-about>{{ metric_about(current_metric) }}</p>
|
|
{% else %}<p class="field-hint" data-metric-about hidden></p>{% endif %}
|
|
</div>
|