From 822a64cc99a62ce96a9b863e4e41f3ad7dd3508a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 16 Nov 2014 18:43:36 +0100 Subject: [PATCH] monitoring/show: no history tab for livestatus Right now we show the tab based on the backend capability. No eventhistory, no history tab. --- .../controllers/ShowController.php | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index dd36154d1..6c295e641 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -227,15 +227,17 @@ class Monitoring_ShowController extends Controller 'urlParams' => $params, ) ); - $tabs->add( - 'history', - array( - 'title' => 'History', - 'icon' => 'rewind', - 'url' => 'monitoring/show/history', - 'urlParams' => $params, - ) - ); + if ($this->backend->hasQuery('eventHistory')) { + $tabs->add( + 'history', + array( + 'title' => 'History', + 'icon' => 'rewind', + 'url' => 'monitoring/show/history', + 'urlParams' => $params, + ) + ); + } $tabs->extend(new OutputFormat()) ->extend(new DashboardAction()); }