1 <cd-modal [modalRef]=
"activeModal">
2 <ng-container class=
"modal-title"
3 i18n
>Create Namespace
</ng-container>
5 <ng-container class=
"modal-content">
6 <form name=
"namespaceForm"
8 [formGroup]=
"namespaceForm"
10 <div class=
"modal-body">
13 <div class=
"form-group row">
14 <label class=
"cd-col-form-label required"
17 <div class=
"cd-col-form-input">
18 <input class=
"form-control"
20 placeholder=
"Pool name..."
23 formControlName=
"pool"
24 *
ngIf=
"!poolPermission.read">
28 formControlName=
"pool"
29 *
ngIf=
"poolPermission.read">
30 <option *
ngIf=
"pools === null"
32 i18n
>Loading...
</option>
33 <option *
ngIf=
"pools !== null && pools.length === 0"
35 i18n
>-- No rbd pools available --
</option>
36 <option *
ngIf=
"pools !== null && pools.length > 0"
38 i18n
>-- Select a pool --
</option>
39 <option *
ngFor=
"let pool of pools"
40 [value]=
"pool.pool_name">{{ pool.pool_name }}
</option>
42 <span *
ngIf=
"namespaceForm.showError('pool', formDir, 'required')"
43 class=
"invalid-feedback"
44 i18n
>This field is required.
</span>
49 <div class=
"form-group row">
50 <label class=
"cd-col-form-label required"
53 <div class=
"cd-col-form-input">
54 <input class=
"form-control"
56 placeholder=
"Namespace name..."
59 formControlName=
"namespace"
61 <span class=
"invalid-feedback"
62 *
ngIf=
"namespaceForm.showError('namespace', formDir, 'required')"
63 i18n
>This field is required.
</span>
64 <span class=
"invalid-feedback"
65 *
ngIf=
"namespaceForm.showError('namespace', formDir, 'namespaceExists')"
66 i18n
>Namespace already exists.
</span>
72 <div class=
"modal-footer">
73 <cd-form-button-panel (submitActionEvent)=
"submit()"
74 [form]=
"namespaceForm"
75 [submitText]=
"actionLabels.CREATE"></cd-form-button-panel>