From: Stephan Müller Date: Tue, 7 Aug 2018 12:20:38 +0000 (+0200) Subject: mgr/dashboard: Fixes user roles X-Git-Tag: v14.0.1~96^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=525de6674dc13c27f48a2ac3b9e57a85e98e856f;p=ceph.git mgr/dashboard: Fixes user roles 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 --- 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,