Refactoring of the function 'action_service' has been completed in the roxywi module. The function for different actions ('start', 'stop', and 'restart') has been replaced by a dictionary for more clean and efficient code. This change also enhances code readability and maintainability.
This commit includes two major changes. Javascript code in udp.js has been refactored to fix the sequence of operations. We have moved the getScript function inside the bracket to ensure smoother operation. Also, error handling in api_funct.py has been simplified and made more consistent by passing json.loads instead of raw strings to install_service method, and by directly setting 'e' as a value in case of exceptions. A minor style change has also been added on ha_cluster.html.
Added decorator `@get_user_params()` to various route handlers in `routes.py`. Adjusted user handling in `config.py` by eliminating checks for 'login' and directly accessing user parameters from Flask's global variable `g`. Also moved user retrieval process from `routes.py` to lower level operations allowing for better abstraction and less redundancy.
Imported user module to the routes module and added a user parameter decorator to the save_config route. This parameter fetches the user ID, which is then used to fetch the username. This username is passed to the upload_and_restart functions as a login argument.
The user id retrieval function, get_user_id_by_username, in the config module was refactored. The changes included the removal of unnecessary use of keyword argument on a function call. This change simplifies the code, making it more readable and easier to understand.
In auth.py, removed an unnecessary pass statement and reassigned unused bind variables. Also, added a check to assign a default value to 'session_ttl' if it is None. In installation.py, rolled back the nginxinc.nginx version used during ansible galaxy installation from 0.24.2 to 0.24.1.
The version of nginx being installed via the ansible-galaxy command in the installation.py file has been updated. The version number has been changed from 0.23.2 to 0.24.2, adhering to up-to-date libraries and compatibility improvements that the new version provides.
This update reviews and adjusts multiple code segments across the project. The improvements are mainly focused on error handling with more informative exceptions and error messages. Additionally, data formatting and retrieval have been streamlined, mainly regarding JSON data preparation and use in several functions, which should expedite the data processing and enhance the code maintainability. Minor changes were also done on the front-end logic for error handling and improved user interaction.
This commit removes unneeded OpenVPN related code and improves error handling in the alert system. All OpenVPN related functions and html files have been removed. Also, changes are made in the alerting module to raise exceptions instead of returning error messages, which provides a more pythonic way of error handling.
Modified the cred module in the db modules package. The insert statement under the try block was updated to return the result of the .execute() method. This will allow for better handling and control of the execution flow depending on the result of the insert operation.
The code changes focus on enhancing the server application's functionality by improving the error handling mechanism and streamlining the logic. Modifications include refining how servers get created, updated, and deleted, optimizing how ssh related actions are performed, and ensuring more accurate server scanning. The changes help reduce potential errors and make the application more efficient.
The code changes focus on enhancing the server application's functionality by improving the error handling mechanism and streamlining the logic. Modifications include refining how servers get created, updated, and deleted, optimizing how ssh related actions are performed, and ensuring more accurate server scanning. The changes help reduce potential errors and make the application more efficient.
The commit refactors the server-side modules of the Roxy-WI web interface to use JSON-based APIs for improved data exchange. Specifically, methods for user, group and SSH management have been updated to accept and return JSON data. Simultaneously, error handling is improved to give more informative responses instead of plain strings. The client-side JavaScript code is also refactored to accommodate these changes. Additionally, some minor corrections are made in the UI templates.
The error handling has been refactored in the Roxywi overview and routes files to raise and return more comprehensive exceptions. Unnecessary commented out JSON parsing code in the service installation file has been removed for better code clarity. Aside from these, various minor grammar and formatting fixes have been made to the README.md to improve readability.
This commit changes the term "UDP balancers" to "UDP listeners" across all language templates. This adjustment ensures consistency and correctness in how we refer to this network entity in different languages.
The code adjustments primarily focus on improving layout management and enhancing backend functionality. Specifically, the CSS styles have been modified to adjust the alignment and width of certain elements. Additionally, new HTML templates have been created to refine the display of server details and a new link has been added. In the ansible tasks, logic has been added to handle the installation of packages and modification of NGINX version retrieval. In the logs module, an exception has been added to handle cases where the syslog server IP is not defined.
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.