haproxy-wi/app/templates/ajax/overivewWaf.html

57 lines
2.0 KiB
HTML
Raw Normal View History

2018-09-12 02:25:32 +00:00
{% set waf_servers = [] %}
2018-08-17 11:55:17 +00:00
{% for service in service_status %}
2018-10-01 02:32:13 +00:00
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" or url == "waf.py" %}
2018-09-12 02:25:32 +00:00
{% do waf_servers.append(1) %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn">
<a href="#{{ service.0 }}" title="Go to {{ service.0 }} status" style="color: #000">{{ service.0 }}</a>
</td>
<td class="second-collumn">
{% if service.2|int() >= 1 %}
<span class="serverUp"> UP</span> running {{service.2 }} processes
{% else %}
<span class="serverDown"> DOWN</span> running {{service.2 }} processes
2018-08-17 11:55:17 +00:00
{% endif %}
2018-09-12 02:25:32 +00:00
</td>
<td>
{% if role <= 1 %}
<a id="{{ service.1 }}" class="start-waf" title="Start WAF service">
2019-09-09 19:14:37 +00:00
<img src=/inc/images/start.png alt="start" class="icon" style="margin-bottom: -2px;">
2018-09-12 02:25:32 +00:00
</a>
<a id="{{ service.1 }}" class="stop-waf" title="Stop WAF service">
2019-09-09 19:14:37 +00:00
<img src=/inc/images/stop.png alt="start" class="icon" width="17px">
2018-09-12 02:25:32 +00:00
</a>
<a id="{{ service.1 }}" class="restart-waf" title="Restart WAF service">
2019-09-09 19:14:37 +00:00
<img src=/inc/images/update.png alt="restart" class="icon">
2018-09-12 02:25:32 +00:00
</a>
{% endif %}
</td>
<td>
2018-10-01 02:32:13 +00:00
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" %}
2018-09-12 02:25:32 +00:00
{{ service.3 }}
{%else %}
<a title="Install WAF"><button onclick="installWaf('{{ service.1 }}')">Install</button></a>
{% endif %}
</td>
{% if url == "waf.py" %}
<td>
2018-10-01 02:32:13 +00:00
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" %}
2018-09-12 02:25:32 +00:00
{% if service.4|int() == 1 %}
2018-10-01 02:32:13 +00:00
<label for="{{ service.0 }}"></label><input type="checkbox" id="{{ service.0 }}" checked>
2018-09-12 02:25:32 +00:00
{% else %}
2018-10-01 02:32:13 +00:00
<label for="{{ service.0 }}"></label><input type="checkbox" id="{{ service.0 }}">
2018-09-12 02:25:32 +00:00
{% endif %}
2018-08-20 06:39:52 +00:00
{% endif %}
2018-09-12 02:25:32 +00:00
</td>
2018-08-20 06:39:52 +00:00
{% endif %}
2018-09-12 02:25:32 +00:00
<td></td>
</tr>
{% endif %}
{% endfor %}
{% if waf_servers|count == 0 and url != "waf.py" %}
<tr>
<td class="padding10 first-collumn">
You have not installed the WAF server yet
2018-08-20 06:39:52 +00:00
</td>
2018-08-17 11:55:17 +00:00
</tr>
2018-09-12 02:25:32 +00:00
{% endif %}