Repository navigation
Monitor: redesign status legend as theme-appropriate colour chips - #260
Merged
Merged
Conversation
Match the thold and syslog legends: render the status key as an evenly sized, wrapping flex row of rounded, solid-colour chips with white text (controller.php now emits .monitorLegend/.monitorLegendItem instead of the old fixed-position .monitor_legend bar). Chip colours are scoped under .monitorLegend so the device tiles keep their subtle tints. The standard solid palette lives in css/monitor.css and applies to every theme; css/deepness.css overrides the Up chip to emerald to harmonise with the Deepness palette. Removed the now-dead per-theme .monitor_legend overrides (midwinter previously hid the legend via display:none; it now shows chips like the other themes).
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Both Up-chip colours have insufficient white-text contrast for WCAG AA compliance.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Redesigns the Monitor status legend as theme-aware, wrapping colour chips while preserving existing device-tile styling.
Changes:
- Replaces legacy legend markup and fixed positioning.
- Adds solid semantic colours with a Deepness-specific accent.
- Removes obsolete theme overrides and documents the change.
| File | Description |
|---|---|
includes/controller.php |
Emits the new legend chip markup. |
css/monitor.css |
Defines shared chip layout and colours. |
css/deepness.css |
Adds the Deepness Up-chip accent. |
css/classic.css |
Removes the legacy legend override. |
css/dark.css |
Removes the legacy legend override. |
css/midwinter.css |
Enables the redesigned legend. |
css/modern.css |
Removes the legacy legend override. |
css/paper-plane.css |
Removes the legacy legend override. |
css/paw.css |
Removes the legacy legend override. |
css/sunrise.css |
Removes legacy positioning and colouring. |
CHANGELOG.md |
Records the legend redesign. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Change background color for deviceUpFull class to better match Deepness palette. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
xmacan
approved these changes
Oct 7, 2026
2 tasks done
TheWitness
added a commit
that referenced
this pull request
Oct 7, 2026
…rflow (#261) Three follow-ups to the legend-chip redesign (PR #260): (1) legend chips kept overflowing their rounded bounds when space was tight - added min-width:max-content (keeping white-space:nowrap) so each chip is at least as wide as its label and wraps to a new row instead of clipping. (2) device-tile status icons were coloured by the core .deviceXxx classes, which did not match the legend; monitor.css now colours .mon_icon.deviceXxx from the same solid legend palette (with !important to beat the core themes' !important rules), including the Deepness emerald Up. (3) List view now adopts the Cacti deviceStatus pill design: the status cell is wrapped in a .monitorStatus.deviceStatus pill coloured from the legend palette, and the whole-row tint was removed so only the pill is coloured. includes/render.php added to the patch-coverage allowlist (auth-gated render library, not unit-loadable, same as controller.php).
2 tasks done
xmacan
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Redesigns the Monitor status legend to match the thold and syslog legends: instead of the old fixed-position bar whose cells reused the subtle device-tile tints, the legend now renders as an evenly sized, wrapping flex row of rounded, solid-colour chips with white text.
includes/controller.phpnow emits<div class='monitorLegend'>/<div class='monitorLegendItem …Full'>instead of the old.monitor_legend/.monitor_legend_cellmarkup.css/monitor.csscarries the chip layout and the standard solid palette, scoped under.monitorLegend .device…Fullso the device tiles keep their existing tints — only the legend chips get solid colours (same technique thold uses).css/deepness.cssoverrides the Up chip to emerald (#1f9f6e) to harmonise with the Deepness palette, mirroring what the thold Deepness theme does..monitor_legendoverrides from every theme stylesheet. Note:midwinterpreviously hid the legend entirely (display:none); it now shows the chip legend like the other themes.All themes are in scope (classic, modern, paw, dark, midwinter, sunrise, paper-plane, and deepness).
Related Issue
Follows the same legend-chip treatment previously applied to thold and syslog.
Motivation and Context
A legend is a colour key, so its swatches should be solid and legible on every theme rather than inheriting the faint tile tints (which were hard to read, especially on dark themes). This brings Monitor's legend in line with the thold and syslog plugins for a consistent look across the Cacti plugin family.
How Has This Been Tested?
php -lclean onincludes/controller.php..monitor_legend/.monitor_legend_cellCSS-class references remain (the survivingmonitor_legendreferences are the user/config setting name that toggles the legend, which is unchanged).includes/controller.php, which is already on the patch-coverage$unmeasured_allowlist; CSS files are not coverage-gated.Types of changes
Checklist: