From 69e872569cdfbb6a14cc91bc473ad3b11c833417 Mon Sep 17 00:00:00 2001 From: Luigi D'Acunto Date: Thu, 30 Jul 2026 13:07:12 +0200 Subject: [PATCH] Add search/filter bar to large ListChoice checkbox lists Checkmk's native checkbox-list widget renders one row per item with no grouping or pagination, making rules like "Deploy custom files with agent" hard to work with when only a few items need to be checked among hundreds. Adds a search box, a live selected-count, and a "Selected only" toggle above any such list with 15+ items. --- CHANGELOG.md | 5 + README.md | 8 ++ user_script/checkmk_swissknife.user.js | 121 ++++++++++++++++++++++++- 3 files changed, 133 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de02089..391ee3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to **Checkmk SwissKnife** are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.17.0] - 2026-07-30 + +### Added +- Search box, live "N / total selected" counter and a "Selected only" toggle above large checkbox lists (Checkmk's native ListChoice widget, e.g. "Deploy custom files with agent"), making it easy to find the few relevant checkboxes among hundreds without scrolling. Purely visual filtering — checkbox state and form submission are unaffected. + ## [2.16.2] - 2026-07-29 ### Changed diff --git a/README.md b/README.md index a0c111d..2687450 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ A [Tampermonkey](https://www.tampermonkey.net/) userscript that enhances the Che | **Auto-check Foreign Changes** | Automatically ticks the "Activate foreign changes" checkbox on the pending changes page | `tryAutoCheckForeignActivation` | | **Collapse All / Expand All** | Adds two buttons to the menu bar to collapse or expand all accordion sections at once | `addAccordionToggleButtons` | | **Site Status Filters** | Adds Disabled / Online / Timeout / Not running toggle buttons below "Add connection" to quickly filter the site connections list | `addSitesFilterBar` | +| **ListChoice Filter Bar** | Adds a search box, a "N / total selected" counter and a "Selected only" toggle above large checkbox lists (e.g. "Deploy custom files with agent") | `addListChoiceFilter` | --- @@ -148,6 +149,13 @@ Only one filter can be active at a time — clicking the active button turns it Applies to: `wato.py?mode=sites` (with or without sidebar). +--- + +### ListChoice Filter Bar +Checkmk's native checkbox-list widget (used by rules like "Deploy custom files with agent") renders one row per item with no grouping or pagination — some lists have 100+ entries even though a rule typically only needs 3-4 checked. Adds a search box, a live "N / total selected" counter, and a "Selected only" toggle above any such list with 15+ items. Purely visual — checkbox state and the Save button are unaffected. + +Applies to: any WATO rule editor page containing a large checkbox-list value (with or without sidebar). + ## How it works The script injects enhancements at page load and re-applies them on SPA navigation (Checkmk reloads content inside an `