Revision abf90954 ui/templates/machines.html
b/ui/templates/machines.html | ||
---|---|---|
202 | 202 |
</div> |
203 | 203 |
|
204 | 204 |
<script> |
205 |
|
|
205 | 206 |
// hardcoded image types |
206 | 207 |
var image_tags = { |
207 | 208 |
1: 'archlinux', |
... | ... | |
234 | 235 |
type: "GET", |
235 | 236 |
//async: false, |
236 | 237 |
dataType: "json", |
237 |
error: function(data) { |
|
238 |
timeout: {{timeout}}, |
|
239 |
error: function(data, strError) { |
|
238 | 240 |
$("#spinner").hide(); |
239 |
alert('{% trans "Cannot connect to the backend! Please inform the admins" %}'); |
|
240 |
}, |
|
241 |
if (strError == 'timeout'){ |
|
242 |
alert('{% trans "timeout error. Check your network connection" %}'); |
|
243 |
return false; |
|
244 |
} |
|
245 |
else{ |
|
246 |
alert('{% trans "Cannot connect to the backend! Please inform the admins" %}'); |
|
247 |
return false; |
|
248 |
} |
|
249 |
}, |
|
241 | 250 |
success: function(data) { |
242 | 251 |
if ($(".running a.name").length + $(".terminated a.name").length == 0) { |
243 | 252 |
|
... | ... | |
312 | 321 |
type: "GET", |
313 | 322 |
//async: false, |
314 | 323 |
dataType: "json", |
324 |
timeout: {{timeout}}, |
|
325 |
error: function(data, strError) { |
|
326 |
if (strError == 'timeout'){ |
|
327 |
alert('{% trans "timeout error. Check your network connection" %}'); |
|
328 |
return false; |
|
329 |
} |
|
330 |
}, |
|
315 | 331 |
success: function(data) { |
316 | 332 |
if ($("ul#standard-images li").toArray().length + $("ul#custom-images li").toArray().length == 0) { |
317 | 333 |
$.each(data.images, function(i,image){ |
Also available in: Unified diff