Repository navigation
Monitor 3.0 board: full-width grouping cards, Tree ordering, and the Status->Events filter model - #274
Merged
TheWitness merged 26 commits intoOct 12, 2026
Conversation
TheWitness
requested review from
bmfmancini and
xmacan
and
a balanced review from Copilot
October 11, 2026 15:11
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is localized and sound, with only a non-blocking release-note inaccuracy.
1 open finding
What changed in this PR
Replaces the problematic card grid with a responsive flex layout and orders Tree cards by device count.
Changes:
- Uses wrapping flexbox sizing for grouping cards.
- Sorts Tree cards busiest-first while preserving saved order.
- Documents both refinements.
| File | Description |
|---|---|
includes/render.php |
Adds Tree sorting and flex-oriented span metadata. |
css/monitor.css |
Replaces grid rules with responsive flexbox rules. |
CHANGELOG.md |
Records the changes; one comparison needs correction. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…r Cacti's new install-failure reporting
bmfmancini
previously approved these changes
Oct 11, 2026
…ls with filter toggles
…ugin columns, tile sizing, dialog UX
…nly' view option (backend retained)
…s becomes scope-only Show
…ge for native selects)
- Add an "All" option to the Criticality filter. Its value (-1) matches the default and the pill "clear to default" action, which previously set the select to a non-existent option and submitted crit=null, tripping validate_store_request_vars. - Convert the Device Template filter to a checkbox multi-select (like Events) and actually apply it: renderWhereJoin now adds h.host_template_id IN (...) for the template grouping (0 = Non-Templated). Previously the template selection was never applied, so all hosts returned. - Persist the template selection as a user setting and serialize the multi-value for request/save payloads. - Add a "Devices without Service Checks" scope to the Show filter, shown only when the servcheck plugin is installed and permitted. - Tests + regenerated .pot.
- Left-align the List-view Actions column header and fa-layer-group glyph. - Stack the detail panels as plain blocks and force the jQuery UI dialog content box to always fill the dialog width, so the panels can no longer collapse into a narrow right-hand strip.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Realm enforcement, filter persistence, event rendering, performance, accessibility, and scope discrepancies remain unresolved.
13 open findings
Enforce Service Check realm authorization server-side · New Persist events and template in named dashboards · New Preserve legacy monitor status selections · New Show failed service checks on Down hosts · New Hide Service Check column without realm access · New Include Events in Save Filter payload · New Include events in named-dashboard payload · New Make filter pills keyboard accessible · New Hide failed service filter when unavailable · New Defer list-only count queries to List view · New Update release notes for the Events-based UI · New Fix malformed PHPDoc opener · New Align PR scope and description with behavioral changes · New
1 resolved since last review
🧠 Review effort: Balanced
The #monitorPanelDialog overflow override (higher specificity than the theme's .ui-dialog .ui-dialog-content) turned the content into a fixed-height scroll box that fought the theme's overflow:visible and squashed the panels. Use height:auto (capped by maxHeight) and stop overriding overflow so the dialog sizes to its content and the theme governs scrolling.
The Notes column consumed a lot of horizontal space in List view. Drop it from the table and surface the notes in the Host Information panel of the Device Detail Panels dialog instead (shown only when the device has notes).
List view: add a pen-square action icon linking to host.php?action=edit for users with the host.php (device edit) realm, beside the detail-panels icon. Filter bar: add a Devices button (right of Acknowledge) that opens the Cacti Devices page, shown only to users with the same realm. Also move the detail dialog anchor from top+300 to top+150.
Remove the Hostname column and add an orange fas fa-chart-line Graphs glyph (.monitorGraph, matching HMIB's colour) to the Actions column, linking to the device's graphs where the hostname hyperlink used to point.
- List columns reordered to Description, Location, Site, ID; add a Location column; Averages, Length in Status, Last Fail are now the last three columns, all right-aligned. - rfilter Search now also matches the device location. - Filter: move the Events multiselect to the second row (right of Search) and the Rows dropdown to the second row (left of Refresh); rename that dropdown from Devices to Rows. - Add a renderWhereJoin test for the description/location rfilter search.
…te, legacy status reset, failed_svc independent, defer list counts, pill keyboard a11y, PHPDoc/changelog fixes
bmfmancini
approved these changes
Oct 12, 2026
xmacan
approved these changes
Oct 12, 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
The 3.0 refresh of the Monitor board. This is more than a CSS tweak — it covers the grouping-card layout fix and the Status→Events filter model, list columns/pills, service-check integration, and the per-user / per-dashboard persistence and tests that go with them.
Layout (grouping cards)
.monitorGroupGridis now a wrapping flexbox and each.monitorGroupCardgrows viaflex-grow/flex-basiskeyed offdata-span. Inside Cacti's shrink-to-fithtml_start_boxdiv.cactiTablenesting the old CSS grid mis-counted its tracks and clipped cards to ~half the page; flexbox fills the full width at 360 / 500 / 760 / 1100 / 1517px with no overflow.monitorRenderTreeCards()now default-orders tree cards by device count (busiest first); any saved drag order still wins viamonitorRenderGroupCards().Filtering model (Status → Events)
role=button,tabindex=0, Enter/Space).Service checks (realm-gated)
status=-5), the Failed Svc event option, and the List-view Service Checks column/cell are all gated byapi_plugin_is_enabled('servcheck') && api_plugin_user_realm_auth('servcheck_test.php')— server-side, not just by hiding UI — so a user without the realm cannot probe service-check membership or see a misleading column.failed_svcis evaluated independently of ping availability, so a Down+Failed-Svc host still shows the Failed Svc pill.Persistence
plugin_monitor_dashboardsstores filter state as a JSONpropertiesobject (legacy rawurlmigrated in and dropped on upgrade). Both per-user settings and named dashboards persist the new events and template selections;loadDashboardSettings()replays them. Legacy availability-status codes (0/1/2) saved inmonitor_statusare normalized to-1on load so stale layouts don't silently broaden.Validation
php -lclean across the touched PHP; unit tests added/updated intests/Unit/DbFunctionsTest.php(including the realm-gated-5scope). Browser-measured the layout before/after against a faithful reproduction of Cacti'shtml_start_boxnesting (before: 49% clipped; after: 99% full width).No schema change beyond the documented dashboard
propertiesmigration.