mirror of
https://github.com/Cacti/plugin_monitor.git
synced 2026-10-23 03:26:42 +09:00
* Relocate schema to includes/database.php via plugin table API + db_update_table upgrade * CI: allowlist unmeasured schema bootstrap and web entry points * CI: keep include_once for the settings-page-only lib/reports.php load (uncoverable) * Add manifest.json + upgrade-time file pruning; consolidate themes/ into css/ * database: keep user-owned dashboards table across uninstall api_plugin_db_table_create() records plugin_monitor_dashboards in plugin_db_changes, so api_plugin_db_changes_remove() (run by api_plugin_uninstall() after plugin_monitor_uninstall()) would drop it even though monitor_drop_tables() intentionally leaves it in place. Remove the 'create' ownership record after provisioning (install and upgrade paths) so user dashboards survive an uninstall. Adds a regression test. * Prune phpunit.xml on upgrade and ignore markdown-lint configs phpunit.xml ships in the repo for CI but is a dev-only test artifact, so it is removed from manifest.json 'expected', pruned from installs on upgrade (like tests/), and excluded from the manifest drift check. The retired markdown-lint configs (.mdlrc, .md_style.rb) are deleted, and .md* is now ignored like .git*: protected from pruning and excluded from drift if it reappears. * Move libraries into includes/, flatten css, drop sonar config db_functions.php, monitor_render.php and monitor_controller.php move into includes/ (the latter two lose the monitor_ prefix, becoming render.php and controller.php); monitor.php and the tests load them from there. Each per-theme stylesheet css/<theme>/monitor.css becomes css/<theme>.css so users can drop their own css/<theme>.css into the css base, and plugin_monitor_page_head() looks there, falling back to css/monitor.css. The unreferenced sonar-project.properties is removed. Old paths are tombstoned so existing installs drop the stale copies on upgrade. * Rename includes/db_functions.php to includes/functions.php Follows the fleet convention for the plugin's shared library filename; monitor.php, the measured-source list and the unit test load it from the new name. * Regenerate cacti.pot for the includes/ file relocations Moving the plugin's library files into includes/ changed the source-reference lines in the translation template; regenerate it so the 'Verify translation template' CI check passes. * Harden prune against tampered-manifest path traversal The upgrade-time prune now rejects any tombstone containing '.'/'..' segments (which could escape the plugin directory or resolve to its root) and treats ancestors of whitelist entries as protected, so a tombstone on a parent directory can no longer delete a whitelisted file beneath it. * docs: update and align the Project Structure block Point the structure tree at the relocated files (libraries now under includes/, data files under docs/, stylesheets under css/) and align the trailing '# ...' comments to a single column so they no longer drift right. * docs/tests: standardize test header and correct manifest-contract notes - Use the full license header (from the plugin's own setup.php) in tests/Unit/PruneFilesTest.php instead of the abbreviated copyright banner. - Document that the manifest drift check and the upgrade-time prune also handle phpunit.xml and .md* files, matching the implemented behavior. * refactor: rename prune helpers to the plugin-slug function prefix The repository naming contract reserves the plugin_<name>_ prefix for plugin lifecycle / hook-registration functions; all other functions use the plain <name>_ prefix. Rename the internal upgrade helpers accordingly: plugin_<name>_prune_files() -> <name>_prune_files() plugin_<name>_rmtree() -> <name>_rmtree() The call site, unit tests, and the copilot-instructions.md references are updated to match. No behavioral change. * chore: set the Cacti compatibility floor to 1.2.29 Align the compat metadata (and the contributor-guide references) with the team decision to standardize the minimum supported Cacti version at 1.2.29; the previously proposed 1.2.32 floor was not adopted. * Bump plugin version to 3.0 so the upgrade-time cleanup migration runs Add a 3.0 CHANGELOG section for this cycle's schema/manifest work and set INFO version = 3.0 so existing 2.9 installs detect the version change and run the schema refresh and manifest-based file prune. --------- Co-authored-by: Copilot <copilot@users.noreply.github.com>
396 lines
7.6 KiB
CSS
396 lines
7.6 KiB
CSS
/*
|
|
+-------------------------------------------------------------------------+
|
|
| Copyright (C) 2004-2025 The Cacti Group |
|
|
| |
|
|
| This program is free software; you can redistribute it and/or |
|
|
| modify it under the terms of the GNU General Public License |
|
|
| as published by the Free Software Foundation; either version 2 |
|
|
| of the License, or (at your option) any later version. |
|
|
| |
|
|
| This program is distributed in the hope that it will be useful, |
|
|
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
| GNU General Public License for more details. |
|
|
+-------------------------------------------------------------------------+
|
|
| Cacti: The Complete RRDtool-based Graphing Solution |
|
|
+-------------------------------------------------------------------------+
|
|
| This code is designed, written, and maintained by the Cacti Group. See |
|
|
| about.php and/or the AUTHORS file for specific developer information. |
|
|
+-------------------------------------------------------------------------+
|
|
| http://www.cacti.net/ |
|
|
+-------------------------------------------------------------------------+
|
|
*/
|
|
|
|
.monitorHover {
|
|
color: #e3e3e3 !important;
|
|
}
|
|
|
|
.monitor a, .monitor a:active, .monitor a:visited,
|
|
.monitorHover a, .monitorHover a:active, .monitorHover a:visited {
|
|
color: #e3e3e3 !important;
|
|
}
|
|
|
|
.monitor a:hover {
|
|
color: snow !important;
|
|
}
|
|
|
|
.monitorHover a:hover {
|
|
color: snow !important;
|
|
}
|
|
|
|
.monitorFooterText {
|
|
color: gray;
|
|
font-size: 10px;
|
|
}
|
|
|
|
.monitorFooterTextBold {
|
|
color: snow;
|
|
font-size: 10px;
|
|
padding-bottom: 120px;
|
|
}
|
|
|
|
.monitor_legend {
|
|
background-color: #161616;
|
|
}
|
|
|
|
.deviceThresholdFull {
|
|
background-color: rgba(242, 25, 36, 0.4);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceDownMutedFull {
|
|
background-color: rgba(205, 207, 196, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceUnmonitoredFull {
|
|
background-color: rgba(20, 20, 196, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceWarningFull {
|
|
background-color: rgba(200, 86, 225, 0.6);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceAlertFull {
|
|
background-color: rgba(177, 20, 212, 0.6);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceThresholdMutedFull {
|
|
background-color: rgba(255, 207, 196, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceUpFull {
|
|
background-color: rgba(25, 142, 50, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceDownFull {
|
|
background-color: rgba(255, 0, 0, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceUnknownFull {
|
|
background-color: rgba(0, 0, 255, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceDisabledFull {
|
|
background-color: rgba(161, 161, 161, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceRecoveringFull {
|
|
background-color: rgba(255, 143, 30, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceErrorFull {
|
|
background-color: rgba(117, 15, 125, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.deviceNotMonFull {
|
|
background-color: rgba(250, 253, 158, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
line-height: 16px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorAlertNotify {
|
|
background-color: rgba(242, 25, 36, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorAlert2Warn {
|
|
background-color: rgba(200, 25, 36, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorWarningNotify {
|
|
background-color: rgba(251, 74, 20, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorReTriggerNotify {
|
|
background-color: rgba(200, 125, 88, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorReTriggerEvent {
|
|
background-color: rgba(255, 122, 48, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorTriggerEvent {
|
|
background-color: rgba(250, 253, 158, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorWarnTrigger {
|
|
background-color: rgba(210, 223, 128, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorRestoralNotify {
|
|
background-color: rgba(204, 255, 204, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorRestoralEvent {
|
|
background-color: rgba(205, 207, 196, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 11.11%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorRestore {
|
|
background-color: rgba(204, 255, 204, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorAlertTrigger {
|
|
background-color: rgba(242, 23, 33, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorReTrigger {
|
|
background-color: rgba(250, 116, 32, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorWarning {
|
|
background-color: rgba(255, 122, 48, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorAlert {
|
|
background-color: rgba(242, 25, 36, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorAckCol {
|
|
background-color: rgba(138, 43, 226, 0.2);
|
|
}
|
|
|
|
.monitorAcknowledgment {
|
|
background-color: rgba(138, 43, 226, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorBaseAlert {
|
|
background-color: rgba(251, 74, 20, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorNotice {
|
|
background-color: rgba(250, 253, 158, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorOk {
|
|
background-color: rgba(204, 255, 204, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorDisabled {
|
|
background-color: rgba(205, 207, 196, 0.2);
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
width: 14%;
|
|
padding: 3px;
|
|
color: #eeeeee;
|
|
}
|
|
|
|
.monitorGlyphEdit {
|
|
color: #666666;
|
|
}
|
|
|
|
.monitorGlyphDisable {
|
|
color: #990000;
|
|
}
|
|
|
|
.monitorGlyphEnable {
|
|
color: #006600;
|
|
}
|
|
|
|
.monitorGlyphChart {
|
|
color: #996600;
|
|
}
|
|
|
|
.monitorGlyphLog {
|
|
color: #999900;
|
|
}
|
|
|
|
.monitorGlyphAcknowledge {
|
|
color: #336600;
|
|
}
|
|
|
|
.monitorGlyphAcknowledge {
|
|
color: #336600;
|
|
}
|
|
|
|
.monitorGlyphAcknowledgeSuspend {
|
|
color: #336600;
|
|
}
|
|
|
|
.monitorLog {
|
|
white-space: pre-wrap !important;
|
|
}
|