mirror of https://github.com/Aidaho12/haproxy-wi
parent
249f418b2b
commit
698c0bf6ee
|
@ -89,7 +89,6 @@ def get_servers():
|
|||
'id':s[0],
|
||||
'hostname':s[1],
|
||||
'ip':s[2],
|
||||
'group':s[3],
|
||||
'virt':s[4],
|
||||
'enable':s[5],
|
||||
'is_master':s[6],
|
||||
|
|
|
@ -46,12 +46,12 @@
|
|||
{{ service.3 }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td style="padding-top: 2px;">
|
||||
<td style="padding-top: 2px;" class="ajaxwafstatus">
|
||||
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" %}
|
||||
{% if service.4|int() == 1 %}
|
||||
<label for="{{ service.0 }}"></label><input type="checkbox" id="{{ service.0 }}" checked>
|
||||
<label for="metrics{{ service.0 }}"></label><input type="checkbox" id="metrics{{ service.0 }}" checked />
|
||||
{% else %}
|
||||
<label for="{{ service.0 }}"></label><input type="checkbox" id="{{ service.0 }}">
|
||||
<label for="metrics{{ service.0 }}"></label><input type="checkbox" id="metrics{{ service.0 }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
@ -68,12 +68,18 @@
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
<script>
|
||||
$( "select" ).selectmenu();
|
||||
{% if role <= 1 %}
|
||||
$( "select" ).selectmenu();
|
||||
$( "input[type=checkbox]" ).checkboxradio();
|
||||
$( "select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id');
|
||||
changeWafMode(id)
|
||||
});
|
||||
$( ".ajaxwafstatus input" ).change(function() {
|
||||
var id = $(this).attr('id');
|
||||
console.log(id)
|
||||
metrics_waf(id);
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
<style>
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
var awesome = "/inc/fontawesome.min.js"
|
||||
|
||||
$( function() {
|
||||
$( "#ajaxwafstatus input" ).change(function() {
|
||||
var id = $(this).attr('id');
|
||||
metrics_waf(id);
|
||||
});
|
||||
} );
|
||||
function showOverviewWaf(serv, hostnamea) {
|
||||
$.getScript('/inc/chart.min.js');
|
||||
showWafMetrics();
|
||||
|
@ -43,6 +36,7 @@ function metrics_waf(name) {
|
|||
if ($('#'+name).is(':checked')) {
|
||||
enable = '1';
|
||||
}
|
||||
name = name.split('metrics')[1]
|
||||
$.ajax( {
|
||||
url: "options.py",
|
||||
data: {
|
||||
|
|
Loading…
Reference in New Issue