You've already forked haproxy-wi
mirror of
https://github.com/roxy-wi/roxy-wi.git
synced 2025-12-21 12:34:01 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user