v8.0: Add new icons and update HA view validation

Added new icons for Keepalived and Roxy services in the static images and integrated them into the main menu. Updated HA view validation to use `eth` instead of `ip` and changed certain property types from string to integer. Enhanced error handling and data processing for the configuration routes and improved JSON data handling in the script.js file.
This commit is contained in:
Aidaho
2024-09-01 20:51:12 +03:00
parent bf7469cc3f
commit 4e5f4b2bd1
9 changed files with 53 additions and 90 deletions

View File

@@ -338,20 +338,22 @@ function showConfig() {
}
}
clearAllAjaxFields();
let json_data = {
"serv": $("#serv").val(),
"service": service,
"config_file_name": config_file_name
}
$.ajax( {
url: "/config/" + service + "/show",
data: {
serv: $("#serv").val(),
service: service,
config_file_name: config_file_name
},
data: JSON.stringify(json_data),
type: "POST",
contentType: "application/json; charset=utf-8",
success: function( data ) {
if (data.indexOf('error:') != '-1') {
if (data.status === 'failed') {
toastr.error(data);
} else {
toastr.clear();
$("#ajax").html(data);
$("#ajax").html(data.data);
$.getScript(configShow);
window.history.pushState("Show config", "Show config", "/config/" + service + "/" + $("#serv").val() + "/show/" + config_file_name);
}