diff --git a/app/funct.py b/app/funct.py
index e415ba99..ea2edda1 100644
--- a/app/funct.py
+++ b/app/funct.py
@@ -298,24 +298,26 @@ def ssh_connect(serv):
else:
ssh.connect(hostname=serv, port=ssh_port, username=ssh_user_name, password=ssh_user_password, timeout=11, banner_timeout=200)
return ssh
- except paramiko.AuthenticationException:
- return 'Authentication failed, please verify your credentials'
+ except paramiko.AuthenticationException as e:
+ logging('localhost', ' ' + str(e), haproxywi=1)
+ print('error: Authentication failed, please verify your credentials')
except paramiko.SSHException as sshException:
- return 'error: Unable to establish SSH connection: %s ' % sshException
+ logging('localhost', ' ' + str(sshException), haproxywi=1)
+ print('error: Unable to establish SSH connection: %s ') % sshException
except paramiko.PasswordRequiredException as e:
logging('localhost', ' ' + str(e), haproxywi=1)
- return 'error: %s ' % e
+ print('error: %s ') % e
except paramiko.BadHostKeyException as badHostKeyException:
logging('localhost', ' ' + str(badHostKeyException), haproxywi=1)
- return 'error: Unable to verify server\'s host key: %s ' % badHostKeyException
+ print('error: Unable to verify server\'s host key: %s ') % badHostKeyException
except Exception as e:
logging('localhost', ' ' + str(e), haproxywi=1)
if e == "No such file or directory":
- return 'error: %s. Check ssh key' % e
+ print('error: %s. Check SSH key') % e
elif e == "Invalid argument":
- return 'error: Check the IP of the server'
+ print('error: Check the IP of the server')
else:
- return str(e)
+ print(str(e))
def get_config(serv, cfg, **kwargs):
diff --git a/app/options.py b/app/options.py
index 75ae1e4d..2fa2c152 100644
--- a/app/options.py
+++ b/app/options.py
@@ -807,7 +807,7 @@ if serv is not None and act == "showMap":
node = ""
line_new2 = [1, ""]
i, k = 800, 800
- j, m = 0, 0
+ j = 0
for line in conf:
if line.startswith('listen') or line.startswith('frontend'):
if "stats" not in line:
@@ -854,9 +854,9 @@ if serv is not None and act == "showMap":
backend_server_port = ''
if j % 2 == 0:
- G.add_node(line_new[0], pos=(k + 230, i - 335), label_pos=(k + 225, i - 180))
+ G.add_node(line_new[0], pos=(k + 250, i - 335), label_pos=(k + 215, i - 180))
else:
- G.add_node(line_new[0], pos=(k - 230, i - 0), label_pos=(k - 225, i + 180))
+ G.add_node(line_new[0], pos=(k - 250, i - 0), label_pos=(k - 245, i + 180))
if line_new2[1] != "":
G.add_edge(node, line_new[0], port=backend_server_port)
@@ -1394,7 +1394,7 @@ if form.getvalue('installwaf'):
if form.getvalue('update_haproxy_wi'):
service = form.getvalue('service')
- services = ['roxy-wi-checker', 'haproxy-wi', 'roxy-wi-keep_alive', 'roxy-wi-smon', 'roxy-wi-metrics']
+ services = ['roxy-wi-checker', 'roxy-wi', 'roxy-wi-keep_alive', 'roxy-wi-smon', 'roxy-wi-metrics']
if service not in services:
print('error: ' + service + ' is not part of Roxy-WI')
sys.exit()
diff --git a/app/scripts/ansible/roles/haproxy/tasks/main.yml b/app/scripts/ansible/roles/haproxy/tasks/main.yml
index a30b6375..db6a02fb 100644
--- a/app/scripts/ansible/roles/haproxy/tasks/main.yml
+++ b/app/scripts/ansible/roles/haproxy/tasks/main.yml
@@ -28,7 +28,7 @@
- name: install HAProxy {{HAPVER}} on EL{{ansible_facts['distribution_major_version']}}
yum:
name:
- - http://repo.haproxy-wi.org/haproxy-{{HAPVER}}.el{{ansible_facts['distribution_major_version']}}.x86_64.rpm
+ - http://repo.roxy-wi.org/haproxy-{{HAPVER}}.el{{ansible_facts['distribution_major_version']}}.x86_64.rpm
- socat
- rsyslog
state: present
@@ -44,7 +44,7 @@
- name: Try to install another HAProxy {{HAPVER}} on EL{{ansible_facts['distribution_major_version']}}
yum:
name:
- - http://repo1.haproxy-wi.org/haproxy-{{HAPVER}}.el{{ansible_facts['distribution_major_version']}}.x86_64.rpm
+ - http://repo1.roxy-wi.org/haproxy-{{HAPVER}}.el{{ansible_facts['distribution_major_version']}}.x86_64.rpm
- socat
- rsyslog
- bind-utils
diff --git a/app/templates/404.html b/app/templates/404.html
index 0950836e..e416adae 100644
--- a/app/templates/404.html
+++ b/app/templates/404.html
@@ -45,7 +45,7 @@
diff --git a/app/templates/500.html b/app/templates/500.html
index 761913e8..1dba9f5f 100644
--- a/app/templates/500.html
+++ b/app/templates/500.html
@@ -45,7 +45,7 @@
diff --git a/app/templates/add.html b/app/templates/add.html
index 0a57e0c7..2b2a6199 100644
--- a/app/templates/add.html
+++ b/app/templates/add.html
@@ -260,7 +260,7 @@
error-limit: {{ input('circuit_breaking_error_limit', type='number', value='50', style='width: 50px;') }}
on-error:
{{ select('circuit_breaking_on_error', values=on_error, class='force_close') }}
-
+
@@ -644,7 +644,7 @@
error-limit: {{ input('circuit_breaking_error_limit', type='number', value='50', style='width: 50px;') }}
on-error:
{{ select('circuit_breaking_on_error', values=on_error, class='force_close') }}
-
+
@@ -801,7 +801,7 @@
How to use pre saved option you can see in
-
+
this video
@@ -856,7 +856,7 @@
How to use pre saved servers you can see in
-
+
this video
@@ -952,7 +952,7 @@
How to use userlists you can read
-
+
here
@@ -1019,7 +1019,7 @@
How to use peers you can read
-
+
here
@@ -1084,7 +1084,7 @@
In this section you can create and edit black and white lists. And after use them in the HAProxy configs or in the "Add proxy" pages. Read how to use it in this
-
article
+
article
Note: Each new address must be specified from a new line
diff --git a/app/templates/admin.html b/app/templates/admin.html
index 2aeb18fa..8c0b463b 100644
--- a/app/templates/admin.html
+++ b/app/templates/admin.html
@@ -64,7 +64,7 @@
+ Add
- How to setup groups you can read in this
article
+ How to setup groups you can read in this
article
@@ -90,17 +90,18 @@
Service
|
-
+ |
Actions
|
-
Version |
-
Description |
+
Version |
+
Description |
+
|
- You can read about services
here
+ You can read about services
here
@@ -115,18 +116,19 @@
Description
|
+ |
Note:
- For updating you have to use Roxy-WI RPM. How to start using repository read
here
+ For updating you have to use Roxy-WI RPM. How to start using repository read
here
If the Roxy-WI server uses a proxy to connect to the Internet, add the proxy settings to yum.conf
- Read more about updating in
docs
- and
changelog
+ Read more about updating in
docs
+ and
changelog
diff --git a/app/templates/ajax/load_openvpn.html b/app/templates/ajax/load_openvpn.html
index 0c260a4b..a9b5af5d 100644
--- a/app/templates/ajax/load_openvpn.html
+++ b/app/templates/ajax/load_openvpn.html
@@ -83,7 +83,7 @@
You do not have installed OpenVPN client.
- Read hear
+ Read hear
how to install OpenVPN client
{% endif %}
\ No newline at end of file
diff --git a/app/templates/ajax/nginx_stats.html b/app/templates/ajax/nginx_stats.html
index 9cb33370..cb87f6b9 100644
--- a/app/templates/ajax/nginx_stats.html
+++ b/app/templates/ajax/nginx_stats.html
@@ -121,6 +121,6 @@ u:hover div.tips {visibility:visible;}
- You can read the description about statuses
here
+ You can read the description about statuses
here
{% endfor %}
diff --git a/app/templates/ha.html b/app/templates/ha.html
index 30c98024..3d1bb8ff 100644
--- a/app/templates/ha.html
+++ b/app/templates/ha.html
@@ -94,7 +94,7 @@
diff --git a/app/templates/include/admin_backup.html b/app/templates/include/admin_backup.html
index d7e7f967..f54b02ba 100644
--- a/app/templates/include/admin_backup.html
+++ b/app/templates/include/admin_backup.html
@@ -68,5 +68,5 @@
- You can read the description of all parameters
here
+ You can read the description of all parameters
here
\ No newline at end of file
diff --git a/app/templates/include/admin_servers.html b/app/templates/include/admin_servers.html
index 9c14e039..1beec357 100644
--- a/app/templates/include/admin_servers.html
+++ b/app/templates/include/admin_servers.html
@@ -165,7 +165,7 @@
- You can read the description of all parameters
here
- or read HowTo in this
article
+ You can read the description of all parameters
here
+ or read HowTo in this
article
{% endif %}
\ No newline at end of file
diff --git a/app/templates/include/admin_ssh.html b/app/templates/include/admin_ssh.html
index 2e87b81c..b7598e0c 100644
--- a/app/templates/include/admin_ssh.html
+++ b/app/templates/include/admin_ssh.html
@@ -86,6 +86,6 @@
- You can read the description of all parameters
here
- or read HOWTO
here
+ You can read the description of all parameters
here
+ or read HOWTO
here
\ No newline at end of file
diff --git a/app/templates/logs.html b/app/templates/logs.html
index 14c39006..ed90c7f4 100644
--- a/app/templates/logs.html
+++ b/app/templates/logs.html
@@ -88,14 +88,14 @@
}
- You can read the descriptions about all logs
here
+ You can read the descriptions about all logs
here
{% elif serv == 'haproxy-wi.error.log' or serv == 'haproxy-wi.access.log' %}
- You can read the description about all logs file
here
+ You can read the description about all logs file
here
{% else %}
- You can read the description of all Run Time API
here
+ You can read the description of all Run Time API
here
{% if role <= 3 %}
@@ -111,7 +111,7 @@
- You can read how it works
here
+ You can read how it works
here
@@ -157,7 +157,7 @@
- You can read how it works
here
+ You can read how it works
here
@@ -189,7 +189,7 @@
- You can read how it works
here
+ You can read how it works
here
@@ -221,7 +221,7 @@
- You can read how it works
here
+ You can read how it works
here
@@ -248,7 +248,7 @@
- You can read how it works
here
+ You can read how it works
here
{% endif %}
diff --git a/app/templates/servers.html b/app/templates/servers.html
index 67d85782..d2a72245 100644
--- a/app/templates/servers.html
+++ b/app/templates/servers.html
@@ -144,7 +144,7 @@
- Read the "how to" in this
article
+ Read the "how to" in this
article
diff --git a/app/templates/waf.html b/app/templates/waf.html
index b4fd49a0..083f81e8 100644
--- a/app/templates/waf.html
+++ b/app/templates/waf.html
@@ -45,7 +45,7 @@
var hostnamea = []
{% for s in servers_all %}
ip.push("{{s[2]}}");
- var host = "{{s[1]}}";
+ var host = "{{s[2]}}";
host = host.replace(/\./g, '\\.');
hostnamea.push(host);
{% endfor %}
@@ -56,21 +56,11 @@
{% else %}
-
- Server
- |
-
- Actions
- |
-
- WAF mode
- |
-
- Metrics
- |
-
- Manage rules
- |
+ Server |
+ Actions |
+ WAF mode |
+ Metrics |
+ Manage rules |
@@ -78,7 +68,7 @@
|
{% for s in servers_all %}
-
+
{% endfor %}
@@ -129,7 +119,7 @@
});
- You can read the description and watch a video about WAF
here
+ You can read the description and watch a video about WAF
here
{% endif %}
{% endif %}
diff --git a/inc/users.js b/inc/users.js
index 55c44bf4..07d42900 100644
--- a/inc/users.js
+++ b/inc/users.js
@@ -1844,6 +1844,8 @@ function checkSshConnect(ip) {
success: function( data ) {
if (data.indexOf('error:') != '-1') {
toastr.error(data)
+ } else if(data.indexOf('failed') != '-1') {
+ toastr.error(data)
} else {
toastr.clear();
toastr.success('Connect is accepted');