1327 Commits

Author SHA1 Message Date
Aidaho
2527f00d3c v8.2.6: Update version migrations and enhance install template options
- Added a new migration file to update the version to `8.2.6`.
- Updated install templates to include new version options for HAProxy, Apache Exporter, and Node Exporter.
- Modified default version in `ServerInstall` model to `3.3.0-1`.
2025-12-12 12:36:40 +03:00
Aidaho
b45584d734 Add group-based filtering for metrics queries in service and route layers
- Updated `select_metrics_enabled` to include `group_id` filtering.
- Refactored query logic to handle `group_id` constraints consistently across services.
- Integrated `group_id` parameter in route handlers for metrics APIs.
2025-11-20 12:02:31 +03:00
Aidaho
081ca5c824 v8.2.5: Add caching support for Nginx configurations and update version
- Introduced caching options (`proxy_cache`) in Nginx models, templates, and JavaScript for better performance.
- Added `NginxProxyPassCache` model for detailed cache configurations (e.g., path, size, levels, inactive duration).
- Updated messages in multiple languages to include cache-related terms.
- Modified Ansible templates and logic for cache zone definitions.
- Enhanced the UI to support enabling and managing cache settings.
- Included new migration file to update version to `8.2.5`.
2025-10-27 09:31:03 +03:00
Aidaho
980f563eb0 v8.2.4: Add WebSocket support in Nginx configuration and update version
- Introduced WebSocket support in Nginx models, templates, and JavaScript.
- Updated database migration to version `8.2.4`.
- Refactored logrotate configurations for consistency.
- Added Page Size pragma in database initialization for optimized performance.
2025-10-13 10:24:03 +03:00
e345
b25ce00e12 Update action.py : Redirect Docker command output to prevent Python hang
When executing Docker commands via Python, such as `docker kill -s HUP <container>`, the process may hang because the command produces output that blocks the Python subprocess.  

This change appends `> /dev/null` to Docker commands to discard any standard output, ensuring that Python can execute the command without waiting indefinitely.  

Systemd commands remain unchanged, as they do not exhibit the same blocking behavior.
2025-09-22 15:41:50 +08:00
e345
6b7cfd1e86 Update action.py: correct docker kill signal option case
Previously, when handling the reload action, the code used `docker kill -S HUP`.
However, the Docker CLI only supports the lowercase `-s` option.
Using `-S` results in an error and prevents the signal from being sent to the container process.

This change:
- Corrects `kill -S HUP` to `kill -s HUP`
- Ensures that in Docker mode, the reload action can properly send the SIGHUP signal
- Keeps the systemd branch logic unchanged
2025-09-22 13:53:50 +08:00
Aidaho
3042fd7f24 v8.2.3: Add hotkeys info link in config template and refactor time_range handling in metrics module
- Added an informational link about hotkeys to the config.html template for improved usability.
- Refactored time_range logic in metric queries to use integers instead of strings for better consistency and readability.
2025-09-06 09:50:36 +03:00
Aidaho
dccc2b3e20 v8.2.3: Add backend header hiding option and improve UDP listener updates
- Introduced `hide_backend_headers` option in Nginx configuration for enhanced security.
- Updated models, templates, and JavaScript to support `hide_backend_headers`.
- Improved UDP listener rendering logic by dynamically fetching and syncing listeners via AJAX.
- Added new database migration to update version to `8.2.3`.
2025-08-26 09:24:20 +03:00
Aidaho
20157572c6 v8.2.2: Add security headers and HTTP/2 support for Nginx configuration in models, templates, and JS
- Introduced `NginxProxyPassSecurity` model for managing security headers and server token settings.
- Enhanced templates and JavaScript to support `hide_server_tokens`, `security_headers`, and `hsts` options.
- Updated Ansible and migration files to align with new security and HTTP/2 features.
2025-07-28 11:57:22 +03:00
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
44ddae6dd1 v8.2.0.4: add the possibility to downgrade HAProxy 2025-05-27 11:25:30 +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
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
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
Vladislav Bukatov
df4471fff6 rework breadcrumbs logic 2025-05-15 23:16:33 +04: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
ea5ee37b8c v8.1.8: Simplify Ansible tasks by removing or commenting unused logic
Unused and commented-out conditions were removed or commented in multiple Ansible task files to streamline execution. This cleanup reduces complexity while ensuring unnecessary operations are excluded.
2025-05-02 10:28:52 +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
3b8cc74065 v8.1.8: Add HA cluster creation progress modal to template
Introduce a new modal to display HA cluster creation progress with messages and a progress bar. This enhances the user interface by providing clear feedback during the creation process.
2025-04-28 11:32:15 +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
d3747e1b48 v8.1.8: Remove SSL-related sections from the add.html template
Removed the sections handling SSL certificates and Let's Encrypt in the add.html template. This includes related scripts, HTML elements, and form inputs for certificate management. Streamlines the template by eliminating unused or unnecessary functionality related to SSL.
2025-04-16 19:12:58 +03:00
Aidaho
615c4b3e4c v8.1.8: Add new SSL management table and improve JS logic
Introduced an SSL management table with dynamic fields for server, type, domain, and credentials in `ssl.html`. Simplified JS logic by removing redundant conditions and enhanced `showConfigFiles` to support preselection. Added `makeid` function for generating random strings.
2025-04-16 19:12:26 +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
aedba82e7c v8.1.6.1: Update version, improve WAF handling, and fix minor bugs
Updated the version in the database to 8.1.6.1. Adjusted WAF log handling to correctly process parameters and URLs, improving functionality and accuracy. Fixed minor issues, including initializing variables and handling edge cases for section edits in configurations.
2025-03-17 18:39:08 +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