1 <cd-modal [pageURL]="pageURL"
2 [modalRef]="activeModal">
3 <span class="modal-title"
4 i18n>{{ action | titlecase }} {{ resource | upperFirst }}</span>
5 <ng-container class="modal-content">
10 <div class="modal-body">
12 <div class="form-group row">
13 <label class="cd-col-form-label"
15 <span [ngClass]="{'required': !edit}"
18 <div class="cd-col-form-input">
22 formControlName="pool">
26 formControlName="pool">
27 <option *ngIf="rbdPools === null"
29 i18n>Loading...</option>
30 <option *ngIf="rbdPools && rbdPools.length === 0"
32 i18n>-- No block pools available --</option>
33 <option *ngIf="rbdPools && rbdPools.length > 0"
35 i18n>-- Select a pool --</option>
36 <option *ngFor="let pool of rbdPools"
37 [value]="pool.pool_name">{{ pool.pool_name }}</option>
40 An RBD application-enabled pool where the image will be created.
42 <span class="invalid-feedback"
43 *ngIf="nsForm.showError('pool', formDir, 'required')"
44 i18n>This field is required.</span>
47 <!-- Namespace Count -->
49 class="form-group row">
50 <label class="cd-col-form-label"
52 <span [ngClass]="{'required': !edit}"
53 i18n>Namespace Count</span>
55 <div class="cd-col-form-input">
57 formControlName="nsCount"
58 helperText="The number of namespaces to create"
60 [min]="MIN_NAMESPACE_CREATE"
61 [max]="MAX_NAMESPACE_CREATE"
62 [invalid]="nsForm.showError('nsCount', formDir, 'max') || nsForm.showError('nsCount', formDir, 'min') || nsForm.showError('nsCount', formDir, 'required')"
63 [invalidText]="nsForm.get('nsCount').hasError('required') ? requiredInvalidText: nsCountInvalidText"
64 size="sm"></cds-number>
68 <div class="form-group row">
69 <label class="cd-col-form-label"
71 <span [ngClass]="{'required': edit}"
72 i18n>Image Size</span>
74 <div class="cd-col-form-input">
75 <div class="input-group">
79 formControlName="image_size">
81 class="form-input form-select"
82 formControlName="unit">
83 <option *ngFor="let u of units"
87 <span class="invalid-feedback"
88 *ngIf="nsForm.showError('image_size', formDir, 'pattern')">
89 <ng-container i18n>Enter a positive integer.</ng-container>
91 <span class="invalid-feedback"
92 *ngIf="edit && nsForm.showError('image_size', formDir, 'required')">
93 <ng-container i18n>This field is required</ng-container>
95 <span class="invalid-feedback"
96 *ngIf="edit && invalidSizeError">
97 <ng-container i18n>Enter a value above than previous. A block device image can be expanded but not reduced.</ng-container>
103 <div class="modal-footer">
104 <div class="text-right">
105 <cd-form-button-panel (submitActionEvent)="onSubmit()"
107 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>