{% if collectors.is_empty() %} {% else %} {% for c in collectors %} {% endfor %} {% endif %}
Type Name Target Group Enabled Source Updated
⚙️ No collectors configured
{% match c.collector_type %} {% when crate::storage::CollectorType::Tcp %} TCP {% when crate::storage::CollectorType::Ping %} Ping {% when crate::storage::CollectorType::Http %} HTTP {% endmatch %} {{ c.name }} {% match c.collector_type %} {% when crate::storage::CollectorType::Tcp %} {{ c.config["host"].as_str().unwrap_or("-") }}:{{ c.config["port"].as_u64().unwrap_or(0) }} {% when crate::storage::CollectorType::Ping %} {{ c.config["host"].as_str().unwrap_or("-") }} {% when crate::storage::CollectorType::Http %} {{ c.config["url"].as_str().unwrap_or("-") }} {% endmatch %} {{ c.group_name }} {% if c.enabled %} ✓ On {% else %} Off {% endif %} {% match c.source %} {% when crate::storage::CollectorSource::Config %} config {% when crate::storage::CollectorSource::Api %} api {% endmatch %} {{ Self::format_timestamp(c.updated_at) }}
{% if total_pages > 1 %}
Showing {{ (page - 1) * page_size + 1 }}-{{ (page - 1) * page_size + count }} of {{ total_count }} collectors
{% if page > 1 %} {% endif %} Page {{ page }} of {{ total_pages }} {% if page < total_pages %} {% endif %}
{% else if total_count > 0 %}
Showing {{ total_count }} collector{% if total_count > 1 %}s{% endif %}
{% endif %}