Changelog: https://roxy-wi.org/changelog#6_3_1
pull/355/head
Pavel Loginov 2022-12-08 10:07:05 +03:00
parent 729df72f11
commit fda5deaf97
2 changed files with 17 additions and 17 deletions

View File

@ -103,7 +103,7 @@ def get_system_info(server_ip: str) -> str:
command = ["sudo lshw -quiet -json"] command = ["sudo lshw -quiet -json"]
try: try:
sys_info_returned = ssh_command(server_ip, command) sys_info_returned = ssh_command(server_ip, command, timeout=5)
except Exception as e: except Exception as e:
raise e raise e
command = ['sudo hostnamectl |grep "Operating System"|awk -F":" \'{print $2}\''] command = ['sudo hostnamectl |grep "Operating System"|awk -F":" \'{print $2}\'']

View File

@ -1367,10 +1367,10 @@ function removeOption(id) {
type: "POST", type: "POST",
success: function( data ) { success: function( data ) {
data = data.replace(/\s+/g,' '); data = data.replace(/\s+/g,' ');
if(data == "Ok ") { if(data.indexOf('Ok') != '-1') {
$("#option-"+id).remove(); $("#option-"+id).remove();
} }
} }
} ); } );
} }
function updateOptions(id) { function updateOptions(id) {
@ -1405,7 +1405,7 @@ function confirmDeleteSavedServer(id) {
title: "Are you sure you want to delete " +$('#servers-saved-'+id).val() + "?", title: "Are you sure you want to delete " +$('#servers-saved-'+id).val() + "?",
buttons: { buttons: {
"Delete": function() { "Delete": function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
removeSavedServer(id); removeSavedServer(id);
}, },
Cancel: function() { Cancel: function() {
@ -1428,7 +1428,7 @@ function removeSavedServer(id) {
if(data.indexOf('Ok') != '-1') { if(data.indexOf('Ok') != '-1') {
$("#servers-saved-"+id).remove(); $("#servers-saved-"+id).remove();
} }
} }
} ); } );
} }
function updateSavedServer(id) { function updateSavedServer(id) {
@ -1485,8 +1485,8 @@ function view_ssl(id) {
confirmDeleting("SSL cert", id, $( this ), ""); confirmDeleting("SSL cert", id, $( this ), "");
} }
} }
}); });
} }
} }
} ); } );
} }
@ -1539,8 +1539,8 @@ function change_select_waf(id) {
token: $('#token').val() token: $('#token').val()
}, },
type: "POST", type: "POST",
success: function( data ) { success: function( data ) {
if(parseFloat(data) < parseFloat('1.8')) { if(parseFloat(data) < parseFloat('1.8')) {
$("#waf"+id).checkboxradio( "disable" ); $("#waf"+id).checkboxradio( "disable" );
} else { } else {
$("#waf"+id).checkboxradio( "enable" ); $("#waf"+id).checkboxradio( "enable" );
@ -1550,7 +1550,7 @@ function change_select_waf(id) {
} }
function createList(color) { function createList(color) {
if(color == 'white') { if(color == 'white') {
list = $('#new_whitelist_name').val() list = $('#new_whitelist_name').val()
} else { } else {
list = $('#new_blacklist_name').val() list = $('#new_blacklist_name').val()
} }
@ -1578,7 +1578,7 @@ function createList(color) {
}, 2500); }, 2500);
} }
} }
} ); } );
} }
function editList(list, color) { function editList(list, color) {
$.ajax( { $.ajax( {
@ -1607,25 +1607,25 @@ function editList(list, color) {
confirmDeleting('list', list, $( this ), color); confirmDeleting('list', list, $( this ), color);
}, },
"Just save": function() { "Just save": function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
saveList('save', list, color); saveList('save', list, color);
}, },
"Save and reload": function() { "Save and reload": function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
saveList('reload', list, color); saveList('reload', list, color);
}, },
"Save and restart": function() { "Save and restart": function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
saveList('restart', list, color); saveList('restart', list, color);
}, },
Cancel: function() { Cancel: function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
} }
} }
}); });
} }
} }
} ); } );
} }
function saveList(action, list, color) { function saveList(action, list, color) {
var serv = $( "#serv-"+color+"-list option:selected" ).val(); var serv = $( "#serv-"+color+"-list option:selected" ).val();