{% import "_macros.html" as m %} {% macro sorth(key, label) -%} {%- set ndir = 'desc' if (sort == key and dir == 'asc') else 'asc' -%} {{ label }}{% if sort == key %} {{ '▲' if dir == 'asc' else '▼' }}{% endif %} {%- endmacro %} {{ sorth('name', 'Device') }}{{ sorth('enabled', 'State') }}{{ sorth('host', 'Host / address') }} {{ sorth('backups', 'Backups') }}{% if latency_enabled %}{{ sorth('latency', 'Latency') }}{% endif %} {% for r in rows %} {% if latency_enabled %}{% endif %} {% else %} {% endfor %}
DescriptionGroupsTags
{{ r.name }} {{ m.status_orb(r.enabled, r.active) }} {{ r.host }} {{ r.description | truncate(40, True, '…', 0) }} {{ m.chips(r.groups, 2, 'group') }} {{ m.chips(r.tags, 3) }} {{ m.backups_cell(r) }}{{ m.latency_cell(r.latency, r.latency_hist) }}
No devices match your filter.
{{ m.pager(pg, '/ui/targets/rows', '#targets-result', '/targets', '#tgt-filters', '&sort=' ~ sort ~ '&dir=' ~ dir) }} {# Poll to refresh latency sparklines and the per-target busy indicator (a faster 4s cadence while something is running so the dot appears/clears promptly). #} {{ m.live_poll('/ui/targets/rows?view=' ~ view ~ '&sort=' ~ sort ~ '&dir=' ~ dir ~ '&page=' ~ pg.page ~ '&per=' ~ pg.per ~ '&q=' ~ (q|urlencode) ~ '&group=' ~ (selected_group|urlencode) ~ '&tag=' ~ (selected_tag|urlencode) ~ '&enabled=' ~ selected_enabled ~ '&version=' ~ (selected_version|urlencode), '#targets-result', 4 if has_active else 10) }}