1 <div class=
"cd-col-form">
7 <div i18n=
"form title|Example: Create Pool@@formTitle"
8 class=
"card-header">{{ action | titlecase }} {{ resource | upperFirst }}
</div>
10 <div class=
"card-body">
12 <div class=
"form-group row"
13 *
ngIf=
"!isDefaultCluster">
14 <label class=
"cd-col-form-label required"
17 <div class=
"cd-col-form-input">
18 <select class=
"form-control custom-select"
19 formControlName=
"cluster_id"
22 (change)=
"onClusterChange()">
23 <option *
ngIf=
"allClusters === null"
25 i18n
>Loading...
</option>
26 <option *
ngIf=
"allClusters !== null && allClusters.length === 0"
28 i18n
>-- No cluster available --
</option>
29 <option *
ngIf=
"allClusters !== null && allClusters.length > 0"
31 i18n
>-- Select the cluster --
</option>
32 <option *
ngFor=
"let cluster of allClusters"
33 [value]=
"cluster">{{ cluster }}
</option>
35 <span class=
"invalid-feedback"
36 *
ngIf=
"nfsForm.showError('cluster_id', formDir, 'required')"
37 i18n
>This field is required.
</span>
42 <div class=
"form-group row">
43 <label class=
"cd-col-form-label"
45 <ng-container i18n
>Daemons
</ng-container>
47 <div class=
"cd-col-form-input">
48 <ng-container *
ngFor=
"let daemon of nfsForm.getValue('daemons'); let i = index">
49 <div class=
"input-group cd-mb">
50 <input class=
"cd-form-control"
54 <span class=
"input-group-append">
55 <button class=
"btn btn-light"
57 (click)=
"removeDaemon(i, daemon)">
58 <i [ngClass]=
"[icons.destroy]"
59 aria-hidden=
"true"></i>
66 <div class=
"col-md-12">
67 <cd-select [data]=
"nfsForm.get('daemons').value"
68 [options]=
"daemonsSelections"
69 [messages]=
"daemonsMessages"
70 (selection)=
"onDaemonSelection()"
71 elemClass=
"btn btn-light float-right">
72 <i [ngClass]=
"[icons.add]"></i>
73 <ng-container i18n
>Add daemon
</ng-container>
81 <div formGroupName=
"fsal">
83 <div class=
"form-group row">
84 <label class=
"cd-col-form-label required"
86 i18n
>Storage Backend
</label>
87 <div class=
"cd-col-form-input">
88 <select class=
"form-control custom-select"
89 formControlName=
"name"
92 (change)=
"fsalChangeHandler()">
93 <option *
ngIf=
"allFsals === null"
95 i18n
>Loading...
</option>
96 <option *
ngIf=
"allFsals !== null && allFsals.length === 0"
98 i18n
>-- No data pools available --
</option>
99 <option *
ngIf=
"allFsals !== null && allFsals.length > 0"
101 i18n
>-- Select the storage backend --
</option>
102 <option *
ngFor=
"let fsal of allFsals"
103 [value]=
"fsal.value">{{ fsal.descr }}
</option>
105 <span class=
"invalid-feedback"
106 *
ngIf=
"nfsForm.showError('name', formDir, 'required')"
107 i18n
>This field is required.
</span>
112 <div class=
"form-group row"
113 *
ngIf=
"nfsForm.getValue('name') === 'RGW'">
114 <label class=
"cd-col-form-label required"
116 i18n
>Object Gateway User
</label>
117 <div class=
"cd-col-form-input">
118 <select class=
"form-control custom-select"
119 formControlName=
"rgw_user_id"
122 (change)=
"rgwUserIdChangeHandler()">
123 <option *
ngIf=
"allRgwUsers === null"
125 i18n
>Loading...
</option>
126 <option *
ngIf=
"allRgwUsers !== null && allRgwUsers.length === 0"
128 i18n
>-- No users available --
</option>
129 <option *
ngIf=
"allRgwUsers !== null && allRgwUsers.length > 0"
131 i18n
>-- Select the object gateway user --
</option>
132 <option *
ngFor=
"let rgwUserId of allRgwUsers"
133 [value]=
"rgwUserId">{{ rgwUserId }}
</option>
135 <span class=
"invalid-feedback"
136 *
ngIf=
"nfsForm.showError('rgw_user_id', formDir, 'required')"
137 i18n
>This field is required.
</span>
141 <!-- CephFS user_id -->
142 <div class=
"form-group row"
143 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
144 <label class=
"cd-col-form-label required"
146 i18n
>CephFS User ID
</label>
147 <div class=
"cd-col-form-input">
148 <select class=
"form-control custom-select"
149 formControlName=
"user_id"
152 <option *
ngIf=
"allCephxClients === null"
154 i18n
>Loading...
</option>
155 <option *
ngIf=
"allCephxClients !== null && allCephxClients.length === 0"
157 i18n
>-- No clients available --
</option>
158 <option *
ngIf=
"allCephxClients !== null && allCephxClients.length > 0"
160 i18n
>-- Select the cephx client --
</option>
161 <option *
ngFor=
"let client of allCephxClients"
162 [value]=
"client">{{ client }}
</option>
164 <span class=
"invalid-feedback"
165 *
ngIf=
"nfsForm.showError('user_id', formDir, 'required')"
166 i18n
>This field is required.
</span>
170 <!-- CephFS fs_name -->
171 <div class=
"form-group row"
172 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
173 <label class=
"cd-col-form-label required"
175 i18n
>CephFS Name
</label>
176 <div class=
"cd-col-form-input">
177 <select class=
"form-control custom-select"
178 formControlName=
"fs_name"
181 (change)=
"rgwUserIdChangeHandler()">
182 <option *
ngIf=
"allFsNames === null"
184 i18n
>Loading...
</option>
185 <option *
ngIf=
"allFsNames !== null && allFsNames.length === 0"
187 i18n
>-- No CephFS filesystem available --
</option>
188 <option *
ngIf=
"allFsNames !== null && allFsNames.length > 0"
190 i18n
>-- Select the CephFS filesystem --
</option>
191 <option *
ngFor=
"let filesystem of allFsNames"
192 [value]=
"filesystem.name">{{ filesystem.name }}
</option>
194 <span class=
"invalid-feedback"
195 *
ngIf=
"nfsForm.showError('fs_name', formDir, 'required')"
196 i18n
>This field is required.
</span>
201 <!-- Secutiry Label -->
202 <div class=
"form-group row"
203 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
204 <label class=
"cd-col-form-label"
205 [ngClass]=
"{'required': nfsForm.getValue('security_label')}"
207 i18n
>Security Label
</label>
209 <div class=
"cd-col-form-input">
210 <div class=
"custom-control custom-checkbox">
211 <input type=
"checkbox"
212 class=
"custom-control-input"
213 formControlName=
"security_label"
214 name=
"security_label"
216 <label for=
"security_label"
217 class=
"custom-control-label"
218 i18n
>Enable security label
</label>
224 *
ngIf=
"nfsForm.getValue('security_label')"
226 name=
"sec_label_xattr"
228 formControlName=
"sec_label_xattr">
230 <span class=
"invalid-feedback"
231 *
ngIf=
"nfsForm.showError('sec_label_xattr', formDir, 'required')"
232 i18n
>This field is required.
</span>
237 <div class=
"form-group row"
238 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
239 <label class=
"cd-col-form-label required"
241 i18n
>CephFS Path
</label>
242 <div class=
"cd-col-form-input">
247 formControlName=
"path"
248 [typeahead]=
"pathDataSource"
249 (typeaheadOnSelect)=
"pathChangeHandler()"
250 (blur)=
"pathChangeHandler()">
251 <span class=
"invalid-feedback"
252 *
ngIf=
"nfsForm.showError('path', formDir, 'required')"
253 i18n
>This field is required.
</span>
255 <span class=
"invalid-feedback"
256 *
ngIf=
"nfsForm.showError('path', formDir, 'pattern')"
257 i18n
>Path need to start with a '/' and can be followed by a word
</span>
258 <span class=
"form-text text-muted"
259 *
ngIf=
"isNewDirectory && !nfsForm.showError('path', formDir)"
260 i18n
>New directory will be created
</span>
265 <div class=
"form-group row"
266 *
ngIf=
"nfsForm.getValue('name') === 'RGW'">
267 <label class=
"cd-col-form-label required"
270 <div class=
"cd-col-form-input">
275 formControlName=
"path"
276 [typeahead]=
"bucketDataSource"
277 (typeaheadOnSelect)=
"bucketChangeHandler()"
278 (blur)=
"bucketChangeHandler()">
280 <span class=
"invalid-feedback"
281 *
ngIf=
"nfsForm.showError('path', formDir, 'required')"
282 i18n
>This field is required.
</span>
284 <span class=
"invalid-feedback"
285 *
ngIf=
"nfsForm.showError('path', formDir, 'pattern')"
286 i18n
>Path can only be a single '/' or a word
</span>
288 <span class=
"form-text text-muted"
289 *
ngIf=
"isNewBucket && !nfsForm.showError('path', formDir)"
290 i18n
>New bucket will be created
</span>
294 <!-- NFS Protocol -->
295 <div class=
"form-group row">
296 <label class=
"cd-col-form-label required"
298 i18n
>NFS Protocol
</label>
299 <div class=
"cd-col-form-input">
300 <div class=
"custom-control custom-checkbox">
301 <input type=
"checkbox"
302 class=
"custom-control-input"
305 formControlName=
"protocolNfsv3">
307 class=
"custom-control-label"
308 for=
"protocolNfsv3">NFSv3
</label>
310 <div class=
"custom-control custom-checkbox">
311 <input type=
"checkbox"
312 class=
"custom-control-input"
313 formControlName=
"protocolNfsv4"
317 class=
"custom-control-label"
318 for=
"protocolNfsv4">NFSv4
</label>
320 <span class=
"invalid-feedback"
321 *
ngIf=
"nfsForm.showError('protocolNfsv3', formDir, 'required') ||
322 nfsForm.showError('protocolNfsv4', formDir, 'required')"
323 i18n
>This field is required.
</span>
328 <div class=
"form-group row"
329 *
ngIf=
"nfsForm.getValue('protocolNfsv3')">
330 <label class=
"cd-col-form-label"
332 <ng-container i18n
>NFS Tag
</ng-container>
334 <p i18n
>Alternative access for
<strong>NFS v3
</strong> mounts (it must not have a leading /).
</p>
335 <p i18n
>Clients may not mount subdirectories (i.e. if Tag = foo, the client may not mount foo/baz).
</p>
336 <p i18n
>By using different Tag options, the same Path may be exported multiple times.
</p>
339 <div class=
"cd-col-form-input">
344 formControlName=
"tag">
349 <div class=
"form-group row"
350 *
ngIf=
"nfsForm.getValue('protocolNfsv4')">
351 <label class=
"cd-col-form-label"
353 <span class=
"required"
356 <p i18n
>The position that this
<strong>NFS v4
</strong> export occupies
357 in the
<strong>Pseudo FS
</strong> (it must be unique).
</p>
358 <p i18n
>By using different Pseudo options, the same Path may be exported multiple times.
</p>
361 <div class=
"cd-col-form-input">
366 formControlName=
"pseudo">
367 <span class=
"invalid-feedback"
368 *
ngIf=
"nfsForm.showError('pseudo', formDir, 'required')"
369 i18n
>This field is required.
</span>
370 <span class=
"invalid-feedback"
371 *
ngIf=
"nfsForm.showError('pseudo', formDir, 'pattern')"
372 i18n
>Pseudo needs to start with a '/' and can't contain any of the following:
>,
<, |, &, ( or ).
</span>
377 <div class=
"form-group row">
378 <label class=
"cd-col-form-label required"
380 i18n
>Access Type
</label>
381 <div class=
"cd-col-form-input">
382 <select class=
"form-control custom-select"
383 formControlName=
"access_type"
386 (change)=
"accessTypeChangeHandler()">
387 <option *
ngIf=
"nfsAccessType === null"
389 i18n
>Loading...
</option>
390 <option *
ngIf=
"nfsAccessType !== null && nfsAccessType.length === 0"
392 i18n
>-- No access type available --
</option>
393 <option *
ngIf=
"nfsAccessType !== null && nfsAccessType.length > 0"
395 i18n
>-- Select the access type --
</option>
396 <option *
ngFor=
"let accessType of nfsAccessType"
397 [value]=
"accessType.value">{{ accessType.value }}
</option>
399 <span class=
"form-text text-muted"
400 *
ngIf=
"nfsForm.getValue('access_type')">
401 {{ getAccessTypeHelp(nfsForm.getValue('access_type')) }}
403 <span class=
"form-text text-warning"
404 *
ngIf=
"nfsForm.getValue('access_type') === 'RW' && nfsForm.getValue('name') === 'RGW'"
405 i18n
>The Object Gateway NFS backend has a number of
406 limitations which will seriously affect applications writing to
407 the share. Please consult the
<cd-doc section=
"rgw-nfs"></cd-doc>
408 for details before enabling write access.
</span>
409 <span class=
"invalid-feedback"
410 *
ngIf=
"nfsForm.showError('access_type', formDir, 'required')"
411 i18n
>This field is required.
</span>
416 <div class=
"form-group row">
417 <label class=
"cd-col-form-label required"
420 <div class=
"cd-col-form-input">
421 <select class=
"form-control custom-select"
423 formControlName=
"squash"
425 <option *
ngIf=
"nfsSquash === null"
427 i18n
>Loading...
</option>
428 <option *
ngIf=
"nfsSquash !== null && nfsSquash.length === 0"
430 i18n
>-- No squash available --
</option>
431 <option *
ngIf=
"nfsSquash !== null && nfsSquash.length > 0"
433 i18n
>--Select what kind of user id squashing is performed --
</option>
434 <option *
ngFor=
"let squash of nfsSquash"
435 [value]=
"squash">{{ squash }}
</option>
438 <span class=
"invalid-feedback"
439 *
ngIf=
"nfsForm.showError('squash', formDir,'required')"
440 i18n
>This field is required.
</span>
444 <!-- Transport Protocol -->
445 <div class=
"form-group row">
446 <label class=
"cd-col-form-label required"
448 i18n
>Transport Protocol
</label>
449 <div class=
"cd-col-form-input">
450 <div class=
"custom-control custom-checkbox">
451 <input type=
"checkbox"
452 class=
"custom-control-input"
453 formControlName=
"transportUDP"
456 <label for=
"transportUDP"
457 class=
"custom-control-label"
460 <div class=
"custom-control custom-checkbox">
461 <input type=
"checkbox"
462 class=
"custom-control-input"
463 formControlName=
"transportTCP"
466 <label for=
"transportTCP"
467 class=
"custom-control-label"
470 <span class=
"invalid-feedback"
471 *
ngIf=
"nfsForm.showError('transportUDP', formDir, 'required') ||
472 nfsForm.showError('transportTCP', formDir, 'required')"
473 i18n
>This field is required.
</span>
479 <cd-nfs-form-client [form]=
"nfsForm"
481 </cd-nfs-form-client>
485 <div class=
"card-footer">
486 <div class=
"button-group text-right">
488 (submitAction)=
"submitAction()"
489 i18n=
"form action button|Example: Create Pool@@formActionButton"
490 [form]=
"formDir">{{ action | titlecase }} {{ resource | upperFirst }}
</cd-submit-button>
491 <cd-back-button></cd-back-button>