Commit Graph

140 Commits (master)

Author SHA1 Message Date
Aidaho 073a86be80 v8.2.1: Refactor HA and Config Compare modules, optimize service installation flow, and add Spanish language support
- Replaced unused AJAX and JS methods (`cleanProvisioningProcess`, `showErrorStatus`) in HA management with simpler, streamlined equivalents. Moved HA cluster data fetching logic to the new endpoint (`HAClustersView`).
- Introduced `compareConfig()` method to improve configuration diff rendering. Removed redundant templates (`compare.html`), leveraging external Diff2Html library.
- Simplified HA service installation logic in `Reconfigure`, enabling task-based tracking. Removed redundant progress logic (`increaseProgressValue`, `checkInstallResp`).
- Added support for Spanish localization (`es-ES.html`, updated `languages.html` template).
- Replaced Python PagerDuty SDK for a more actively maintained library.
- Fixed description rendering logic in HA cluster templates.
- Updated Nginx to support multiple aliases per server.
- Minor dependency updates and comments cleanup in Ansible WAF tasks.
2025-07-03 17:57:53 +03:00
Aidaho 3c57a863c8 v8.2.0.2: fix metrics display 2025-05-21 15:16:31 +03:00
Aidaho fad4fa6d25 v8.2.0: fix metrics display 2025-05-21 14:49:40 +03:00
Aidaho 18bba8faba v8.2.0: fix metrics display 2025-05-21 14:49:12 +03:00
Aidaho 1cabf7fff9 v8.2.0 2025-05-21 10:00:20 +03:00
Aidaho 8c300a9f7d v8.2.0: Add centralized error handling and structured logging modules
Introduced a unified error handling module (`error_handler.py`) for consistent exception management across the app. Added a structured logging system (`logger.py`) to support JSON-formatted logs, improving log readability and analysis. Updated various modules to utilize these new components for better maintainability and tracing.
2025-05-19 09:24:35 +03:00
Aidaho bc2fe10485 v8.2.0: Refactor metrics and user group handling for better efficiency
Replaced raw SQL queries with ORM-based queries in metrics retrieval functions, ensuring better maintainability and readability. Simplified logic in `check_user_group_for_flask` and `get_dick_permit` by removing redundant arguments and unused paths. Adjusted the flow for consistent error handling and improved data grouping across various time ranges for metrics calculations.
2025-05-17 10:49:31 +03:00
Aidaho 40703576af v8.2.0: Refactor and modularize Nginx proxy addition logic
Redesigned Nginx proxy addition by removing unused templates, consolidating scripts, and introducing new modular template structures. Improvements include dynamic JavaScript handlers, enhanced UI flow, better SSL and upstream management, and new functionality for headers and location-specific configurations. Cleaned up obsolete code and adjusted database version updating logic.
2025-05-14 20:31:25 +03:00
Aidaho da34363cb4 v8.1.8: Remove HAProxy enterprise support.
Removed all references to HAProxy enterprise functionality from the codebase, including UI elements, backend logic, and service settings. Standardized status key casing across files and improved error handling in `_service_status` method.
2025-05-10 18:47:53 +03:00
Aidaho 9e2b5ec058 v8.1.8: Refactor service settings template and logging logic.
Simplify and consolidate service settings template by introducing reusable variables and reducing code redundancy. Remove unnecessary imports and streamline logging logic to eliminate redundant parameters.
2025-05-01 10:47:03 +03:00
Aidaho e36050d8fd v8.1.8: Refactor error handling, cleanup unused variables, and fix intervals
Removed unnecessary error handling logic and unused `error_mess` variables. Adjusted HA cluster polling interval from 10 minutes to 1 minute for better responsiveness. Cleaned up redundant HTML elements and ensured consistent coding practices across files.
2025-04-27 19:51:54 +03:00
Aidaho c765616b1b v8.1.8: Remove unused code and improve variable naming.
Removed the obsolete `Reconfigure` function from UDP.js and cleaned up unused parameters in config.py. Enhanced logging by simplifying error messages in auth.py and clarified variable naming for HA routes. These changes improve readability and maintainability.
2025-04-26 22:33:15 +03:00
Aidaho fc5d4f72a1 v8.1.8: Simplify next URL handling and improve redirect behavior.
Replaced `request.form` with `request.json` for `next` retrieval in login handling, ensuring consistency for JSON-based requests. Updated the redirect to include `next` parameters, preserving the original path when navigating to the login page.
2025-04-23 13:22:48 +03:00
Aidaho 3ca015d279 v8.1.8: Add SSL certificate management feature
Introduced support for uploading, viewing, and deleting SSL certificates via a dedicated web interface. Updated routing, templates, and backend logic to handle certificate types (pem, key, crt) and improved integration with SSL-related UI components.
2025-04-16 18:41:21 +03:00
Aidaho c153da9842 v8.1.7: Update service action routing and validation logic
Revised the action route to use a restricted list of allowed actions via the `any` converter. Improved service name validation by refining the regex pattern and adjusted logging message formatting for consistency.
2025-04-10 15:45:14 +03:00
Aidaho 60044a8cff v8.1.7: Remove unnecessary parameter from `upload_ssl_cert` function.
The `cert_type` parameter was unused in the `upload_ssl_cert` function and has been removed to simplify the function call. This change reduces redundancy and improves code clarity.
2025-04-10 10:55:43 +03:00
Aidaho 61a7c342a8 v8.1.7: Refactor and enhance cert routes and frontend blacklist handling
Replaced unsafe input checks with Pydantic validation, improving route type safety. Adjusted blacklist handling logic in the frontend and templates for better consistency. Fixed minor JS selector bugs and added hidden input for group_id in the config template.
2025-04-10 08:52:37 +03:00
Aidaho 53d319f5e0 v8.1.7: Add "log" mode, improve metrics, and refactor logging
Extended "mode" options to include "log" for frontend/backend configurations. Enhanced RAM/CPU metrics to better handle remote servers and removed redundant logic. Streamlined logging with structured formatting, improved error handling, and removed unnecessary parameters.
2025-04-05 12:33:22 +03:00
Aidaho 66f1760ca3 v8.1.6: Add support for editing specific config sections and templates
Enhanced configuration management by introducing support for editing specific sections in HAProxy configurations via `edit_section`. Added server templates with structured validation, improved file encoding handling, and addressed edge cases in multiple components for greater robustness.
2025-03-14 12:29:16 +03:00
Aidaho 32db39fdd5 v8.1.6: Fix minor bugs and enhance security in multiple modules
Removed a debug print statement, added error handling for SSH commands, updated token inputs to be password-protected, and fixed a log path in Fail2Ban configuration. Updated server list handling in templates to improve code consistency. These changes enhance reliability, security, and maintainability across the application.
2025-03-13 10:45:39 +03:00
Aidaho e53a7445c7 v8.1.5: Add UDP backend status checks and refine cluster HA handling
Introduced backend status monitoring for UDP listeners and enhanced HA cluster checks. Updated several templates and JavaScript files to reflect these changes, improving service visibility and coordination. Minor code refactoring and removed unused functions for cleaner implementation.
2025-01-04 10:49:28 +03:00
Aidaho 8ec6d0a0d3 v8.1.3: Update cert endpoint to use server_id instead of server_ip
Replaced server_ip with server_id in the cert endpoint for better database integration and clarity. Adjusted related logic to retrieve the server IP using server_id and updated function calls accordingly. This change simplifies URL structure and aligns with database practices.
2024-12-26 22:54:48 +03:00
Aidaho 05279fa64f v8.1.3: Refactor server identification in certs and autocomplete logic
Updated routes and JavaScript logic to use server IDs instead of server IPs for cert and backend lookups. This improves consistency and simplifies request handling. Minor fixes in formatting and structure were also applied.
2024-12-12 16:21:50 +03:00
Aidaho 91802b3cd6 v8.1.3: Add dark theme support and update HAProxy management.
Introduce a dark theme for the web interface, enabling users to switch between themes seamlessly. Additionally, enhance HAProxy management by updating available versions and streamlining API routes for list management, ensuring smoother operations and integration.
2024-12-03 15:28:55 +03:00
Aidaho 5bf719ef1c v8.1.2: Refactor endpoints for direct server_ip usage
Convert POST methods to GET with direct server_ip parameter, improving clarity and conformity. Removed unused imports and fixed a typo in the `overview.py` module. Validations are added for better input handling, enhancing security and error management.
2024-12-01 17:34:16 +03:00
Aidaho 6cfaf90743 v8.1.2: Refactor metric insertion and selection logic
Consolidated multiple metric insertion and deletion functions into more generic and reusable functions using dictionaries and typing literals. This refactoring reduces code duplication and improves maintainability. Additionally, flask route functions have been updated to use type validation, ensuring stronger typing and input verification.
2024-12-01 14:43:39 +03:00
Aidaho ddd9a1b92d v8.1.2: Refactor IP validation and type annotations in routes
Replaced common.is_ip_or_dns() with pydantic type validation in various route functions to ensure input consistency and clarity. Updated several methods to use Union[IPvAnyAddress, DomainName] for typing and added necessary imports. Also refined templates and helper functions for better readability.
2024-11-30 10:21:03 +03:00
Aidaho ac5a6093a5 v8.1.2: Refactor IP validation and type annotations in routes
Replaced common.is_ip_or_dns() with pydantic type validation in various route functions to ensure input consistency and clarity. Updated several methods to use Union[IPvAnyAddress, DomainName] for typing and added necessary imports. Also refined templates and helper functions for better readability.
2024-11-19 15:34:14 +03:00
Aidaho 5c28a47cae v8.1.2: Add IP calculator and improve nettools forms
Implemented an IP calculator feature using the netaddr library and added corresponding JS and HTML form elements. Enhanced existing nettools forms by utilizing Flask-Pydantic for validation and AJAX request improvements. Removed deprecated alert selection methods in the database checker module. Updated language translations and incremented version to 8.1.2.
2024-11-18 11:34:25 +03:00
Aidaho a8dfe6e2c4 v8.1.1: Refactor server SQL function names
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.
2024-11-13 21:52:41 +03:00
Aidaho 9548ac6d9a v8.1.1: Update WAF overview and simplify service ID handling
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.
2024-11-10 11:09:07 +03:00
Aidaho e9473088d5 v8.1.2: Enhance server status checks and exception handling logic
Improved the server status check by adding sessionStorage management and handling responses for better UI feedback. Changed some function signatures for consistency and better error handling. Updated routes and database initialization to reflect new functions and database versions.
2024-11-04 11:19:00 +03:00
Aidaho c437274cfe v8.1.2: Switch to retrieving server data by IP and hostname
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.
2024-11-03 13:00:43 +03:00
Aidaho 8ebf934f06 v8.1.2: Delete letsencrypt.sh script and add LetsEncrypt API endpoints
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.
2024-11-03 10:12:08 +03:00
Aidaho 96f9f71a2b v8.1.0.1: Refactor SSH and WAF modules for improved logic and readability
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.
2024-10-22 11:13:16 +03:00
Aidaho ca1a39ed96 v8.2: Refactor log handling and cleanup unused code
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.
2024-10-08 15:56:13 +03:00
Aidaho a9aa9f2436 v8.2: Remove unnecessary blank lines and exception handling
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.
2024-10-03 10:11:39 +03:00
Aidaho 7ec162244f v8.2: Fix whitespace inconsistencies across various modules
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.
2024-10-02 12:33:20 +03:00
Aidaho 292ca51cc7 v8.1.0
https://roxy-wi.org/changelog#8_1
2024-10-02 11:51:26 +03:00
Aidaho 34907769e6 v8.0.2: Refactor and optimize code handling in multiple files
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.
2024-09-26 17:38:35 +03:00
Aidaho 1dbbf54986 v8.0.2: Remove Grafana integration
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.
2024-09-17 08:52:36 +03:00
Aidaho 6004147073 v8.0.1: Add group_id to service-related functions utilizing user params
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.
2024-09-13 12:39:54 +03:00
Aidaho 8964652375 v8.0.1: Fix SSL cert upload and improve error handling
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.
2024-09-11 09:41:29 +03:00
Aidaho 3423595d9b v8.0.1: Remove keepalived service and improve service status handling
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.
2024-09-04 21:16:22 +03:00
Aidaho 6d11d04577 v8.0.1
https://roxy-wi.org/changelog#8_0_1
2024-09-03 12:09:03 +03:00
Aidaho cde708065b v8.0: Refactor config logic to streamline cfg retrieval
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.
2024-09-01 22:39:57 +03:00
Aidaho 4e5f4b2bd1 v8.0: Add new icons and update HA view validation
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.
2024-09-01 20:51:12 +03:00
Aidaho c6e6988209 v8.0: Update credential endpoints and proxy settings
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.
2024-08-30 17:25:31 +03:00
Aidaho a0866b9e88 v8.0: Refactor slave routes and clean up redundant code
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`.
2024-08-28 15:10:39 +03:00
Aidaho 5b71fb257e v8.0: Refactor HA cluster master selection logic
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.
2024-08-27 15:57:45 +03:00