Change log: https://roxy-wi.org/changelog.py#6_1_1
pull/328/head
Pavel Loginov 2022-07-06 11:51:02 +03:00
parent d99ed4ab3a
commit 5c18a2d837
7 changed files with 18 additions and 14 deletions

View File

@ -89,7 +89,7 @@ if serv and form.getvalue('ssl_cert'):
if form.getvalue('ssl_name') is None:
print('error: Please enter a desired name')
else:
name = form.getvalue('ssl_name')
name = form.getvalue('ssl_name').replace(';', '').replace('&', '')
try:
with open(name, "w") as ssl_cert:

View File

@ -86,7 +86,7 @@
{% set description = 'Socket is a service for sending alerts and notifications' %}
{% endif %}
<td class="padding10 first-collumn">
<a href="{{desc_link}}" title="Read more about {{service_name}}" target="_blank" class="link">{{service_name}}</a>
<a href="{{desc_link}}" title="Read more about {{service_name}}" target="_blank" class="link" rel="noopener noreferrer">{{service_name}}</a>
</td>
<td>
{% if s.3 != '* is not installed' and s.3 != '' %}

View File

@ -140,7 +140,7 @@
data: frm.serialize(),
type: frm.attr('method'),
success: function( data ) {
data = data.replace('\n', '<br>');
data = data.replace(/\n/g, "<br>");
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error(s)') != '-1') {
$('#ajax-nettools').html('<div class="ping_pre">'+data+'</div>');
} else if (data.indexOf('warning: ') != '-1') {
@ -174,7 +174,7 @@
data: frm.serialize(),
type: frm.attr('method'),
success: function( data ) {
data = data.replace('\n', '<br>');
data = data.replace(/\n/g, "<br>");
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error(s)') != '-1') {
toastr.clear();
toastr.error(data);
@ -205,7 +205,7 @@
data: frm.serialize() + "&nettools_action=" + $(this).val(),
type: frm.attr('method'),
success: function( data ) {
data = data.replace('\n', '<br>');
data = data.replace(/\n/g, "<br>");
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error(s)') != '-1') {
toastr.clear();
toastr.error(data);

View File

@ -252,7 +252,7 @@
<td class="padding10 first-collumn-wi">
{% if grafana|int() >= 1 %}
<span class="serverUp server-status" title="running {{grafana}} process"></span>
<a href="http://{{host}}:3000" target="_blank" title="Open Grafana" class="logs_link">Grafana</a>
<a href="http://{{host}}:3000" target="_blank" title="Open Grafana" class="logs_link" rel="noopener noreferrer">Grafana</a>
{% else %}
<span class="serverNone server-status" title="The service is not installed or not running"></span>
<span>Grafana</span>

View File

@ -1985,7 +1985,9 @@ function showUserlists() {
$('#existing_userlist_ajax').text('');
data = data.split(",");
for (i = 0; i < data.length; i++) {
$('#existing_userlist_ajax').append('<a href="sections.py?serv='+serv+'&section='+data[i]+'" title="Edit/Delete this userlist" target="_blank">'+data[i]+'</a> ');
var existing_userlist_ajax = $.find("#existing_userlist_ajax");
existing_userlist_ajax = existing_userlist_ajax[0].id;
$('#'+existing_userlist_ajax).append('<a href="sections.py?serv='+serv+'&section='+data[i]+'" title="Edit/Delete this userlist" target="_blank">'+data[i]+'</a> ');
}
}
}

View File

@ -61,7 +61,7 @@ $( function() {
data: frm.serialize() + "&save=" + $(this).val(),
type: frm.attr('method'),
success: function( data ) {
data = data.replace('\n', '<br>');
data = data.replaceAll('\n', '<br>');
if (data.indexOf(service + ': command not found') != '-1') {
try {
var service = findGetParameter('service');

View File

@ -127,14 +127,16 @@ if(localStorage.getItem('restart')) {
type: "POST",
success: function( data ) {
if(data.indexOf('ok') != '-1') {
var apply_div = $.find("#apply_div");
apply_div = apply_div[0].id;
$("#apply").css('display', 'block');
$("#apply_div").css('width', '850px');
$('#'+apply_div).css('width', '850px');
if (cur_url[0] == "hapservers.py") {
$("#apply_div").css('width', '650px');
$("#apply_div").addClass("alert-one-row");
$("#apply_div").html("You have made changes to the server: "+ip_for_restart+". Changes will take effect only after<a id='"+ip_for_restart+"' class='restart' title='Restart HAproxy service' onclick=\"confirmAjaxAction('restart', 'hap', '"+ip_for_restart+"')\">restart</a><a href='#' title='close' id='apply_close' style='float: right'><b>X</b></a>");
$('#'+apply_div).css('width', '650px');
$('#'+apply_div).addClass("alert-one-row");
$('#'+apply_div).html("You have made changes to the server: "+ip_for_restart+". Changes will take effect only after<a id='"+ip_for_restart+"' class='restart' title='Restart HAproxy service' onclick=\"confirmAjaxAction('restart', 'hap', '"+ip_for_restart+"')\">restart</a><a href='#' title='close' id='apply_close' style='float: right'><b>X</b></a>");
} else {
$("#apply_div").html("You have made changes to the server: "+ip_for_restart+". Changes will take effect only after restart. <a href='hapservers.py' title='Overview'>Go to the HAProxy Overview page and restart</a><a href='#' title='close' id='apply_close' style='float: right'><b>X</b></a>");
$('#'+apply_div).html("You have made changes to the server: "+ip_for_restart+". Changes will take effect only after restart. <a href='hapservers.py' title='Overview'>Go to the HAProxy Overview page and restart</a><a href='#' title='close' id='apply_close' style='float: right'><b>X</b></a>");
}
$.getScript('/inc/overview.js');
}
@ -901,7 +903,7 @@ $( function() {
$('#auth').submit(function() {
let searchParams = new URLSearchParams(window.location.search)
if(searchParams.has('ref')) {
var ref = searchParams.get('ref');
window.location = /.*ref=([^&]*).*/.exec(document.location.href)[1];
} else {
var ref = "overview.py";
}