CC-3702: System -> Status: No difference between a service is failed vs a service is not monitor
-fixed
This commit is contained in:
parent
5e5ced6fe5
commit
b9ab11ce28
|
@ -784,6 +784,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$api_key = $request->getParam('api_key');
|
||||
$getDiskInfo = $request->getParam('diskinfo') == "true";
|
||||
|
||||
if (!in_array($api_key, $CC_CONFIG["apiKey"]) &&
|
||||
is_null(Zend_Auth::getInstance()->getStorage()->read()))
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ class Application_Model_Systemstatus
|
|||
"name"=>"",
|
||||
"process_id"=>"STARTING...",
|
||||
"uptime_seconds"=>"-1",
|
||||
"status"=>true,
|
||||
"status"=>0,
|
||||
"memory_perc"=>"0%",
|
||||
"memory_kb"=>"0",
|
||||
"cpu_perc"=>"0%");
|
||||
|
@ -47,8 +47,8 @@ class Application_Model_Systemstatus
|
|||
$notMonitored = array(
|
||||
"name"=>$p_serviceName,
|
||||
"process_id"=>"NOT MONITORED",
|
||||
"uptime_seconds"=>"-1",
|
||||
"status"=>false,
|
||||
"uptime_seconds"=>"1",
|
||||
"status"=>1,
|
||||
"memory_perc"=>"0%",
|
||||
"memory_kb"=>"0",
|
||||
"cpu_perc"=>"0%"
|
||||
|
@ -58,7 +58,7 @@ class Application_Model_Systemstatus
|
|||
"name"=>$p_serviceName,
|
||||
"process_id"=>"FAILED",
|
||||
"uptime_seconds"=>"-1",
|
||||
"status"=>false,
|
||||
"status"=>0,
|
||||
"memory_perc"=>"0%",
|
||||
"memory_kb"=>"0",
|
||||
"cpu_perc"=>"0%"
|
||||
|
@ -97,7 +97,7 @@ class Application_Model_Systemstatus
|
|||
$process_id = $item->getElementsByTagName("pid");
|
||||
if ($process_id->length > 0){
|
||||
$data["process_id"] = $process_id->item(0)->nodeValue;
|
||||
$data["status"] = true;
|
||||
$data["status"] = 0;
|
||||
}
|
||||
|
||||
$uptime = $item->getElementsByTagName("uptime");
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue