From 525de6674dc13c27f48a2ac3b9e57a85e98e856f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Tue, 7 Aug 2018 14:20:38 +0200 Subject: [PATCH] mgr/dashboard: Fixes user roles MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Due to changes in the badges component, user roles had to be amended. Fixes: https://tracker.ceph.com/issues/36357 Signed-off-by: Stephan Müller --- .../src/app/core/auth/user-form/user-form-role.model.ts | 2 ++ .../src/app/core/auth/user-form/user-form.component.html | 5 +++-- .../src/app/core/auth/user-form/user-form.component.ts | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form-role.model.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form-role.model.ts index 6f3ce000a06..28caa3f9dae 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form-role.model.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form-role.model.ts @@ -1,3 +1,5 @@ +import { SelectBadgesOption } from '../../../shared/components/select-badges/select-badges-option.model'; + export class UserFormRoleModel implements SelectBadgesOption { name: string; description: string; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html index 8639cd6e648..254747b3d2c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html @@ -146,10 +146,11 @@ i18n>Roles
- + + [messages]="messages">
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts index 1b323f68e8c..4bbaab03b0a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts @@ -9,6 +9,7 @@ import { AuthService } from '../../../shared/api/auth.service'; import { RoleService } from '../../../shared/api/role.service'; import { UserService } from '../../../shared/api/user.service'; import { ConfirmationModalComponent } from '../../../shared/components/confirmation-modal/confirmation-modal.component'; +import { SelectBadgesMessages } from '../../../shared/components/select-badges/select-badges-messages.model'; import { NotificationType } from '../../../shared/enum/notification-type.enum'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; import { CdValidators } from '../../../shared/forms/cd-validators'; @@ -35,6 +36,7 @@ export class UserFormComponent implements OnInit { userFormMode = UserFormMode; mode: UserFormMode; allRoles: Array; + messages = new SelectBadgesMessages({ empty: 'There are no roles.' }); constructor( private authService: AuthService, -- 2.39.5