')
+if serv is not None and form.getvalue('rows1') is not None:
+ rows = form.getvalue('rows1')
+ grep = form.getvalue('grep')
+
+ if grep is not None:
+ grep_act = '|grep'
+ else:
+ grep_act = ''
+ grep = ''
+
+ cmd='tail -%s %s %s %s' % (rows, '/var/log/httpd/'+serv, grep_act, grep)
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, universal_newlines=True)
+ stdout, stderr = p.communicate()
+ output = stdout.splitlines()
+
+ funct.show_log(output)
+ print(stderr)
+
if serv is not None and act == "showMap":
ovw.get_map(serv)
diff --git a/app/ovw.py b/app/ovw.py
index a44e7857..847bb703 100644
--- a/app/ovw.py
+++ b/app/ovw.py
@@ -151,13 +151,16 @@ def get_map(serv):
G.add_node(node,pos=(k,i),label_pos=(k,i+150))
if "bind" in line:
- bind = line.split(":")
- if stats_port not in bind[1]:
- bind[1] = bind[1].strip(' ')
- bind = bind[1].split("crt")
- node = node.strip(' \t\n\r')
- node = node + ":" + bind[0]
- G.add_node(node,pos=(k,i),label_pos=(k,i+150))
+ try:
+ bind = line.split(":")
+ if stats_port not in bind[1]:
+ bind[1] = bind[1].strip(' ')
+ bind = bind[1].split("crt")
+ node = node.strip(' \t\n\r')
+ node = node + ":" + bind[0]
+ G.add_node(node,pos=(k,i),label_pos=(k,i+150))
+ except:
+ pass
if "server " in line or "use_backend" in line or "default_backend" in line and "stats" not in line:
if "timeout" not in line and "default-server" not in line and "#" not in line and "stats" not in line:
diff --git a/app/templates/admin.html b/app/templates/admin.html
index 653c5456..5e9ce9c7 100644
--- a/app/templates/admin.html
+++ b/app/templates/admin.html
@@ -289,10 +289,16 @@