Compare commits
No commits in common. "0fbfda4b815d4726350d383f57e12bca38af1ee5" and "9f964b0c7d9afa301cb835b2746082827f98ed30" have entirely different histories.
0fbfda4b81
...
9f964b0c7d
3 changed files with 7 additions and 12 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,9 +1,8 @@
|
||||||
|
|
||||||
|
### My Personal test file for Dev only ###
|
||||||
/.*/
|
/.*/
|
||||||
/*.bat
|
/*.bat
|
||||||
/*.ps1
|
/*.ps1
|
||||||
/*.sh
|
|
||||||
/*.md
|
/*.md
|
||||||
|
|
||||||
!/.gitlab
|
|
||||||
!README.md
|
!README.md
|
||||||
!CHANGELOG.md
|
!CHANGELOG.md
|
||||||
|
|
@ -70,9 +70,9 @@ Applies to: `mode=edit_ruleset` with host/service context.
|
||||||
---
|
---
|
||||||
|
|
||||||
### Ruleset Filter Toggle
|
### 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).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Checkmk SwissKnife
|
// @name Checkmk SwissKnife
|
||||||
// @namespace https://luigidacunto.com/
|
// @namespace https://luigidacunto.com/
|
||||||
// @version 2.16.1
|
// @version 2.16.0
|
||||||
// @checkmk 2.3.x - 2.4.x
|
// @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.
|
// @description Collection of UI improvements for Checkmk WATO. Each fix or enhancement is added here as an independent feature.
|
||||||
// @author Luigi D'Acunto
|
// @author Luigi D'Acunto
|
||||||
|
|
@ -729,9 +729,9 @@
|
||||||
|
|
||||||
function addRulesetFilterToggle(doc) {
|
function addRulesetFilterToggle(doc) {
|
||||||
if (doc.body.dataset.cmkFilterToggle === '1') return;
|
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-rule-nomatch, tr.cmk-sk-ineffective';
|
||||||
const RELEVANT_SEL = 'tr.cmk-sk-rule-match, tr.cmk-sk-ineffective';
|
|
||||||
|
|
||||||
// No highlighted rows = no active search, toggle is useless
|
// No highlighted rows = no active search, toggle is useless
|
||||||
const relevantCount = doc.querySelectorAll(RELEVANT_SEL).length;
|
const relevantCount = doc.querySelectorAll(RELEVANT_SEL).length;
|
||||||
|
|
@ -750,10 +750,6 @@
|
||||||
|
|
||||||
if (!irrelevantRows && !irrelevantFolders) return;
|
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', `
|
injectStyles(doc, 'cmk-sk-filter-toggle-styles', `
|
||||||
#cmk-sk-filter-bar {
|
#cmk-sk-filter-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue