8aad2ab43d
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
1.1 KiB
HTML
30 lines
1.1 KiB
HTML
{# alerts/_rule_fields.html — HTMX partial: resource + metric selects for a given source_module #}
|
|
<div class="form-group">
|
|
<label>Resource Name</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="">No data yet — run monitors first</option>
|
|
</select>
|
|
<p style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">
|
|
Resource names populate from live metric data. Start the scheduler and try again.
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Metric Name</label>
|
|
<select name="metric_name" required>
|
|
{% if not current_metric %}<option value="" disabled selected>— pick a metric —</option>{% endif %}
|
|
{% for m in metrics %}
|
|
<option value="{{ m }}" {% if m == current_metric %}selected{% endif %}>{{ m }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|