Skip to content

Commit 34dea65

Browse files
authored
Merge pull request ceph#59703 from rhcs-dashboard/usermanagement-form
mgr/dashboard: carbonize user management form Reviewed-by: Afreen Misbah <[email protected]>
2 parents 34f0475 + 81023d9 commit 34dea65

File tree

9 files changed

+298
-276
lines changed

9 files changed

+298
-276
lines changed

src/pybind/mgr/dashboard/frontend/src/app/core/auth/auth.module.ts

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,57 @@ import { UserFormComponent } from './user-form/user-form.component';
1717
import { UserListComponent } from './user-list/user-list.component';
1818
import { UserPasswordFormComponent } from './user-password-form/user-password-form.component';
1919
import { UserTabsComponent } from './user-tabs/user-tabs.component';
20-
import { ButtonModule, GridModule, IconModule, InputModule } from 'carbon-components-angular';
20+
21+
import {
22+
ButtonModule,
23+
CheckboxModule,
24+
DatePickerModule,
25+
GridModule,
26+
IconModule,
27+
IconService,
28+
InputModule,
29+
ModalModule,
30+
NumberModule,
31+
RadioModule,
32+
SelectModule,
33+
UIShellModule,
34+
TimePickerModule,
35+
ComboBoxModule
36+
} from 'carbon-components-angular';
37+
// Icons
38+
import ChevronDown from '@carbon/icons/es/chevron--down/16';
39+
import Close from '@carbon/icons/es/close/32';
40+
import AddFilled from '@carbon/icons/es/add--filled/32';
41+
import SubtractFilled from '@carbon/icons/es/subtract--filled/32';
42+
import Reset from '@carbon/icons/es/reset/32';
43+
import EyeIcon from '@carbon/icons/es/view/16';
2144
@NgModule({
2245
imports: [
2346
CommonModule,
2447
FormsModule,
2548
ReactiveFormsModule,
2649
SharedModule,
50+
UIShellModule,
51+
InputModule,
52+
GridModule,
53+
ButtonModule,
54+
IconModule,
55+
CheckboxModule,
56+
RadioModule,
57+
SelectModule,
58+
NumberModule,
59+
ModalModule,
60+
DatePickerModule,
61+
TimePickerModule,
2762
NgbNavModule,
2863
NgbPopoverModule,
2964
NgxPipeFunctionModule,
3065
RouterModule,
3166
NgbModule,
3267
IconModule,
3368
GridModule,
34-
ButtonModule,
35-
InputModule
69+
InputModule,
70+
ComboBoxModule
3671
],
3772
declarations: [
3873
LoginComponent,
@@ -46,7 +81,11 @@ import { ButtonModule, GridModule, IconModule, InputModule } from 'carbon-compon
4681
UserPasswordFormComponent
4782
]
4883
})
49-
export class AuthModule {}
84+
export class AuthModule {
85+
constructor(private iconService: IconService) {
86+
this.iconService.registerAll([ChevronDown, Close, AddFilled, SubtractFilled, Reset, EyeIcon]);
87+
}
88+
}
5089

5190
const routes: Routes = [
5291
{ path: '', redirectTo: 'users', pathMatch: 'full' },

src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form-role.model.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ export class UserFormRoleModel implements SelectOption {
44
name: string;
55
description: string;
66
selected = false;
7-
scopes_permissions: object;
8-
enabled = true;
9-
10-
constructor(name: string, description: string) {
7+
scopes_permissions?: object;
8+
enabled: boolean;
9+
content: string;
10+
constructor(name: string, description: string, content: string) {
1111
this.name = name;
1212
this.description = description;
13+
this.content = content;
1314
}
1415
}

0 commit comments

Comments
 (0)