mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
monitoring: Fix the link to hosts in downtime when multiple hosts are selected
This commit is contained in:
parent
f1f808b7a3
commit
26bc56e9df
@ -75,6 +75,7 @@ class Monitoring_HostsController extends Controller
|
|||||||
$unhandledFilterExpressions = array();
|
$unhandledFilterExpressions = array();
|
||||||
$acknowledgedObjects = array();
|
$acknowledgedObjects = array();
|
||||||
$objectsInDowntime = array();
|
$objectsInDowntime = array();
|
||||||
|
$downtimeFilterExpressions = array();
|
||||||
$hostStates = array(
|
$hostStates = array(
|
||||||
Host::getStateText(Host::STATE_UP) => 0,
|
Host::getStateText(Host::STATE_UP) => 0,
|
||||||
Host::getStateText(Host::STATE_DOWN) => 0,
|
Host::getStateText(Host::STATE_DOWN) => 0,
|
||||||
@ -92,6 +93,7 @@ class Monitoring_HostsController extends Controller
|
|||||||
}
|
}
|
||||||
if ((bool) $host->in_downtime === true) {
|
if ((bool) $host->in_downtime === true) {
|
||||||
$objectsInDowntime[] = $host;
|
$objectsInDowntime[] = $host;
|
||||||
|
$downtimeFilterExpressions[] = Filter::where('downtime_host', $host->getName());
|
||||||
}
|
}
|
||||||
++$hostStates[$host::getStateText($host->state)];
|
++$hostStates[$host::getStateText($host->state)];
|
||||||
}
|
}
|
||||||
@ -117,8 +119,8 @@ class Monitoring_HostsController extends Controller
|
|||||||
->setQueryString($unhandledFilterQueryString);
|
->setQueryString($unhandledFilterQueryString);
|
||||||
$this->view->acknowledgedObjects = $acknowledgedObjects;
|
$this->view->acknowledgedObjects = $acknowledgedObjects;
|
||||||
$this->view->objectsInDowntime = $objectsInDowntime;
|
$this->view->objectsInDowntime = $objectsInDowntime;
|
||||||
$this->view->inDowntimeLink = Url::fromRequest()
|
$this->view->inDowntimeLink = Url::fromPath('monitoring/list/downtimes')
|
||||||
->setPath('monitoring/list/downtimes');
|
->setQueryString(Filter::matchAny($downtimeFilterExpressions)->toQueryString());
|
||||||
$this->view->havingCommentsLink = Url::fromRequest()
|
$this->view->havingCommentsLink = Url::fromRequest()
|
||||||
->setPath('monitoring/list/comments');
|
->setPath('monitoring/list/comments');
|
||||||
$this->view->hostStatesPieChart = $this->createPieChart(
|
$this->view->hostStatesPieChart = $this->createPieChart(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user