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 class="required"
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>
83 <span class="invalid-feedback"
84 *ngIf="form.showError('k', frm, 'max')"
85 i18n>Chunks (k+m) have exceeded the available OSDs of {{deviceCount}}.</span>
86 <span class="invalid-feedback"
87 *ngIf="form.showError('k', frm, 'unequal')"
88 i18n>For an equal distribution k has to be a multiple of (k+m)/l.</span>
89 <span class="invalid-feedback"
90 *ngIf="form.showError('k', frm, 'kLowerM')"
91 i18n>K has to be equal to or greater than m in order to recover data correctly through c.</span>
92 <span *ngIf="plugin === 'lrc'"
93 class="form-text text-muted"
94 i18n>Distribution factor: {{lrcMultiK}}</span>
98 <div class="form-group row">
100 class="cd-col-form-label">
101 <span class="required"
102 i18n>Coding chunks (m)</span>
103 <cd-helper [html]="tooltips.m">
106 <div class="cd-col-form-input">
111 placeholder="Coding chunks..."
113 <span class="invalid-feedback"
114 *ngIf="form.showError('m', frm, 'required')"
115 i18n>This field is required!</span>
116 <span class="invalid-feedback"
117 *ngIf="form.showError('m', frm, 'min')"
118 i18n>Must be equal to or greater than 1.</span>
119 <span class="invalid-feedback"
120 *ngIf="form.showError('m', frm, 'max')"
121 i18n>Chunks (k+m) have exceeded the available OSDs of {{deviceCount}}.</span>
125 <div class="form-group row"
126 *ngIf="plugin === 'shec'">
128 class="cd-col-form-label">
129 <span class="required"
130 i18n>Durability estimator (c)</span>
131 <cd-helper [html]="tooltips.plugins.shec.c">
134 <div class="cd-col-form-input">
139 placeholder="Coding chunks..."
141 <span class="invalid-feedback"
142 *ngIf="form.showError('c', frm, 'min')"
143 i18n>Must be equal to or greater than 1.</span>
144 <span class="invalid-feedback"
145 *ngIf="form.showError('c', frm, 'cGreaterM')"
146 i18n>C has to be equal to or lower than m as m defines the amount of chunks that can be used.</span>
150 <div class="form-group row"
151 *ngIf="plugin === PLUGIN.LRC">
152 <label class="cd-col-form-label"
154 <span class="required"
155 i18n>Locality (l)</span>
156 <cd-helper [html]="tooltips.plugins.lrc.l">
159 <div class="cd-col-form-input">
164 placeholder="Coding chunks..."
166 <span class="invalid-feedback"
167 *ngIf="form.showError('l', frm, 'required')"
168 i18n>This field is required!</span>
169 <span class="invalid-feedback"
170 *ngIf="form.showError('l', frm, 'min')"
171 i18n>Must be equal to or greater than 1.</span>
172 <span class="invalid-feedback"
173 *ngIf="form.showError('l', frm, 'unequal')"
174 i18n>Can't split up chunks (k+m) correctly with the current locality.</span>
175 <span class="form-text text-muted"
176 i18n>Locality groups: {{lrcGroups}}</span>
180 <div class="form-group row">
181 <label for="crushFailureDomain"
182 class="cd-col-form-label">
183 <ng-container i18n>Crush failure domain</ng-container>
184 <cd-helper [html]="tooltips.crushFailureDomain">
187 <div class="cd-col-form-input">
188 <select class="form-control custom-select"
189 id="crushFailureDomain"
190 name="crushFailureDomain"
191 formControlName="crushFailureDomain">
192 <option *ngIf="!failureDomains"
194 i18n>Loading...</option>
195 <option *ngFor="let domain of failureDomainKeys"
197 {{ domain }} ( {{failureDomains[domain].length}} )
203 <div class="form-group row"
204 *ngIf="plugin === PLUGIN.LRC">
205 <label for="crushLocality"
206 class="cd-col-form-label">
207 <ng-container i18n>Crush Locality</ng-container>
208 <cd-helper [html]="tooltips.plugins.lrc.crushLocality">
211 <div class="cd-col-form-input">
212 <select class="form-control custom-select"
215 formControlName="crushLocality">
216 <option *ngIf="!failureDomains"
218 i18n>Loading...</option>
219 <option *ngIf="failureDomainKeys.length > 0"
222 <option *ngFor="let domain of failureDomainKeys"
224 {{ domain }} ( {{failureDomains[domain].length}} )
230 <div class="form-group row"
231 *ngIf="[PLUGIN.JERASURE, PLUGIN.ISA].includes(plugin)">
232 <label for="technique"
233 class="cd-col-form-label">
234 <ng-container i18n>Technique</ng-container>
235 <cd-helper [html]="tooltips.plugins[plugin].technique">
238 <div class="cd-col-form-input">
239 <select class="form-control custom-select"
242 formControlName="technique">
243 <option *ngFor="let technique of techniques"
244 [ngValue]="technique">
251 <div class="form-group row"
252 *ngIf="plugin === PLUGIN.JERASURE">
253 <label for="packetSize"
254 class="cd-col-form-label">
255 <ng-container i18n>Packetsize</ng-container>
256 <cd-helper [html]="tooltips.plugins.jerasure.packetSize">
259 <div class="cd-col-form-input">
264 placeholder="Packetsize..."
265 formControlName="packetSize">
266 <span class="invalid-feedback"
267 *ngIf="form.showError('packetSize', frm, 'min')"
268 i18n>Must be equal to or greater than 1.</span>
272 <div class="form-group row">
273 <label for="crushRoot"
274 class="cd-col-form-label">
275 <ng-container i18n>Crush root</ng-container>
276 <cd-helper [html]="tooltips.crushRoot">
279 <div class="cd-col-form-input">
280 <select class="form-control custom-select"
283 formControlName="crushRoot">
284 <option *ngIf="!buckets"
286 i18n>Loading...</option>
287 <option *ngFor="let bucket of buckets"
295 <div class="form-group row">
296 <label for="crushDeviceClass"
297 class="cd-col-form-label">
298 <ng-container i18n>Crush device class</ng-container>
299 <cd-helper [html]="tooltips.crushDeviceClass">
302 <div class="cd-col-form-input">
303 <select class="form-control custom-select"
304 id="crushDeviceClass"
305 name="crushDeviceClass"
306 formControlName="crushDeviceClass">
308 i18n>Let Ceph decide</option>
309 <option *ngFor="let deviceClass of devices"
310 [ngValue]="deviceClass">
314 <span class="form-text text-muted"
315 i18n>Available OSDs: {{deviceCount}}</span>
319 <div class="form-group row">
320 <label for="directory"
321 class="cd-col-form-label">
322 <ng-container i18n>Directory</ng-container>
323 <cd-helper [html]="tooltips.directory">
326 <div class="cd-col-form-input">
331 placeholder="Path..."
332 formControlName="directory">
337 <div class="modal-footer">
338 <cd-submit-button (submitAction)="onSubmit()"
339 i18n="form action button|Example: Create Pool@@formActionButton"
340 [form]="frm">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
341 <cd-back-button [back]="bsModalRef.hide"></cd-back-button>