mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
Dashboard: show Health to admins only
This commit is contained in:
parent
c93657c42e
commit
8cec78a7c3
@ -45,10 +45,12 @@ class DashboardController extends ActionController
|
||||
$this->tabs()->add('main', [
|
||||
'label' => $this->translate('Overview'),
|
||||
'url' => 'director'
|
||||
])->add('health', [
|
||||
])->activate('main');
|
||||
if ($this->hasPermission('director/admin')) {
|
||||
$this->tabs()->add('health', [
|
||||
'label' => $this->translate('Health'),
|
||||
'url' => 'director/health'
|
||||
])->activate('main');
|
||||
]);
|
||||
$state = $this->getHealthState();
|
||||
if ($state->isProblem()) {
|
||||
$this->tabs()->get('health')->setTagParams([
|
||||
@ -56,6 +58,7 @@ class DashboardController extends ActionController
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cntDashboards = 0;
|
||||
foreach ($names as $name) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user