This commit updates variable declarations from 'var' to 'let' in 'install.js' for better scope control. It additionally includes error-handling for undefined 'select_id' in 'parseAnsibleJsonOutput' function. The 'waf.js' file is moved to the 'app/static/js' directory and paths are updated accordingly in both 'waf.js' and 'waf.html'. The success handler in 'waf.js' is also updated to use 'parseAnsibleJsonOutput'.
Path of the WAF nginx module in Ansible scripts has been updated from NGINX_PATH to SERVICE_PATH. This refactoring enhances the organization of the configuration files and improves code base understanding. Changes have been applied in the WAF configuration and service execution files.
Improve error handling in tools list and adjust status check command
Enhanced error handling in tools list loop within the 'common.py' file to provide more specific error messages. Additionally, the command for checking a tool's status was adjusted to remove unnecessary sudo usage. Also, updated the service check in the 'roxy.py' file from 'sshd' to 'rsyslog'.
Remove service check decorator from action_service route
The `check_services` decorator was removed from the `action_service` route in the file 'app/routes/service/routes.py'. This change simplifies the code and avoids unnecessary service checks when performing actions on a service.
Additionally, import paths were corrected in the Python file 'app/routes/install/routes.py'. Error handling was improved in the 'install_service' function to return details of any encountered exceptions.
Refactor imports and remove redundant paths
This commit updates the sys.path.append and import statements in multiple files for better readability and maintainability. Unused or unnecessary paths were removed, and module imports were restructured for a more logical organization.