1 <cd-modal [modalRef]=
"activeModal">
2 <ng-container i18n=
"form title"
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..."
78 <span class=
"invalid-feedback"
79 *
ngIf=
"form.showError('k', frm, 'required')"
80 i18n
>This field is required!
</span>
81 <span class=
"invalid-feedback"
82 *
ngIf=
"form.showError('k', frm, 'min')"
83 i18n
>Must be equal to or greater than
2.
</span>
84 <span class=
"invalid-feedback"
85 *
ngIf=
"form.showError('k', frm, 'max')"
86 i18n
>Chunks (k+m) have exceeded the available OSDs of {{deviceCount}}.
</span>
87 <span class=
"invalid-feedback"
88 *
ngIf=
"form.showError('k', frm, 'unequal')"
89 i18n
>For an equal distribution k has to be a multiple of (k+m)/l.
</span>
90 <span class=
"invalid-feedback"
91 *
ngIf=
"form.showError('k', frm, 'kLowerM')"
92 i18n
>K has to be equal to or greater than m in order to recover data correctly through c.
</span>
93 <span *
ngIf=
"plugin === 'lrc'"
94 class=
"form-text text-muted"
95 i18n
>Distribution factor: {{lrcMultiK}}
</span>
99 <div class=
"form-group row">
101 class=
"cd-col-form-label">
102 <span class=
"required"
103 i18n
>Coding chunks (m)
</span>
104 <cd-helper [html]=
"tooltips.m">
107 <div class=
"cd-col-form-input">
112 placeholder=
"Coding chunks..."
115 <span class=
"invalid-feedback"
116 *
ngIf=
"form.showError('m', frm, 'required')"
117 i18n
>This field is required!
</span>
118 <span class=
"invalid-feedback"
119 *
ngIf=
"form.showError('m', frm, 'min')"
120 i18n
>Must be equal to or greater than
1.
</span>
121 <span class=
"invalid-feedback"
122 *
ngIf=
"form.showError('m', frm, 'max')"
123 i18n
>Chunks (k+m) have exceeded the available OSDs of {{deviceCount}}.
</span>
127 <div class=
"form-group row"
128 *
ngIf=
"plugin === 'shec'">
130 class=
"cd-col-form-label">
131 <span class=
"required"
132 i18n
>Durability estimator (c)
</span>
133 <cd-helper [html]=
"tooltips.plugins.shec.c">
136 <div class=
"cd-col-form-input">
141 placeholder=
"Coding chunks..."
144 <span class=
"invalid-feedback"
145 *
ngIf=
"form.showError('c', frm, 'min')"
146 i18n
>Must be equal to or greater than
1.
</span>
147 <span class=
"invalid-feedback"
148 *
ngIf=
"form.showError('c', frm, 'cGreaterM')"
149 i18n
>C has to be equal to or lower than m as m defines the amount of chunks that can be used.
</span>
153 <div class=
"form-group row"
154 *
ngIf=
"plugin === 'clay'">
156 class=
"cd-col-form-label">
157 <span class=
"required"
158 i18n
>Helper chunks (d)
</span>
159 <cd-helper [html]=
"tooltips.plugins.clay.d">
162 <div class=
"cd-col-form-input">
163 <div class=
"input-group">
168 placeholder=
"Helper chunks..."
170 <span class=
"input-group-append">
171 <button class=
"btn btn-light"
173 ngbTooltip=
"Set d manually or use the plugin's default calculation that maximizes d."
176 (click)=
"toggleDCalc()">
177 <i [ngClass]=
"dCalc ? icons.unlock : icons.lock"
178 aria-hidden=
"true"></i>
182 <span class=
"form-text text-muted"
184 i18n
>D is automatically updated on k and m changes
</span>
187 <span class=
"form-text text-muted"
188 *
ngIf=
"getDMin() < getDMax()"
189 i18n
>D can be set from {{getDMin()}} to {{getDMax()}}
</span>
190 <span class=
"form-text text-muted"
191 *
ngIf=
"getDMin() === getDMax()"
192 i18n
>D can only be set to {{getDMax()}}
</span>
194 <span class=
"invalid-feedback"
195 *
ngIf=
"form.showError('d', frm, 'dMin')"
196 i18n
>D has to be greater than k ({{getDMin()}}).
</span>
197 <span class=
"invalid-feedback"
198 *
ngIf=
"form.showError('d', frm, 'dMax')"
199 i18n
>D has to be lower than k + m ({{getDMax()}}).
</span>
203 <div class=
"form-group row"
204 *
ngIf=
"plugin === PLUGIN.LRC">
205 <label class=
"cd-col-form-label"
207 <span class=
"required"
208 i18n
>Locality (l)
</span>
209 <cd-helper [html]=
"tooltips.plugins.lrc.l">
212 <div class=
"cd-col-form-input">
217 placeholder=
"Coding chunks..."
220 <span class=
"invalid-feedback"
221 *
ngIf=
"form.showError('l', frm, 'required')"
222 i18n
>This field is required!
</span>
223 <span class=
"invalid-feedback"
224 *
ngIf=
"form.showError('l', frm, 'min')"
225 i18n
>Must be equal to or greater than
1.
</span>
226 <span class=
"invalid-feedback"
227 *
ngIf=
"form.showError('l', frm, 'unequal')"
228 i18n
>Can't split up chunks (k+m) correctly with the current locality.
</span>
229 <span class=
"form-text text-muted"
230 i18n
>Locality groups: {{lrcGroups}}
</span>
234 <div class=
"form-group row">
235 <label for=
"crushFailureDomain"
236 class=
"cd-col-form-label">
237 <ng-container i18n
>Crush failure domain
</ng-container>
238 <cd-helper [html]=
"tooltips.crushFailureDomain">
241 <div class=
"cd-col-form-input">
242 <select class=
"form-control custom-select"
243 id=
"crushFailureDomain"
244 name=
"crushFailureDomain"
245 formControlName=
"crushFailureDomain">
246 <option *
ngIf=
"!failureDomains"
248 i18n
>Loading...
</option>
249 <option *
ngFor=
"let domain of failureDomainKeys"
251 {{ domain }} ( {{failureDomains[domain].length}} )
257 <div class=
"form-group row"
258 *
ngIf=
"plugin === PLUGIN.LRC">
259 <label for=
"crushLocality"
260 class=
"cd-col-form-label">
261 <ng-container i18n
>Crush Locality
</ng-container>
262 <cd-helper [html]=
"tooltips.plugins.lrc.crushLocality">
265 <div class=
"cd-col-form-input">
266 <select class=
"form-control custom-select"
269 formControlName=
"crushLocality">
270 <option *
ngIf=
"!failureDomains"
272 i18n
>Loading...
</option>
273 <option *
ngIf=
"failureDomainKeys.length > 0"
276 <option *
ngFor=
"let domain of failureDomainKeys"
278 {{ domain }} ( {{failureDomains[domain].length}} )
284 <div class=
"form-group row"
285 *
ngIf=
"PLUGIN.CLAY === plugin">
286 <label for=
"scalar_mds"
287 class=
"cd-col-form-label">
288 <ng-container i18n
>Scalar mds
</ng-container>
289 <cd-helper [html]=
"tooltips.plugins.clay.scalar_mds">
292 <div class=
"cd-col-form-input">
293 <select class=
"form-control custom-select"
296 formControlName=
"scalar_mds">
297 <option *
ngFor=
"let plugin of [PLUGIN.JERASURE, PLUGIN.ISA, PLUGIN.SHEC]"
305 <div class=
"form-group row"
306 *
ngIf=
"[PLUGIN.JERASURE, PLUGIN.ISA, PLUGIN.CLAY].includes(plugin)">
307 <label for=
"technique"
308 class=
"cd-col-form-label">
309 <ng-container i18n
>Technique
</ng-container>
310 <cd-helper [html]=
"tooltips.plugins[plugin].technique">
313 <div class=
"cd-col-form-input">
314 <select class=
"form-control custom-select"
317 formControlName=
"technique">
318 <option *
ngFor=
"let technique of techniques"
319 [ngValue]=
"technique">
326 <div class=
"form-group row"
327 *
ngIf=
"plugin === PLUGIN.JERASURE">
328 <label for=
"packetSize"
329 class=
"cd-col-form-label">
330 <ng-container i18n
>Packetsize
</ng-container>
331 <cd-helper [html]=
"tooltips.plugins.jerasure.packetSize">
334 <div class=
"cd-col-form-input">
339 placeholder=
"Packetsize..."
340 formControlName=
"packetSize"
342 <span class=
"invalid-feedback"
343 *
ngIf=
"form.showError('packetSize', frm, 'min')"
344 i18n
>Must be equal to or greater than
1.
</span>
348 <div class=
"form-group row">
349 <label for=
"crushRoot"
350 class=
"cd-col-form-label">
351 <ng-container i18n
>Crush root
</ng-container>
352 <cd-helper [html]=
"tooltips.crushRoot">
355 <div class=
"cd-col-form-input">
356 <select class=
"form-control custom-select"
359 formControlName=
"crushRoot">
360 <option *
ngIf=
"!buckets"
362 i18n
>Loading...
</option>
363 <option *
ngFor=
"let bucket of buckets"
371 <div class=
"form-group row">
372 <label for=
"crushDeviceClass"
373 class=
"cd-col-form-label">
374 <ng-container i18n
>Crush device class
</ng-container>
375 <cd-helper [html]=
"tooltips.crushDeviceClass">
378 <div class=
"cd-col-form-input">
379 <select class=
"form-control custom-select"
380 id=
"crushDeviceClass"
381 name=
"crushDeviceClass"
382 formControlName=
"crushDeviceClass">
384 i18n
>Let Ceph decide
</option>
385 <option *
ngFor=
"let deviceClass of devices"
386 [ngValue]=
"deviceClass">
390 <span class=
"form-text text-muted"
391 i18n
>Available OSDs: {{deviceCount}}
</span>
395 <div class=
"form-group row">
396 <label for=
"directory"
397 class=
"cd-col-form-label">
398 <ng-container i18n
>Directory
</ng-container>
399 <cd-helper [html]=
"tooltips.directory">
402 <div class=
"cd-col-form-input">
407 placeholder=
"Path..."
408 formControlName=
"directory">
413 <div class=
"modal-footer">
414 <cd-form-button-panel (submitActionEvent)=
"onSubmit()"
416 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>