From 2b74cb3e6aa1306b7fbbf372e1cd9d2e46d5faa0 Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Sat, 28 May 2022 11:05:17 +0300 Subject: [PATCH] v6.0.2.0 Changelog: https://roxy-wi.org/changelog.py#6_0_2 --- app/create_db.py | 20 ++++++++++---------- app/sql.py | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/create_db.py b/app/create_db.py index 4a8c011b..f36100bf 100644 --- a/app/create_db.py +++ b/app/create_db.py @@ -129,9 +129,9 @@ def default_values(): {'param': 'apache_container_name', 'value': 'apache', 'section': 'apache', 'desc': 'Docker container name for Apache service', 'group': '1'}, {'param': 'keepalived_config_path', 'value': '/etc/keepalived/keepalived.conf', 'section': 'keepalived', - 'desc': 'Path to the main Keepalived configuration file', 'group': '1'}, + 'desc': 'Path to the main Keepalived configuration file', 'group': '1'}, {'param': 'keepalived_path_logs', 'value': '/var/log/keepalived/', 'section': 'keepalived', - 'desc': 'The path for Keepalived logs', 'group': '1'}, + 'desc': 'The path for Keepalived logs', 'group': '1'}, ] try: Setting.insert_many(data_source).on_conflict_ignore().execute() @@ -579,24 +579,24 @@ def update_db_v_5_3_0(**kwargs): {'param': 'haproxy_container_name', 'value': 'haproxy', 'section': 'haproxy', 'desc': 'Docker container name for HAProxy service', 'group': g.group_id}, {'param': 'maxmind_key', 'value': '', 'section': 'haproxy', - 'desc': 'License key for downloading GeoIP DB. You can create it on maxmind.com', - 'group': g.group_id}, + 'desc': 'License key for downloading GeoIP DB. You can create it on maxmind.com', + 'group': g.group_id}, {'param': 'apache_path_logs', 'value': '/var/log/httpd/', 'section': 'apache', 'desc': 'The path for Apache logs', 'group': g.group_id}, {'param': 'apache_stats_user', 'value': 'admin', 'section': 'apache', 'desc': 'Username for accessing Apache stats page', 'group': g.group_id}, {'param': 'apache_stats_password', 'value': 'password', 'section': 'apache', - 'desc': 'Password for Apache stats webpage', 'group': g.group_id}, + 'desc': 'Password for Apache stats webpage', 'group': g.group_id}, {'param': 'apache_stats_port', 'value': '8087', 'section': 'apache', 'desc': 'Stats port for webpage Apache', - 'group': g.group_id}, + 'group': g.group_id}, {'param': 'apache_stats_page', 'value': 'stats', 'section': 'apache', 'desc': 'URI Stats for webpage Apache', - 'group': g.group_id}, + 'group': g.group_id}, {'param': 'apache_dir', 'value': '/etc/httpd/', 'section': 'apache', - 'desc': 'Path to the Apache directory with config files', 'group': g.group_id}, + 'desc': 'Path to the Apache directory with config files', 'group': g.group_id}, {'param': 'apache_config_path', 'value': '/etc/httpd/conf/httpd.conf', 'section': 'apache', - 'desc': 'Path to the main Apache configuration file', 'group': g.group_id}, + 'desc': 'Path to the main Apache configuration file', 'group': g.group_id}, {'param': 'apache_container_name', 'value': 'apache', 'section': 'apache', - 'desc': 'Docker container name for Apache service', 'group': g.group_id}, + 'desc': 'Docker container name for Apache service', 'group': g.group_id}, {'param': 'keepalived_config_path', 'value': '/etc/keepalived/keepalived.conf', 'section': 'keepalived', 'desc': 'Path to the main Keepalived configuration file', 'group': g.group_id}, {'param': 'keepalived_path_logs', 'value': '/var/log/keepalived/', 'section': 'keepalived', diff --git a/app/sql.py b/app/sql.py index c52dc94f..25817b99 100755 --- a/app/sql.py +++ b/app/sql.py @@ -168,8 +168,8 @@ def add_setting_for_new_group(group_id): {'param': 'haproxy_sock_port', 'value': '1999', 'section': 'haproxy', 'desc': 'Socket port for HAProxy', 'group': group_id}, {'param': 'maxmind_key', 'value': '', 'section': 'haproxy', - 'desc': 'License key for downloading GeoIP DB. You can create it on maxmind.com', - 'group': g.group_id}, + 'desc': 'License key for downloading GeoIP DB. You can create it on maxmind.com', + 'group': g.group_id}, {'param': 'nginx_path_logs', 'value': '/var/log/nginx/', 'section': 'nginx', 'desc': 'NGINX error log', 'group': group_id}, {'param': 'nginx_stats_user', 'value': 'admin', 'section': 'nginx', @@ -224,9 +224,9 @@ def add_setting_for_new_group(group_id): {'param': 'apache_container_name', 'value': 'apache', 'section': 'apache', 'desc': 'Docker container name for Apache service', 'group': group_id}, {'param': 'keepalived_config_path', 'value': '/etc/keepalived/keepalived.conf', 'section': 'keepalived', - 'desc': 'Path to the main Keepalived configuration file', 'group': g.group_id}, + 'desc': 'Path to the main Keepalived configuration file', 'group': g.group_id}, {'param': 'keepalived_path_logs', 'value': '/var/log/keepalived/', 'section': 'keepalived', - 'desc': 'The path for Keepalived logs', 'group': g.group_id}, + 'desc': 'The path for Keepalived logs', 'group': g.group_id}, ] try: @@ -2461,7 +2461,7 @@ def select_all_alerts_for_all(): sql = """ select level, message, `date`, user_group from alerts where `date` <= (now()+ INTERVAL 10 second) """ else: sql = """ select level, message, `date`, user_group from alerts where `date` >= datetime('now', '-10 second', 'localtime') - and `date` <= datetime('now', 'localtime') ; """ + and `date` <= datetime('now', 'localtime') ; """ try: cursor.execute(sql) except Exception as e: