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

@ -2310,6 +2310,14 @@ tfoot tr th {
margin:0;
display:block;
}
.warning-icon {
width:100%;
margin:0;
background: url("images/warning-icon.png") no-repeat center center;
height:16px;
margin:0;
display:block;
}
.statustable ul {
margin:4px 0;
padding:0;
@ -2656,4 +2664,4 @@ dd .stream-status {
background-color: #727272;
outline: 0;
border-top-color:#333333
}
}

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));