autorefreshIntervals and titles

This commit is contained in:
Thomas Gelf 2014-03-04 12:33:02 +00:00
parent f5d796255c
commit 0f0e4883d1
2 changed files with 9 additions and 3 deletions

View File

@ -77,7 +77,7 @@ class Monitoring_ListController extends MonitoringController
$this->view->grapher = Hook::get('grapher');
$this->createTabs();
$this->view->activeRowHref = $this->getParam('detail');
$this->view->compact = ($this->_request->getParam('view') === 'compact');
/*
$contextSwitch = $this->_helper->getHelper('DataFormatSwitch');
$contextSwitch = $this->_helper->getHelper('ContextSwitch');
@ -109,7 +109,7 @@ class Monitoring_ListController extends MonitoringController
'url' => Url::fromPath('monitoring/list/hosts')
))->activate('hosts');
header('X-Icinga-Refresh: 30');
$this->setAutorefreshInterval(10);
$this->view->title = 'Host Status';
$this->compactView = 'hosts-compact';
$dataview = HostStatusView::fromRequest(
@ -167,7 +167,7 @@ class Monitoring_ListController extends MonitoringController
'url' => Url::fromPath('monitoring/list/services')
))->activate('services');
$this->view->title = 'Service Status';
header('X-Icinga-Refresh: 30');
$this->setAutorefreshInterval(10);
$this->compactView = 'services-compact';
$query = $this->fetchServices();
$this->applyRestrictions($query);
@ -408,6 +408,7 @@ class Monitoring_ListController extends MonitoringController
public function eventhistoryAction()
{
$this->addTitleTab('eventhistory');
$dataview = EventHistoryView::fromRequest(
$this->getRequest(),
array(

View File

@ -74,6 +74,9 @@ class Monitoring_ShowController extends Controller
*/
public function serviceAction()
{
$this->setAutorefreshInterval(10);
$this->view->title = $this->view->object->service_description
. ' on ' . $this->view->object->host_name;
$this->getTabs()->activate('service');
$this->view->object->populate();
}
@ -83,7 +86,9 @@ class Monitoring_ShowController extends Controller
*/
public function hostAction()
{
$this->setAutorefreshInterval(10);
$this->getTabs()->activate('host');
$this->view->title = $this->view->object->host_name;
$this->view->object->populate();
}