From a5f7b1a9343176de770d1e3a76fc2a4c955555c7 Mon Sep 17 00:00:00 2001 From: Luigi D'Acunto Date: Fri, 31 Jul 2026 12:11:26 +0200 Subject: [PATCH] Add "Copy host list (JSON)" button to WATO folder pages Copies hostname, alias, IPv4 address and monitored site for every host in the list (folder browsing or host search results) to the clipboard as JSON. --- CHANGELOG.md | 5 ++ README.md | 8 +++ user_script/checkmk_swissknife.user.js | 94 +++++++++++++++++++++++++- 3 files changed, 106 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4b4183..c65c22a 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.19.0] - 2026-07-31 + +### Added +- "Copy host list (JSON)" button in the WATO menu bar on any host-list page (folder browsing or host search results). Copies hostname, alias, IPv4 address and monitored site for every visible host to the clipboard as JSON. + ## [2.18.0] - 2026-07-30 ### Added diff --git a/README.md b/README.md index 5f0272d..04cbb7f 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ A [Tampermonkey](https://www.tampermonkey.net/) userscript that enhances the Che | **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` | | **Extra Column Toggle** | Adds an ON/OFF button to the menu bar to show/hide the Extra column; the choice is remembered across reloads | `addExtraColumnToggle` | +| **Copy Host List (JSON)** | Adds a button to the menu bar that copies hostname, alias, IPv4 address and monitored site for every host in the list to the clipboard as JSON | `addHostListCopyButton` | --- @@ -159,6 +160,13 @@ Checkmk's native checkbox-list widget (used by rules like "Deploy custom files w Applies to: any WATO rule editor page containing a large checkbox-list value (with or without sidebar). +--- + +### Copy Host List (JSON) +Adds a **"Copy host list (JSON)"** button to the menu bar on any WATO host-list page — plain folder browsing or host search results. Clicking it copies hostname, alias, IPv4 address and monitored site for every host currently listed to the clipboard as a JSON array, ready to paste into a script, ticket, or spreadsheet. + +Applies to: `wato.py?mode=folder` (folder browsing and host search results, 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 `