1 <div class=
"cd-col-form"
2 *
cdFormLoading=
"loading">
8 <div i18n=
"form title|Example: Create Pool@@formTitle"
9 class=
"card-header">{{ action | titlecase }} {{ resource | upperFirst }}
</div>
11 <div class=
"card-body">
13 <div class=
"form-group row"
14 *
ngIf=
"!isDefaultCluster">
15 <label class=
"cd-col-form-label required"
18 <div class=
"cd-col-form-input">
19 <select class=
"form-control custom-select"
20 formControlName=
"cluster_id"
23 (change)=
"onClusterChange()">
24 <option *
ngIf=
"allClusters === null"
26 i18n
>Loading...
</option>
27 <option *
ngIf=
"allClusters !== null && allClusters.length === 0"
29 i18n
>-- No cluster available --
</option>
30 <option *
ngIf=
"allClusters !== null && allClusters.length > 0"
32 i18n
>-- Select the cluster --
</option>
33 <option *
ngFor=
"let cluster of allClusters"
34 [value]=
"cluster.cluster_id">{{ cluster.cluster_id }}
</option>
36 <span class=
"invalid-feedback"
37 *
ngIf=
"nfsForm.showError('cluster_id', formDir, 'required')"
38 i18n
>This field is required.
</span>
43 <div class=
"form-group row"
45 <label class=
"cd-col-form-label"
47 <ng-container i18n
>Daemons
</ng-container>
49 <div class=
"cd-col-form-input">
50 <ng-container *
ngFor=
"let daemon of nfsForm.getValue('daemons'); let i = index">
51 <div class=
"input-group cd-mb">
52 <input class=
"cd-form-control"
56 <span *
ngIf=
"clusterType === 'user'"
57 class=
"input-group-append">
58 <button class=
"btn btn-light"
60 (click)=
"removeDaemon(i, daemon)">
61 <i [ngClass]=
"[icons.destroy]"
62 aria-hidden=
"true"></i>
68 <div *
ngIf=
"clusterType === 'user'"
70 <div class=
"col-md-12">
71 <cd-select [data]=
"nfsForm.get('daemons').value"
72 [options]=
"daemonsSelections"
73 [messages]=
"daemonsMessages"
74 (selection)=
"onDaemonSelection()"
75 elemClass=
"btn btn-light float-right">
76 <i [ngClass]=
"[icons.add]"></i>
77 <ng-container i18n
>Add daemon
</ng-container>
82 <div *
ngIf=
"clusterType === 'orchestrator'"
84 <div class=
"col-md-12">
86 class=
"btn btn-light float-right"
87 (click)=
"onToggleAllDaemonsSelection()">
88 <i [ngClass]=
"[icons.add]"></i>
89 <ng-container *
ngIf=
"nfsForm.getValue('daemons').length === 0; else hasDaemons"
90 i18n
>Add all daemons
</ng-container>
91 <ng-template #hasDaemons
>
92 <ng-container i18n
>Remove all daemons
</ng-container>
101 <div formGroupName=
"fsal">
103 <div class=
"form-group row">
104 <label class=
"cd-col-form-label required"
106 i18n
>Storage Backend
</label>
107 <div class=
"cd-col-form-input">
108 <select class=
"form-control custom-select"
109 formControlName=
"name"
112 (change)=
"fsalChangeHandler()">
113 <option *
ngIf=
"allFsals === null"
115 i18n
>Loading...
</option>
116 <option *
ngIf=
"allFsals !== null && allFsals.length === 0"
118 i18n
>-- No data pools available --
</option>
119 <option *
ngIf=
"allFsals !== null && allFsals.length > 0"
121 i18n
>-- Select the storage backend --
</option>
122 <option *
ngFor=
"let fsal of allFsals"
123 [value]=
"fsal.value">{{ fsal.descr }}
</option>
125 <span class=
"invalid-feedback"
126 *
ngIf=
"nfsForm.showError('name', formDir, 'required')"
127 i18n
>This field is required.
</span>
132 <div class=
"form-group row"
133 *
ngIf=
"nfsForm.getValue('name') === 'RGW'">
134 <label class=
"cd-col-form-label required"
136 i18n
>Object Gateway User
</label>
137 <div class=
"cd-col-form-input">
138 <select class=
"form-control custom-select"
139 formControlName=
"rgw_user_id"
142 (change)=
"rgwUserIdChangeHandler()">
143 <option *
ngIf=
"allRgwUsers === null"
145 i18n
>Loading...
</option>
146 <option *
ngIf=
"allRgwUsers !== null && allRgwUsers.length === 0"
148 i18n
>-- No users available --
</option>
149 <option *
ngIf=
"allRgwUsers !== null && allRgwUsers.length > 0"
151 i18n
>-- Select the object gateway user --
</option>
152 <option *
ngFor=
"let rgwUserId of allRgwUsers"
153 [value]=
"rgwUserId">{{ rgwUserId }}
</option>
155 <span class=
"invalid-feedback"
156 *
ngIf=
"nfsForm.showError('rgw_user_id', formDir, 'required')"
157 i18n
>This field is required.
</span>
161 <!-- CephFS user_id -->
162 <div class=
"form-group row"
163 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
164 <label class=
"cd-col-form-label required"
166 i18n
>CephFS User ID
</label>
167 <div class=
"cd-col-form-input">
168 <select class=
"form-control custom-select"
169 formControlName=
"user_id"
172 <option *
ngIf=
"allCephxClients === null"
174 i18n
>Loading...
</option>
175 <option *
ngIf=
"allCephxClients !== null && allCephxClients.length === 0"
177 i18n
>-- No clients available --
</option>
178 <option *
ngIf=
"allCephxClients !== null && allCephxClients.length > 0"
180 i18n
>-- Select the cephx client --
</option>
181 <option *
ngFor=
"let client of allCephxClients"
182 [value]=
"client">{{ client }}
</option>
184 <span class=
"invalid-feedback"
185 *
ngIf=
"nfsForm.showError('user_id', formDir, 'required')"
186 i18n
>This field is required.
</span>
190 <!-- CephFS fs_name -->
191 <div class=
"form-group row"
192 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
193 <label class=
"cd-col-form-label required"
195 i18n
>CephFS Name
</label>
196 <div class=
"cd-col-form-input">
197 <select class=
"form-control custom-select"
198 formControlName=
"fs_name"
201 (change)=
"rgwUserIdChangeHandler()">
202 <option *
ngIf=
"allFsNames === null"
204 i18n
>Loading...
</option>
205 <option *
ngIf=
"allFsNames !== null && allFsNames.length === 0"
207 i18n
>-- No CephFS filesystem available --
</option>
208 <option *
ngIf=
"allFsNames !== null && allFsNames.length > 0"
210 i18n
>-- Select the CephFS filesystem --
</option>
211 <option *
ngFor=
"let filesystem of allFsNames"
212 [value]=
"filesystem.name">{{ filesystem.name }}
</option>
214 <span class=
"invalid-feedback"
215 *
ngIf=
"nfsForm.showError('fs_name', formDir, 'required')"
216 i18n
>This field is required.
</span>
221 <!-- Security Label -->
222 <div class=
"form-group row"
223 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
224 <label class=
"cd-col-form-label"
225 [ngClass]=
"{'required': nfsForm.getValue('security_label')}"
227 i18n
>Security Label
</label>
229 <div class=
"cd-col-form-input">
230 <div class=
"custom-control custom-checkbox">
231 <input type=
"checkbox"
232 class=
"custom-control-input"
233 formControlName=
"security_label"
234 name=
"security_label"
236 <label for=
"security_label"
237 class=
"custom-control-label"
238 i18n
>Enable security label
</label>
244 *
ngIf=
"nfsForm.getValue('security_label')"
246 name=
"sec_label_xattr"
248 formControlName=
"sec_label_xattr">
250 <span class=
"invalid-feedback"
251 *
ngIf=
"nfsForm.showError('sec_label_xattr', formDir, 'required')"
252 i18n
>This field is required.
</span>
257 <div class=
"form-group row"
258 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
259 <label class=
"cd-col-form-label required"
261 i18n
>CephFS Path
</label>
262 <div class=
"cd-col-form-input">
267 formControlName=
"path"
268 [ngbTypeahead]=
"pathDataSource"
269 (selectItem)=
"pathChangeHandler()"
270 (blur)=
"pathChangeHandler()">
271 <span class=
"invalid-feedback"
272 *
ngIf=
"nfsForm.showError('path', formDir, 'required')"
273 i18n
>This field is required.
</span>
275 <span class=
"invalid-feedback"
276 *
ngIf=
"nfsForm.showError('path', formDir, 'pattern')"
277 i18n
>Path need to start with a '/' and can be followed by a word
</span>
278 <span class=
"form-text text-muted"
279 *
ngIf=
"isNewDirectory && !nfsForm.showError('path', formDir)"
280 i18n
>New directory will be created
</span>
285 <div class=
"form-group row"
286 *
ngIf=
"nfsForm.getValue('name') === 'RGW'">
287 <label class=
"cd-col-form-label required"
290 <div class=
"cd-col-form-input">
295 formControlName=
"path"
296 [ngbTypeahead]=
"bucketDataSource"
297 (selectItem)=
"bucketChangeHandler()"
298 (blur)=
"bucketChangeHandler()">
300 <span class=
"invalid-feedback"
301 *
ngIf=
"nfsForm.showError('path', formDir, 'required')"
302 i18n
>This field is required.
</span>
304 <span class=
"invalid-feedback"
305 *
ngIf=
"nfsForm.showError('path', formDir, 'pattern')"
306 i18n
>Path can only be a single '/' or a word
</span>
308 <span class=
"form-text text-muted"
309 *
ngIf=
"isNewBucket && !nfsForm.showError('path', formDir)"
310 i18n
>New bucket will be created
</span>
314 <!-- NFS Protocol -->
315 <div class=
"form-group row">
316 <label class=
"cd-col-form-label required"
318 i18n
>NFS Protocol
</label>
319 <div class=
"cd-col-form-input">
320 <div class=
"custom-control custom-checkbox">
321 <input type=
"checkbox"
322 class=
"custom-control-input"
325 formControlName=
"protocolNfsv3">
327 class=
"custom-control-label"
328 for=
"protocolNfsv3">NFSv3
</label>
330 <div class=
"custom-control custom-checkbox">
331 <input type=
"checkbox"
332 class=
"custom-control-input"
333 formControlName=
"protocolNfsv4"
337 class=
"custom-control-label"
338 for=
"protocolNfsv4">NFSv4
</label>
340 <span class=
"invalid-feedback"
341 *
ngIf=
"nfsForm.showError('protocolNfsv3', formDir, 'required') ||
342 nfsForm.showError('protocolNfsv4', formDir, 'required')"
343 i18n
>This field is required.
</span>
348 <div class=
"form-group row"
349 *
ngIf=
"nfsForm.getValue('protocolNfsv3')">
350 <label class=
"cd-col-form-label"
352 <ng-container i18n
>NFS Tag
</ng-container>
354 <p i18n
>Alternative access for
<strong>NFS v3
</strong> mounts (it must not have a leading /).
</p>
355 <p i18n
>Clients may not mount subdirectories (i.e. if Tag = foo, the client may not mount foo/baz).
</p>
356 <p i18n
>By using different Tag options, the same Path may be exported multiple times.
</p>
359 <div class=
"cd-col-form-input">
364 formControlName=
"tag">
369 <div class=
"form-group row"
370 *
ngIf=
"nfsForm.getValue('protocolNfsv4')">
371 <label class=
"cd-col-form-label"
373 <span class=
"required"
376 <p i18n
>The position that this
<strong>NFS v4
</strong> export occupies
377 in the
<strong>Pseudo FS
</strong> (it must be unique).
</p>
378 <p i18n
>By using different Pseudo options, the same Path may be exported multiple times.
</p>
381 <div class=
"cd-col-form-input">
386 formControlName=
"pseudo">
387 <span class=
"invalid-feedback"
388 *
ngIf=
"nfsForm.showError('pseudo', formDir, 'required')"
389 i18n
>This field is required.
</span>
390 <span class=
"invalid-feedback"
391 *
ngIf=
"nfsForm.showError('pseudo', formDir, 'pattern')"
392 i18n
>Pseudo needs to start with a '/' and can't contain any of the following:
>,
<, |, &, ( or ).
</span>
397 <div class=
"form-group row">
398 <label class=
"cd-col-form-label required"
400 i18n
>Access Type
</label>
401 <div class=
"cd-col-form-input">
402 <select class=
"form-control custom-select"
403 formControlName=
"access_type"
406 (change)=
"accessTypeChangeHandler()">
407 <option *
ngIf=
"nfsAccessType === null"
409 i18n
>Loading...
</option>
410 <option *
ngIf=
"nfsAccessType !== null && nfsAccessType.length === 0"
412 i18n
>-- No access type available --
</option>
413 <option *
ngIf=
"nfsAccessType !== null && nfsAccessType.length > 0"
415 i18n
>-- Select the access type --
</option>
416 <option *
ngFor=
"let accessType of nfsAccessType"
417 [value]=
"accessType.value">{{ accessType.value }}
</option>
419 <span class=
"form-text text-muted"
420 *
ngIf=
"nfsForm.getValue('access_type')">
421 {{ getAccessTypeHelp(nfsForm.getValue('access_type')) }}
423 <span class=
"form-text text-warning"
424 *
ngIf=
"nfsForm.getValue('access_type') === 'RW' && nfsForm.getValue('name') === 'RGW'"
425 i18n
>The Object Gateway NFS backend has a number of
426 limitations which will seriously affect applications writing to
427 the share. Please consult the
<cd-doc section=
"rgw-nfs"></cd-doc>
428 for details before enabling write access.
</span>
429 <span class=
"invalid-feedback"
430 *
ngIf=
"nfsForm.showError('access_type', formDir, 'required')"
431 i18n
>This field is required.
</span>
436 <div class=
"form-group row">
437 <label class=
"cd-col-form-label required"
440 <div class=
"cd-col-form-input">
441 <select class=
"form-control custom-select"
443 formControlName=
"squash"
445 <option *
ngIf=
"nfsSquash === null"
447 i18n
>Loading...
</option>
448 <option *
ngIf=
"nfsSquash !== null && nfsSquash.length === 0"
450 i18n
>-- No squash available --
</option>
451 <option *
ngIf=
"nfsSquash !== null && nfsSquash.length > 0"
453 i18n
>--Select what kind of user id squashing is performed --
</option>
454 <option *
ngFor=
"let squash of nfsSquash"
455 [value]=
"squash">{{ squash }}
</option>
458 <span class=
"invalid-feedback"
459 *
ngIf=
"nfsForm.showError('squash', formDir,'required')"
460 i18n
>This field is required.
</span>
464 <!-- Transport Protocol -->
465 <div class=
"form-group row">
466 <label class=
"cd-col-form-label required"
468 i18n
>Transport Protocol
</label>
469 <div class=
"cd-col-form-input">
470 <div class=
"custom-control custom-checkbox">
471 <input type=
"checkbox"
472 class=
"custom-control-input"
473 formControlName=
"transportUDP"
476 <label for=
"transportUDP"
477 class=
"custom-control-label"
480 <div class=
"custom-control custom-checkbox">
481 <input type=
"checkbox"
482 class=
"custom-control-input"
483 formControlName=
"transportTCP"
486 <label for=
"transportTCP"
487 class=
"custom-control-label"
490 <span class=
"invalid-feedback"
491 *
ngIf=
"nfsForm.showError('transportUDP', formDir, 'required') ||
492 nfsForm.showError('transportTCP', formDir, 'required')"
493 i18n
>This field is required.
</span>
499 <cd-nfs-form-client [form]=
"nfsForm"
502 </cd-nfs-form-client>
506 <div class=
"card-footer">
507 <cd-form-button-panel (submitActionEvent)=
"submitAction()"
509 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"
510 wrappingClass=
"text-right"></cd-form-button-panel>