18 |
18 |
<div class="indicator"></div>
|
19 |
19 |
<div class="indicator"></div>
|
20 |
20 |
<div class="spinner" style="display:none"></div>
|
21 |
|
<img class="wave" src="" />
|
|
21 |
<img class="wave" style="display:none" src="" />
|
22 |
22 |
</div>
|
23 |
23 |
<img class="logo" src="" />
|
24 |
24 |
<a href="#" class="name">
|
... | ... | |
195 |
195 |
moved.find("img.logo").attr("src","static/machines/"+image_tags[server.imageRef]+'.png');
|
196 |
196 |
existing.remove();
|
197 |
197 |
existing = moved;
|
198 |
|
existing.find('.spinner').hide();
|
199 |
198 |
} else if (['STOPPED','ERROR'].indexOf(server.status) >= 0 &&
|
200 |
199 |
[STATUS_MESSAGES['ACTIVE'], STATUS_MESSAGES['BUILD'], STATUS_MESSAGES['REBOOT']].indexOf(existing.find(".status").text()) >= 0) {
|
201 |
200 |
moved = existing.clone().appendTo(".terminated");
|
202 |
201 |
moved.find("img.logo").attr("src","static/machines/"+image_tags[server.imageRef]+'-off.png');
|
203 |
202 |
existing.remove();
|
204 |
203 |
existing = moved;
|
205 |
|
existing.find('.spinner').hide();
|
206 |
|
} else {
|
207 |
|
existing.find('.spinner').hide();
|
208 |
|
existing.find(' .wave').attr('src','static/wave.gif');
|
209 |
|
setTimeout("$('#" + server.id +" .wave').attr('src','')", 3000);
|
210 |
|
}
|
|
204 |
}
|
|
205 |
existing.find('.spinner').hide();
|
|
206 |
existing.find(' .wave').attr('src','static/wave.gif').show();
|
|
207 |
setTimeout("$('#" + server.id +" .wave').attr('src','').hide()", 3000);
|
211 |
208 |
existing.find(".status").text(STATUS_MESSAGES[server.status]);
|
212 |
209 |
|
213 |
210 |
}
|
... | ... | |
227 |
224 |
machine.find("img.logo").attr("src","static/machines/"+image_tags[server.imageRef]+'-off.png');
|
228 |
225 |
machine.appendTo(".terminated");
|
229 |
226 |
}
|
|
227 |
//machine.find(' .wave').attr('src','static/wave.gif').show();
|
|
228 |
//setTimeout("$('#" + server.id +" .wave').attr('src','').hide()", 3000);
|
230 |
229 |
}
|
231 |
230 |
});
|
232 |
231 |
|
... | ... | |
245 |
244 |
if (servers.length == 0) {
|
246 |
245 |
$("#emptymachineslist").fadeIn("slow");
|
247 |
246 |
}
|
|
247 |
|
|
248 |
// set confirm box position
|
|
249 |
if (window.innerHeight - 235 < $('#machinesview').height())
|
|
250 |
$('.confirm_multiple').addClass('fixed');
|
|
251 |
else
|
|
252 |
$('.confirm_multiple').removeClass('fixed');
|
248 |
253 |
}
|
249 |
254 |
|
250 |
255 |
// indicate that the requested action was succesfully completed
|