Browse Source

v6.2.2.0

Changelog: https://roxy-wi.org/changelog#6_2_2
pull/343/head
Pavel Loginov 2 years ago
parent
commit
0ff26682be
  1. 2
      app/funct.py
  2. 4
      app/options.py

2
app/funct.py

@ -350,7 +350,7 @@ def return_ssh_keys_path(server_ip: str, **kwargs) -> dict:
ssh_settings.setdefault('enabled', ssh.enable)
ssh_settings.setdefault('user', ssh.username)
ssh_settings.setdefault('password', ssh.password)
ssh_key = f'{lib_path}/keys/{ssh.name}.pem' if ssh.enable == '1' else ''
ssh_key = f'{lib_path}/keys/{ssh.name}.pem' if ssh.enable == 1 else ''
ssh_settings.setdefault('key', ssh_key)
ssh_port = [str(server[10]) for server in sql.select_servers(server=server_ip)]

4
app/options.py

@ -150,7 +150,7 @@ if form.getvalue('ipbackend') is not None and form.getvalue('backend_server') is
backend = funct.checkAjaxInput(form.getvalue('ipbackend'))
backend_server = funct.checkAjaxInput(form.getvalue('backend_server'))
cmd = 'echo "show servers state"|nc %s %s |grep "%s" |grep "%s" |awk \'{print $5":"$19}\' |head -1' % (
serv, haproxy_sock_port, backend, backend_server)
serv, haproxy_sock_port, backend, backend_server)
output, stderr = funct.subprocess_execute(cmd)
print(output[0])
@ -848,7 +848,7 @@ if act == "overviewServers":
async def async_get_overviewServers(serv1, serv2, service):
if service == 'haproxy':
cmd = 'echo "show info" |nc %s %s -w 1|grep -e "node\|Nbproc\|Maxco\|MB\|Nbthread"' % (
serv2, sql.get_setting('haproxy_sock_port'))
serv2, sql.get_setting('haproxy_sock_port'))
out = funct.subprocess_execute(cmd)
return_out = ""

Loading…
Cancel
Save