mirror of https://github.com/Aidaho12/haproxy-wi
v7.2.2.0: Update error handling in waf.js and fix favicon and script paths
Refactored error handling in the waf.js file to simplify and reduce conditional checks. Also updated the paths for favicon images and included scripts to ensure accurate addressing, enhancing the consistency and reliability of the application's behavior.pull/377/head v7.2.3.0
parent
f17fec9403
commit
73563a047e
|
@ -1,2 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig><msapplication><tile><square70x70logo src="/inc/images/favicon/ms-icon-70x70.png"/><square150x150logo src="/inc/images/favicon/ms-icon-150x150.png"/><square310x310logo src="/inc/images/favicon/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
|
||||
<browserconfig><msapplication><tile><square70x70logo src="/app/static/images/favicon/ms-icon-70x70.png"/><square150x150logo src="/app/static/images/favicon/ms-icon-150x150.png"/><square310x310logo src="/app/static/images/favicon/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
|
|
@ -8,31 +8,31 @@
|
|||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "\/inc\/images\/favicon\/android-icon-48x48.png",
|
||||
"src": "\/app\/static\/images\/favicon\/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "\/inc\/images\/favicon\/android-icon-72x72.png",
|
||||
"src": "\/app\/static\/images\/favicon\/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "\/inc\/images\/favicon\/android-icon-96x96.png",
|
||||
"src": "\/app\/static\/images\/favicon\/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "\/inc\/images\/favicon\/android-icon-144x144.png",
|
||||
"src": "\/app\/static\/images\/favicon\/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "\/inc\/images\/favicon\/android-icon-192x192.png",
|
||||
"src": "\/app\/static\/images\/favicon\/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
|
|
@ -55,12 +55,11 @@ function installWaf(ip1) {
|
|||
url: "/app/install/waf/" + service + "/" + ip1,
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('Failed') != '-1' || data.indexOf('fatal') != '-1') {
|
||||
toastr.error(data);
|
||||
} else if (data.indexOf('Info') != '-1') {
|
||||
toastr.clear();
|
||||
toastr.info(data);
|
||||
} else {
|
||||
try {
|
||||
if (data.indexOf('error:') != '-1') {
|
||||
toastr.error(data);
|
||||
}
|
||||
} catch (e) {
|
||||
toastr.clear();
|
||||
parseAnsibleJsonOutput(data, `${service} WAF`, false);
|
||||
showOverviewWaf(ip, hostnamea);
|
||||
|
@ -75,10 +74,6 @@ function changeWafMode(id) {
|
|||
var service = cur_url[1];
|
||||
$.ajax({
|
||||
url: "/app/waf/" + service + "/mode/" + server_hostname + "/" + waf_mode,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
toastr.info('Do not forget restart WAF service');
|
||||
$('#' + server_hostname + '-select-line').addClass("update", 1000);
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
{% block title %}{{title}}{% endblock %}
|
||||
{% block h2 %}{{title}}{% endblock %}
|
||||
{% block content %}
|
||||
<script src="/app/static/js/waf.js"></script>
|
||||
<script src="{{ url_for('static', filename='js/install.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/waf.js') }}"></script>
|
||||
{% if manage_rules == '1' %}
|
||||
{% from 'include/input_macros.html' import input, checkbox %}
|
||||
<table class="overview" id="waf_rules">
|
||||
|
|
Loading…
Reference in New Issue