Commit 82ebed37 authored by Mike Muzurakis's avatar Mike Muzurakis
Browse files

better timing when showing welcome message

parent 6c7b0d9f
......@@ -202,9 +202,8 @@ function update_machines_view(data){
if (server.status == "DELETED") {
vmTable.fnDeleteRow(current);
// Reload the page to check if server list is empty
console.info(tableData.length);
if (tableData.length == 1) {
$("#machinesview_content").fadeOut("fast")
hideWelcome()
standard_view();
}
} else { // when server is not be deleted, it should be updated
......
......@@ -213,6 +213,13 @@ function update_machines_view(data){
Go through the servers in the input data. Update existing entries, add
new ones to the list
*/
// show message in case user has no servers!
if (data.servers.values.length == 0) {
showWelcome()
} else {
hideWelcome()
}
$.each(data.servers.values, function(i,server){
existing = $('#' + server.id);
......@@ -332,13 +339,6 @@ function update_machines_view(data){
} else {
$("#mini.separator").fadeOut("slow");
}
// show message in case user has no servers!
if (servers.length == 0) {
showWelcome()
} else {
hideWelcome()
}
// set confirm box position
if (window.innerHeight - 220 < $('#machinesview').height())
......
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