mirror of https://github.com/Aidaho12/haproxy-wi
parent
d99ed4ab3a
commit
5c18a2d837
|
@ -89,7 +89,7 @@ if serv and form.getvalue('ssl_cert'):
|
||||||
if form.getvalue('ssl_name') is None:
|
if form.getvalue('ssl_name') is None:
|
||||||
print('error: Please enter a desired name')
|
print('error: Please enter a desired name')
|
||||||
else:
|
else:
|
||||||
name = form.getvalue('ssl_name')
|
name = form.getvalue('ssl_name').replace(';', '').replace('&', '')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(name, "w") as ssl_cert:
|
with open(name, "w") as ssl_cert:
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
{% set description = 'Socket is a service for sending alerts and notifications' %}
|
{% set description = 'Socket is a service for sending alerts and notifications' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td class="padding10 first-collumn">
|
<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>
|
||||||
<td>
|
<td>
|
||||||
{% if s.3 != '* is not installed' and s.3 != '' %}
|
{% if s.3 != '* is not installed' and s.3 != '' %}
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
data: frm.serialize(),
|
data: frm.serialize(),
|
||||||
type: frm.attr('method'),
|
type: frm.attr('method'),
|
||||||
success: function( data ) {
|
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') {
|
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error(s)') != '-1') {
|
||||||
$('#ajax-nettools').html('<div class="ping_pre">'+data+'</div>');
|
$('#ajax-nettools').html('<div class="ping_pre">'+data+'</div>');
|
||||||
} else if (data.indexOf('warning: ') != '-1') {
|
} else if (data.indexOf('warning: ') != '-1') {
|
||||||
|
@ -174,7 +174,7 @@
|
||||||
data: frm.serialize(),
|
data: frm.serialize(),
|
||||||
type: frm.attr('method'),
|
type: frm.attr('method'),
|
||||||
success: function( data ) {
|
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') {
|
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error(s)') != '-1') {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
data: frm.serialize() + "&nettools_action=" + $(this).val(),
|
data: frm.serialize() + "&nettools_action=" + $(this).val(),
|
||||||
type: frm.attr('method'),
|
type: frm.attr('method'),
|
||||||
success: function( data ) {
|
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') {
|
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error(s)') != '-1') {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
|
|
|
@ -252,7 +252,7 @@
|
||||||
<td class="padding10 first-collumn-wi">
|
<td class="padding10 first-collumn-wi">
|
||||||
{% if grafana|int() >= 1 %}
|
{% if grafana|int() >= 1 %}
|
||||||
<span class="serverUp server-status" title="running {{grafana}} process"></span>
|
<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 %}
|
{% else %}
|
||||||
<span class="serverNone server-status" title="The service is not installed or not running"></span>
|
<span class="serverNone server-status" title="The service is not installed or not running"></span>
|
||||||
<span>Grafana</span>
|
<span>Grafana</span>
|
||||||
|
|
|
@ -1985,7 +1985,9 @@ function showUserlists() {
|
||||||
$('#existing_userlist_ajax').text('');
|
$('#existing_userlist_ajax').text('');
|
||||||
data = data.split(",");
|
data = data.split(",");
|
||||||
for (i = 0; i < data.length; i++) {
|
for (i = 0; i < data.length; i++) {
|
||||||
$('#existing_userlist_ajax').append('<a href="sections.py?serv='+serv+'§ion='+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+'§ion='+data[i]+'" title="Edit/Delete this userlist" target="_blank">'+data[i]+'</a> ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ $( function() {
|
||||||
data: frm.serialize() + "&save=" + $(this).val(),
|
data: frm.serialize() + "&save=" + $(this).val(),
|
||||||
type: frm.attr('method'),
|
type: frm.attr('method'),
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace('\n', '<br>');
|
data = data.replaceAll('\n', '<br>');
|
||||||
if (data.indexOf(service + ': command not found') != '-1') {
|
if (data.indexOf(service + ': command not found') != '-1') {
|
||||||
try {
|
try {
|
||||||
var service = findGetParameter('service');
|
var service = findGetParameter('service');
|
||||||
|
|
|
@ -127,14 +127,16 @@ if(localStorage.getItem('restart')) {
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
if(data.indexOf('ok') != '-1') {
|
if(data.indexOf('ok') != '-1') {
|
||||||
|
var apply_div = $.find("#apply_div");
|
||||||
|
apply_div = apply_div[0].id;
|
||||||
$("#apply").css('display', 'block');
|
$("#apply").css('display', 'block');
|
||||||
$("#apply_div").css('width', '850px');
|
$('#'+apply_div).css('width', '850px');
|
||||||
if (cur_url[0] == "hapservers.py") {
|
if (cur_url[0] == "hapservers.py") {
|
||||||
$("#apply_div").css('width', '650px');
|
$('#'+apply_div).css('width', '650px');
|
||||||
$("#apply_div").addClass("alert-one-row");
|
$('#'+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).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 {
|
} 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');
|
$.getScript('/inc/overview.js');
|
||||||
}
|
}
|
||||||
|
@ -901,7 +903,7 @@ $( function() {
|
||||||
$('#auth').submit(function() {
|
$('#auth').submit(function() {
|
||||||
let searchParams = new URLSearchParams(window.location.search)
|
let searchParams = new URLSearchParams(window.location.search)
|
||||||
if(searchParams.has('ref')) {
|
if(searchParams.has('ref')) {
|
||||||
var ref = searchParams.get('ref');
|
window.location = /.*ref=([^&]*).*/.exec(document.location.href)[1];
|
||||||
} else {
|
} else {
|
||||||
var ref = "overview.py";
|
var ref = "overview.py";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue