1 <cd-modal [modalRef]="bsModalRef">
2 <ng-container i18n="form title|Example: Create Pool@@formTitle"
3 class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container>
5 <ng-container class="modal-content">
9 <div class="modal-body">
10 <div class="form-group row">
11 <label class="cd-col-form-label"
14 <div class="cd-col-form-input">
20 formControlName="name"
22 <span class="invalid-feedback"
23 *ngIf="form.showError('name', frm, 'required')"
24 i18n>This field is required!</span>
25 <span class="invalid-feedback"
26 *ngIf="form.showError('name', frm, 'pattern')"
27 i18n>The name can only consist of alphanumeric characters, dashes and underscores.</span>
28 <span class="invalid-feedback"
29 *ngIf="form.showError('name', frm, 'uniqueName')"
30 i18n>The chosen erasure code profile name is already in use.</span>
34 <div class="form-group row">
36 class="cd-col-form-label">
37 <span class="required"
39 <cd-helper [html]="tooltips.plugins[plugin].description">
42 <div class="cd-col-form-input">
43 <select class="form-control custom-select"
46 formControlName="plugin">
47 <option *ngIf="!plugins"
49 i18n>Loading...</option>
50 <option *ngFor="let plugin of plugins"
55 <span class="invalid-feedback"
56 *ngIf="form.showError('name', frm, 'required')"
57 i18n>This field is required!</span>
61 <div class="form-group row">
63 class="cd-col-form-label">
64 <span [ngClass]="{'required': requiredControls.includes('k')}"
65 i18n>Data chunks (k)</span>
66 <cd-helper [html]="tooltips.k">
69 <div class="cd-col-form-input">
74 ng-model="$ctrl.erasureCodeProfile.k"
75 placeholder="Data chunks..."
77 <span class="invalid-feedback"
78 *ngIf="form.showError('k', frm, 'required')"
79 i18n>This field is required!</span>
80 <span class="invalid-feedback"
81 *ngIf="form.showError('k', frm, 'min')"
82 i18n>Must be equal to or greater than 2.</span>
86 <div class="form-group row">
88 class="cd-col-form-label">
89 <span [ngClass]="{'required': requiredControls.includes('m')}"
90 i18n>Coding chunks (m)</span>
91 <cd-helper [html]="tooltips.m">
94 <div class="cd-col-form-input">
99 placeholder="Coding chunks..."
101 <span class="invalid-feedback"
102 *ngIf="form.showError('m', frm, 'required')"
103 i18n>This field is required!</span>
104 <span class="invalid-feedback"
105 *ngIf="form.showError('m', frm, 'min')"
106 i18n>Must be equal to or greater than 1.</span>
110 <div class="form-group row"
111 *ngIf="plugin === 'shec'">
113 class="cd-col-form-label">
114 <ng-container i18n>Durability estimator (c)</ng-container>
115 <cd-helper [html]="tooltips.plugins.shec.c">
118 <div class="cd-col-form-input">
123 placeholder="Coding chunks..."
125 <span class="invalid-feedback"
126 *ngIf="form.showError('c', frm, 'min')"
127 i18n>Must be equal to or greater than 1.</span>
131 <div class="form-group row"
132 *ngIf="plugin === PLUGIN.LRC">
133 <label class="cd-col-form-label"
135 <span class="required"
136 i18n>Locality (l)</span>
137 <cd-helper [html]="tooltips.plugins.lrc.l">
140 <div class="cd-col-form-input">
145 placeholder="Coding chunks..."
147 <span class="invalid-feedback"
148 *ngIf="form.showError('l', frm, 'required')"
149 i18n>This field is required!</span>
150 <span class="invalid-feedback"
151 *ngIf="form.showError('l', frm, 'min')"
152 i18n>Must be equal to or greater than 1.</span>
156 <div class="form-group row">
157 <label for="crushFailureDomain"
158 class="cd-col-form-label">
159 <ng-container i18n>Crush failure domain</ng-container>
160 <cd-helper [html]="tooltips.crushFailureDomain">
163 <div class="cd-col-form-input">
164 <select class="form-control custom-select"
165 id="crushFailureDomain"
166 name="crushFailureDomain"
167 formControlName="crushFailureDomain">
168 <option *ngIf="!failureDomains"
170 i18n>Loading...</option>
171 <option *ngFor="let domain of failureDomainKeys"
173 {{ domain }} ( {{failureDomains[domain].length}} )
179 <div class="form-group row"
180 *ngIf="plugin === PLUGIN.LRC">
181 <label for="crushLocality"
182 class="cd-col-form-label">
183 <ng-container i18n>Crush Locality</ng-container>
184 <cd-helper [html]="tooltips.plugins.lrc.crushLocality">
187 <div class="cd-col-form-input">
188 <select class="form-control custom-select"
191 formControlName="crushLocality">
192 <option *ngIf="!failureDomains"
194 i18n>Loading...</option>
195 <option *ngIf="failureDomainKeys.length > 0"
198 <option *ngFor="let domain of failureDomainKeys"
200 {{ domain }} ( {{failureDomains[domain].length}} )
206 <div class="form-group row"
207 *ngIf="[PLUGIN.JERASURE, PLUGIN.ISA].includes(plugin)">
208 <label for="technique"
209 class="cd-col-form-label">
210 <ng-container i18n>Technique</ng-container>
211 <cd-helper [html]="tooltips.plugins[plugin].technique">
214 <div class="cd-col-form-input">
215 <select class="form-control custom-select"
218 formControlName="technique">
219 <option *ngFor="let technique of techniques"
220 [ngValue]="technique">
227 <div class="form-group row"
228 *ngIf="plugin === PLUGIN.JERASURE">
229 <label for="packetSize"
230 class="cd-col-form-label">
231 <ng-container i18n>Packetsize</ng-container>
232 <cd-helper [html]="tooltips.plugins.jerasure.packetSize">
235 <div class="cd-col-form-input">
240 placeholder="Packetsize..."
241 formControlName="packetSize">
242 <span class="invalid-feedback"
243 *ngIf="form.showError('packetSize', frm, 'min')"
244 i18n>Must be equal to or greater than 1.</span>
248 <div class="form-group row">
249 <label for="crushRoot"
250 class="cd-col-form-label">
251 <ng-container i18n>Crush root</ng-container>
252 <cd-helper [html]="tooltips.crushRoot">
255 <div class="cd-col-form-input">
256 <select class="form-control custom-select"
259 formControlName="crushRoot">
260 <option *ngIf="!buckets"
262 i18n>Loading...</option>
263 <option *ngFor="let bucket of buckets"
271 <div class="form-group row">
272 <label for="crushDeviceClass"
273 class="cd-col-form-label">
274 <ng-container i18n>Crush device class</ng-container>
275 <cd-helper [html]="tooltips.crushDeviceClass">
278 <div class="cd-col-form-input">
279 <select class="form-control custom-select"
280 id="crushDeviceClass"
281 name="crushDeviceClass"
282 formControlName="crushDeviceClass">
284 i18n>Let Ceph decide</option>
285 <option *ngFor="let deviceClass of devices"
286 [ngValue]="deviceClass">
290 <span class="form-text text-muted"
291 i18n>Available OSDs: {{deviceCount}}</span>
295 <div class="form-group row">
296 <label for="directory"
297 class="cd-col-form-label">
298 <ng-container i18n>Directory</ng-container>
299 <cd-helper [html]="tooltips.directory">
302 <div class="cd-col-form-input">
307 placeholder="Path..."
308 formControlName="directory">
313 <div class="modal-footer">
314 <cd-submit-button (submitAction)="onSubmit()"
315 i18n="form action button|Example: Create Pool@@formActionButton"
316 [form]="frm">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
317 <cd-back-button [back]="bsModalRef.hide"></cd-back-button>