Commit db259cbc authored by Dimitris Moraitis's avatar Dimitris Moraitis
Browse files

welcome page fix - Refs #279

parent 76d46bb6
......@@ -296,16 +296,9 @@ function update_machines_view(data){
$("div.list table.list-machines").show();
$("div.list div.actions").show();
}
var server_states = [];
for (var i=0;i<data.servers.values.length;i++){
var server = data.servers.values[i];
if (server_states.indexOf(server.status) == -1){
server_states[server_states.length] = server.status;
}
}
// show message in case user has no servers!
if (server_states.length == 0 || (server_states.length == 1 && server_states[0]=='DELETED')) {
if ($("tbody.machines .dataTables_empty").length > 0) {
standard_view();
} else {
hideWelcome();
......
......@@ -331,15 +331,8 @@ function update_machines_view(data){
$("#mini.separator").fadeOut("slow");
}
var server_states = [];
for (var i=0;i<data.servers.values.length;i++){
var server = data.servers.values[i];
if (server_states.indexOf(server.status) == -1){
server_states[server_states.length] = server.status;
}
}
// show message in case user has no servers!
if (server_states.length == 0 || (server_states.length == 1 && server_states[0]=='DELETED')) {
if ($('.machine').length < 2) {
showWelcome();
} else {
hideWelcome();
......
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