mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
GroupController: Behave nicely when not any backend is available
This commit is contained in:
parent
07041fafc8
commit
91cee3a957
@ -28,6 +28,10 @@ class GroupController extends AuthBackendController
|
|||||||
function ($b) { return $b->getName(); },
|
function ($b) { return $b->getName(); },
|
||||||
$this->loadUserGroupBackends('Icinga\Data\Selectable')
|
$this->loadUserGroupBackends('Icinga\Data\Selectable')
|
||||||
);
|
);
|
||||||
|
if (empty($backendNames)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->view->backendSelection = new Form();
|
$this->view->backendSelection = new Form();
|
||||||
$this->view->backendSelection->setAttrib('class', 'backend-selection');
|
$this->view->backendSelection->setAttrib('class', 'backend-selection');
|
||||||
$this->view->backendSelection->setUidDisabled();
|
$this->view->backendSelection->setUidDisabled();
|
||||||
|
@ -18,7 +18,7 @@ if (! $this->compact): ?>
|
|||||||
<div class="content groups">
|
<div class="content groups">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($backend === null) {
|
if (! isset($backend)) {
|
||||||
echo $this->translate('No backend found which is able to list groups') . '</div>';
|
echo $this->translate('No backend found which is able to list groups') . '</div>';
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user