mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-06-09 08:34:04 -04:00
Fix monitoring health badge if programstatus has never been set
This commit is contained in:
parent
3db9a1d77f
commit
ca803e8f05
1 changed files with 8 additions and 0 deletions
|
|
@ -31,6 +31,14 @@ class BackendAvailabilityNavigationItemRenderer extends BadgeNavigationItemRende
|
|||
array('is_currently_running', 'notifications_enabled')
|
||||
)
|
||||
->fetchRow();
|
||||
|
||||
if ($programStatus === false) {
|
||||
throw new Exception(sprintf(
|
||||
mt('monitoring', '%s is currently not up and running'),
|
||||
MonitoringBackend::instance()->getName()
|
||||
));
|
||||
}
|
||||
|
||||
return $programStatus;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue