diff --git a/modules/monitoring/application/controllers/TacticalController.php b/modules/monitoring/application/controllers/TacticalController.php
index 7a4e8ccce..6eb5ba0db 100644
--- a/modules/monitoring/application/controllers/TacticalController.php
+++ b/modules/monitoring/application/controllers/TacticalController.php
@@ -51,6 +51,16 @@ class TacticalController extends Controller
);
$this->applyRestriction('monitoring/filter/objects', $stats);
+ $this->setupFilterControl($stats, null, ['host', 'service'], ['format']);
+ $this->view->setHelperFunction('filteredUrl', function ($path, array $params) {
+ $filter = clone $this->view->filterEditor->getFilter();
+ foreach ($params as $column => $value) {
+ $filter = $filter->andFilter($filter->where($column, $value));
+ }
+
+ return $this->view->url($path)->setQueryString($filter->toQueryString());
+ });
+
$this->handleFormatRequest($stats);
$summary = $stats->fetchRow();
@@ -83,16 +93,18 @@ class TacticalController extends Controller
->setLabelSmall($this->translate('Services Critical'));
$this->view->hostStatusSummaryChart = $hostSummaryChart
- ->setLabelBigUrl($this->view->url(
+ ->setLabelBigUrl($this->view->filteredUrl(
'monitoring/list/hosts',
array(
- 'host_state' => 1, 'host_handled' => 0,
- 'sort' => 'host_last_check', 'dir' => 'asc'
+ 'host_state' => 1,
+ 'host_handled' => 0,
+ 'sort' => 'host_last_check',
+ 'dir' => 'asc'
)
))
->render();
$this->view->serviceStatusSummaryChart = $serviceSummaryChart
- ->setLabelBigUrl($this->view->url(
+ ->setLabelBigUrl($this->view->filteredUrl(
'monitoring/list/services',
array(
'service_state' => 2,
diff --git a/modules/monitoring/application/views/scripts/tactical/index.phtml b/modules/monitoring/application/views/scripts/tactical/index.phtml
index ef9f53f5a..4ee3a7d18 100644
--- a/modules/monitoring/application/views/scripts/tactical/index.phtml
+++ b/modules/monitoring/application/views/scripts/tactical/index.phtml
@@ -1,6 +1,7 @@
compact): ?>
= $this->tabs ?>
+ = $this->filterEditor ?>
@@ -13,43 +14,43 @@
hosts_up): ?>
-
+
= $statusSummary->hosts_up ?> |
= $this->translate('Up') ?> |
hosts_down_handled):?>
-
+
= $statusSummary->hosts_down_handled ?> |
= $this->translate('Down') ?> (= $this->translate('Handled') ?>) |
hosts_down_unhandled):?>
-
+
= $statusSummary->hosts_down_unhandled ?> |
= $this->translate('Down') ?> |
hosts_unreachable_handled):?>
-
+
= $statusSummary->hosts_unreachable_handled ?> |
= $this->translate('Unreachable') ?> (= $this->translate('Handled') ?>) |
hosts_unreachable_unhandled):?>
-
+
= $statusSummary->hosts_unreachable_unhandled ?> |
= $this->translate('Unreachable') ?> |
hosts_pending):?>
-
+
= $statusSummary->hosts_pending ?> |
= $this->translate('Pending') ?> |
hosts_not_checked):?>
-
+
= $statusSummary->hosts_not_checked ?> |
= $this->translate('Not Checked') ?> |
@@ -65,55 +66,55 @@
services_ok):?>
-
+
= $statusSummary->services_ok ?> |
= $this->translate('Ok') ?> |
services_warning_handled):?>
-
+
= $statusSummary->services_warning_handled ?> |
= $this->translate('Warning') ?> (= $this->translate('Handled') ?>) |
services_warning_unhandled):?>
-
+
= $statusSummary->services_warning_unhandled ?> |
= $this->translate('Warning') ?> |
services_critical_handled):?>
-
+
= $statusSummary->services_critical_handled ?> |
= $this->translate('Critical') ?> (= $this->translate('Handled') ?>) |
services_critical_unhandled):?>
-
+
= $statusSummary->services_critical_unhandled ?> |
= $this->translate('Critical') ?> |
services_unknown_handled):?>
-
+
= $statusSummary->services_unknown_handled ?> |
= $this->translate('Unknown') ?> (= $this->translate('Handled') ?>) |
services_unknown_unhandled):?>
-
+
= $statusSummary->services_unknown_unhandled ?> |
= $this->translate('Unknown') ?> |
services_pending):?>
-
+
= $statusSummary->services_pending ?> |
= $this->translate('Pending') ?> |
services_not_checked):?>
-
+
= $statusSummary->services_not_checked ?> |
= $this->translate('Not Checked') ?> |