{# alerts/_rule_target.html — what one rule watches (#5475). For a host source: the Host, then its Part ("the whole host", then mounts, cores and so on), so a host's parts never crowd the list of hosts. Any other source: one Resource picker. Then the metrics that resource reports, and a preview of the chosen one. Picking a host or part swaps this block alone (/alerts/api/rule_target); picking a metric swaps the preview, which is read in its own request after the block is drawn (#5485). #} {% set one = current_covers|default("resource") == "resource" %}
{% if host_source %}
{% if hosts %} {% else %} {% endif %}
{% if not hosts %}

The list fills once an agent reports.

{% endif %} {% else %}
{% if resources %} {% else %}

The list fills from readings this source has recorded. Come back once it has reported.

{% endif %}
{% endif %}
{% if metric and metric_about(metric) %}

{{ metric_about(metric) }}

{% else %}{% endif %} {# The preview comes in its own request once the page is up (#5485). #}
{%- include "alerts/_metric_preview.html" -%}