Commit f6f94d2e authored by Vassilios Karakoidas's avatar Vassilios Karakoidas
Browse files

Merge branch 'master' of https://code.grnet.gr/git/synnefo

parents 0f4ecea6 1a2d0e59
......@@ -481,7 +481,7 @@ function reboot(serverIDs){
// continue with the rest of the servers
reboot(serverIDs);
} else {
ajax_error(jqXHR.status);
ajax_error(jqXHR.status, serverID);
}
}
});
......@@ -520,7 +520,7 @@ function shutdown(serverIDs) {
// continue with the rest of the servers
shutdown(serverIDs);
} else {
ajax_error(jqXHR.status);
ajax_error(jqXHR.status, serverID);
}
}
});
......@@ -557,7 +557,7 @@ function destroy(serverIDs) {
// continue with the rest of the servers
destroy(serverIDs);
} else {
ajax_error(jqXHR.status);
ajax_error(jqXHR.status, serverID);
}
}
});
......@@ -596,7 +596,7 @@ function start(serverIDs){
// continue with the rest of the servers
start(serverIDs);
} else {
ajax_error(jqXHR.status);
ajax_error(jqXHR.status, serverID);
}
}
});
......
......@@ -64,12 +64,17 @@
};
// ajax error checking
function ajax_error(status) {
function ajax_error(status, serverID) {
// prepare the error message
$("#error-success h3").text(ERRORS['HEADER']);
if (ERRORS[status] != undefined) {
$("#error-success p").text(ERRORS[status]);
if (serverID == undefined){
$("#error-success p").text(ERRORS[status]);
} else {
var serverName = $("#"+serverID).parent().parent().find("a.name").text();
$("#error-success p").html("<b>" + serverName + "</b>" + ": " + ERRORS[status]);
}
} else {
$("#error-success p").text(ERRORS['DEFAULT']);
}
......
......@@ -263,7 +263,7 @@ function display_success(serverID) {
function display_failure(serverID, status, action) {
osIcon = $('#'+serverID).parent().parent().find('.list-logo');
osIcon.attr('src',osIcon.attr('os'));
ajax_error(status);
ajax_error(status, serverID);
}
var vmTable = $("div.list table.list-machines").dataTable({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment