From cf7e15f00befd6474d1630f24c7ade9fde15bdfe Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Sun, 1 Dec 2019 20:15:09 +0300 Subject: [PATCH] v3.8.1 --- README.md | 2 + app/create_db.py | 6 +- app/funct.py | 3 + app/templates/base.html | 3 + app/templates/runtimeapi.html | 8 +++ inc/add.js | 36 ++++++++++++ inc/js.cookie.min.js | 3 +- inc/script.js | 107 +++++++++++++++------------------- inc/style.css | 50 ++++++++++------ 9 files changed, 137 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index 673e811..0093827 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ After install HAProxy-WI: yum install haproxy-wi ``` +Supports EL7 and EL8 + #### Before uses RPM repository you should donate to support project on [Patreon](https://www.patreon.com/haproxy_wi/overview) or on [PayPal](https://www.paypal.me/loginovpavel) and I will send you credentials for access. Actual prices you can see on [Patreon](https://www.patreon.com/haproxy_wi/overview) ## Manual install diff --git a/app/create_db.py b/app/create_db.py index 7d4af3f..6c69a49 100644 --- a/app/create_db.py +++ b/app/create_db.py @@ -185,6 +185,8 @@ def update_db_v_31(**kwargs): sql.append("INSERT INTO settings (param, value, section, `desc`) values('ldap_password', '', 'ldap', 'Password for connect to LDAP server');") sql.append("INSERT INTO settings (param, value, section, `desc`) values('ldap_base', '', 'ldap', 'Base domain. Example: dc=domain, dc=com');") sql.append("INSERT INTO settings (param, value, section, `desc`) values('ldap_domain', '', 'ldap', 'Domain for login, that after @, like user@domain.com, without user@');") + sql.append("INSERT INTO settings (param, value, section, `desc`) values('ldap_class_search', 'user', 'ldap', 'Class to search user');") + sql.append("INSERT INTO settings (param, value, section, `desc`) values('ldap_user_attribute', 'sAMAccountName', 'ldap', 'User\'s attribute for search');") sql.append("INSERT INTO settings (param, value, section, `desc`) values('ldap_search_field', 'mail', 'ldap', 'Field where user e-mail saved');") for i in sql: @@ -409,7 +411,7 @@ def update_db_v_3_4_9_5(**kwargs): if e.args[0] == 'duplicate column name: param' or e == "1060 (42S21): Duplicate column name 'param' ": print('DB was update to 3.4.9.5') else: - print("DB was update to 3.4.9.5") + print("Updating... go to version 3.8.1") return False else: return True @@ -438,7 +440,7 @@ def update_db_v_3_5_3(**kwargs): def update_ver(**kwargs): con, cur = get_cur() - sql = """update version set version = '3.8'; """ + sql = """update version set version = '3.8.1'; """ try: cur.execute(sql) con.commit() diff --git a/app/funct.py b/app/funct.py index 1c56bf6..6514120 100644 --- a/app/funct.py +++ b/app/funct.py @@ -636,6 +636,7 @@ def ssh_command(serv, commands, **kwargs): for line in stderr.read().decode(encoding='UTF-8'): if line: print("
"+line+"
") + logging('localhost', ' '+line, haproxywi=1) try: ssh.close() except: @@ -663,6 +664,8 @@ def show_backends(serv, **kwargs): haproxy_sock_port = sql.get_setting('haproxy_sock_port') cmd='echo "show backend" |nc %s %s' % (serv, haproxy_sock_port) output, stderr = subprocess_execute(cmd) + if stderr: + logging('localhost', ' '+stderr, haproxywi=1) if kwargs.get('ret'): ret = list() else: diff --git a/app/templates/base.html b/app/templates/base.html index 57bae85..cda5732 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -198,6 +198,9 @@ {% endif %} + {% if h2 %} + + {% endif %} {% if role %} {% if role <= 2 %}