8 Commits
Author SHA1 Message Date
Thomas VincentandTheWitness 11fa109548 refactor: safe PHP 7.4 modernization (#212)
* refactor: add strict typing and clean up standalone infra

* refactor: safe PHP 7.4 modernization (arrays, null coalescing)

* fix: restore corrupted function calls from refactor tool

Revert bulk array()->[] rewrite damage affecting:
- is_array, in_array, xml2array
- call_user_func_array, filter_var_array
- Function declarations with _array suffix

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix: restore corrupted syntax from refactor tool

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix: remove duplicate declare(strict_types) statements

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(security): escape request reuse in monitor views

* fix:Run php-cs-fixit to resolve workflows

* fix: Remove strict types for now

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-07-09 09:20:25 -04:00
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
TheWitness 89a2a485ad Update copyrights to 2026 (#199) 2026-02-14 15:56:15 -05:00
TheWitness c9ea6ecd34 QA: Update Copyrights to 2025 2025-06-16 09:20:41 -04:00
TheWitness cae4012523 QA: Updating Copyrights to 2024 2024-03-16 04:57:13 +05:30
netniV f0b6bf5e54 Update copyright for 2023 2023-01-04 22:15:22 +00:00
TheWitness ce822e5b9b Fixing Issue #340 - Spelling
Fix "Notification" Spelling Error
2021-02-23 07:42:08 -05:00
cigamit c3d3e3749d committing monitor 2.0
Note: Requires some syslog and base cacti changes.
Rough ChangeLog as follows:
---  2.0 ---
feature: Support for Cacti 1.0
feature: Complete redesign using font awesome
feature: Allow specification of device criticality
feature: Allow specification of warning and alert ping round trip
latency number
feature: All GUI interactions using ajax
feature: Specification of settings using filter
feature: Save user based settings
feature: Using new Cacti permissions system
feature: Generalized code cleanup
feature: Integrate better with Thold and Syslog
2016-06-26 19:36:27 -05:00