Commit Graph

324 Commits (master)

Author SHA1 Message Date
Aidaho 9755fe1513 v8.2.1: Strip single quotes from descriptions, add HTTP/2 support in models 2025-07-12 11:08:20 +03:00
Aidaho f08a049d72 v8.2.1: Refactor server IP handling, update metric timestamp logic, and improve service configuration error handling
- Extracted `server_ip` for consistent use across server creation workflows.
- Replaced `datetime.now()` with `datetime.utcnow()` for metric timestamp standardization.
- Enhanced exception handling and logging in service configuration to improve debuggability.
2025-07-11 10:06:50 +03:00
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 a3eb55749d v8.2.1: Add a utility for managing file locks to prevent concurrent executions
Introduced `lock_utils.py` to manage file-based locks. Includes functions to acquire and release locks, ensuring the safety of processes by detecting stale or live locks with PID validation.
2025-06-08 12:56:41 +03:00
Aidaho f749f7366e v8.2.1: Refactor JS and Python models, remove unused functions, and improve form validation
Updated JavaScript to refine option selection logic and remove redundant functions (`showCompare`, `showCompareConfigs`). Enhanced Python models with validators to enforce non-empty inputs for critical fields (`port`, `maxconn`, etc.). Optimized configuration diff logic for better performance and readability. Added file lock checks before database migrations.
2025-06-08 12:55:43 +03:00
Aidaho 420694793d v8.2.0.4: bug fix. add new HAProxy versions 2025-05-24 09:14:19 +03:00
Aidaho 3c57a863c8 v8.2.0.2: fix metrics display 2025-05-21 15:16:31 +03:00
Aidaho f8fa52a88d v8.2.0.2: fix metrics display 2025-05-21 14:58:52 +03:00
Aidaho 1cabf7fff9 v8.2.0 2025-05-21 10:00:20 +03:00
Aidaho 44580ac62a v8.2.0: Refactor error handlers and clean up unused imports
Replaced inline `get_user_params()` calls with decorators for error handlers, improving readability and consistency. Cleaned up unused imports in multiple files and improved logging messages for better clarity. Simplified `create_db.py` by removing unused ORM fields.
2025-05-19 10:11:07 +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 0d022c57e5 v8.2.0: Fix action type in Nginx config update and clean up spacing.
Changed action type from 'create' to 'update' in `_edit_config` for proper handling of updates. Added 'update' as a valid action in `_edit_config` logic. Also removed unnecessary print statements and standardized whitespace across migration-related files for better readability.
2025-05-17 11:37:01 +03:00
Aidaho c20f3f8ee9 v8.2.0: Fix string interpolation in migration error messages
Standardize the use of formatted strings (f-strings) for error messages across all migration scripts to ensure correctness and consistency. Added missing blank lines across files to comply with PEP 8 style guidelines and improve code readability.
2025-05-17 11:30:44 +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 b1bec4ec06 v8.2.0: Add database migration framework and initial migrations
Introduce migration management tools using Peewee's migrate module. Add scripts for migration creation, application, rollback, and listing. Include initial batch of database migrations for schema and data changes.
2025-05-17 08:51:50 +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 a218caa56c v8.1.8: Refactor exception handling and minor UI updates.
Removed redundant try-except blocks to streamline code and improve readability. Added new fields to JavaScript variables for UI consistency and adjusted HTML structure for better semantics. Removed an unused error message constant.
2025-04-28 09:27:52 +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 33b18a4a35 v8.1.8: Refactor logging and update ModSec highlight logic
Refactored Roxy-WI logging to remove redundant arguments and streamline log formatting. Improved ModSecurity CodeMirror mode with enhanced keyword, operator, flag, and action support, ensuring better syntax highlighting. Replaced Nginx and HAProxy modes in WAF templates with ModSec mode.
2025-04-25 09:44:36 +03:00
Aidaho 0909fe8022 v8.1.8: Refactor JWT claims retrieval into a reusable function
Replaced repeated JWT validation and claim extraction code with a centralized `get_jwt_token_claims` function. This improves code maintainability, reduces redundancy, and ensures consistent JWT handling across the application.
2025-04-23 17:31:27 +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 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 f3f540c291 v8.1.6: Add UDP listener checker functionality
Introduces the ability to enable or disable a checker service for UDP listeners. Includes UI updates, database migration, new API route, and backend logic to handle checker settings on UDP listeners.
2025-02-19 10:49:07 +03:00
Aidaho fc0ccb8f9c v8.1.5: Fix SSH handling, password decryption, and error messaging.
Ensure SSH key validity check, correct password decryption, and proper error handling for SSH agent startup and service activation. Enhanced error messages improve debugging and maintainability.
2025-01-28 17:59:14 +03:00
Aidaho 5b8df16ba9 v8.1.5: Update HAProxy configurations and enhance error handling
Adjusted HAProxy Ansible role for ownership and removed unused peer configurations. Added error handling to HA-related views and database queries to improve stability. Updated HAProxy Exporter dependency to a newer version for compatibility.
2025-01-16 14:43:52 +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 f3c7cf97f2 v8.1.4: Add support for storing private keys in the database
Introduce a new `private_key` field in the `cred` table for secure key storage. Updated related functions to eliminate file-based key handling and use the database instead. Includes migration script for schema changes and necessary code adjustments across the application.
2025-01-02 15:00:30 +03:00
Aidaho c8b1822e8a v8.1.3: Update default versions for HAProxy and Nginx
Updated the default HAProxy version to 3.1.1-1 and Nginx experimental version to 1.4.0 in the templates and service installation logic. This ensures compatibility with the latest releases and improves functionality.
2024-12-28 11:09:20 +03:00
Nijat 32313928eb
Update roxy.py 2024-12-24 17:15:34 +04: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 95cd8be699 v8.1.1.1: Refactor service alert checks and update version.
Consolidated service-specific alert checks into a single function for better maintainability. Deprecated outdated functions with markers for future deletion. Also, updated the database version to '8.1.1.1'.
2024-11-15 15:41:36 +03:00
Aidaho 5e542caf4a v8.1.1: Fix incorrect IP retrieval for cluster slaves
Replaces a method call with direct attribute access for retrieving the IP address of cluster slaves. This simplifies the code and improves performance by eliminating unnecessary database queries.
2024-11-13 22:27:06 +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 3d642a61c4 v8.1.2: Change get_user_status to select_user_status
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.
2024-11-04 19:54:27 +03:00
Aidaho 61ed3e92c3 v8.1.2: Remove unused imports and simplify user status checks
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.
2024-11-04 17:27:51 +03:00
Aidaho 0128321642 v8.1.2: Refactor database interactions and cleanup unused code
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.
2024-11-04 16:46:54 +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 d2cc32f984 v8.1.2: Rename `group` to `group_id` in settings and related files.
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.
2024-11-04 09:26:32 +03:00