1 <div class="modal-header">
2 <h4 i18n="form title|Example: Create Pool@@formTitle"
3 class="modal-title float-left">{{ action | titlecase }} {{ resource | upperFirst }}</h4>
6 class="close float-right"
8 (click)="bsModalRef.hide()">
9 <span aria-hidden="true">×</span>
16 <div class="modal-body">
17 <div class="form-group row">
19 class="col-form-label col-sm-3">
20 <ng-container i18n>Name</ng-container>
21 <span class="required"></span>
23 <div class="col-sm-9">
29 formControlName="name"
31 <span class="invalid-feedback"
32 *ngIf="form.showError('name', frm, 'required')"
33 i18n>This field is required!</span>
34 <span class="invalid-feedback"
35 *ngIf="form.showError('name', frm, 'pattern')"
36 i18n>The name can only consist of alphanumeric characters, dashes and underscores.</span>
37 <span class="invalid-feedback"
38 *ngIf="form.showError('name', frm, 'uniqueName')"
39 i18n>The chosen erasure code profile name is already in use.</span>
43 <div class="form-group row">
45 class="col-form-label col-sm-3">
46 <ng-container i18n>Plugin</ng-container>
47 <span class="required"></span>
48 <cd-helper [html]="tooltips.plugins[plugin].description">
51 <div class="col-sm-9">
52 <select class="form-control"
55 formControlName="plugin">
56 <option *ngIf="!plugins"
58 i18n>Loading...</option>
59 <option *ngFor="let plugin of plugins"
64 <span class="invalid-feedback"
65 *ngIf="form.showError('name', frm, 'required')"
66 i18n>This field is required!</span>
70 <div class="form-group row">
72 class="col-form-label col-sm-3">
73 <ng-container i18n>Data chunks (k)</ng-container>
74 <span class="required"
75 *ngIf="requiredControls.includes('k')"></span>
76 <cd-helper [html]="tooltips.k">
79 <div class="col-sm-9">
84 ng-model="$ctrl.erasureCodeProfile.k"
85 placeholder="Data chunks..."
87 <span class="invalid-feedback"
88 *ngIf="form.showError('k', frm, 'required')"
89 i18n>This field is required!</span>
90 <span class="invalid-feedback"
91 *ngIf="form.showError('k', frm, 'min')"
92 i18n>Must be equal to or greater than 2.</span>
96 <div class="form-group row">
98 class="col-form-label col-sm-3">
99 <ng-container i18n>Coding chunks (m)</ng-container>
100 <span class="required"
101 *ngIf="requiredControls.includes('m')"></span>
102 <cd-helper [html]="tooltips.m">
105 <div class="col-sm-9">
110 placeholder="Coding chunks..."
112 <span class="invalid-feedback"
113 *ngIf="form.showError('m', frm, 'required')"
114 i18n>This field is required!</span>
115 <span class="invalid-feedback"
116 *ngIf="form.showError('m', frm, 'min')"
117 i18n>Must be equal to or greater than 1.</span>
121 <div class="form-group row"
122 *ngIf="plugin === 'shec'">
124 class="col-form-label col-sm-3">
125 <ng-container i18n>Durability estimator (c)</ng-container>
126 <cd-helper [html]="tooltips.plugins.shec.c">
129 <div class="col-sm-9">
134 placeholder="Coding chunks..."
136 <span class="invalid-feedback"
137 *ngIf="form.showError('c', frm, 'min')"
138 i18n>Must be equal to or greater than 1.</span>
142 <div class="form-group row"
143 *ngIf="plugin === PLUGIN.LRC">
145 class="col-form-label col-sm-3">
146 <ng-container i18n>Locality (l)</ng-container>
147 <span class="required"></span>
148 <cd-helper [html]="tooltips.plugins.lrc.l">
151 <div class="col-sm-9">
156 placeholder="Coding chunks..."
158 <span class="invalid-feedback"
159 *ngIf="form.showError('l', frm, 'required')"
160 i18n>This field is required!</span>
161 <span class="invalid-feedback"
162 *ngIf="form.showError('l', frm, 'min')"
163 i18n>Must be equal to or greater than 1.</span>
167 <div class="form-group row">
168 <label for="crushFailureDomain"
169 class="col-form-label col-sm-3">
170 <ng-container i18n>Crush failure domain</ng-container>
171 <cd-helper [html]="tooltips.crushFailureDomain">
174 <div class="col-sm-9">
175 <select class="form-control"
176 id="crushFailureDomain"
177 name="crushFailureDomain"
178 formControlName="crushFailureDomain">
179 <option *ngIf="!failureDomains"
181 i18n>Loading...</option>
182 <option *ngFor="let domain of failureDomains"
190 <div class="form-group row"
191 *ngIf="plugin === PLUGIN.LRC">
192 <label for="crushLocality"
193 class="col-form-label col-sm-3">
194 <ng-container i18n>Crush Locality</ng-container>
195 <cd-helper [html]="tooltips.plugins.lrc.crushLocality">
198 <div class="col-sm-9">
199 <select class="form-control"
202 formControlName="crushLocality">
203 <option *ngIf="!failureDomains"
205 i18n>Loading...</option>
206 <option *ngIf="failureDomains && failureDomains.length > 0"
209 <option *ngFor="let domain of failureDomains"
217 <div class="form-group row"
218 *ngIf="[PLUGIN.JERASURE, PLUGIN.ISA].includes(plugin)">
219 <label for="technique"
220 class="col-form-label col-sm-3">
221 <ng-container i18n>Technique</ng-container>
222 <cd-helper [html]="tooltips.plugins[plugin].technique">
225 <div class="col-sm-9">
226 <select class="form-control"
229 formControlName="technique">
230 <option *ngFor="let technique of techniques"
231 [ngValue]="technique">
238 <div class="form-group row"
239 *ngIf="plugin === PLUGIN.JERASURE">
240 <label for="packetSize"
241 class="col-form-label col-sm-3">
242 <ng-container i18n>Packetsize</ng-container>
243 <cd-helper [html]="tooltips.plugins.jerasure.packetSize">
246 <div class="col-sm-9">
251 placeholder="Packetsize..."
252 formControlName="packetSize">
253 <span class="invalid-feedback"
254 *ngIf="form.showError('packetSize', frm, 'min')"
255 i18n>Must be equal to or greater than 1.</span>
259 <div class="form-group row">
260 <label for="crushRoot"
261 class="col-form-label col-sm-3">
262 <ng-container i18n>Crush root</ng-container>
263 <cd-helper [html]="tooltips.crushRoot">
266 <div class="col-sm-9">
271 placeholder="root..."
272 formControlName="crushRoot">
276 <div class="form-group row">
277 <label for="crushDeviceClass"
278 class="col-form-label col-sm-3">
279 <ng-container i18n>Crush device class</ng-container>
280 <cd-helper [html]="tooltips.crushDeviceClass">
283 <div class="col-sm-9">
284 <select class="form-control"
285 id="crushDeviceClass"
286 name="crushDeviceClass"
287 formControlName="crushDeviceClass">
290 <option *ngFor="let deviceClass of devices"
291 [ngValue]="deviceClass">
298 <div class="form-group row">
299 <label for="directory"
300 class="col-form-label col-sm-3">
301 <ng-container i18n>Directory</ng-container>
302 <cd-helper [html]="tooltips.directory">
305 <div class="col-sm-9">
310 placeholder="Path..."
311 formControlName="directory">
316 <div class="modal-footer">
317 <cd-submit-button (submitAction)="onSubmit()"
318 i18n="form action button|Example: Create Pool@@formActionButton"
319 [form]="frm">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
320 <cd-back-button [back]="bsModalRef.hide"></cd-back-button>