Replaced multiple SQL function calls with consistent `get_server` naming. Consolidated and streamlined the function calls to `get_server` and `get_server_by_ip` to ensure consistency and improve maintainability across the codebase. Removed obsolete and redundant function definitions that were no longer in use.
Removed redundant service checks for 'haproxy' and 'nginx' in WAF routes. Simplified action confirmation logic by using hidden input to fetch server names dynamically. Updated database operation calls to be concise for deleting and updating group settings.
Renamed get_user_status to select_user_status in roxy.py and db.py for better clarity and consistency. This modification ensures alignment in method naming conventions across the codebase, improving readability and maintainability.
Removed the unused 'distro' and 'Union' imports for code cleanliness. Simplified the user status check mechanism by introducing a direct method, `get_user_status`, and modified the service control flow accordingly. Simplified 'update_plan' function to only insert a default username.
Refactor multiple functions to call `get_group` instead of `get_group_name_by_id`. Remove the `ApiToken` class and related database table operations. Simplify the template logic in `show_sub_ovw.html` by removing unnecessary loop and context variables. Cleanup unused imports and streamline several function implementations across the codebase.
Updated the `group` attribute to `group_id` in the Settings model and all related instances in the codebase to improve clarity and consistency. This change affects model definitions, setting initialization, and queries throughout the project.
Updated multiple functions across the codebase to use the `get_server_by_ip` method instead of iterating over server lists. This change simplifies the code, improves readability, and reduces potential errors. Adjusted SQL queries to remove unnecessary conditions and parameters related to master servers.
Remove the letsencrypt.sh script and integrate LetsEncrypt functionality directly into the web application via new API endpoints. This includes creating, updating, retrieving, and deleting LetsEncrypt configurations, improving maintainability and user interaction with the LetsEncrypt feature.
Refactored SSH credential handling to better support shared credentials and improve code readability. Simplified WAF mode changes by switching from hostname to server ID, enhancing reliability. Updated various templates and functions to align with these changes.
Updated the server creation functions to utilize keyword arguments, simplifying the code and making it more maintainable. Additionally, improved the handling of VIP updates and error logging for HA clusters.
Implement additional checks for shared SSH credential editing and deletion. Refactored database connection logic to use keyword arguments for improved readability and maintainability.
Add return statements to `insert_*` methods for consistency. Introduce a `delete_section` method and implement it in the view. Enhance response handling with new `IdDataStrResponse` and update OpenAPI spec to better reflect data structures.
Added support for managing Docker settings and improved the handling of service-specific configurations. Updated various backup methods and database columns to ensure consistency and clarity. Included new database migration scripts to handle renamed columns.
Refactored code to use `server_id` in place of `server` across various modules to improve clarity and consistency. Updated database migrations, schema definitions, API documentation, and templates accordingly. Additionally, fixed related issues in the backup creation and management logic.
Adjusted line formatting in `runtime.py` and `waf.py` for consistency and readability. Added exception handling for logging in `auth.py` to prevent crashes and provide error feedback.
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.
Added logic to set user_group_id based on Flask global object `g`, with a fallback to default value if an exception occurs. This enhances the flexibility of `user_group_id` assignment based on runtime context.
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 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.
Introduce a custom exception `RoxywiResourceNotFound` to manage cases where system information cannot be found. Refactor the server installation process to use server IDs instead of IPs, improving data consistency and reliability.
Added try-except blocks for better exception handling and updated VIP retrieval logic. Changed the structure from using server names and IPs to using IDs in both backend and frontend code. Updated template selections and introduced new expected version options.
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.
Simplified imports and cleaned up unused functionalities in `admin/views.py`. Switched `var` to `let` in `script.js` for better scope management. Adjusted `showOverviewWaf` function for consistency. Removed `check_services` decorator from `ServiceActionView`. Enhanced `Checker` class model and improved error handling in `CheckerView`. Added `update_checker_setting_for_server` method in `checker.py`.
Added return_master setting, removed unnecessary code, and improved exception handling throughout the project. Key updates include enabling return_master by default, simplifying database update methods, handling empty IP exceptions more appropriately, and refining JavaScript validations.
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.
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.
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 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.
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 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.
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'.