CC-3702: System -> Status: No difference between a service is failed vs a service is not monitor

-fixed
This commit is contained in:
Martin Konecny 2012-04-23 17:18:34 -04:00
parent 5e5ced6fe5
commit b9ab11ce28
4 changed files with 24 additions and 7 deletions

View file

@ -48,7 +48,15 @@ function success(data, textStatus, jqXHR){
var s = services[key];
var children = $("#"+s.name).children();
$(children[0]).text(s.name);
$($(children[1]).children()[0]).attr("class", s.status ? "checked-icon": "not-available-icon");
var status_class = "not-available-icon";
if (s.status == 0){
status_class = "checked-icon";
} else if (s.status == 1) {
status_class = "warning-icon";
}
$($(children[1]).children()[0]).attr("class", status_class);
$(children[2]).text(sprintf('%(days)sd %(hours)sh %(minutes)sm %(seconds)ss', convertSecondsToDaysHoursMinutesSeconds(s.uptime_seconds)));
$(children[3]).text(s.cpu_perc);
$(children[4]).text(sprintf('%01.1fMB (%s)', parseInt(s.memory_kb)/1000, s.memory_perc));