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