From adab58e769fb871e9c981eccbdc78c8b27380036 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 5 Sep 2014 18:38:56 +0200 Subject: [PATCH] list/statehistorysummary: fix filter links --- .../scripts/list/statehistorysummary.phtml | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/statehistorysummary.phtml b/modules/monitoring/application/views/scripts/list/statehistorysummary.phtml index d7c5527d8..e0af60773 100644 --- a/modules/monitoring/application/views/scripts/list/statehistorysummary.phtml +++ b/modules/monitoring/application/views/scripts/list/statehistorysummary.phtml @@ -1,4 +1,8 @@ -
+
tabs ?>

History - Critical Events

@@ -16,19 +20,20 @@ foreach ($summary as $entry) { $value = $entry->cnt_critical; $caption = $value . ' ' . t('critical events on ') . $this->dateFormat()->formatDate(strtotime($day)); + $filter = Filter::matchAll( + Filter::expression('timestamp', '<', strtotime($day . ' 23:59:59')), + Filter::expression('timestamp', '>', strtotime($day . ' 00:00:00')), + Filter::expression('object_type', '=', 'service'), + Filter::expression('state', '=', '2'), + Filter::matchAny( + Filter::expression('type', '=', 'hard_state'), + Filter::expression('type', '=', 'hard_state') + ) + ); $data[$day] = array( 'value' => $value, 'caption' => $caption, - 'url' => $this->href( - 'monitoring/list/eventhistory', - array( - 'timestamp<' => strtotime($day . ' 23:59:59'), - 'timestamp>' => strtotime($day . ' 00:00:00'), - 'object_type' => 'service', - 'state' => '2', - 'type' => '(hard_state|soft_state)' - ) - ) + 'url' => $this->href('monitoring/list/eventhistory?' . $filter->toQueryString()) ); } $grid->setData($data);