From 8dd744b039e85e511fb4fffca0f244da98b411b3 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Wed, 13 May 2026 13:12:25 -0400 Subject: [PATCH] Show suppressed badge on host cards during global maintenance windows Global suppressions (target_type='all') have an empty target_name, so the selectattr filter never matched them, leaving no visual indicator when a global maintenance window was active. Pre-compute has_global_sup before the host loop and OR it into the badge condition. Co-Authored-By: Claude Sonnet 4.6 --- templates/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 47ee69b..417acec 100644 --- a/templates/index.html +++ b/templates/index.html @@ -324,6 +324,7 @@
+ {%- set has_global_sup = suppressions | selectattr('target_type', 'equalto', 'all') | list | length > 0 -%} {% for name, host in snapshot.hosts.items() %} {% set suppressed = suppressions | selectattr('target_name', 'equalto', name) | list %}
@@ -331,7 +332,7 @@
{{ name }} - {% if suppressed %} + {% if suppressed or has_global_sup %} 🔕 {% endif %}