Files
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>
2026-03-07 11:55:27 -05:00

27 lines
1.5 KiB
PHP

<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2026 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/ |
+-------------------------------------------------------------------------+
*/
header('Location:../index.php');