Auto start
pull/145/head
Pavel Loginov 2019-09-01 14:13:34 +03:00
parent 9d85b74599
commit 4bb9a840fb
4 changed files with 18 additions and 3 deletions

View File

@ -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():

View File

@ -3,9 +3,17 @@
<td class="padding10">
<a href="#{{ service.0 }}" title="Go to {{ service.0 }} status" style="color: #000; padding-left: 15px;">
{{ service.0 }}
{% if service.5.0.0|int() >= 1 %}
<img src="/image/pic/shield.png" width=18 style="padding-left: 5px; margin-bottom: -3px;" title="Auto start enabled">
<img
{% if service.6|int() >= 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 %}
</a>
</td>
<td class="second-collumn">

BIN
image/pic/shield-red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -359,7 +359,7 @@ pre {
padding: 10px;
padding-left: 0px;
border: none;
width: 23%;
width: 15%;
}
.padding20 {
padding: 15px;