Add proper title to the timeline's tab

refs #8458
This commit is contained in:
Johannes Meyer 2015-02-23 16:59:47 +01:00
parent 1ef03a76f7
commit f48dbf1640
1 changed files with 9 additions and 11 deletions

View File

@ -13,19 +13,17 @@ use Icinga\Module\Monitoring\Web\Widget\SelectBox;
class Monitoring_TimelineController extends Controller
{
protected function addTitleTab($action, $title = false)
{
$title = $title ? : ucfirst($action);
$this->getTabs()->add($action, array(
'title' => $title,
'url' => Url::fromRequest()
))->activate($action);
$this->view->title = $title;
}
public function indexAction()
{
$this->addTitleTab('index', t('Timeline'));
$this->getTabs()->add(
'timeline',
array(
'title' => $this->translate('Show the number of historical event records grouped by time and type'),
'label' => $this->translate('Timeline'),
'url' => Url::fromRequest()
)
)->activate('timeline');
$this->view->title = $this->translate('Timeline');
// TODO: filter for hard_states (precedence adjustments necessary!)
$this->setupIntervalBox();