diff --git a/.gitignore b/.gitignore index c5f4110..75c810e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,8 @@ + +### My Personal test file for Dev only ### /.*/ /*.bat /*.ps1 -/*.sh /*.md - -!/.gitlab !README.md !CHANGELOG.md \ No newline at end of file diff --git a/README.md b/README.md index 476cb3b..69df676 100644 --- a/README.md +++ b/README.md @@ -70,9 +70,9 @@ Applies to: `mode=edit_ruleset` with host/service context. --- ### Ruleset Filter Toggle -After match/ineffective highlighting runs, a **"Relevant only"** button appears above the rule list. Clicking it hides all `✗ no match` rows, non-highlighted rows and empty folders, leaving only the matching (or ineffective) rules for the current context. +After match/ineffective highlighting runs, a **"Relevant only"** button appears above the rule list. Clicking it hides all non-highlighted rows and empty folders, leaving only the rules that matter for the current context. -Applies to: `mode=edit_ruleset` (when at least one `✓ match` or ineffective row exists). +Applies to: `mode=edit_ruleset` (when at least one highlighted row exists). --- diff --git a/user_script/checkmk_swissknife.user.js b/user_script/checkmk_swissknife.user.js index 995ce39..455b70e 100644 --- a/user_script/checkmk_swissknife.user.js +++ b/user_script/checkmk_swissknife.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Checkmk SwissKnife // @namespace https://luigidacunto.com/ -// @version 2.16.1 +// @version 2.16.0 // @checkmk 2.3.x - 2.4.x // @description Collection of UI improvements for Checkmk WATO. Each fix or enhancement is added here as an independent feature. // @author Luigi D'Acunto @@ -729,9 +729,9 @@ function addRulesetFilterToggle(doc) { if (doc.body.dataset.cmkFilterToggle === '1') return; + doc.body.dataset.cmkFilterToggle = '1'; - // Le righe "no match" NON sono rilevanti: il filtro serve proprio a nasconderle - const RELEVANT_SEL = 'tr.cmk-sk-rule-match, tr.cmk-sk-ineffective'; + const RELEVANT_SEL = 'tr.cmk-sk-rule-match, tr.cmk-sk-rule-nomatch, tr.cmk-sk-ineffective'; // No highlighted rows = no active search, toggle is useless const relevantCount = doc.querySelectorAll(RELEVANT_SEL).length; @@ -750,10 +750,6 @@ if (!irrelevantRows && !irrelevantFolders) return; - // Guard settato solo qui: se la tabella non era ancora renderizzata - // il prossimo tentativo deve poter riprovare - doc.body.dataset.cmkFilterToggle = '1'; - injectStyles(doc, 'cmk-sk-filter-toggle-styles', ` #cmk-sk-filter-bar { display: flex;