Repository navigation
Add clickable status pills + zebra rows to Device Status and Threshold Log pages - #853
Merged
Merged
Conversation
…d Log pages Mirror the Thresholds-page pill treatment on the two remaining thold_graph.php sub-views: the Device Status (hoststat) list now renders each device's status as a clickable pill and zebra-stripes its rows instead of colouring the whole row, and the Threshold Log gains a clickable Status pill column right after Type (rows zebra-striped). Clicking a pill sets the page's Status filter and auto-applies. Regenerated cacti.pot for the new Log Status header.
TheWitness
requested review from
bmfmancini and
xmacan
and
a balanced review from Copilot
October 8, 2026 20:07
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Device-status pill values do not consistently map to exact filter semantics, producing incorrect or disappearing results.
1 open finding
What changed in this PR
Adds clickable, theme-aware status pills and zebra striping to Device Status and Threshold Log views.
Changes:
- Replaces row coloring with clickable status pills.
- Adds a Status column to Threshold Log.
- Updates translations and changelog.
| File | Description |
|---|---|
thold_graph.php |
Implements status pills, filtering, and zebra rows. |
locales/po/cacti.pot |
Regenerates translation metadata. |
CHANGELOG.md |
Documents the UI enhancements. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bmfmancini
approved these changes
Oct 8, 2026
bmfmancini
approved these changes
Oct 8, 2026
bmfmancini
previously approved these changes
Oct 8, 2026
Address review feedback on PR #853: the clicked status pills did not consistently filter to the state shown on the device row. - Map the Error pill to an exact Error filter (host_status=4) instead of the aggregate Not Up (-4), and add an Error option to the Status dropdown. - Rework the host_status WHERE clause so each state reuses the same failure-count override classification as thold_device_status_pill(): the override now uses >= (matching the pill, was >) and only reclassifies hosts to Down, so the Down filter includes overridden hosts and the Up/Unknown/Error filters exclude them.
bmfmancini
approved these changes
Oct 9, 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.

Summary
Extends the clickable status-pill treatment (shipped for the Thresholds page in #851) to the two remaining
thold_graph.phpsub-views: Device Status (action=hoststat) and Threshold Log (action=log).Device Status page
.thold-pillin the existing Status column instead of colouring the whole row; rows now zebra-stripe.tabindex/role=button, Enter/Space).form_host_status_row_color()(printed a colour-classed<tr>) is replaced bythold_device_status_pill(), which reuses the same failure-count override logic andget_uncolored_device_status()label.Threshold Log page
Theme / colours
.device<State>Full/ log-state background classes, and the shared shape-onlycss/pills.cssalready loads globally viathold_page_head(). Colours stay fully theme-aware.Testing / CI
php -l thold_graph.php- clean.tests/bin/validate-manifest.php- passes (no file-set change).tests/bin/check-i18n-pot.php- passes; regeneratedlocales/po/cacti.potfor the newStatuslog header.functions.php/polling.php/setup.php); no test loadsthold_graph.php, so Pest/patch-coverage are unaffected.