Translate labels in the ChartController
This commit is contained in:
parent
3ed67c9af6
commit
b85ac3ab45
|
@ -164,29 +164,30 @@ class Monitoring_ChartController extends Controller
|
||||||
$unknownBars[] = array($servicegroup->servicegroup, $servicegroup->services_unknown_unhandled);
|
$unknownBars[] = array($servicegroup->servicegroup, $servicegroup->services_unknown_unhandled);
|
||||||
}
|
}
|
||||||
$this->view->chart = new GridChart();
|
$this->view->chart = new GridChart();
|
||||||
$this->view->chart->setAxisLabel('', 'Services')
|
$this->view->chart->setAxisLabel('', t('Services'))
|
||||||
->setXAxis(new \Icinga\Chart\Unit\StaticAxis());
|
->setXAxis(new \Icinga\Chart\Unit\StaticAxis());
|
||||||
|
|
||||||
$this->view->chart->drawBars(
|
$this->view->chart->drawBars(
|
||||||
array(
|
array(
|
||||||
'label' => 'Ok',
|
'label' => t('Ok'),
|
||||||
'color' => '#44bb77',
|
'color' => '#44bb77',
|
||||||
'stack' => 'stack1',
|
'stack' => 'stack1',
|
||||||
'data' => $okBars
|
'data' => $okBars
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Warning',
|
'label' => t('Warning'),
|
||||||
'color' => '#ffaa44',
|
'color' => '#ffaa44',
|
||||||
'stack' => 'stack1',
|
'stack' => 'stack1',
|
||||||
'data' => $warningBars
|
'data' => $warningBars
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Critical',
|
'label' => t('Critical'),
|
||||||
'color' => '#ff5566',
|
'color' => '#ff5566',
|
||||||
'stack' => 'stack1',
|
'stack' => 'stack1',
|
||||||
'data' => $critBars
|
'data' => $critBars
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Unknown',
|
'label' => t('Unknown'),
|
||||||
'color' => '#dd66ff',
|
'color' => '#dd66ff',
|
||||||
'stack' => 'stack1',
|
'stack' => 'stack1',
|
||||||
'data' => $unknownBars
|
'data' => $unknownBars
|
||||||
|
@ -214,22 +215,22 @@ class Monitoring_ChartController extends Controller
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$this->view->chart = new GridChart();
|
$this->view->chart = new GridChart();
|
||||||
$this->view->chart->setAxisLabel('', 'Hosts')->setXAxis(new StaticAxis());
|
$this->view->chart->setAxisLabel('', t('Hosts'))->setXAxis(new StaticAxis());
|
||||||
$this->view->chart->drawBars(
|
$this->view->chart->drawBars(
|
||||||
array(
|
array(
|
||||||
'label' => 'Up',
|
'label' => t('Up'),
|
||||||
'color' => '#44bb77',
|
'color' => '#44bb77',
|
||||||
'stack' => 'stack1',
|
'stack' => 'stack1',
|
||||||
'data' => $upBars
|
'data' => $upBars
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Down',
|
'label' => t('Down'),
|
||||||
'color' => '#ff5566',
|
'color' => '#ff5566',
|
||||||
'stack' => 'stack1',
|
'stack' => 'stack1',
|
||||||
'data' => $downBars
|
'data' => $downBars
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Unreachable',
|
'label' => t('Unreachable'),
|
||||||
'color' => '#dd66ff',
|
'color' => '#dd66ff',
|
||||||
'stack' => 'stack1',
|
'stack' => 'stack1',
|
||||||
'data' => $unreachableBars
|
'data' => $unreachableBars
|
||||||
|
@ -253,11 +254,11 @@ class Monitoring_ChartController extends Controller
|
||||||
'colors' => array( '#ff4444', '#ff0000', '#E066FF', '#f099FF', '#fefefe'),
|
'colors' => array( '#ff4444', '#ff0000', '#E066FF', '#f099FF', '#fefefe'),
|
||||||
'labels'=> array(
|
'labels'=> array(
|
||||||
// (int) $query->hosts_up . ' Up Hosts',
|
// (int) $query->hosts_up . ' Up Hosts',
|
||||||
(int) $query->hosts_down_handled . ' Down Hosts (Handled)',
|
(int) $query->hosts_down_handled . t(' Down Hosts (Handled)'),
|
||||||
(int) $query->hosts_down_unhandled . ' Down Hosts (Unhandled)',
|
(int) $query->hosts_down_unhandled . t(' Down Hosts (Unhandled)'),
|
||||||
(int) $query->hosts_unreachable_handled . ' Unreachable Hosts (Handled)',
|
(int) $query->hosts_unreachable_handled . t(' Unreachable Hosts (Handled)'),
|
||||||
(int) $query->hosts_unreachable_unhandled . ' Unreachable Hosts (Unhandled)',
|
(int) $query->hosts_unreachable_unhandled . t(' Unreachable Hosts (Unhandled)'),
|
||||||
(int) $query->hosts_pending . ' Pending Hosts'
|
(int) $query->hosts_pending . t(' Pending Hosts')
|
||||||
)
|
)
|
||||||
), array(
|
), array(
|
||||||
'data' => array(
|
'data' => array(
|
||||||
|
@ -273,14 +274,13 @@ class Monitoring_ChartController extends Controller
|
||||||
'colors' => array('#ff4444', '#ff0000', '#ffff00', '#ffff33', '#E066FF', '#f099FF', '#fefefe'),
|
'colors' => array('#ff4444', '#ff0000', '#ffff00', '#ffff33', '#E066FF', '#f099FF', '#fefefe'),
|
||||||
'labels'=> array(
|
'labels'=> array(
|
||||||
// $query->services_ok . ' Up Services',
|
// $query->services_ok . ' Up Services',
|
||||||
$query->services_warning_handled . ' Warning Services (Handled)',
|
$query->services_warning_handled . t(' Warning Services (Handled)'),
|
||||||
$query->services_warning_unhandled . ' Warning Services (Unhandled)',
|
$query->services_warning_unhandled . t(' Warning Services (Unhandled)'),
|
||||||
$query->services_critical_handled . ' Down Services (Handled)',
|
$query->services_critical_handled . t(' Down Services (Handled)'),
|
||||||
$query->services_critical_unhandled . ' Down Services (Unhandled)',
|
$query->services_critical_unhandled . t(' Down Services (Unhandled)'),
|
||||||
$query->services_unknown_handled . ' Unreachable Services (Handled)',
|
$query->services_unknown_handled . t(' Unreachable Services (Handled)'),
|
||||||
$query->services_unknown_unhandled . ' Unreachable Services (Unhandled)',
|
$query->services_unknown_unhandled . t(' Unreachable Services (Unhandled)'),
|
||||||
$query->services_pending . ' Pending Services',
|
$query->services_pending . t(' Pending Services')
|
||||||
|
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue