mirror of
https://github.com/Cacti/plugin_monitor.git
synced 2026-10-23 03:26:42 +09:00
develop
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5f96b8b7e2 |
Monitor 3.0 board: full-width grouping cards, Tree ordering, and the Status->Events filter model (#274)
* Monitor: flex grouping cards to full width, order Tree cards by device count * Monitor: drop inaccurate Site/Template ordering comparison from changelog * CI: install the declared thold dependency so Monitor can install under Cacti's new install-failure reporting * Monitor: remove the filter-status/criticality footer and prompt from the board * Monitor: give the busiest grouping cards (span 3-4) a full row so their tiles span the page * Monitor: changelog for full-width busy cards and footer removal * Monitor: drop Site grouping header, tighten tile uptime spacing, add List column tips * Monitor: add clickable List-view thold/servcheck/ping/criticality pills with filter toggles * Monitor: unit tests for new filter branches and thold/servcheck count helpers * Monitor: selectable status pill, fallback/empty pills, hide absent plugin columns, tile sizing, dialog UX * Monitor: center and keep clickable the tile hostname, remove 'Names only' view option (backend retained) * Monitor: multi-select Events filter + Events column (additive), Status becomes scope-only Show * Monitor: apply the Events multi-select on dropdown close (and on change for native selects) * Add All criticality, Device Template multi-select, servcheck scope - 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. * Update template escaping assertions for the multiselect markup * Cover empty-template branch in renderWhereJoin * Left-align Actions glyph and harden Device Detail Panels dialog layout - 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. * Size the detail dialog to its content instead of forcing overflow 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. * Anchor the detail dialog 300px from the top instead of centering * Make the detail panels dialog non-modal * Move Notes out of the List view into the detail dialog 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). * Add device-edit action icon and Devices filter button (realm-gated) 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. * Anchor the detail dialog at top+80 * List view: replace Hostname column with a Graphs action glyph 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 + filter layout refinements - 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. * Monitor: realm-gate service-check scope/column, persist events+template, legacy status reset, failed_svc independent, defer list counts, pill keyboard a11y, PHPDoc/changelog fixes |
||
|
|
11c7e46706 |
Monitor: Rows filter, servcheck status, Tiles sizing, device-detail panels, dashboard properties & grouping cards (#272)
* feat: servcheck hover integration, list-only Rows filter, fix Tiles & Time tile box Rows filter now only paginates/shows on the List view; non-list views show all devices. Add plugin_servcheck hover status + glyph alongside thold/syslog. Fix Tiles & Time tiles overflowing their bounding box via min-height. * fix(review): servcheck schema compat, realm-gated status, POT, tests - getHostTriggeredServchecks adapts to servcheck v0.3 (lastcheck/failures) and v0.4 (last_check/last_result) schemas and guards a missing table - Gate the hover status promotion behind the servcheck_test.php realm, matching the glyph link - Regenerate locales/po/cacti.pot for 'View Failing Service Check' - Add unit coverage for the servcheck helper (disabled/empty/missing-table exits, bound params, v0.3 & v0.4 predicates) * feat: distinct Service Check Failed status + List-view Actions detail panels - Add status 10 (Service Check Failed) with legend chip, tile/list colour and status-filter coverage via a realm-gated, schema-aware checkServchecks() host set - Add a non-sortable Actions column to the List view opening a modal of intropage-style cards: host info, data collection timing, service checks, thresholds, last-hour syslog, and device links - Regenerate cacti.pot; add unit coverage for checkServchecks() and the servcheck status filter * feat: dashboard properties JSON + colorized draggable grouping card panels - Restructure plugin_monitor_dashboards to a JSON properties column; migrate the legacy url into it and drop the url column on upgrade; load/save dashboards via the structure - Render Site and Device Template groupings as a responsive grid of draggable card panels, titles coloured by each group's worst device status, with per-dashboard/per-user persisted ordering - Add unit coverage for the url->properties migration and db stubs * fix(review): secure device panels, schema-aware not-tested, IPv6 link, thold realm - Enforce is_device_allowed() on ajax_hostpanel and ajax_status so a user cannot pull details for a device off their board - Gate the Thresholds card behind thold's thold_graph.php realm - Select the schema-specific servcheck check time (lastcheck/last_check) and use it so never-run v0.3 checks report Not tested - Bracket IPv6 literals in the Open Actual Device link * fix(review): ownership-aware card order + request helper for order array - Save/read grouping card order via the dashboard only when the user owns it; shared/read-only dashboards and no-dashboard fall back to the per-user monitor_cardorder setting so reorders persist - Read the posted order through get_nfilter_request_var() instead of \ directly |
||
|
|
ab0c5a0b2f | Avoid monitor JavaScript redeclaration errors (#221) | ||
|
|
501622a676 |
Refactor codebase for PSR12 compliance and modernization (#202)
* PSR12 - First run Rename functions to match PSR12 requirements * PSR12 run 1 - Change tabs to spaces - add consts * reduce cognetive complexity scores based on PSR12 and sonar scans * Split poller_monitor with helper file * update docblocks * code reorginization Breaking up some of the large files * modernize js Replaced legacy var with const/let. Switched loose checks to strict (===, !==, strict typeof checks). Added default param: applyFilter(action = ''). Used template literals for URL/query string assembly. Converted many callbacks to arrow functions and shorthand methods. Removed one duplicate object key in saveFilter payload (trim was defined twice with same value). Kept existing flow, DOM selectors, action names, and endpoints unchanged. * Update monitor.js Applied the Sonar-requested cleanups in monitor.js: * remove unused variables * remove unused variables * Update copilot-instructions.md * PSR12 formatting * Update db_functions.php * refactor functions Refactor rending function and Ajax call functions Lowe cognetive complexity prepare for easier testing * Add missing docblocks * Apply typing * remove checks for min php version * correct installation errors after PSR12 * try iinstall fix one more time * . * Update monitor_controller.php * Update monitor_controller.php * Update monitor_render.php * fix typing errors * apply php cs-fixer updates * missed 2 commits * Update js/monitor.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update js/monitor.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update copilot-instructions.md --------- Co-authored-by: TheWitness <thewitness@cacti.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |