Skip to content

Commit

Permalink
monitoring: Call `hasBetterUrl()' in every list action
Browse files Browse the repository at this point in the history
fixes #6679
  • Loading branch information
lippserd committed Oct 6, 2014
1 parent 421263a commit 8a8ce49
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions modules/monitoring/application/controllers/ListController.php
Expand Up @@ -265,6 +265,9 @@ public function servicesAction()
*/
public function downtimesAction()
{
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('downtimes');
$this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('downtime', array(
Expand Down Expand Up @@ -309,6 +312,9 @@ public function downtimesAction()
*/
public function notificationsAction()
{
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('notifications');
$this->setAutorefreshInterval(15);
$query = $this->backend->select()->from('notification', array(
Expand All @@ -328,6 +334,9 @@ public function notificationsAction()

public function contactsAction()
{
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('contacts');
$query = $this->backend->select()->from('contact', array(
'contact_name',
Expand Down Expand Up @@ -364,6 +373,9 @@ public function contactsAction()

public function statehistorysummaryAction()
{
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('statehistorysummary', 'State Summary');

$form = new StatehistoryForm();
Expand Down Expand Up @@ -401,6 +413,9 @@ public function statehistorysummaryAction()

public function contactgroupsAction()
{
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('contactgroups');
$query = $this->backend->select()->from('contactgroup', array(
'contactgroup_name',
Expand Down Expand Up @@ -430,6 +445,9 @@ public function contactgroupsAction()

public function commentsAction()
{
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('comments');
$this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('comment', array(
Expand Down Expand Up @@ -550,6 +568,9 @@ public function eventhistoryAction()

public function servicematrixAction()
{
if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url);
}
$this->addTitleTab('servicematrix');
$this->setAutorefreshInterval(15);
$query = $this->backend->select()->from('serviceStatus', array(
Expand Down

0 comments on commit 8a8ce49

Please sign in to comment.