diff --git a/CHANGELOG.md b/CHANGELOG.md index bf17d74..114cf66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ 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.22.0] - 2026-09-23 + +### Added +- "Columns" dropdown in the monitoring view menu bar, on any view.py page with a data table. Lets you hide/show native Checkmk columns that eat horizontal space but aren't always needed (State, Site alias, Host icons, Service icons, Checked, Check command, Groups) — only the columns actually present on the current view are listed, each with its own ON/OFF button plus "Show all"/"Hide all" shortcuts, so it's always clear at a glance what's currently shown. Purely visual, doesn't touch form/checkbox state; the choice is saved and applies to every view. Hiding the State column also tints the service name with that row's state color (green/amber/red/purple), so problems stay identifiable without the column. + +### Changed +- "Export to Markdown (.md)", "Copy hosts (JSON)" and "Copy hosts (TSV)" are now grouped under a single "Export ▾" dropdown in the menu bar instead of three separate buttons, to keep the bar from growing too wide now that the Columns dropdown has joined it. + +## [2.21.0] - 2026-08-25 + +### Added +- "Copy hosts (JSON)" and "Copy hosts (TSV)" buttons in the monitoring view menu bar, on any view.py page listing hosts (e.g. "Host search"). Copies hostname (FQDN) and IP for every host on the page — deduplicated, and correctly handling views that render 2 hosts per physical row as side-by-side column pairs — either as JSON or as tab-separated `FQDN\tIP` lines ready to paste into a spreadsheet. + ## [2.20.2] - 2026-08-20 ### Fixed diff --git a/README.md b/README.md index d094ccf..1cd367b 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,9 @@ A [Tampermonkey](https://www.tampermonkey.net/) userscript that enhances the Che | **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` | -| **Service Export to Markdown** | On any view.py services table (Host + Display name/Service columns), adds a button that exports a Markdown table with whichever of Site/Host/IP/Display name/Summary/Details are present, to the clipboard and as a downloaded `.md` file | `addServiceExportButton` | +| **Service Export to Markdown** | On any view.py services table (Host + Display name/Service columns), adds an "Export ▾" menu entry that exports a Markdown table with whichever of Site/Host/IP/Display name/Summary/Details are present, to the clipboard and as a downloaded `.md` file | `addServiceExportButton` | +| **Copy Hosts (JSON/TSV)** | Adds "Copy hosts (JSON)"/"Copy hosts (TSV)" entries to the same "Export ▾" menu on any view.py host list, copying hostname (FQDN) and IP for every host on the page to the clipboard | `addHostExportButtons` | +| **Column Visibility Toggle** | Adds a "Columns" dropdown with a per-column ON/OFF button plus "Show all"/"Hide all", to hide/show bulky native columns (State, Site alias, Host/Service icons, Checked, Check command, Groups); only columns present on the current view are listed, and the choice is remembered across reloads. Hiding State tints the service name with its state's color instead | `addColumnVisibilityToggle` | --- @@ -172,10 +174,26 @@ Applies to: `wato.py?mode=folder` (folder browsing and host search results, with --- ### Service Export to Markdown -On any monitoring view showing a services table — detected structurally by a **Host** column plus a **Display name**/**Service** column, not tied to one specific view — adds an **"Export to Markdown (.md)"** button to the menu bar. It turns the visible table into a standard Markdown table, one row per service, copies it to the clipboard and downloads it as a `.md` file in one click. Columns are Site, Host, IP, Display name, Summary, Details in that order, but only the ones actually present on the current view are included — a view without a Details column simply won't have one in the export. Rows are read at click time, so the export always matches what's currently on screen. +On any monitoring view showing a services table — detected structurally by a **Host** column plus a **Display name**/**Service** column, not tied to one specific view — adds an **"Export to Markdown (.md)"** entry to the **"Export ▾"** dropdown in the menu bar. It turns the visible table into a standard Markdown table, one row per service, copies it to the clipboard and downloads it as a `.md` file in one click. Columns are Site, Host, IP, Display name, Summary, Details in that order, but only the ones actually present on the current view are included — a view without a Details column simply won't have one in the export. Rows are read at click time, so the export always matches what's currently on screen. Applies to: any `view.py` page with a services table (with or without sidebar). +--- + +### Copy Hosts (JSON/TSV) +Adds **"Copy hosts (JSON)"** and **"Copy hosts (TSV)"** entries to the same **"Export ▾"** dropdown, on any monitoring view listing hosts (e.g. "Host search"), whether results are grouped by folder across several tables or shown as a single table. Clicking one copies hostname (FQDN) and IP for every host currently listed to the clipboard — deduplicated — either as a JSON array or as tab-separated `FQDN` / `IP` lines (with a header row) ready to paste into a spreadsheet. + +Applies to: any `view.py` page listing hosts (with or without sidebar). + +--- + +### Column Visibility Toggle +Adds a **"Columns"** dropdown to the menu bar on any monitoring view table. Each entry hides/shows one native Checkmk column — State, Site alias, Host icons, Service icons, Checked, Check command, Groups (service + host) — found by its header text, so it works on any view without being tied to one specific one. Only the columns actually present on the current view are listed, each with its own **ON/OFF** button so it's always clear at a glance what's currently shown, plus **"Show all"**/**"Hide all"** shortcuts at the top of the panel to reset everything in one click. Purely visual (CSS only, never touches form/checkbox state), and the choice is saved so it applies the same way to every monitoring view you open afterwards. + +Hiding the **State** column also tints the service name itself with that row's state color (green OK, amber WARN, red CRIT, purple UNKNOWN), so problems stay identifiable at a glance without the column taking up space. + +Applies to: any `view.py` page with a data table (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 `