From 43f116fdf3bb434c7b4ecb2fb2d0b19e2ebb1eba Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Fri, 8 Jul 2022 17:40:45 +0300 Subject: [PATCH] v6.1.1.0 Change log: https://roxy-wi.org/changelog.py#6_1_1 --- app/templates/ajax/config_show.html | 44 +++++++++++++++++++++++++++++ inc/configshow.js | 2 +- inc/script.js | 2 +- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/app/templates/ajax/config_show.html b/app/templates/ajax/config_show.html index 3ba1f9d1..851b3f40 100644 --- a/app/templates/ajax/config_show.html +++ b/app/templates/ajax/config_show.html @@ -99,6 +99,50 @@   {{ line }}
{% endif %} + {% elif service == 'apache' %} + {% if i == 0 and " +
+ + {{ i }} +   {{ line }} +
+ {% continue %} + {% endif %} + {%- if " 1 %} +
+ {% endif %} + {{ line }} +
+ {% continue %} + {% endif %} + {% if "<" in line or " + {{ i }} + + +  {{ line }} +
+ {% continue %} + {% endif %} + {% endif %} + {% if "#" in line %} + + {{ i }} + + +  {{ line }} +
+ {% continue %} + {% endif %} + {% if line|length > 1 %} + + {{ i }} +   {{ line }} +
+ {% endif %} {% elif service == 'keepalived' %} {%- if "global_defs {" in line -%} {% if i > 1 %} diff --git a/inc/configshow.js b/inc/configshow.js index ce3e358a..b7902946 100644 --- a/inc/configshow.js +++ b/inc/configshow.js @@ -61,7 +61,7 @@ $( function() { data: frm.serialize() + "&save=" + $(this).val(), type: frm.attr('method'), success: function( data ) { - data = data.replaceAll('\n', '
'); + data = data.replace(/\n/g, "
"); if (data.indexOf(service + ': command not found') != '-1') { try { var service = findGetParameter('service'); diff --git a/inc/script.js b/inc/script.js index bee90803..9d00c1bf 100644 --- a/inc/script.js +++ b/inc/script.js @@ -904,7 +904,7 @@ $( function() { $('#auth').submit(function() { let searchParams = new URLSearchParams(window.location.search) if(searchParams.has('ref')) { - window.location = /.*ref=([^&]*).*/.exec(document.location.href)[1]; + var ref = /.*ref=([^&]*).*/.exec(document.location.href)[1]; } else { var ref = "overview.py"; }