monitoring: Call `hasBetterUrl()' in every list action

fixes #6679
This commit is contained in:
Eric Lippmann 2014-10-06 17:07:37 +02:00
parent 421263af00
commit 8a8ce49f73
1 changed files with 21 additions and 0 deletions

View File

@ -265,6 +265,9 @@ class Monitoring_ListController extends Controller
*/ */
public function downtimesAction() public function downtimesAction()
{ {
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('downtimes'); $this->addTitleTab('downtimes');
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('downtime', array( $query = $this->backend->select()->from('downtime', array(
@ -309,6 +312,9 @@ class Monitoring_ListController extends Controller
*/ */
public function notificationsAction() public function notificationsAction()
{ {
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('notifications'); $this->addTitleTab('notifications');
$this->setAutorefreshInterval(15); $this->setAutorefreshInterval(15);
$query = $this->backend->select()->from('notification', array( $query = $this->backend->select()->from('notification', array(
@ -328,6 +334,9 @@ class Monitoring_ListController extends Controller
public function contactsAction() public function contactsAction()
{ {
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('contacts'); $this->addTitleTab('contacts');
$query = $this->backend->select()->from('contact', array( $query = $this->backend->select()->from('contact', array(
'contact_name', 'contact_name',
@ -364,6 +373,9 @@ class Monitoring_ListController extends Controller
public function statehistorysummaryAction() public function statehistorysummaryAction()
{ {
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('statehistorysummary', 'State Summary'); $this->addTitleTab('statehistorysummary', 'State Summary');
$form = new StatehistoryForm(); $form = new StatehistoryForm();
@ -401,6 +413,9 @@ class Monitoring_ListController extends Controller
public function contactgroupsAction() public function contactgroupsAction()
{ {
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('contactgroups'); $this->addTitleTab('contactgroups');
$query = $this->backend->select()->from('contactgroup', array( $query = $this->backend->select()->from('contactgroup', array(
'contactgroup_name', 'contactgroup_name',
@ -430,6 +445,9 @@ class Monitoring_ListController extends Controller
public function commentsAction() public function commentsAction()
{ {
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('comments'); $this->addTitleTab('comments');
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('comment', array( $query = $this->backend->select()->from('comment', array(
@ -550,6 +568,9 @@ class Monitoring_ListController extends Controller
public function servicematrixAction() public function servicematrixAction()
{ {
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('servicematrix'); $this->addTitleTab('servicematrix');
$this->setAutorefreshInterval(15); $this->setAutorefreshInterval(15);
$query = $this->backend->select()->from('serviceStatus', array( $query = $this->backend->select()->from('serviceStatus', array(