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 === 'clay'">
153 class=
"cd-col-form-label">
154 <span class=
"required"
155 i18n
>Helper chunks (d)
</span>
156 <cd-helper [html]=
"tooltips.plugins.clay.d">
159 <div class=
"cd-col-form-input">
160 <div class=
"input-group">
165 placeholder=
"Helper chunks..."
167 <span class=
"input-group-append">
168 <button class=
"btn btn-light"
170 ngbTooltip=
"Set d manually or use the plugin's default calculation that maximizes d."
173 (click)=
"toggleDCalc()">
174 <i [ngClass]=
"dCalc ? icons.unlock : icons.lock"
175 aria-hidden=
"true"></i>
179 <span class=
"form-text text-muted"
181 i18n
>D is automatically updated on k and m changes
</span>
184 <span class=
"form-text text-muted"
185 *
ngIf=
"getDMin() < getDMax()"
186 i18n
>D can be set from {{getDMin()}} to {{getDMax()}}
</span>
187 <span class=
"form-text text-muted"
188 *
ngIf=
"getDMin() === getDMax()"
189 i18n
>D can only be set to {{getDMax()}}
</span>
191 <span class=
"invalid-feedback"
192 *
ngIf=
"form.showError('d', frm, 'dMin')"
193 i18n
>D has to be greater than k ({{getDMin()}}).
</span>
194 <span class=
"invalid-feedback"
195 *
ngIf=
"form.showError('d', frm, 'dMax')"
196 i18n
>D has to be lower than k + m ({{getDMax()}}).
</span>
200 <div class=
"form-group row"
201 *
ngIf=
"plugin === PLUGIN.LRC">
202 <label class=
"cd-col-form-label"
204 <span class=
"required"
205 i18n
>Locality (l)
</span>
206 <cd-helper [html]=
"tooltips.plugins.lrc.l">
209 <div class=
"cd-col-form-input">
214 placeholder=
"Coding chunks..."
216 <span class=
"invalid-feedback"
217 *
ngIf=
"form.showError('l', frm, 'required')"
218 i18n
>This field is required!
</span>
219 <span class=
"invalid-feedback"
220 *
ngIf=
"form.showError('l', frm, 'min')"
221 i18n
>Must be equal to or greater than
1.
</span>
222 <span class=
"invalid-feedback"
223 *
ngIf=
"form.showError('l', frm, 'unequal')"
224 i18n
>Can't split up chunks (k+m) correctly with the current locality.
</span>
225 <span class=
"form-text text-muted"
226 i18n
>Locality groups: {{lrcGroups}}
</span>
230 <div class=
"form-group row">
231 <label for=
"crushFailureDomain"
232 class=
"cd-col-form-label">
233 <ng-container i18n
>Crush failure domain
</ng-container>
234 <cd-helper [html]=
"tooltips.crushFailureDomain">
237 <div class=
"cd-col-form-input">
238 <select class=
"form-control custom-select"
239 id=
"crushFailureDomain"
240 name=
"crushFailureDomain"
241 formControlName=
"crushFailureDomain">
242 <option *
ngIf=
"!failureDomains"
244 i18n
>Loading...
</option>
245 <option *
ngFor=
"let domain of failureDomainKeys"
247 {{ domain }} ( {{failureDomains[domain].length}} )
253 <div class=
"form-group row"
254 *
ngIf=
"plugin === PLUGIN.LRC">
255 <label for=
"crushLocality"
256 class=
"cd-col-form-label">
257 <ng-container i18n
>Crush Locality
</ng-container>
258 <cd-helper [html]=
"tooltips.plugins.lrc.crushLocality">
261 <div class=
"cd-col-form-input">
262 <select class=
"form-control custom-select"
265 formControlName=
"crushLocality">
266 <option *
ngIf=
"!failureDomains"
268 i18n
>Loading...
</option>
269 <option *
ngIf=
"failureDomainKeys.length > 0"
272 <option *
ngFor=
"let domain of failureDomainKeys"
274 {{ domain }} ( {{failureDomains[domain].length}} )
280 <div class=
"form-group row"
281 *
ngIf=
"PLUGIN.CLAY === plugin">
282 <label for=
"scalar_mds"
283 class=
"cd-col-form-label">
284 <ng-container i18n
>Scalar mds
</ng-container>
285 <cd-helper [html]=
"tooltips.plugins.clay.scalar_mds">
288 <div class=
"cd-col-form-input">
289 <select class=
"form-control custom-select"
292 formControlName=
"scalar_mds">
293 <option *
ngFor=
"let plugin of [PLUGIN.JERASURE, PLUGIN.ISA, PLUGIN.SHEC]"
301 <div class=
"form-group row"
302 *
ngIf=
"[PLUGIN.JERASURE, PLUGIN.ISA, PLUGIN.CLAY].includes(plugin)">
303 <label for=
"technique"
304 class=
"cd-col-form-label">
305 <ng-container i18n
>Technique
</ng-container>
306 <cd-helper [html]=
"tooltips.plugins[plugin].technique">
309 <div class=
"cd-col-form-input">
310 <select class=
"form-control custom-select"
313 formControlName=
"technique">
314 <option *
ngFor=
"let technique of techniques"
315 [ngValue]=
"technique">
322 <div class=
"form-group row"
323 *
ngIf=
"plugin === PLUGIN.JERASURE">
324 <label for=
"packetSize"
325 class=
"cd-col-form-label">
326 <ng-container i18n
>Packetsize
</ng-container>
327 <cd-helper [html]=
"tooltips.plugins.jerasure.packetSize">
330 <div class=
"cd-col-form-input">
335 placeholder=
"Packetsize..."
336 formControlName=
"packetSize">
337 <span class=
"invalid-feedback"
338 *
ngIf=
"form.showError('packetSize', frm, 'min')"
339 i18n
>Must be equal to or greater than
1.
</span>
343 <div class=
"form-group row">
344 <label for=
"crushRoot"
345 class=
"cd-col-form-label">
346 <ng-container i18n
>Crush root
</ng-container>
347 <cd-helper [html]=
"tooltips.crushRoot">
350 <div class=
"cd-col-form-input">
351 <select class=
"form-control custom-select"
354 formControlName=
"crushRoot">
355 <option *
ngIf=
"!buckets"
357 i18n
>Loading...
</option>
358 <option *
ngFor=
"let bucket of buckets"
366 <div class=
"form-group row">
367 <label for=
"crushDeviceClass"
368 class=
"cd-col-form-label">
369 <ng-container i18n
>Crush device class
</ng-container>
370 <cd-helper [html]=
"tooltips.crushDeviceClass">
373 <div class=
"cd-col-form-input">
374 <select class=
"form-control custom-select"
375 id=
"crushDeviceClass"
376 name=
"crushDeviceClass"
377 formControlName=
"crushDeviceClass">
379 i18n
>Let Ceph decide
</option>
380 <option *
ngFor=
"let deviceClass of devices"
381 [ngValue]=
"deviceClass">
385 <span class=
"form-text text-muted"
386 i18n
>Available OSDs: {{deviceCount}}
</span>
390 <div class=
"form-group row">
391 <label for=
"directory"
392 class=
"cd-col-form-label">
393 <ng-container i18n
>Directory
</ng-container>
394 <cd-helper [html]=
"tooltips.directory">
397 <div class=
"cd-col-form-input">
402 placeholder=
"Path..."
403 formControlName=
"directory">
408 <div class=
"modal-footer">
409 <cd-submit-button (submitAction)=
"onSubmit()"
410 i18n=
"form action button|Example: Create Pool@@formActionButton"
411 [form]=
"frm">{{ action | titlecase }} {{ resource | upperFirst }}
</cd-submit-button>
412 <cd-back-button [back]=
"bsModalRef.hide"></cd-back-button>