Do not hide OK hosts and services from the Pie Chart

Having a single hostgroup, and all hosts and services up, landing page Pie Chart is empty. This restores display of OK hosts and services.
This commit is contained in:
Goran Rakic 2014-08-21 03:58:36 +02:00 committed by Matthias Jentsch
parent 23aa57a5d7
commit 746f53fd20
1 changed files with 6 additions and 6 deletions

View File

@ -222,16 +222,16 @@ class Monitoring_ChartController extends Controller
if (isset($query->hosts_up)) {
$this->view->chart->drawPie(array(
'data' => array(
// (int) $query->hosts_up,
(int) $query->hosts_up,
(int) $query->hosts_down_handled,
(int) $query->hosts_down_unhandled,
(int) $query->hosts_unreachable_handled,
(int) $query->hosts_unreachable_unhandled,
(int) $query->hosts_pending
),
'colors' => array( '#ff4444', '#ff0000', '#E066FF', '#f099FF', '#fefefe'),
'colors' => array('#44bb77', '#ff4444', '#ff0000', '#E066FF', '#f099FF', '#fefefe'),
'labels'=> array(
// (int) $query->hosts_up . ' Up Hosts',
(int) $query->hosts_up . ' Up Hosts',
(int) $query->hosts_down_handled . t(' Down Hosts (Handled)'),
(int) $query->hosts_down_unhandled . t(' Down Hosts (Unhandled)'),
(int) $query->hosts_unreachable_handled . t(' Unreachable Hosts (Handled)'),
@ -240,7 +240,7 @@ class Monitoring_ChartController extends Controller
)
), array(
'data' => array(
// (int) $query->services_ok,
(int) $query->services_ok,
(int) $query->services_warning_unhandled,
(int) $query->services_warning_handled,
(int) $query->services_critical_unhandled,
@ -249,9 +249,9 @@ class Monitoring_ChartController extends Controller
(int) $query->services_unknown_handled,
(int) $query->services_pending
),
'colors' => array('#ff4444', '#ff0000', '#ffff00', '#ffff33', '#E066FF', '#f099FF', '#fefefe'),
'colors' => array('#44bb77', '#ff4444', '#ff0000', '#ffff00', '#ffff33', '#E066FF', '#f099FF', '#fefefe'),
'labels'=> array(
// $query->services_ok . ' Up Services',
$query->services_ok . ' Up Services',
$query->services_warning_handled . t(' Warning Services (Handled)'),
$query->services_warning_unhandled . t(' Warning Services (Unhandled)'),
$query->services_critical_handled . t(' Down Services (Handled)'),