mirror of https://github.com/Aidaho12/haproxy-wi
v7.2.4.0: Update script paths and add a new script
The JavaScript paths in many files have been updated to "/app/static/js". A new script for handling checker settings updates, "checker.js", has been added. The commit improves organisation of JavaScript resources by grouping them under a single directory and introduces new functionality for the checker service.pull/381/head
parent
1954b60e13
commit
7df8cbad8b
|
@ -192,3 +192,10 @@ def sanitize_input_word(word: str) -> str:
|
|||
Sanitizes the input word by removing certain characters.
|
||||
"""
|
||||
return re.sub(r'[?|$|!|^|*|\]|\[|,| |]', r'', word)
|
||||
|
||||
|
||||
def return_proxy_dict() -> dict:
|
||||
proxy = sql.get_setting('proxy')
|
||||
if proxy in {None, '', 'None'}:
|
||||
return {}
|
||||
return {"https": proxy, "http": proxy}
|
||||
|
|
|
@ -6,8 +6,8 @@ import requests
|
|||
from requests.adapters import HTTPAdapter
|
||||
from requests.packages.urllib3.util.retry import Retry
|
||||
|
||||
import app.modules.db.sql as sql
|
||||
import app.modules.db.roxy as roxy_sql
|
||||
import app.modules.common.common as common
|
||||
import app.modules.roxywi.common as roxywi_common
|
||||
import app.modules.server.server as server_mod
|
||||
|
||||
|
@ -56,13 +56,10 @@ def versions():
|
|||
|
||||
def check_new_version(service):
|
||||
current_ver = check_ver()
|
||||
proxy = sql.get_setting('proxy')
|
||||
res = ''
|
||||
proxy_dict = {}
|
||||
proxy_dict = common.return_proxy_dict()
|
||||
|
||||
try:
|
||||
if proxy is not None and proxy != '' and proxy != 'None':
|
||||
proxy_dict = {"https": proxy, "http": proxy}
|
||||
response = requests.get(f'https://roxy-wi.org/version/get/{service}', timeout=1, proxies=proxy_dict)
|
||||
if service == 'roxy-wi':
|
||||
requests.get(f'https://roxy-wi.org/version/send/{current_ver}', timeout=1, proxies=proxy_dict)
|
||||
|
@ -75,10 +72,7 @@ def check_new_version(service):
|
|||
|
||||
|
||||
def update_user_status() -> None:
|
||||
proxy = sql.get_setting('proxy')
|
||||
proxy_dict = {}
|
||||
if proxy is not None and proxy != '' and proxy != 'None':
|
||||
proxy_dict = {"https": proxy, "http": proxy}
|
||||
proxy_dict = common.return_proxy_dict()
|
||||
user_name = roxy_sql.select_user_name()
|
||||
retry_strategy = Retry(
|
||||
total=3,
|
||||
|
|
|
@ -277,7 +277,6 @@ def pd_send_mess(mess, level, server_ip=None, service_id=None, alert_type=None,
|
|||
|
||||
|
||||
def mm_send_mess(mess, level, server_ip=None, service_id=None, alert_type=None, **kwargs):
|
||||
print('send mess to mm', kwargs.get('channel_id'))
|
||||
token = ''
|
||||
|
||||
if kwargs.get('channel_id') == 0:
|
||||
|
@ -298,18 +297,6 @@ def mm_send_mess(mess, level, server_ip=None, service_id=None, alert_type=None,
|
|||
token = pd.token
|
||||
channel = pd.chanel_name
|
||||
|
||||
# try:
|
||||
# proxy = sql.get_setting('proxy')
|
||||
# session = pdpyras.EventsAPISession(token)
|
||||
# dedup_key = f'{server_ip} {service_id} {alert_type}'
|
||||
# except Exception as e:
|
||||
# roxywi_common.logging('Roxy-WI server', str(e), roxywi=1)
|
||||
# raise Exception(f'error: {e}')
|
||||
#
|
||||
# if proxy is not None and proxy != '' and proxy != 'None':
|
||||
# proxies = dict(https=proxy, http=proxy)
|
||||
# session.proxies.update(proxies)
|
||||
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
if level == "info":
|
||||
color = "51A347"
|
||||
|
@ -336,8 +323,9 @@ def mm_send_mess(mess, level, server_ip=None, service_id=None, alert_type=None,
|
|||
}
|
||||
attach = str(json.dumps(attach))
|
||||
values = f'{{"channel": "{channel}", "username": "Roxy-WI", "attachments": [{attach}]}}'
|
||||
proxy_dict = common.return_proxy_dict()
|
||||
try:
|
||||
requests.post(token, headers=headers, data=str(values))
|
||||
requests.post(token, headers=headers, data=str(values), proxies=proxy_dict)
|
||||
return 'ok'
|
||||
except Exception as e:
|
||||
roxywi_common.logging('Roxy-WI server', str(e), roxywi=1)
|
||||
|
|
|
@ -483,7 +483,7 @@ $( function() {
|
|||
setTimeout(function () {
|
||||
$(".newoption").removeClass("update");
|
||||
}, 2500);
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -528,7 +528,7 @@ $( function() {
|
|||
setTimeout(function () {
|
||||
$(".newsavedserver").removeClass("update");
|
||||
}, 2500);
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -2045,7 +2045,7 @@ function make_actions_for_adding_acl_rule(section_id) {
|
|||
$('#new_acl_rule_minus').attr('id', '');
|
||||
$('#new_acl_p').attr('id', random_id);
|
||||
$('#new_acl_rule_minus').attr('id', '');
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
$( "select" ).selectmenu();
|
||||
$('[name=acl_if]').selectmenu({width: 180});
|
||||
$('[name=acl_then]').selectmenu({width: 180});
|
||||
|
@ -2075,7 +2075,7 @@ function make_actions_for_adding_header(section_id) {
|
|||
$('#new_header_minus').attr('id', '');
|
||||
$('#new_header_p').attr('id', random_id);
|
||||
$('#new_header_minus').attr('id', '');
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
$( "select" ).selectmenu();
|
||||
$('[name=headers_method]').selectmenu({width: 180});
|
||||
// $('[name=acl_then]').selectmenu({width: 180});
|
||||
|
@ -2091,7 +2091,7 @@ function make_actions_for_adding_bind(section_id) {
|
|||
$('#new_bind_minus').attr('id', '');
|
||||
$('#new_bind_p').attr('id', random_id);
|
||||
$('#new_bind_minus').attr('id', '');
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
$( "select" ).selectmenu();
|
||||
var serv = 'serv2'
|
||||
if(section_id == '#listener_bind') {
|
||||
|
|
|
@ -0,0 +1,182 @@
|
|||
$( function() {
|
||||
$( "#checker_haproxy_table select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateHaproxyCheckerSettings(id[1])
|
||||
});
|
||||
$( "#checker_haproxy_table input" ).change(function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateHaproxyCheckerSettings(id[1])
|
||||
});
|
||||
$( "#checker_nginx_table select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateServiceCheckerSettings(id[1], 'nginx')
|
||||
});
|
||||
$( "#checker_nginx_table input" ).change(function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateServiceCheckerSettings(id[1], 'nginx')
|
||||
});
|
||||
$( "#checker_apache_table select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateServiceCheckerSettings(id[1], 'apache')
|
||||
});
|
||||
$( "#checker_apache_table input" ).change(function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateServiceCheckerSettings(id[1], 'apache')
|
||||
});
|
||||
$( "#checker_keepalived_table select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateKeepalivedCheckerSettings(id[1])
|
||||
});
|
||||
$( "#checker_keepalived_table input" ).change(function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateKeepalivedCheckerSettings(id[1])
|
||||
});
|
||||
});
|
||||
function updateHaproxyCheckerSettings(id) {
|
||||
toastr.clear();
|
||||
let email = 0;
|
||||
let server = 0;
|
||||
let backend = 0;
|
||||
let maxconn = 0;
|
||||
if ($('#haproxy_server_email-' + id).is(':checked')) {
|
||||
email = '1';
|
||||
}
|
||||
if ($('#haproxy_server_status-' + id).is(':checked')) {
|
||||
server = '1';
|
||||
}
|
||||
if ($('#haproxy_server_backend-' + id).is(':checked')) {
|
||||
backend = '1';
|
||||
}
|
||||
if ($('#haproxy_server_maxconn-' + id).is(':checked')) {
|
||||
maxconn = '1';
|
||||
}
|
||||
$.ajax({
|
||||
url: "/app/checker/settings/update",
|
||||
data: {
|
||||
service: 'haproxy',
|
||||
setting_id: id,
|
||||
email: email,
|
||||
server: server,
|
||||
backend: backend,
|
||||
maxconn: maxconn,
|
||||
telegram_id: $('#haproxy_server_telegram_channel-' + id + ' option:selected').val(),
|
||||
slack_id: $('#haproxy_server_slack_channel-' + id + ' option:selected').val(),
|
||||
pd_id: $('#haproxy_server_pd_channel-' + id + ' option:selected').val(),
|
||||
mm_id: $('#haproxy_server_mm_channel-' + id + ' option:selected').val(),
|
||||
token: $('#token').val()
|
||||
},
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||
toastr.error(data);
|
||||
} else if (data.indexOf('ok') != '-1') {
|
||||
toastr.clear();
|
||||
$("#haproxy_server_tr_id-" + id).addClass("update", 1000);
|
||||
setTimeout(function () {
|
||||
$("#haproxy_server_tr_id-" + id).removeClass("update");
|
||||
}, 2500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function updateKeepalivedCheckerSettings(id) {
|
||||
toastr.clear();
|
||||
let email = 0;
|
||||
let server = 0;
|
||||
let backend = 0;
|
||||
if ($('#keepalived_server_email-' + id).is(':checked')) {
|
||||
email = '1';
|
||||
}
|
||||
if ($('#keepalived_server_status-' + id).is(':checked')) {
|
||||
server = '1';
|
||||
}
|
||||
if ($('#keepalived_server_backend-' + id).is(':checked')) {
|
||||
backend = '1';
|
||||
}
|
||||
$.ajax({
|
||||
url: "/app/checker/settings/update",
|
||||
data: {
|
||||
service: 'keepavlied',
|
||||
setting_id: id,
|
||||
email: email,
|
||||
server: server,
|
||||
backend: backend,
|
||||
telegram_id: $('#keepalived_server_telegram_channel-' + id + ' option:selected').val(),
|
||||
slack_id: $('#keepalived_server_slack_channel-' + id + ' option:selected').val(),
|
||||
pd_id: $('#keepalived_server_pd_channel-' + id + ' option:selected').val(),
|
||||
mm_id: $('#keepalived_server_mm_channel-' + id + ' option:selected').val(),
|
||||
token: $('#token').val()
|
||||
},
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||
toastr.error(data);
|
||||
} else if (data.indexOf('ok') != '-1') {
|
||||
toastr.clear();
|
||||
$("#keepalived_server_tr_id-" + id).addClass("update", 1000);
|
||||
setTimeout(function () {
|
||||
$("#keepalived_server_tr_id-" + id).removeClass("update");
|
||||
}, 2500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function updateServiceCheckerSettings(id, service_name) {
|
||||
toastr.clear();
|
||||
let email = 0;
|
||||
let server = 0;
|
||||
if ($('#' + service_name + '_server_email-' + id).is(':checked')) {
|
||||
email = '1';
|
||||
}
|
||||
if ($('#' + service_name + '_server_status-' + id).is(':checked')) {
|
||||
server = '1';
|
||||
}
|
||||
$.ajax({
|
||||
url: "/app/checker/settings/update",
|
||||
data: {
|
||||
service: service_name,
|
||||
setting_id: id,
|
||||
email: email,
|
||||
server: server,
|
||||
telegram_id: $('#' + service_name + '_server_telegram_channel-' + id + ' option:selected').val(),
|
||||
slack_id: $('#' + service_name + '_server_slack_channel-' + id + ' option:selected').val(),
|
||||
pd_id: $('#' + service_name + '_server_pd_channel-' + id + ' option:selected').val(),
|
||||
mm_id: $('#' + service_name + '_server_mm_channel-' + id + ' option:selected').val(),
|
||||
token: $('#token').val()
|
||||
},
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||
toastr.error(data);
|
||||
} else if (data.indexOf('ok') != '-1') {
|
||||
toastr.clear();
|
||||
$('#' + service_name + '_server_tr_id-' + id).addClass("update", 1000);
|
||||
setTimeout(function () {
|
||||
$('#' + service_name + '_server_tr_id-' + id).removeClass("update");
|
||||
}, 2500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function loadchecker() {
|
||||
$.ajax({
|
||||
url: "/app/checker/settings/load",
|
||||
type: "GET",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('group_error') == '-1' && data.indexOf('error:') != '-1') {
|
||||
toastr.error(data);
|
||||
} else {
|
||||
$('#checker').html(data);
|
||||
$( "select" ).selectmenu();
|
||||
$("button").button();
|
||||
$( "input[type=checkbox]" ).checkboxradio();
|
||||
$.getScript('/app/static/js/checker.js');
|
||||
$.getScript(awesome);
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
|
@ -47,7 +47,7 @@ function showProvisioningError(data, step_id, wait_mess, error_id) {
|
|||
$(error_id).show();
|
||||
$(step_id).removeClass('proccessing');
|
||||
$(step_id).addClass('processing_error');
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/fontawesome.min.js");
|
||||
}
|
||||
function cleanProvisioningProccess(div_id, success_div, error_id, warning_id, progres_id) {
|
||||
$(div_id).empty();
|
||||
|
@ -61,7 +61,7 @@ function cleanProvisioningProccess(div_id, success_div, error_id, warning_id, pr
|
|||
$(div_id).each(function () {
|
||||
$(this).remove('');
|
||||
});
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/fontawesome.min.js");
|
||||
}
|
||||
function confirmDeleteCluster(cluster_id) {
|
||||
var delete_word = $('#translate').attr('data-delete');
|
||||
|
@ -474,7 +474,7 @@ function showErrorStatus(service_name, server_name, li_id, server_id, progress_s
|
|||
var check_apache_log = $('#translate').attr('data-check_apache_log');
|
||||
$('#' + li_id + server_id).removeClass('proccessing');
|
||||
$('#' + li_id + server_id).addClass('processing_error');
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/fontawesome.min.js");
|
||||
$('#creating-error').show();
|
||||
$('#creating-error').append('<div>' + message + ' ' + service_name + ' ' + server_name + '. '+check_apache_log+'</div>');
|
||||
increaseProgressValue(progress_step);
|
||||
|
@ -497,7 +497,7 @@ function checkInstallResp(output, server_id, progress_step, name, li_id, service
|
|||
showErrorStatus(service_name, k, li_id, server_id, progress_step, something_wrong);
|
||||
}
|
||||
increaseProgressValue(progress_step);
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/fontawesome.min.js");
|
||||
}
|
||||
function increaseProgressValue(progress_step) {
|
||||
let progress_id = '#creating-progress';
|
||||
|
@ -846,7 +846,7 @@ function getHaCluster(cluster_id, new_cluster=false) {
|
|||
} else {
|
||||
$('#cluster-' + cluster_id).replaceWith(data);
|
||||
}
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/fontawesome.min.js");
|
||||
$('#cluster-'+cluster_id).removeClass('animated-background');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ function showHapserversCallBack(serv, hostnamea, service) {
|
|||
$.ajax( {
|
||||
url: "/app/service/" + service + "/" + serv + "/last-edit",
|
||||
beforeSend: function() {
|
||||
$("#edit_date_"+hostnamea).html('<img class="loading_small_haproxyservers" src="/images/loading.gif" />');
|
||||
$("#edit_date_"+hostnamea).html('<img class="loading_small_haproxyservers" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
type: "GET",
|
||||
success: function( data ) {
|
||||
|
@ -32,7 +32,7 @@ function overviewHapserverBackends(serv, hostnamea, service) {
|
|||
$.ajax( {
|
||||
url: "/app/service/" + service + "/backends/" + serv[0],
|
||||
beforeSend: function() {
|
||||
$("#top-"+hostnamea).html('<img class="loading_small" style="padding-left: 45%;" src="/images/loading.gif" />');
|
||||
$("#top-"+hostnamea).html('<img class="loading_small" style="padding-left: 45%;" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
success: function( data ) {
|
||||
if (data.indexOf('error:') != '-1') {
|
||||
|
@ -59,7 +59,7 @@ function showOverviewCallBack(serv, hostnamea) {
|
|||
$.ajax( {
|
||||
url: "/app/overview/server/"+serv,
|
||||
beforeSend: function() {
|
||||
$("#"+hostnamea).html('<img class="loading_small" src="/images/loading.gif" />');
|
||||
$("#"+hostnamea).html('<img class="loading_small" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
type: "GET",
|
||||
success: function( data ) {
|
||||
|
@ -77,7 +77,7 @@ function showServicesOverview() {
|
|||
$.ajax( {
|
||||
url: "/app/overview/services",
|
||||
beforeSend: function() {
|
||||
$("#services_ovw").html('<img class="loading_small_bin_bout" style="padding-left: 100%;padding-top: 40px;padding-bottom: 40px;" src="/images/loading.gif" />');
|
||||
$("#services_ovw").html('<img class="loading_small_bin_bout" style="padding-left: 100%;padding-top: 40px;padding-bottom: 40px;" src="/app/static/images/loading.gif" />');
|
||||
|
||||
},
|
||||
type: "GET",
|
||||
|
@ -110,7 +110,7 @@ function showOverviewServer(name, ip, id, service) {
|
|||
$(".div-pannel").css('height', '70px');
|
||||
$("#div-pannel-" + id).insertBefore('#up-pannel')
|
||||
$("#ajax-server-" + id).html(data);
|
||||
$.getScript("/inc/fontawesome.min.js")
|
||||
$.getScript("/app/static/js/fontawesome.min.js")
|
||||
getChartDataHapWiRam()
|
||||
getChartDataHapWiCpu()
|
||||
}
|
||||
|
@ -321,8 +321,8 @@ function showBytes(serv) {
|
|||
},
|
||||
type: "POST",
|
||||
beforeSend: function() {
|
||||
$("#show_bin_bout").html('<img class="loading_small_bin_bout" src="/images/loading.gif" />');
|
||||
$("#sessions").html('<img class="loading_small_bin_bout" src="/images/loading.gif" />');
|
||||
$("#show_bin_bout").html('<img class="loading_small_bin_bout" src="/app/static/images/loading.gif" />');
|
||||
$("#sessions").html('<img class="loading_small_bin_bout" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
success: function( data ) {
|
||||
data = data.replace(/\s+/g,' ');
|
||||
|
@ -330,7 +330,7 @@ function showBytes(serv) {
|
|||
toastr.error(data);
|
||||
} else {
|
||||
$("#bin_bout").html(data);
|
||||
$.getScript("/inc/fontawesome.min.js")
|
||||
$.getScript("/app/static/js/fontawesome.min.js")
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
@ -343,7 +343,7 @@ function showNginxConnections(serv) {
|
|||
},
|
||||
type: "POST",
|
||||
beforeSend: function() {
|
||||
$("#sessions").html('<img class="loading_small_bin_bout" src="/images/loading.gif" />');
|
||||
$("#sessions").html('<img class="loading_small_bin_bout" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
success: function( data ) {
|
||||
data = data.replace(/\s+/g,' ');
|
||||
|
@ -351,7 +351,7 @@ function showNginxConnections(serv) {
|
|||
toastr.error(data);
|
||||
} else {
|
||||
$("#bin_bout").html(data);
|
||||
$.getScript("/inc/fontawesome.min.js")
|
||||
$.getScript("/app/static/js/fontawesome.min.js")
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
@ -364,7 +364,7 @@ function showApachekBytes(serv) {
|
|||
},
|
||||
type: "POST",
|
||||
beforeSend: function() {
|
||||
$("#sessions").html('<img class="loading_small_bin_bout" src="/images/loading.gif" />');
|
||||
$("#sessions").html('<img class="loading_small_bin_bout" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
success: function( data ) {
|
||||
data = data.replace(/\s+/g,' ');
|
||||
|
@ -372,7 +372,7 @@ function showApachekBytes(serv) {
|
|||
toastr.error(data);
|
||||
} else {
|
||||
$("#bin_bout").html(data);
|
||||
$.getScript("/inc/fontawesome.min.js")
|
||||
$.getScript("/app/static/js/fontawesome.min.js")
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
@ -385,7 +385,7 @@ function keepalivedBecameMaster(serv) {
|
|||
},
|
||||
type: "POST",
|
||||
beforeSend: function() {
|
||||
$("#bin_bout").html('<img class="loading_small_bin_bout" src="/images/loading.gif" />');
|
||||
$("#bin_bout").html('<img class="loading_small_bin_bout" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
success: function( data ) {
|
||||
data = data.replace(/\s+/g,' ');
|
||||
|
@ -393,7 +393,7 @@ function keepalivedBecameMaster(serv) {
|
|||
toastr.error(data);
|
||||
} else {
|
||||
$("#bin_bout").html(data);
|
||||
$.getScript("/inc/fontawesome.min.js")
|
||||
$.getScript("/app/static/js/fontawesome.min.js")
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
@ -407,7 +407,7 @@ function showUsersOverview() {
|
|||
// },
|
||||
type: "GET",
|
||||
beforeSend: function() {
|
||||
$("#users-table").html('<img class="loading_small_bin_bout" style="padding-left: 100%;padding-top: 40px;padding-bottom: 40px;" src="/images/loading.gif" />');
|
||||
$("#users-table").html('<img class="loading_small_bin_bout" style="padding-left: 100%;padding-top: 40px;padding-bottom: 40px;" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
success: function( data ) {
|
||||
data = data.replace(/\s+/g,' ');
|
||||
|
@ -428,7 +428,7 @@ function showSubOverview() {
|
|||
// },
|
||||
type: "GET",
|
||||
beforeSend: function() {
|
||||
$("#sub-table").html('<img class="loading_small_bin_bout" style="padding-left: 40%;padding-top: 40px;padding-bottom: 40px;" src="/images/loading.gif" />');
|
||||
$("#sub-table").html('<img class="loading_small_bin_bout" style="padding-left: 40%;padding-top: 40px;padding-bottom: 40px;" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
success: function( data ) {
|
||||
data = data.replace(/\s+/g,' ');
|
||||
|
@ -576,12 +576,12 @@ function ShowOverviewLogs() {
|
|||
url: "/app/overview/logs",
|
||||
type: "GET",
|
||||
beforeSend: function() {
|
||||
$("#overview-logs").html('<img class="loading_small_bin_bout" style="padding-left: 40%;padding-top: 40px;padding-bottom: 40px;" src="/images/loading.gif" />');
|
||||
$("#overview-logs").html('<img class="loading_small_bin_bout" style="padding-left: 40%;padding-top: 40px;padding-bottom: 40px;" src="/app/static/images/loading.gif" />');
|
||||
},
|
||||
success: function( data ) {
|
||||
data = data.replace(/\s+/g,' ');
|
||||
$("#overview-logs").html(data);
|
||||
$.getScript("/inc/fontawesome.min.js")
|
||||
$.getScript("/app/static/js/fontawesome.min.js")
|
||||
$.getScript("/app/static/js/overview.js")
|
||||
}
|
||||
} );
|
||||
|
|
|
@ -335,7 +335,7 @@ function getTable() {
|
|||
$("#ajaxtable").html(data);
|
||||
$("input[type=submit], button").button();
|
||||
$.getScript("/inc/script.js");
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
FontAwesomeConfig = {searchPseudoElements: true, observeMutations: false};
|
||||
}
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ function getList() {
|
|||
$("#ajaxlist").html(data);
|
||||
$("input[type=submit], button").button();
|
||||
$.getScript("/inc/script.js");
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
FontAwesomeConfig = {searchPseudoElements: true, observeMutations: false};
|
||||
}
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ function getSessions() {
|
|||
$("#ajaxsessions").html(data);
|
||||
$("input[type=submit], button").button();
|
||||
$.getScript("/inc/script.js");
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
FontAwesomeConfig = {searchPseudoElements: true, observeMutations: false};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ function getSmonCheck(smon_id, check_id, dialog_id, new_check=false) {
|
|||
$('#smon-' + smon_id).replaceWith(data);
|
||||
}
|
||||
$(dialog_id).dialog("close");
|
||||
// $.getScript("/inc/fontawesome.min.js");
|
||||
// $.getScript("/app/static/js/fontawesome.min.js");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -564,7 +564,7 @@ function createStatusPage(dialog_id) {
|
|||
} else {
|
||||
clearStatusPageDialog(dialog_id);
|
||||
$("#pages").append(data);
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/fontawesome.min.js");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -600,7 +600,7 @@ function editStatusPage(dialog_id, page_id) {
|
|||
setTimeout(function () {
|
||||
$("#page_" + page_id).removeClass("update");
|
||||
}, 2500);
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/fontawesome.min.js");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -856,7 +856,7 @@ function getAgent(agent_id, new_agent=false) {
|
|||
} else {
|
||||
$('#agent-' + agent_id).replaceWith(data);
|
||||
}
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/fontawesome.min.js");
|
||||
$('#agent-' + agent_id).removeClass('animated-background');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var awesome = "/inc/fontawesome.min.js"
|
||||
var awesome = "/app/static/js/fontawesome.min.js"
|
||||
var cur_url = window.location.href.split('/app/').pop();
|
||||
cur_url = cur_url.split('/');
|
||||
var add_word = $('#translate').attr('data-add');
|
||||
|
@ -179,38 +179,6 @@ $( function() {
|
|||
$('.services_for_scan').show();
|
||||
}
|
||||
});
|
||||
$( "#checker_haproxy_table select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateHaproxyCheckerSettings(id[1])
|
||||
});
|
||||
$( "#checker_haproxy_table input" ).change(function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateHaproxyCheckerSettings(id[1])
|
||||
});
|
||||
$( "#checker_nginx_table select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateServiceCheckerSettings(id[1], 'nginx')
|
||||
});
|
||||
$( "#checker_nginx_table input" ).change(function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateServiceCheckerSettings(id[1], 'nginx')
|
||||
});
|
||||
$( "#checker_apache_table select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateServiceCheckerSettings(id[1], 'apache')
|
||||
});
|
||||
$( "#checker_apache_table input" ).change(function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateServiceCheckerSettings(id[1], 'apache')
|
||||
});
|
||||
$( "#checker_keepalived_table select" ).on('selectmenuchange',function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateKeepalivedCheckerSettings(id[1])
|
||||
});
|
||||
$( "#checker_keepalived_table input" ).change(function() {
|
||||
var id = $(this).attr('id').split('-');
|
||||
updateKeepalivedCheckerSettings(id[1])
|
||||
});
|
||||
$('#search_ldap_user').click(function() {
|
||||
var valid = true;
|
||||
toastr.clear();
|
||||
|
@ -527,10 +495,7 @@ function getGroupNameById(group_id) {
|
|||
$.ajax({
|
||||
url: "/app/user/group/name/" + group_id,
|
||||
async: false,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function (data) {
|
||||
if (data.indexOf('error:') != '-1') {
|
||||
toastr.error(data);
|
||||
|
@ -683,10 +648,7 @@ function removeUser(id) {
|
|||
$("#user-" + id).css("background-color", "#f2dede");
|
||||
$.ajax({
|
||||
url: "/app/user/delete/" + id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data == "ok") {
|
||||
|
@ -701,10 +663,7 @@ function removeServer(id) {
|
|||
$("#server-" + id).css("background-color", "#f2dede");
|
||||
$.ajax({
|
||||
url: "/app/server/delete/" + id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data == "Ok") {
|
||||
|
@ -722,10 +681,7 @@ function removeGroup(id) {
|
|||
$("#group-" + id).css("background-color", "#f2dede");
|
||||
$.ajax({
|
||||
url: "/app/server/group/delete/" + id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data == "ok") {
|
||||
|
@ -742,10 +698,7 @@ function removeSsh(id) {
|
|||
$("#ssh-table-"+id).css("background-color", "#f2dede");
|
||||
$.ajax( {
|
||||
url: "/app/server/ssh/delete/" + id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function( data ) {
|
||||
data = data.replace(/\s+/g,' ');
|
||||
if(data == "ok") {
|
||||
|
@ -977,10 +930,7 @@ function showApacheLog(serv) {
|
|||
function checkSshConnect(ip) {
|
||||
$.ajax({
|
||||
url: "/app/server/check/ssh/" + ip,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function (data) {
|
||||
if (data.indexOf('error:') != '-1') {
|
||||
toastr.error(data)
|
||||
|
@ -1083,10 +1033,7 @@ function changeUserServiceDialog(id) {
|
|||
}
|
||||
$.ajax({
|
||||
url: "/app/user/services/" + id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function (data) {
|
||||
if (data.indexOf('danger') != '-1') {
|
||||
toastr.error(data);
|
||||
|
@ -1197,10 +1144,6 @@ function confirmAjaxServiceAction(action, service) {
|
|||
function ajaxActionServices(action, service) {
|
||||
$.ajax( {
|
||||
url: "/app/admin/tools/action/" + service + "/" + action,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function( data ) {
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('Failed') != '-1') {
|
||||
toastr.error(data);
|
||||
|
@ -1222,10 +1165,6 @@ function updateService(service, action='update') {
|
|||
$("#ajax-update").html(wait_mess);
|
||||
$.ajax({
|
||||
url: "/app/admin/tools/update/" + service,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('Complete!') != '-1' || data.indexOf('Unpacking') != '-1') {
|
||||
|
@ -1291,7 +1230,6 @@ function confirmDeleteOpenVpnProfile(id) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function removeOpenVpnProfile(id) {
|
||||
$("#" + id).css("background-color", "#f2dede");
|
||||
$.ajax({
|
||||
|
@ -1342,10 +1280,6 @@ function uploadOvpn() {
|
|||
function OpenVpnSess(id, action) {
|
||||
$.ajax({
|
||||
url: "/app/admin/openvpn/" + action + "/" + id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('danger') != '-1' || data.indexOf('unique') != '-1' || data.indexOf('error:') != '-1') {
|
||||
|
@ -1363,10 +1297,7 @@ function OpenVpnSess(id, action) {
|
|||
function viewFirewallRules(ip) {
|
||||
$.ajax({
|
||||
url: "/app/server/firewall/" + ip,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('danger') != '-1' || data.indexOf('unique') != '-1' || data.indexOf('error: ') != '-1') {
|
||||
|
@ -1394,10 +1325,6 @@ function viewFirewallRules(ip) {
|
|||
function loadServices() {
|
||||
$.ajax({
|
||||
url: "/app/admin/tools",
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('danger') != '-1' || data.indexOf('unique') != '-1' || data.indexOf('error:') != '-1') {
|
||||
|
@ -1412,10 +1339,6 @@ function loadServices() {
|
|||
function loadupdatehapwi() {
|
||||
$.ajax({
|
||||
url: "/app/admin/update",
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('danger') != '-1' || data.indexOf('unique') != '-1' || data.indexOf('error:') != '-1') {
|
||||
|
@ -1429,42 +1352,14 @@ function loadupdatehapwi() {
|
|||
function checkUpdateRoxy() {
|
||||
$.ajax({
|
||||
url: "/app/admin/update/check",
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
loadupdatehapwi();
|
||||
}
|
||||
} );
|
||||
}
|
||||
function loadchecker() {
|
||||
$.ajax({
|
||||
url: "/app/checker/settings/load",
|
||||
type: "GET",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('group_error') == '-1' && data.indexOf('error:') != '-1') {
|
||||
toastr.error(data);
|
||||
} else {
|
||||
$('#checker').html(data);
|
||||
$( "select" ).selectmenu();
|
||||
$("button").button();
|
||||
$( "input[type=checkbox]" ).checkboxradio();
|
||||
$.getScript('/inc/users.js');
|
||||
$.getScript(awesome);
|
||||
// $( "#checker_tabs" ).tabs( "option", "active", tab );
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
function loadopenvpn() {
|
||||
$.ajax({
|
||||
url: "/app/admin/openvpn",
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('group_error') == '-1' && data.indexOf('error:') != '-1') {
|
||||
|
@ -1479,10 +1374,6 @@ function loadopenvpn() {
|
|||
function updateServerInfo(ip, id) {
|
||||
$.ajax({
|
||||
url: "/app/server/system_info/update/" + ip + "/" + id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('error_code') != '-1') {
|
||||
|
@ -1501,10 +1392,6 @@ function showServerInfo(id, ip) {
|
|||
var server_info = $('#translate').attr('data-server_info');
|
||||
$.ajax({
|
||||
url: "/app/server/system_info/get/" + ip + "/" +id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('error_code') != '-1') {
|
||||
|
@ -1529,135 +1416,6 @@ function showServerInfo(id, ip) {
|
|||
}
|
||||
});
|
||||
}
|
||||
function updateHaproxyCheckerSettings(id) {
|
||||
toastr.clear();
|
||||
let email = 0;
|
||||
let server = 0;
|
||||
let backend = 0;
|
||||
let maxconn = 0;
|
||||
if ($('#haproxy_server_email-' + id).is(':checked')) {
|
||||
email = '1';
|
||||
}
|
||||
if ($('#haproxy_server_status-' + id).is(':checked')) {
|
||||
server = '1';
|
||||
}
|
||||
if ($('#haproxy_server_backend-' + id).is(':checked')) {
|
||||
backend = '1';
|
||||
}
|
||||
if ($('#haproxy_server_maxconn-' + id).is(':checked')) {
|
||||
maxconn = '1';
|
||||
}
|
||||
$.ajax({
|
||||
url: "/app/checker/settings/update",
|
||||
data: {
|
||||
service: 'haproxy',
|
||||
setting_id: id,
|
||||
email: email,
|
||||
server: server,
|
||||
backend: backend,
|
||||
maxconn: maxconn,
|
||||
telegram_id: $('#haproxy_server_telegram_channel-' + id + ' option:selected').val(),
|
||||
slack_id: $('#haproxy_server_slack_channel-' + id + ' option:selected').val(),
|
||||
pd_id: $('#haproxy_server_pd_channel-' + id + ' option:selected').val(),
|
||||
mm_id: $('#haproxy_server_mm_channel-' + id + ' option:selected').val(),
|
||||
token: $('#token').val()
|
||||
},
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||
toastr.error(data);
|
||||
} else if (data.indexOf('ok') != '-1') {
|
||||
toastr.clear();
|
||||
$("#haproxy_server_tr_id-" + id).addClass("update", 1000);
|
||||
setTimeout(function () {
|
||||
$("#haproxy_server_tr_id-" + id).removeClass("update");
|
||||
}, 2500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function updateKeepalivedCheckerSettings(id) {
|
||||
toastr.clear();
|
||||
let email = 0;
|
||||
let server = 0;
|
||||
let backend = 0;
|
||||
if ($('#keepalived_server_email-' + id).is(':checked')) {
|
||||
email = '1';
|
||||
}
|
||||
if ($('#keepalived_server_status-' + id).is(':checked')) {
|
||||
server = '1';
|
||||
}
|
||||
if ($('#keepalived_server_backend-' + id).is(':checked')) {
|
||||
backend = '1';
|
||||
}
|
||||
$.ajax({
|
||||
url: "/app/checker/settings/update",
|
||||
data: {
|
||||
service: 'keepavlied',
|
||||
setting_id: id,
|
||||
email: email,
|
||||
server: server,
|
||||
backend: backend,
|
||||
telegram_id: $('#keepalived_server_telegram_channel-' + id + ' option:selected').val(),
|
||||
slack_id: $('#keepalived_server_slack_channel-' + id + ' option:selected').val(),
|
||||
pd_id: $('#keepalived_server_pd_channel-' + id + ' option:selected').val(),
|
||||
mm_id: $('#keepalived_server_mm_channel-' + id + ' option:selected').val(),
|
||||
token: $('#token').val()
|
||||
},
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||
toastr.error(data);
|
||||
} else if (data.indexOf('ok') != '-1') {
|
||||
toastr.clear();
|
||||
$("#keepalived_server_tr_id-" + id).addClass("update", 1000);
|
||||
setTimeout(function () {
|
||||
$("#keepalived_server_tr_id-" + id).removeClass("update");
|
||||
}, 2500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function updateServiceCheckerSettings(id, service_name) {
|
||||
toastr.clear();
|
||||
let email = 0;
|
||||
let server = 0;
|
||||
if ($('#' + service_name + '_server_email-' + id).is(':checked')) {
|
||||
email = '1';
|
||||
}
|
||||
if ($('#' + service_name + '_server_status-' + id).is(':checked')) {
|
||||
server = '1';
|
||||
}
|
||||
$.ajax({
|
||||
url: "/app/checker/settings/update",
|
||||
data: {
|
||||
service: service_name,
|
||||
setting_id: id,
|
||||
email: email,
|
||||
server: server,
|
||||
telegram_id: $('#' + service_name + '_server_telegram_channel-' + id + ' option:selected').val(),
|
||||
slack_id: $('#' + service_name + '_server_slack_channel-' + id + ' option:selected').val(),
|
||||
pd_id: $('#' + service_name + '_server_pd_channel-' + id + ' option:selected').val(),
|
||||
mm_id: $('#' + service_name + '_server_mm_channel-' + id + ' option:selected').val(),
|
||||
token: $('#token').val()
|
||||
},
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
data = data.replace(/\s+/g, ' ');
|
||||
if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||
toastr.error(data);
|
||||
} else if (data.indexOf('ok') != '-1') {
|
||||
toastr.clear();
|
||||
$('#' + service_name + '_server_tr_id-' + id).addClass("update", 1000);
|
||||
setTimeout(function () {
|
||||
$('#' + service_name + '_server_tr_id-' + id).removeClass("update");
|
||||
}, 2500);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function serverIsUp(server_ip, server_id) {
|
||||
var cur_url = window.location.href.split('/').pop();
|
||||
if (cur_url.split('#')[1] == 'servers') {
|
||||
|
@ -1696,10 +1454,7 @@ function confirmChangeGroupsAndRoles(user_id) {
|
|||
var username = $('#login-' + user_id).val();
|
||||
$.ajax({
|
||||
url: "/app/user/groups/" + user_id,
|
||||
// data: {
|
||||
// token: $('#token').val()
|
||||
// },
|
||||
// type: "POST",
|
||||
|
||||
success: function (data) {
|
||||
$("#groups-roles").html(data);
|
||||
$("#groups-roles").dialog({
|
|
@ -1,10 +1,10 @@
|
|||
var awesome = "/inc/fontawesome.min.js"
|
||||
var awesome = "/app/static/js/fontawesome.min.js"
|
||||
var waf = "/app/static/js/waf.js"
|
||||
var overview = "/app/static/js/overview.js"
|
||||
function showOverviewWaf(serv, hostnamea) {
|
||||
var service = cur_url[1];
|
||||
if (service == 'haproxy') {
|
||||
$.getScript('/inc/chart.min-4.3.0.js');
|
||||
$.getScript('/app/static/js/chart.min-4.3.0.js');
|
||||
showWafMetrics();
|
||||
}
|
||||
var i;
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
{% block h2 %}{{lang.words.admin_area|title()}}{% endblock %}
|
||||
{% block content %}
|
||||
{% from 'include/input_macros.html' import input, select, copy_to_clipboard, checkbox %}
|
||||
<script src="/inc/users.js"></script>
|
||||
<script src="/app/static/js/users.js"></script>
|
||||
<script src="{{ url_for('static', filename='js/backup.js') }}"></script>
|
||||
<script src="/inc/fontawesome.min.js"></script>
|
||||
<script src="/app/static/js/fontawesome.min.js"></script>
|
||||
{% include 'include/del_confirm.html' %}
|
||||
<div id="tabs">
|
||||
<ul id="admin-tabs">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<a style="color: #000; cursor: pointer;">
|
||||
{%- if new_ver_without_dots > current_ver_without_dots and new_ver != "Sorry cannot get current version" %}
|
||||
<span id="show-updates-button" class="new-version-exists">v{{current_ver}}</span>
|
||||
<script defer src="/inc/fontawesome.min.js"></script>
|
||||
<script defer src="/app/static/js/fontawesome.min.js"></script>
|
||||
{%- else %}
|
||||
<a href="/app/admin#updatehapwi" title="Update center" style="color: black;">v{{current_ver}}</a>
|
||||
{%- endif %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block content %}
|
||||
{% from 'include/input_macros.html' import input, select, copy_to_clipboard, checkbox %}
|
||||
<script src="{{ url_for('static', filename='js/channel.js') }}"></script>
|
||||
<script src="/inc/fontawesome.min.js"></script>
|
||||
<script src="/app/static/js/fontawesome.min.js"></script>
|
||||
<div id="checker"></div>
|
||||
<script>
|
||||
loadChannel();
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
{% block h2 %} Checker {{ lang.words.settings }} {% endblock %}
|
||||
{% block content %}
|
||||
{% from 'include/input_macros.html' import input, select, copy_to_clipboard, checkbox %}
|
||||
<script src="/inc/users.js"></script>
|
||||
<script src="/inc/fontawesome.min.js"></script>
|
||||
<script src="/app/static/js/users.js"></script>
|
||||
<script src="/app/static/js/checker.js"></script>
|
||||
<script src="/app/static/js/fontawesome.min.js"></script>
|
||||
<div id="checker"></div>
|
||||
<script>
|
||||
loadchecker();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block h2 %}{{ lang.ha_page.has }} {% endblock %}
|
||||
{% block content %}
|
||||
{% from 'include/input_macros.html' import input, checkbox, copy_to_clipboard %}
|
||||
<script src="/inc/users.js"></script>
|
||||
<script src="/app/static/js/users.js"></script>
|
||||
<script src="/app/static/js/ha.js"></script>
|
||||
<script src="/app/static/js/overview.js"></script>
|
||||
<link href="{{ url_for('static', filename='css/servers.css') }}" rel="stylesheet"/>
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="{{ url_for('static', filename='images/favicon/ms-icon-144x144.png') }}">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<script defer src="/inc/fa-solid.min.js"></script>
|
||||
<script defer src="/inc/fontawesome.min.js"></script>
|
||||
<script defer src="/app/static/js/fa-solid.min.js"></script>
|
||||
<script defer src="/app/static/js/fontawesome.min.js"></script>
|
||||
<script src="https://use.fontawesome.com/releases/v5.15.4/js/all.js" data-auto-replace-svg="nest"></script>
|
||||
<script>FontAwesomeConfig = { searchPseudoElements: true, observeMutations: false };</script>
|
||||
<script defer src="/inc/ion.sound.min.js"></script>
|
||||
|
@ -37,12 +37,12 @@
|
|||
<link href="{{ url_for('static', filename='css/jquery-ui.structure.min.css') }}" rel="stylesheet">
|
||||
<script src="/inc/jquery-3.6.0.min.js"></script>
|
||||
<script src="/inc/jquery-ui.min.js"></script>
|
||||
<script src="/inc/js.cookie.min.js"></script>
|
||||
<script src="/inc/reconnecting-websocket.js"></script>
|
||||
<script src="/app/static/js/js.cookie.min.js"></script>
|
||||
<script src="/app/static/js/reconnecting-websocket.js"></script>
|
||||
<script src="/app/static/js/hotkeys.js"></script>
|
||||
<link href="{{ url_for('static', filename='css/select2.css') }}" rel="stylesheet" />
|
||||
<script src="/app/static/js/select2.js"></script>
|
||||
<script src="/inc/script.js"></script>
|
||||
<script src="/app/static/js/nprogress.js"></script>
|
||||
<link href="{{ url_for('static', filename='css/toastr-6.3.9.css') }}" rel="stylesheet"/>
|
||||
<script src="/inc/toastr.js"></script>
|
||||
<script src="/app/static/js/toastr.js"></script>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{% else %}
|
||||
<link href="{{ url_for('static', filename='css/chart.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='css/smon.css') }}" rel="stylesheet">
|
||||
<script src="/inc/chart.min-4.3.0.js"></script>
|
||||
<script src="/app/static/js/chart.min-4.3.0.js"></script>
|
||||
<script src="/app/static/js/smon.js"></script>
|
||||
<div class="row wrap1">
|
||||
{% for s in smon %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block content %}
|
||||
{% from 'include/input_macros.html' import select, checkbox %}
|
||||
<script src="{{ url_for('static', filename='js/install.js') }}"></script>
|
||||
<script src="/inc/fontawesome.min.js"></script>
|
||||
<script src="/app/static/js/fontawesome.min.js"></script>
|
||||
<div id="tabs">
|
||||
<ul id="admin-tabs">
|
||||
<li><a href="#service" title="{{lang.words.proxy|title()}} {{lang.words.service}} - Roxy-WI">{{lang.words.proxy|title()}} {{lang.words.service}}</a></li>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block h2 %}{{lang.menu_links.logs.h2}} {{service_name}}{% endblock %}
|
||||
{% block content %}
|
||||
{% from 'include/input_macros.html' import input, checkbox %}
|
||||
<script src="/inc/users.js"></script>
|
||||
<script src="/app/static/js/users.js"></script>
|
||||
<input type="hidden" id="service" value="{{service}}" />
|
||||
<table class="overview">
|
||||
<tr class="overviewHead">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block h2 %}{{lang.words.internal|title()}} {{lang.words.logs}}{% endblock %}
|
||||
{% block content %}
|
||||
{% from 'include/input_macros.html' import input, checkbox %}
|
||||
<script src="/inc/users.js"></script>
|
||||
<script src="/app/static/js/users.js"></script>
|
||||
<input type="hidden" id="service" value="{{service}}" />
|
||||
<table class="overview">
|
||||
<tr class="overviewHead">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</style>
|
||||
<link href="{{ url_for('static', filename='css/chart.min.css') }}" rel="stylesheet">
|
||||
<script src="/app/static/js/metrics.js"></script>
|
||||
<script src="/inc/chart.min-4.3.0.js"></script>
|
||||
<script src="/app/static/js/chart.min-4.3.0.js"></script>
|
||||
<input type="hidden" id="service" value="{{service}}">
|
||||
{% if user_subscription['user_status'] == 0 %}
|
||||
{% include 'include/no_sub.html' %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block content %}
|
||||
<link href="{{ url_for('static', filename='css/chart.min.css') }}" rel="stylesheet">
|
||||
<script src="/app/static/js/metrics.js"></script>
|
||||
<script src="/inc/chart.min-4.3.0.js"></script>
|
||||
<script src="/app/static/js/chart.min-4.3.0.js"></script>
|
||||
<script src="/app/static/js/overview.js"></script>
|
||||
<script>
|
||||
$("#secIntervals").css("display", "none");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block h2 %}{{lang.menu_links.servers.title}}{% endblock %}
|
||||
{% block content %}
|
||||
{% from 'include/input_macros.html' import input, checkbox, select, copy_to_clipboard %}
|
||||
<script src="/inc/users.js"></script>
|
||||
<script src="/app/static/js/users.js"></script>
|
||||
<script src="{{ url_for('static', filename='js/backup.js') }}"></script>
|
||||
{% include 'include/del_confirm.html' %}
|
||||
<input type="hidden" id="new-group" name="new-group" value="{{ group }}">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<script src="/app/static/js/overview.js"></script>
|
||||
<link href="{{ url_for('static', filename='css/chart.min.css') }}" rel="stylesheet">
|
||||
<script src="/app/static/js/metrics.js"></script>
|
||||
<script src="/inc/chart.min-4.3.0.js"></script>
|
||||
<script src="/app/static/js/chart.min-4.3.0.js"></script>
|
||||
{% if servers|length == 0 %} {% include 'include/getstarted.html' %} {% endif %}
|
||||
<style>
|
||||
.ui-checkboxradio-label {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{% from 'include/input_macros.html' import input, checkbox, select %}
|
||||
{% block content %}
|
||||
<script src="/app/static/js/smon.js"></script>
|
||||
<script src="/inc/users.js"></script>
|
||||
<script src="/inc/fontawesome.min.js"></script>
|
||||
<script src="/app/static/js/users.js"></script>
|
||||
<script src="/app/static/js/fontawesome.min.js"></script>
|
||||
<script src="/inc/jquery.timeago.js" type="text/javascript"></script>
|
||||
<link href="{{ url_for('static', filename='css/servers.css') }}" rel="stylesheet"/>
|
||||
<link href="{{ url_for('static', filename='css/smon.css') }}" rel="stylesheet"/>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<script src="/inc/jquery-ui.min.js"></script>
|
||||
<script src="/app/static/js/smon.js"></script>
|
||||
<link href="{{ url_for('static', filename='css/toastr-6.3.9.css') }}" rel="stylesheet"/>
|
||||
<script src="/inc/toastr.js"></script>
|
||||
<script src="/app/static/js/toastr.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Status page - {{p.name|replace("'", "")}}</h2>
|
||||
|
|
|
@ -179,7 +179,7 @@
|
|||
<link href="{{ url_for('static', filename='css/chart.min.css') }}" rel="stylesheet">
|
||||
<script src="/app/static/js/overview.js"></script>
|
||||
<script src="/app/static/js/metrics.js"></script>
|
||||
<script src="/inc/chart.min-4.3.0.js"></script>
|
||||
<script src="/app/static/js/chart.min-4.3.0.js"></script>
|
||||
<div id="table_metrics"></div>
|
||||
<div class="metrics-time-range">
|
||||
<b>{{lang.words.time_range|title()}}:</b>
|
||||
|
|
|
@ -229,7 +229,7 @@ function setRefreshInterval(interval) {
|
|||
$('#1').text(autorefresh_word);
|
||||
$('.auto-refresh-resume').css('display', 'none');
|
||||
$('.auto-refresh-pause').css('display', 'none');
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
}
|
||||
hideAutoRefreshDiv();
|
||||
} else {
|
||||
|
@ -1123,7 +1123,7 @@ $( function() {
|
|||
}
|
||||
}
|
||||
$('.copyToClipboard').hover(function (){
|
||||
$.getScript("/inc/fontawesome.min.js");
|
||||
$.getScript("/app/static/js/overview.js");
|
||||
});
|
||||
$('.copyToClipboard').click(function () {
|
||||
let str = $(this).attr('data-copy');
|
||||
|
|
12
index.html
12
index.html
|
@ -36,26 +36,26 @@
|
|||
<script src="/inc/jquery-3.6.0.min.js"></script>
|
||||
<script src="/inc/jquery-ui.min.js"></script>
|
||||
<script src="/app/static/js/nprogress.js"></script>
|
||||
<script defer src="/inc/fa-solid.min.js"></script>
|
||||
<script defer src="/inc/fontawesome.min.js"></script>
|
||||
<script defer src="/app/static/js/fa-solid.min.js"></script>
|
||||
<script defer src="/app/static/js/fontawesome.min.js"></script>
|
||||
<link href="/app/static/css/awesome-6.3.9.css" rel="stylesheet">
|
||||
<link href="/app/static/css/chart.min.css" rel="stylesheet">
|
||||
<script src="/app/static/js/metrics.js"></script>
|
||||
<script src="/inc/chart.min-4.3.0.js"></script>
|
||||
<script src="/app/static/js/chart.min-4.3.0.js"></script>
|
||||
<link rel="stylesheet" href="/inc/codemirror/lib/codemirror.css">
|
||||
<script src="/inc/codemirror/lib/codemirror.js"></script>
|
||||
<script src="/inc/codemirror/mode/nginx.js"></script>
|
||||
<script src="/inc/codemirror/mode/haproxy.js"></script>
|
||||
<script src="/inc/codemirror/mode/modsec.js"></script>
|
||||
<link href="/app/static/css/toastr-6.3.9.css" rel="stylesheet"/>
|
||||
<script src="/inc/toastr.js"></script>
|
||||
<script src="/app/static/js/toastr.js"></script>
|
||||
<script defer src="/inc/ion.sound.min.js"></script>
|
||||
<link href="/app/static/css/select2.css" rel="stylesheet" />
|
||||
<script src="/app/static/js/select2.js"></script>
|
||||
<script src="/inc/reconnecting-websocket.js"></script>
|
||||
<script src="/app/static/js/reconnecting-websocket.js"></script>
|
||||
<link href="/app/static/css/table-6.3.9.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" charset="utf8" src="/inc/dataTables.min.js"></script>
|
||||
<script src="/inc/js.cookie.min.js"></script>
|
||||
<script src="/app/static/js/js.cookie.min.js"></script>
|
||||
<script src="/inc/script.js"></script>
|
||||
<meta http-equiv="refresh" content="0; url=/app/" />
|
||||
</head>
|
||||
|
|
Loading…
Reference in New Issue