/monitoring/tactical: fall back to unknown services if none critical

refs #4494
This commit is contained in:
Alexander A. Klimov 2021-08-02 14:16:04 +02:00
parent 8b651d5f13
commit 6e1ab2c0ea
1 changed files with 7 additions and 3 deletions

View File

@ -92,9 +92,13 @@ class TacticalController extends Controller
->addSlice($summary->services_unknown_unhandled, array('class' => 'slice-state-unknown'))
->addSlice($summary->services_pending, array('class' => 'slice-state-pending'))
->addSlice($summary->services_pending_not_checked, array('class' => 'slice-state-not-checked'))
->setLabelBig($summary->services_critical_unhandled)
->setLabelBigEyeCatching($summary->services_critical_unhandled > 0)
->setLabelSmall($this->translate('Services Critical'));
->setLabelBig($summary->services_critical_unhandled ?: $summary->services_unknown_unhandled)
->setLabelBigState($summary->services_critical_unhandled > 0 ? 'critical' : (
$summary->services_unknown_unhandled > 0 ? 'unknown' : null
))
->setLabelSmall($summary->services_critical_unhandled > 0 || $summary->services_unknown_unhandled < 1
? $this->translate('Services Critical')
: $this->translate('Services Unknown'));
$this->view->hostStatusSummaryChart = $hostSummaryChart
->setLabelBigUrl($this->view->filteredUrl(