Fix UNKNOWN state color in service name tint
The service name tint shown when hiding the State column used a generic color palette instead of Checkmk's own state colors, showing UNKNOWN as purple instead of orange. Now matches the native .state_rounded_fill colors exactly.
This commit is contained in:
parent
4e574565ee
commit
728d5cc8b5
3 changed files with 10 additions and 3 deletions
|
|
@ -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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [2.22.2] - 2026-09-23
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- The service name tint applied when hiding the State column now uses Checkmk's actual state colors (green/yellow/red/orange for OK/WARN/CRIT/UNKNOWN) instead of a generic palette — UNKNOWN was showing as purple instead of the native orange.
|
||||||
|
|
||||||
## [2.22.1] - 2026-09-23
|
## [2.22.1] - 2026-09-23
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ Applies to: any `view.py` page listing hosts (with or without sidebar).
|
||||||
### Column Visibility Toggle
|
### 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, Age, 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.
|
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, Age, 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.
|
Hiding the **State** column also tints the service name itself with that row's state color (Checkmk's own colors: green OK, yellow WARN, red CRIT, orange 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).
|
Applies to: any `view.py` page with a data table (with or without sidebar).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Checkmk SwissKnife
|
// @name Checkmk SwissKnife
|
||||||
// @namespace https://luigidacunto.com/
|
// @namespace https://luigidacunto.com/
|
||||||
// @version 2.22.1
|
// @version 2.22.2
|
||||||
// @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
|
||||||
|
|
@ -1134,7 +1134,9 @@
|
||||||
localStorage.setItem(COLUMN_VIS_STORAGE_KEY, JSON.stringify([...set]));
|
localStorage.setItem(COLUMN_VIS_STORAGE_KEY, JSON.stringify([...set]));
|
||||||
}
|
}
|
||||||
|
|
||||||
const STATE_COLORS = { '0': '#4caf50', '1': '#e5a500', '2': '#e55b5b', '3': '#a078c8' };
|
// Matches Checkmk's own state colors (.state_rounded_fill.state<N>), not an
|
||||||
|
// arbitrary palette, so the tint reads the same as the native badge would.
|
||||||
|
const STATE_COLORS = { '0': '#13d389', '1': '#ffd703', '2': '#c83232', '3': '#ff8400' };
|
||||||
|
|
||||||
// Whenever the State column is hidden (via the Columns dropdown, in any
|
// Whenever the State column is hidden (via the Columns dropdown, in any
|
||||||
// combination — no separate "Clean view" mode needed), the Service name is
|
// combination — no separate "Clean view" mode needed), the Service name is
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue