diff --git a/app/ovw.py b/app/ovw.py index 84fe5c83..979d659d 100644 --- a/app/ovw.py +++ b/app/ovw.py @@ -16,9 +16,16 @@ async def async_get_overview(serv1, serv2): haproxy_config_path = sql.get_setting('haproxy_config_path') commands = [ "ls -l %s |awk '{ print $6\" \"$7\" \"$8}'" % haproxy_config_path ] commands1 = [ "ps ax |grep waf/bin/modsecurity |grep -v grep |wc -l" ] + commands2 = [ "ps ax |grep keep_alive.py |grep -v grep |wc -l" ] cmd = 'echo "show info" |nc %s %s |grep -e "Process_num"' % (serv2, haproxy_sock_port) - server_status = (serv1, serv2, funct.server_status(funct.subprocess_execute(cmd)), funct.ssh_command(serv2, commands), funct.ssh_command(serv2, commands1), sql.select_servers(server=serv2, keep_alive=1)) + server_status = (serv1, + serv2, + funct.server_status(funct.subprocess_execute(cmd)), + funct.ssh_command(serv2, commands), + funct.ssh_command(serv2, commands1), + sql.select_servers(server=serv2, keep_alive=1), + funct.ssh_command(serv2, commands2)) return server_status async def get_runner_overview(): diff --git a/app/templates/ajax/overview.html b/app/templates/ajax/overview.html index cf76e32f..599dba99 100644 --- a/app/templates/ajax/overview.html +++ b/app/templates/ajax/overview.html @@ -3,9 +3,17 @@ {{ service.0 }} + {% if service.5.0.0|int() >= 1 %} - + = 1 %} + src="/image/pic/shield.png" title="Auto start enabled" + {% else %} + src="/image/pic/shield-red.png" title="Auto start enabled, but keep alive service does not work" + {% endif %} + width=18 style="padding-left: 5px; margin-bottom: -3px;"> {% endif %} + diff --git a/image/pic/shield-red.png b/image/pic/shield-red.png new file mode 100644 index 00000000..f1f1233e Binary files /dev/null and b/image/pic/shield-red.png differ diff --git a/inc/style.css b/inc/style.css index ee2dcfea..588cd88e 100644 --- a/inc/style.css +++ b/inc/style.css @@ -359,7 +359,7 @@ pre { padding: 10px; padding-left: 0px; border: none; - width: 23%; + width: 15%; } .padding20 { padding: 15px;