Commit Graph
79 Commits
Author SHA1 Message Date
TheWitness 27919c50d7 Updating Copyrights to 2026 (#6578) 2026-01-28 16:11:10 -05:00
TheWitnessandCopilot b993471579 Fix #6539 - Allow Standard Cacti Log Files to be Rotated on Demand,PHPdoc, and Typing (#6540)
* Fix #6539 - Allow Standard Cacti Log Files to be Rotated on Demand from the Cacti UI

* QA: php-cs-fixer updates and documentation for lib/database.php

* QA: Update .gitignore for composer files

* QA: Update .gitignore for composer files

* QA: Back off .gitignore change its duplicated

* QA: Fix typing of db_has_permissions

* QA: Fixing typing issue in db_format_index_create

* Update lib/clog_webapi.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* QA: Fix additional code issues

* QA: Applying more defaults to add device

* QA: Fix at the database layer

* QA: Fixes based upon automated testing

* QA: Fix at the database layer

* QA: After new SQL checking

* QA: Skip MacTrack oui database download warnings

* QA: Fixing type issue

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Some minor changes to avoid errors in testing

* QA: Unused variable

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Minor introduced code defect

* QA: Adding some unifying space around concatination

* QA: Consistent comments and new function alias'

* QA: Multi-line comment corrections

* QA: Fix SQL Style

* QA: Missed one function alias

* QA: PHPStan Level 2 and PHPDoc fixes

* QA: PHPStan Level 2 and PHPDoc Fixes

* QA: PHPStan Level 6 Fixes

* QA: Fix lib/xml.php to PHPStan Level 6

* QA: Wrong grep -v

* PHPStan Level 6 for lib/vdef.php

* PHPStan Level 8 for lib/time.php

* QA: Raise PHPStan to Level 6 for lib/database.php

* QA: Remove @deprecated tag from grv()

* QA: Switch to htmle() alias over html_escape()

* QA: More addressing PHPStan issues at Level 6

* QA: Change recommended by Copilot for Readability

* QA: More PHPStan fixes

* QA: More PHPStan fixes

* QA: More PHPStan fixes for lib/utility.php

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: Some phpseclib3 fixups to update to latest

* QA: More fixups for graphing for magic strings

* QA: More PHPStan fixes at Level 6

* QA: Fixing order string type on get_allowed_graphs()

* QA: Fixing improper use of print

* QA: Optimization of color_templates

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Raise PHPStan to Level 6 More Functions

* QA: Issues insalling Cacti

* QA: Issues insalling Cacti

* QA: Issues insalling Cacti

* QA: Issues insalling Cacti

* QA: Issues insalling Cacti

* QA: Issues testing Cacti

* QA: Copilot recommendation

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: Installer failing

* Undo ownership changes to remove tar errors

* QA: Updates after php-cs-fixer

* QA: Adding code checks to syntax checking

* QA Change syntax flow language

* QA: Reduce the number of cures

* QA: Use sequentional option

* Change runner to self-hosted for check job

* Fix typo in OS version in workflow file

* Add Git installation step in workflow

Added step to install Git if not already installed.

* Add '-y' flag to apt-get install and update commands

Updated apt-get commands to include '-y' for automatic confirmation.

* Change workflow OS version to 'ubuntu-latest'

Updated the workflow to use 'ubuntu-latest' instead of 'ubuntu:latest' and modified the 'runs-on' configuration.

* Remove sequential option from phpcsfixer script

* Remove PHPCS fixer step from workflow

Removed PHP coding standards check from workflow.

* Move code checks to before plugins

Moving these core checks to before the plugins are installed as we really want to check only the base Cacti here.

* Add Composer validation and caching to start of workflow

* QA: Addressing PHPStan additional

* QA: Restore composer lock file

* QA: Addressing PHPStan additional

* QA: Addressing PHPStan additional

* QA: Complete LDAP Project

* QA: php-cs-fixer doing it's thing

* QA: Syntax is already happening in PHPStan

* QA: The md5 function no longer exists

* QA: Update after ldap changes

* QA: Undo that last password hack

* QA: Attempting to switch to MariaDB 11.8

* QA: Attempting to switch to MariaDB 11.8

* QA: Resolving some issues with PHP8.4

* QA: Resolving some issues with PHP8.4

* QA: Add PHP8.5 to the matrix

* QA: Removing PHP8.5 due to dependency issues

* QA: Add the DB version to the testing output

* QA: Switch back to MySQL for the moment

* QA: More fidelity in reporting

* QA: The pipe must be mixed

* QA: Moving audit_schema.php changes from 1.2.x

* QA: Moving audit_schema.php changes from 1.2.x

* QA: Restore mysql monitoring

* QA: php-cs-fixer issues

* QA: Attempt to roll back to MariaDB 10.6

* QA: Attempt to fix check_all_pages.sh

* QA: Make installer functional again

* QA: Fix installer php-cs-fixer issues

* QA: Type to a string

* QA: Get the database version correctly

* QA: Fix issue with reports in check_all_pages.sh

* QA: Check the server version in the right place

* Feature: Support SHA256 as a new hash for passwords

* QA: Function definition and return typing audit

* QA: Refinement of form types

* QA: Refinement of form types

* QA: Consistency of comments

* QA: Issues with php-cs-fixer and more comments

* QA: More typing issues

* QA: php-cs-fixer on merge conflict resolution

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-25 10:13:56 -05:00
Browniebraun 1627c7a150 Font Awesome Icons to Tabler Icons migration 2025-12-16 20:27:05 +01:00
TheWitness b9334a15d9 QA: Updates for files for php-cs-fixer and some php-doc changes 2025-11-18 21:01:15 -05:00
TheWitness 8b9c29708c QA: Finishing up buttons 2025-07-13 12:58:53 -04:00
TheWitness 9ea7e73c2a QA: Convert from input to buttons 2025-07-13 12:30:30 -04:00
Browniebraun 669107018d MidWinter
- start replacing input tags by real HTML buttons.
- introduce usage of form attribute.
2025-07-13 07:31:09 +02:00
TheWitness 2c779273f9 Copyright Updates and PHP-CS-Fixer updates 2025-03-09 14:34:19 -04:00
Jimmy ConnerandTheWitness 65ab16f5cf Start converting to newer PHP Syntax and Functions (#6103)
* Add Rector

* Add Rector

* Fix "Cashed" misspelling

Also harmonize the phrase with the one below it

* Fix implode error in db_table_create

Only relevant when multiple primary keys

* Fix auth issue, parentheses in the wrong location

Was causing too many arguments to be sent to cacti_sizeof which only take 1, instead of get_allowed_devices.

* Fix issue with session_var not properly using class variable

* Fix pass by reference error in get_allowed_devices

get_allowed_devices has a pass by reference on the "total_rows" field.  It is used in several places to pass the total_rows back to a counter.  Here though, we are passing a number directly to the function, which errors out with "Uncaught Error: get_allowed_devices(): Argument #4 ($total_rows) cannot be passed by reference".  So we will just place a dummy variable in front to catch the pass.

This wasn't caught before because the previous parentheses issue.

* Fix undefined variable "field_array" in html_filter

* Fix undefined function 'get_nfilter_filter_request_var'

* Fix undefined variable 'resizable'

I corrected the function parameter, as that was technically the incorrect spelling

* Fix invalid variable $user_id

* Fix undefined vars in spikekill class

* Fix copy and paste error

Oops

* Forgot to use the dummy variables

* Add missing $

Oops

* Start converting to newer PHP Syntax and Functions

* Test fixing the workflow by install composer

* Lets not valid the composer file right now
Seems we have a few things to fix it in

* Validate composer

* Lite formating changes

* lite formatting

* lite formatting

* lite format changes

* lite format changes

* lite format changes

* lite format changes

* lite format changes

* lite format changes

* lite format changes

* lite format changes

---------

Co-authored-by: TheWitness <thewitness@cacti.net>
2025-02-23 15:14:54 -05:00
Linegod 048f2abcc8 typos 2025-02-23 00:13:55 -06:00
Jimmy Conner d8f71092f3 Add missing $
Oops
2025-02-22 01:07:50 -06:00
Jimmy Conner 829d17c44e Fix undefined variable "field_array" in html_filter 2025-02-21 23:49:37 -06:00
Jimmy Conner 52c25cf52f Fix issue with session_var not properly using class variable 2025-02-21 23:42:42 -06:00
TheWitness 8b41bfbbb3 QA: Restore Timespan Defaults 2025-01-15 19:11:29 -05:00
TheWitness c8d988b057 QA: Convert graphs.php to use header icons 2025-01-15 18:15:50 -05:00
Browniebraun d88d3acd30 reverting FontAwesome till better solution has been identified. 2025-01-15 23:04:14 +01:00
Browniebraun 5be7d7f18b Migrating icons from FontAwesome to Tabler 2025-01-05 20:58:36 +01:00
TheWitness c36fc38e9b QA: Fix: #6038 - Location Dropdown Issues 2025-01-02 08:37:38 -05:00
TheWitness b1e5f6e565 QA: Always clear the myRefresh timer 2025-01-01 23:00:12 -05:00
TheWitness 7360ab87cc QA: Restore generalized export 2024-12-30 14:36:27 -05:00
TheWitness dac149cf31 QA: Undefined function in host.php and restore export 2024-12-30 14:27:58 -05:00
TheWitness 647b981697 QA: Restore Realtime Settings 2024-12-29 16:42:27 -05:00
TheWitness c93b3547a0 QA: Fixing multiple graph issues below
* Breadcrumbs would become corrupted depending on actions selected from the graph icon-bar
* Converting graph icon-bar to glyphs
* Adding glyph classes to various Glyph actions
* Adding CSS to 'dark' theme only at this time
* Some double to single quote conversion in layout.js
* Removing some Inline html for various icon-bar's
* Removing duplciated fontawesome.css header inclusion
2024-12-29 14:14:32 -05:00
TheWitness f9847fcaba QA: Fix: #6019 - Refresh logging out 2024-12-27 13:58:09 -05:00
TheWitness 928fd0d1cc QA: Fix: #6015 - Unable to create Graph + Visual Issues 2024-12-24 14:50:05 -05:00
TheWitness 545fc7b375 QA: Allow adding of links to fix the tree.php page
* I over did it on the deployment of classes and doubled up the application of classes on the tree.php page.
2024-12-23 20:44:23 -05:00
TheWitness 78d746b281 QA: Keep the row values 'Default' when they are default
* Also clearing up a warning.
2024-12-23 20:28:05 -05:00
TheWitness ef19e69d51 QA: These little design issues 2024-12-23 20:10:36 -05:00
TheWitness f5ce932b6d QA: Unit testing Filter Class 2024-12-23 19:46:02 -05:00
TheWitness 7a16435433 QA: Validate before create! 2024-12-23 14:14:10 -05:00
TheWitness b20a3f6334 QA: Add request variables to callback, fix predefined timespan callback
* These two little filters make drop_callback be able to append request variables to the various methods.
* The predefined_timespan should send all variables.
* rfilter should come over as base64_encoded
* Allow the filter to have the post method by default
2024-12-23 12:34:46 -05:00
TheWitness ee56a277c9 QA: Tree and Preview Filter default handling and callback
* Change the global default for preview rows per page
* Change the gathering function for the -1 value
* Change the save function for a -1 value
* Change the way button callbacks work
* Restore the 'Save' function for Tree View after Filter Class light re-design.
2024-12-23 08:22:46 -05:00
TheWitness 1dead5b8a2 QA: Enhancements for the Filter Class
* This work was required for the Timespan object.
* Added 'class' attribute to row fields
* Added options array to handle reserved callbacks.
* Changed the default filter area class to 'even'.
2024-12-22 22:19:59 -05:00
TheWitness 3ac6d5574f QA: Enhance Filter Class to handle random content 2024-12-21 11:21:41 -05:00
TheWitness 56d5ae3246 QA: Minor filter JS Issue
* If there were no filter variables, the string would be unterminated with a quote.
2024-12-21 10:20:59 -05:00
TheWitness 3b0f08c61c QA: Set the default for 'has' correctly 2024-12-20 19:00:25 -05:00
TheWitness 6d82368b7a QA: Add has_associated to the filter class 2024-12-20 17:46:06 -05:00
TheWitness 6fd8c79e34 QA: Make it possible for the buttons array to be unset 2024-12-20 15:43:18 -05:00
TheWitness d132e6fd73 QA: Enhance the Filter Class to Display Action Icons 2024-12-20 14:57:22 -05:00
TheWitness 38db78ac0a feature: Add support for JavaScript in the Filter Class 2024-12-20 10:27:34 -05:00
TheWitness ae7ad7c1d2 QA: Migrate host.php to the filter Class 2024-12-19 20:03:30 -05:00
TheWitness 882a6c1dbf QA: Go looser here as the validation logic will clean things up 2024-12-19 17:46:31 -05:00
TheWitness 3d142da9e7 QA: Use cacti_sizeof to catch false responses
* Also remove debug code
2024-12-19 16:26:32 -05:00
TheWitness 4d71468f15 QA: Convert tree.php to Filter Class and Prepared Statements 2024-12-19 15:18:35 -05:00
TheWitness 93036f8b5c QA: More work on utilities.php.
* Address minor bug in the Filter Class
* Update clog_webapi to work inside of utilties.php (api-ify)
* Convert snmp agent utilities section to Filter Class
2024-12-18 23:02:27 -05:00
TheWitness 5381d66edf QA: Implementing data_debug.php
* This one took a bit longer
2024-12-18 19:06:07 -05:00
TheWitness fe4c57b88e QA: Finishing automation_tree_rules.php, automation_graph_rules.php, and rrdcleaner.php
* This change represents a code reduction in the filter class and adding additional features, url, and status text.
2024-12-18 15:29:05 -05:00
TheWitness 36ef05a8d3 QA: Add purge action and make buttons generic add automation_devices.php
* This series of changes makes the button actions generic.
* I could do some code reductions in the class now, but leaving as is for the moment.
* Adding the 'has_purge' boolean' for generic purge actions.
* Migrating automation_devices.php.
* Moving automation_devices.php to prepared statements too for filtering.
2024-12-18 13:27:04 -05:00
TheWitness a4087198ec QA: Correcting some snafu's in the last commit 2024-12-18 10:24:22 -05:00
TheWitness 7080cf3279 QA: Adding 'Page Refresh' to Filter Class and migrating the Data Collectors page
* More QA on the CactiTableFilter class
* Pages will migrate a bit slower now as most of the remaining are pretty custom
2024-12-18 10:16:12 -05:00