don't crash js if a backend service is not running
This commit is contained in:
parent
4f7c8bf0db
commit
4d8dc01638
|
@ -46,6 +46,7 @@ function success(data, textStatus, jqXHR){
|
|||
|
||||
for (var key in services) {
|
||||
var s = services[key];
|
||||
if (s) {
|
||||
var children = $("#"+s.name).children();
|
||||
$(children[0]).text(s.name);
|
||||
|
||||
|
@ -61,6 +62,7 @@ function success(data, textStatus, jqXHR){
|
|||
$(children[3]).text(s.cpu_perc);
|
||||
$(children[4]).text(sprintf('%01.1fMB (%s)', parseInt(s.memory_kb)/1000, s.memory_perc));
|
||||
}
|
||||
}
|
||||
if (data.status.partitions){
|
||||
generatePartitions(data.status.partitions);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue