From fda5deaf977cfa5c50a23c602c8acc398f370d54 Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Thu, 8 Dec 2022 10:07:05 +0300 Subject: [PATCH] v6.3.1.0 Changelog: https://roxy-wi.org/changelog#6_3_1 --- app/modules/server/server.py | 2 +- inc/add.js | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/modules/server/server.py b/app/modules/server/server.py index 01cfeb11..1c89f238 100644 --- a/app/modules/server/server.py +++ b/app/modules/server/server.py @@ -103,7 +103,7 @@ def get_system_info(server_ip: str) -> str: command = ["sudo lshw -quiet -json"] try: - sys_info_returned = ssh_command(server_ip, command) + sys_info_returned = ssh_command(server_ip, command, timeout=5) except Exception as e: raise e command = ['sudo hostnamectl |grep "Operating System"|awk -F":" \'{print $2}\''] diff --git a/inc/add.js b/inc/add.js index 0f659b5b..3d2c8538 100644 --- a/inc/add.js +++ b/inc/add.js @@ -1367,10 +1367,10 @@ function removeOption(id) { type: "POST", success: function( data ) { data = data.replace(/\s+/g,' '); - if(data == "Ok ") { + if(data.indexOf('Ok') != '-1') { $("#option-"+id).remove(); } - } + } } ); } function updateOptions(id) { @@ -1405,7 +1405,7 @@ function confirmDeleteSavedServer(id) { title: "Are you sure you want to delete " +$('#servers-saved-'+id).val() + "?", buttons: { "Delete": function() { - $( this ).dialog( "close" ); + $( this ).dialog( "close" ); removeSavedServer(id); }, Cancel: function() { @@ -1428,7 +1428,7 @@ function removeSavedServer(id) { if(data.indexOf('Ok') != '-1') { $("#servers-saved-"+id).remove(); } - } + } } ); } function updateSavedServer(id) { @@ -1485,8 +1485,8 @@ function view_ssl(id) { confirmDeleting("SSL cert", id, $( this ), ""); } } - }); - } + }); + } } } ); } @@ -1539,8 +1539,8 @@ function change_select_waf(id) { token: $('#token').val() }, type: "POST", - success: function( data ) { - if(parseFloat(data) < parseFloat('1.8')) { + success: function( data ) { + if(parseFloat(data) < parseFloat('1.8')) { $("#waf"+id).checkboxradio( "disable" ); } else { $("#waf"+id).checkboxradio( "enable" ); @@ -1550,7 +1550,7 @@ function change_select_waf(id) { } function createList(color) { if(color == 'white') { - list = $('#new_whitelist_name').val() + list = $('#new_whitelist_name').val() } else { list = $('#new_blacklist_name').val() } @@ -1578,7 +1578,7 @@ function createList(color) { }, 2500); } } - } ); + } ); } function editList(list, color) { $.ajax( { @@ -1607,25 +1607,25 @@ function editList(list, color) { confirmDeleting('list', list, $( this ), color); }, "Just save": function() { - $( this ).dialog( "close" ); + $( this ).dialog( "close" ); saveList('save', list, color); }, "Save and reload": function() { - $( this ).dialog( "close" ); + $( this ).dialog( "close" ); saveList('reload', list, color); }, "Save and restart": function() { - $( this ).dialog( "close" ); + $( this ).dialog( "close" ); saveList('restart', list, color); }, Cancel: function() { $( this ).dialog( "close" ); } } - }); - } + }); + } } - } ); + } ); } function saveList(action, list, color) { var serv = $( "#serv-"+color+"-list option:selected" ).val();