Repository navigation
Converge Status cards and chart Dashboards on the shared Card API - #437
Open
TheWitness wants to merge 2 commits into
Open
TheWitness wants to merge 2 commits into
TheWitness wants to merge 2 commits into
Conversation
The Syslog Status cards and the user chart Dashboards now use the shared Cacti dashboarding Card API (js/cards.js + css/cards.css, kept byte-identical across plugins so the bundle can be promoted into Cacti core unchanged). Both render with the standardized .cc* card chrome (drag/keyboard reorder, show more/less, maximize, refresh, remove). The Status-tab controller moves out of js/functions.js into a thin js/syslog_dashboard.js adapter over the shared CactiCards controller; the chart panels adopt the same chrome while keeping their continuous drag-resize. The plugin's bundled css/cards.css and js/cards.js load only on cores that do not ship them globally (file_exists gate); the --cc-* theme bindings live in css/search.css (Status) and css/dashboard.css (Dashboards). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TheWitness
force-pushed
the
feature/standard-cards-bundle
branch
from
November 10, 2026 15:06
9422f44 to
9aea87e
Compare
TheWitness
marked this pull request as ready for review
November 11, 2026 00:24
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Status cards can create unintended columns on phones, and overlapping refresh requests can let older responses overwrite newer data.
2 open issues
What changed in this PR
Standardizes Syslog’s Status cards and chart Dashboard panels on shared Cacti card styling, while moving Status interactions into an adapter over the shared controller.
Changes:
- Adds shared card assets with fallback loading when core does not provide them.
- Migrates both surfaces to
.cc*markup while preserving chart panels’ continuous resizing. - Updates theme bindings, browser checks, and the pipeline-health assertion.
| File | Description |
|---|---|
tests/Unit/PipelineHealthTest.php |
Checks the new severity attribute. |
tests/browser/dashboard_cards.cjs |
Updates style and reorder checks for shared markup. |
syslog.php |
Emits shared card markup and loads fallback assets. |
js/syslog_dashboard.js |
Adds the Status adapter and refresh/layout integration. |
js/functions.js |
Removes the previous Status controller. |
js/dashboard.js |
Migrates chart panels to shared card classes. |
js/cards.js |
Adds reusable card interactions and layout persistence hooks. |
css/search.css |
Replaces Status chrome with theme bindings. |
css/dashboard.css |
Adds shared theme bindings for chart panels. |
css/cards.css |
Defines shared card styling and state presentation. |
CHANGELOG.md |
Documents the migration and asset-loading behavior. |
Review effort: Balanced
bmfmancini
previously approved these changes
Nov 11, 2026
- Clamp the shared .ccW* spans at the Status grid breakpoints (.ccW5-8 at four columns, every card to a full row at one column) so reducing --cc-cols no longer leaves wide spans creating implicit columns on phones. - Track a per-card request generation in the fetchCard helper that both the per-card refresh and the toolbar Refresh all pass through, resolving a superseded request to null so an earlier response cannot overwrite newer Status data. - Sync cards.js with the shared fix that preserves the live expand/collapse state at swap time (refresh race), byte-identical with core. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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
Converges the two syslog card surfaces — the Status tab and the user chart Dashboards — onto the shared Cacti dashboarding Card API (
js/cards.js+css/cards.css), the same byte-identical bundle used by the other in-scope plugins (intropage, mactrack, hmib, apcupsd) so it can be promoted into Cacti core unchanged.This is the syslog step of the cross-plugin card standardization. The canonical bundle here matches the open core/plugin drafts:
js/cards.jsmd584876af1581b8f349f0a557c7e4ece28css/cards.cssmd5c4337c8dcb55eb638212de9e6fe7e1f1What changed
Status tab (hmib-style status cards)
js/functions.jsinto a thinjs/syslog_dashboard.jsadapter over the sharedCactiCardscontroller (drag/keyboard reorder, show more/less, maximize, refresh, remove, add-from-catalogue, debounced layout save).functions.jskeeps only the search/UI logic.syslog.phpemits the standardized.cc*chrome (.ccToolbar/.ccAdd/.ccRefresh/.ccGrid/.ccCard/.ccCardHeader/.ccDrag/.ccTitle/.ccTools/.ccTool/.ccCardBody) anddata-severity; the grid id issyslog_status_grid.syslogStatus*classes per the contract (only the chrome is standardized).Chart Dashboards (billboard.js panels)
.cc*chrome while keepingsyslogDashboardCardas a plugin marker for the continuous drag-resize (width → column span, height → chart pixels), which is preserved intentionally (no steppedccH).Theme + assets
--cc-*custom properties are bound to syslog's theme (currentColor-derived, following every Cacti theme) incss/search.css(Status) andcss/dashboard.css(Dashboards); the old per-plugin chrome CSS is retired in favour ofcss/cards.css.css/cards.cssandjs/cards.jsload from the plugin only on cores that do not ship them globally (file_existsgate).Testing
php -l+node -cclean on all changed files.tests/browser/dashboard_cards.cjs(rewritten for.cc*): Status/Dashboard chrome parity (light + dark) and panel drag/keyboard reordering pass.tests/Unit/PipelineHealthTest.phpfor thedata-severitychrome.Draft while the shared bundle finishes converging across the remaining plugins and the two core repos.