The method `check_user_group_for_flask` has been updated to first check for 'user_uuid' and 'user_group_id' within the given kwargs. If these are not available, it will fall back to retrieve 'uuid' and 'group' from the cookies. This change makes the method more flexible in terms of data source it can utilize, and improves the module's usability when parameters are directly provided.
Removed a specific condition from the rsyslog configuration for haproxy. The condition was initially checking if the input was UDP which was unnecessary. The new configuration continues to correctly categorize logs into access, error, and status files based on their syslog severity.
Introduced an optional parameter in check_user_group_for_flask function to accept API tokens and return if it is provided. Enhanced error handling in get_all_statuses function in api_funct.py to catch and inform specific exceptions instead of returning a generic error message. Minor cleanups and import optimizations in other modules.
This commit primarily adds a function that validates IP addresses and a function that checks if a server field is filled in the script.js file. Also, it removes the token from several ajax requests, and improves error handling in server.py. In the users.js file, it updates the server info display functionality.
This commit includes a refactoring of the ansible setup script that simplifies the process of installing the python package 'passlib' by directly using pip3. Additionally, typos in the descriptors of certain tasks such as directory creation and SELINUX configuration have been corrected for better readability and understanding of the code.
This commit applies exception handling for the network operations methods and removes unused/commented-out code. The added exception handling checks for incorrect input to nettools methods and raises explicit exceptions with descriptive messages. This dramatically simplifies the debugging process, providing better visibility into runtime errors.
In the install/routes.py, the 'run_ansible' method call in the 'install' function has been updated to dynamically pass the 'service' name, resulting in a more flexible and adaptable code. Previously, it was hardcoded to run only the 'waf_service', which limited its usage.
The code for the WAF installation process has been refactored to improve error handling. The `service_mod.generate_waf_inv` function is now called with `service` instead of hardcoded service names, and error messages are now more descriptive. Additionally, the Ansible role file for WAF has been renamed from `waf.yml` to `waf_haproxy.yml` to better represent its role.
This commit streamlines the way user group data is handled, both in scripts and server-side logic. The group settings URL has been simplified and the logic for updating user groups also has been optimized. Eliminated unnecessary checks in the user.py module, and updated the routing logic for group data to utilize a single route with HTTP GET and PUT methods. Removed unsuccessful group changing errors.
This commit adjusts the 'create_user' and 'create_server' routes to include a decorator for getting user parameters. This will improve the handling of these methods, ensuring they receive any necessary user specific parameters.
This commit simplifies the SSH key handling functionality in the server module. Unnecessary definitions and methods for checking and handling different key types have been removed. Now, paramiko's standard load_private_key method is directly used to load the SSH keys, which has streamlined the code and made it more maintainable.
This commit updates the paths to several static files in various JavaScript files. The '/inc/' directory has been replaced with '/app/static/js/' to maintain consistency across the application. This change affects the ion.sound.min.js and fontawesome.min.js file locations and their corresponding references in script.js, index.html, main_head.html, and channel.js.
The JavaScript paths in many files have been updated to "/app/static/js". A new script for handling checker settings updates, "checker.js", has been added. The commit improves organisation of JavaScript resources by grouping them under a single directory and introduces new functionality for the checker service.
The requirements for el9, deb, and main have been updated to specifically use version 2.27.1 of the "requests" package. In addition, the date formatting function get_time_zoned_date in common.py has been refactored. The default format for the date has been moved to the function arguments, and the function now also checks if the provided date is an instance of datetime before processing it.
The requirements for el9, deb, and main have been updated to specifically use version 2.27.1 of the "requests" package. In addition, the date formatting function get_time_zoned_date in common.py has been refactored. The default format for the date has been moved to the function arguments, and the function now also checks if the provided date is an instance of datetime before processing it.
The commit modifies the date calculation in the database time_range checks to use the UTC timezone instead of the system's local time. This makes the time range checks more uniform and independent of the server's configuration. Additionally, it increases the version number in 'create_db.py' from '7.2.3.0' to '7.2.4.0'.
Refactored error handling in the waf.js file to simplify and reduce conditional checks. Also updated the paths for favicon images and included scripts to ensure accurate addressing, enhancing the consistency and reliability of the application's behavior.
The update adds timezone handling for web application firewall (WAF) rule configurations using roxy_wi_tools.GetDate method. This provides flexibility to manage configurations based on the specified timezone in SQL setting.
The paths for waf.js and the loading image in waf.js have been updated to point to the correct locations. Also, unnecessary code related to the AJAX calls for metrics and installation has been removed, simplifying the code structure.
This commit updates variable declarations from 'var' to 'let' in 'install.js' for better scope control. It additionally includes error-handling for undefined 'select_id' in 'parseAnsibleJsonOutput' function. The 'waf.js' file is moved to the 'app/static/js' directory and paths are updated accordingly in both 'waf.js' and 'waf.html'. The success handler in 'waf.js' is also updated to use 'parseAnsibleJsonOutput'.
Path of the WAF nginx module in Ansible scripts has been updated from NGINX_PATH to SERVICE_PATH. This refactoring enhances the organization of the configuration files and improves code base understanding. Changes have been applied in the WAF configuration and service execution files.
Improve error handling in tools list and adjust status check command
Enhanced error handling in tools list loop within the 'common.py' file to provide more specific error messages. Additionally, the command for checking a tool's status was adjusted to remove unnecessary sudo usage. Also, updated the service check in the 'roxy.py' file from 'sshd' to 'rsyslog'.
Remove service check decorator from action_service route
The `check_services` decorator was removed from the `action_service` route in the file 'app/routes/service/routes.py'. This change simplifies the code and avoids unnecessary service checks when performing actions on a service.
Additionally, import paths were corrected in the Python file 'app/routes/install/routes.py'. Error handling was improved in the 'install_service' function to return details of any encountered exceptions.