Convert WAF parameter from string to integer for consistency. Update JavaScript comparison operators for strict equality checks. Remove unused functions and intro.js library to streamline and simplify the codebase.
Removed multiple unnecessary blank lines across various files to maintain code cleanliness and readability. Simplified exception handling in the `roxywi/auth.py` module and updated the import statements in `ha/routes.py`. Added a timeout parameter to the requests call in `alerting.py` for better error management.
Refactor multiple files to correct spacing issues, including extra blank lines, misaligned parameters, and inconsistent indentation. These changes improve code readability and maintain coding standards without altering functionality.
Removed unused imports, improved error handling in JavaScript, and refactored server command construction for better reliability. Enhanced type checking and streamlined list processing to improve code readability and efficiency.
Deleted the Grafana role from Ansible playbooks and related references in various files. This includes updates to HTML templates, route definitions, and database entries to ensure no remnants of Grafana configuration remain.
Enhance various service functions to accept and process group_id from user parameters. This update ensures that settings and actions are correctly scoped to the user's group, improving access control and accuracy of the returned data.
Replaced single quotes in cert input and updated error handling to raise exceptions instead of returning error messages. This change ensures better logging and clear error propagation.
Removed all references and functionality related to keepalived service. Added detailed status handling for various services including nginx, haproxy, and apache, improving the accuracy of the status checks and error handling for each service. Adjusted user interface elements to reflect the service status changes more clearly.
Moved `cfg` retrieval inside the `if` block to ensure it is only fetched when `serv`, `edit`, and other conditions are met. Also, removed an unnecessary hidden input from the HTML template.
Added new icons for Keepalived and Roxy services in the static images and integrated them into the main menu. Updated HA view validation to use `eth` instead of `ip` and changed certain property types from string to integer. Enhanced error handling and data processing for the configuration routes and improved JSON data handling in the script.js file.
Replaced hostname lookups with unified server object retrieval in metrics and credential management endpoints. Added proxy environment variables to ModSecurity download tasks and improved error handling across various modules.
Removed unused variable `req_method` and refactored URL assignment logic in `ha.js` for clarity. Updated route in `routes.py` to use defaults for `vip_id` and adjusted method checks accordingly. Removed unnecessary print statement in `ha_cluster.py`.
Remove obsolete HTML template and streamline server selection to use JSON. Enhanced server selection and error handling in AJAX calls, fixed minor syntax issues, and updated various routes for consistency.
Removed outdated Debian, EL7, EL8, and EL9 requirement files. Improved various VIP handling and validation functionalities, including changes to VIP endpoints and associated JavaScript functions. Minor enhancements and bug fixes across multiple modules and views.
Added support for deleting configuration file versions via the DELETE method in ServiceConfigVersionsView. Updated corresponding routes, templates, and scripts to handle this functionality.
Integrated port scanner endpoints to manage and retrieve scanner configurations. Removed unused imports and redundant code blocks across multiple files for better performance and readability. Simplified error handling and consolidated port scanner settings operations.
Removed the `check_version.html` template and moved version checking to `script.js`. This refactoring simplifies the codebase by consolidating version check handling into JavaScript, removing deprecated HTML templates, and enhancing the backend logic and API routes.
Removed the python-ldap dependency from requirements.txt and updated route handling to use JSON request data instead of form data. Additionally, responses are now wrapped using DataStrResponse for consistency.
Refactor user-related modules, updating data handling, roles, and methods. Simplify server status check process by removing event-based handling and replacing it with straightforward AJAX requests.
Corrected JavaScript methods to properly store language settings and trigger events. Fixed error handling in multiple scripts, and improved handling of keepalived version checks. Updated the requirements to use a specific ansible-core version for better compatibility.
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.
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.
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.
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 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.
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.