app: Set autorefresh intervals for some routes

This commit is contained in:
Johannes Meyer 2019-12-11 08:59:30 +01:00
parent 5e57ea7781
commit 8beb16e18e
17 changed files with 48 additions and 0 deletions

View file

@ -59,5 +59,7 @@ class CommentController extends Controller
$this->addControl($detail->getControl());
$this->addContent($detail);
$this->setAutorefreshInterval(10);
}
}

View file

@ -36,5 +36,7 @@ class CommentsController extends Controller
$this->addControl($filterControl);
$this->addContent(new CommentList($comments));
$this->setAutorefreshInterval(10);
}
}

View file

@ -44,6 +44,8 @@ class DowntimeController extends Controller
$this->addControl($downtimeDetail->getControl());
$this->addContent($downtimeDetail);
$this->setAutorefreshInterval(10);
}
protected function fetchCommandTargets()

View file

@ -36,5 +36,7 @@ class DowntimesController extends Controller
$this->addControl($filterControl);
$this->addContent(new DowntimeList($downtimes));
$this->setAutorefreshInterval(10);
}
}

View file

@ -61,10 +61,13 @@ class HostController extends Controller
if ($this->host->state->is_overdue) {
$this->controls->addAttributes(['class' => 'overdue']);
}
$this->addControl((new HostList([$this->host]))->setViewMode('minimal'));
$this->addControl(new QuickActions($this->host));
$this->addContent(new ObjectDetail($this->host));
$this->setAutorefreshInterval(10);
}
public function commentsAction()
@ -84,6 +87,8 @@ class HostController extends Controller
$this->addControl($limitControl);
$this->addContent(new CommentList($comments));
$this->setAutorefreshInterval(10);
}
public function downtimesAction()
@ -103,6 +108,8 @@ class HostController extends Controller
$this->addControl($limitControl);
$this->addContent(new DowntimeList($downtimes));
$this->setAutorefreshInterval(10);
}
public function historyAction()
@ -110,6 +117,7 @@ class HostController extends Controller
if ($this->host->state->is_overdue) {
$this->controls->addAttributes(['class' => 'overdue']);
}
$this->addControl((new HostList([$this->host]))->setViewMode('minimal'));
$db = $this->getDb();
@ -146,6 +154,7 @@ class HostController extends Controller
if ($this->host->state->is_overdue) {
$this->controls->addAttributes(['class' => 'overdue']);
}
$this->addControl((new HostList([$this->host]))->setViewMode('minimal'));
$db = $this->getDb();
@ -176,6 +185,8 @@ class HostController extends Controller
$this->addControl($limitControl);
$this->addContent($serviceList);
$this->setAutorefreshInterval(10);
}
protected function createTabs()

View file

@ -68,5 +68,7 @@ class HostgroupController extends Controller
$this->addControl($limitControl);
$this->addContent($hostList);
$this->setAutorefreshInterval(10);
}
}

View file

@ -31,5 +31,7 @@ class HostgroupsController extends Controller
$this->addContent(
(new HostgroupList($hostgroups))->setBaseFilter($this->getFilter())
);
$this->setAutorefreshInterval(30);
}
}

View file

@ -37,5 +37,7 @@ class HostsController extends Controller
$this->addControl($filterControl);
$this->addContent($hostList);
$this->setAutorefreshInterval(10);
}
}

View file

@ -36,5 +36,7 @@ class NotificationsController extends Controller
$this->addControl($filterControl);
$this->addContent(new NotificationList($notifications));
$this->setAutorefreshInterval(10);
}
}

View file

@ -72,6 +72,8 @@ class ServiceController extends Controller
$this->addControl(new QuickActions($this->service));
$this->addContent(new ObjectDetail($this->service));
$this->setAutorefreshInterval(10);
}
public function commentsAction()
@ -91,6 +93,8 @@ class ServiceController extends Controller
$this->addControl($limitControl);
$this->addContent(new CommentList($comments));
$this->setAutorefreshInterval(10);
}
public function downtimesAction()
@ -110,6 +114,8 @@ class ServiceController extends Controller
$this->addControl($limitControl);
$this->addContent(new DowntimeList($downtimes));
$this->setAutorefreshInterval(10);
}
public function historyAction()

View file

@ -38,6 +38,7 @@ class ServicegroupController extends Controller
$this->servicegroup = $servicegroup;
}
public function indexAction()
{
$this->addControl((new ServicegroupList([$this->servicegroup])));
@ -71,5 +72,7 @@ class ServicegroupController extends Controller
$this->addControl($limitControl);
$this->addContent($serviceList);
$this->setAutorefreshInterval(10);
}
}

View file

@ -31,5 +31,7 @@ class ServicegroupsController extends Controller
$this->addContent(
(new ServicegroupList($servicegroups))->setBaseFilter($this->getFilter())
);
$this->setAutorefreshInterval(30);
}
}

View file

@ -41,5 +41,7 @@ class ServicesController extends Controller
$this->addControl($filterControl);
$this->addContent($serviceList);
$this->setAutorefreshInterval(10);
}
}

View file

@ -61,5 +61,7 @@ class UserController extends Controller
)
])
]));
$this->setAutorefreshInterval(10);
}
}

View file

@ -43,5 +43,7 @@ class UsergroupController extends Controller
$this->addControl(new UsergroupList([$this->usergroup]));
$this->addContent(new UserList($this->usergroup->user));
$this->setAutorefreshInterval(10);
}
}

View file

@ -39,5 +39,7 @@ class UsergroupsController extends Controller
$this->addControl($filterControl);
$this->addContent(new UsergroupList($usergroups));
$this->setAutorefreshInterval(10);
}
}

View file

@ -39,5 +39,7 @@ class UsersController extends Controller
$this->addControl($filterControl);
$this->addContent(new UserList($users));
$this->setAutorefreshInterval(10);
}
}