Repository navigation
feature: add status pill column to Tests list - #132
Merged
Merged
Conversation
Add a Status column after Name in data_list() that renders each service check's current state as a colour-coded pill, reusing the status legend's solid colours. Also fixes a missing quote on the row class attribute so the row id is emitted correctly.
TheWitness
requested review from
bmfmancini and
xmacan
and
a balanced review from Copilot
October 8, 2026 17:59
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The translation template is missing the new label, and the success pill does not meet minimum text contrast.
2 open findings
What changed in this PR
Adds an at-a-glance status pill to the Tests list and corrects row markup.
Changes:
- Adds a translated Status column and state pills.
- Adds pill styling using existing state colors.
- Documents the feature in the changelog.
| File | Description |
|---|---|
servcheck_test.php |
Renders the Status column and fixes row attributes. |
css/common.css |
Styles color-coded status pills. |
CHANGELOG.md |
Records the new status column. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bmfmancini
previously approved these changes
Oct 8, 2026
Darken the Ok state green from #2f8f3a to #2e7d32 so white text meets WCAG AA (~5.1:1) on both the status pill and the matching legend chip. Regenerate locales/po/cacti.pot so the new __('Status') column header is translatable (fixes the i18n template CI gate).
xmacan
approved these changes
Oct 8, 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
Adds a Status column to the Tests list (
servcheck_test.php→data_list()), placed immediately after the Name column, that renders each service check's current state as a colour-coded pill.This mirrors the status-pill treatment being added to
plugin_thold, giving the Tests list an at-a-glance status indicator that complements the existing subtle row tint and the status legend footer.Details
Statuscolumn inserted right afterNamein thedata_list()$display_textdefinition (non-sortable, since the state is derived in PHP rather than from a single DB column).$style(servcheck_ok,servcheck_error,servcheck_warning,servcheck_failing,servcheck_duration,servcheck_disabled). The pill reuses that state key to look up its human label from$servcheck_statesand renders<span class="servcheck_pill servcheck_<state>">Label</span>.css/common.css): new.servcheck_pillbadge styling that reuses the solid legend colours so the pill stays legible on top of the subtle row tint on every bundled theme. Compound selectors (.servcheck_pill.servcheck_<state>) keep a higher specificity than the per-theme single-class row tints, so the badge colour always wins without needing per-theme overrides.<tr>tag (class='tableRow selectable $style id='...'→class='tableRow selectable $style' id='...') so the rowidattribute (used by row-selection JS) is emitted correctly.Testing
php -l servcheck_test.php— no syntax errors.