|
|
@ -2,7 +2,7 @@
|
|
|
|
{% for service in service_status %}
|
|
|
|
{% for service in service_status %}
|
|
|
|
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" or url == "waf.py" %}
|
|
|
|
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" or url == "waf.py" %}
|
|
|
|
{% do waf_servers.append(1) %}
|
|
|
|
{% do waf_servers.append(1) %}
|
|
|
|
<tr class="{{ loop.cycle('odd', 'even') }}">
|
|
|
|
<tr class="{{ loop.cycle('odd', 'even') }}" id="{{service.0}}-select-line">
|
|
|
|
<td class="padding10 first-collumn">
|
|
|
|
<td class="padding10 first-collumn">
|
|
|
|
<a href="#{{ service.0 }}" title="Go to {{ service.0 }} status" style="color: #000">{{ service.0 }}</a>
|
|
|
|
<a href="#{{ service.0 }}" title="Go to {{ service.0 }} status" style="color: #000">{{ service.0 }}</a>
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
@ -27,14 +27,30 @@
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<td>
|
|
|
|
|
|
|
|
{% if role <= 1 %}
|
|
|
|
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" %}
|
|
|
|
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" %}
|
|
|
|
{{ service.3 }}
|
|
|
|
<select class="waf_mode" id="{{ service.0 }}_select">
|
|
|
|
|
|
|
|
{% set waf_modes = [] %}
|
|
|
|
|
|
|
|
{% do waf_modes.append("On") %}
|
|
|
|
|
|
|
|
{% do waf_modes.append("Off") %}
|
|
|
|
|
|
|
|
{% do waf_modes.append("DetectionOnly") %}
|
|
|
|
|
|
|
|
{% for waf_mode in waf_modes %}
|
|
|
|
|
|
|
|
{% if service.3 == waf_mode %}
|
|
|
|
|
|
|
|
<option value={{waf_mode}} selected="selected">{{waf_mode}}</option>
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
<option value={{waf_mode}}>{{waf_mode}}</option>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
{%else %}
|
|
|
|
{%else %}
|
|
|
|
<a title="Install WAF"><button onclick="installWaf('{{ service.1 }}')">Install</button></a>
|
|
|
|
<a title="Install WAF"><button onclick="installWaf('{{ service.1 }}')">Install</button></a>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
{{ service.3 }}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
{% if url == "waf.py" %}
|
|
|
|
{% if url == "waf.py" %}
|
|
|
|
<td>
|
|
|
|
<td style="padding-top: 2px;">
|
|
|
|
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" %}
|
|
|
|
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" %}
|
|
|
|
{% if service.4|int() == 1 %}
|
|
|
|
{% if service.4|int() == 1 %}
|
|
|
|
<label for="{{ service.0 }}"></label><input type="checkbox" id="{{ service.0 }}" checked>
|
|
|
|
<label for="{{ service.0 }}"></label><input type="checkbox" id="{{ service.0 }}" checked>
|
|
|
@ -54,4 +70,16 @@
|
|
|
|
You have not installed the WAF server yet
|
|
|
|
You have not installed the WAF server yet
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
$( "select" ).selectmenu();
|
|
|
|
|
|
|
|
{% if role <= 1 %}
|
|
|
|
|
|
|
|
$( "select" ).on('selectmenuchange',function() {
|
|
|
|
|
|
|
|
var id = $(this).attr('id');
|
|
|
|
|
|
|
|
changeWafMode(id)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
.ui-selectmenu-button.ui-button {width: 10em;}
|
|
|
|
|
|
|
|
</style>
|