1 <div class=
"cd-col-form"
2 *
cdFormLoading=
"loading">
9 class=
"card-header">{{ action | titlecase }} {{ resource | upperFirst }}
</div>
11 <div class=
"card-body">
13 <div class=
"form-group row">
14 <label class=
"cd-col-form-label"
16 <span class=
"required"
19 <p i18n
>This is the ID of an NFS Service.
</p>
22 <div class=
"cd-col-form-input">
23 <select class=
"form-control"
24 formControlName=
"cluster_id"
27 <option *
ngIf=
"allClusters === null"
29 i18n
>Loading...
</option>
30 <option *
ngIf=
"allClusters !== null && allClusters.length === 0"
32 i18n
>-- No cluster available --
</option>
33 <option *
ngIf=
"allClusters !== null && allClusters.length > 0"
35 i18n
>-- Select the cluster --
</option>
36 <option *
ngFor=
"let cluster of allClusters"
37 [value]=
"cluster.cluster_id">{{ cluster.cluster_id }}
</option>
39 <span class=
"invalid-feedback"
40 *
ngIf=
"nfsForm.showError('cluster_id', formDir, 'required') || allClusters?.length === 0"
41 i18n
>This field is required.
42 To create a new NFS cluster,
<a [routerLink]=
"['/services', {outlets: {modal: ['create']}}]"
43 class=
"btn-link">add a new NFS Service
</a>.
</span>
48 <div formGroupName=
"fsal">
50 <div class=
"form-group row">
51 <label class=
"cd-col-form-label required"
53 i18n
>Storage Backend
</label>
54 <div class=
"cd-col-form-input">
55 <select class=
"form-control"
56 formControlName=
"name"
59 (change)=
"fsalChangeHandler()">
60 <option *
ngIf=
"allFsals === null"
62 i18n
>Loading...
</option>
63 <option *
ngIf=
"allFsals !== null && allFsals.length === 0"
65 i18n
>-- No data pools available --
</option>
66 <option *
ngIf=
"allFsals !== null && allFsals.length > 0"
68 i18n
>-- Select the storage backend --
</option>
69 <option *
ngFor=
"let fsal of allFsals"
71 [disabled]=
"fsal.disabled">{{ fsal.descr }}
</option>
73 <span class=
"invalid-feedback"
74 *
ngIf=
"nfsForm.showError('name', formDir, 'required')"
75 i18n
>This field is required.
</span>
76 <span class=
"invalid-feedback"
77 *
ngIf=
"fsalAvailabilityError"
78 i18n
>{{ fsalAvailabilityError }}
</span>
82 <!-- CephFS Volume -->
83 <div class=
"form-group row"
84 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
85 <label class=
"cd-col-form-label required"
88 <div class=
"cd-col-form-input">
89 <select class=
"form-control"
90 formControlName=
"fs_name"
93 (change)=
"pathChangeHandler()">
94 <option *
ngIf=
"allFsNames === null"
96 i18n
>Loading...
</option>
97 <option *
ngIf=
"allFsNames !== null && allFsNames.length === 0"
99 i18n
>-- No CephFS filesystem available --
</option>
100 <option *
ngIf=
"allFsNames !== null && allFsNames.length > 0"
102 i18n
>-- Select the CephFS filesystem --
</option>
103 <option *
ngFor=
"let filesystem of allFsNames"
104 [value]=
"filesystem.name">{{ filesystem.name }}
</option>
106 <span class=
"invalid-feedback"
107 *
ngIf=
"nfsForm.showError('fs_name', formDir, 'required')"
108 i18n
>This field is required.
</span>
113 <!-- Security Label -->
114 <div class=
"form-group row"
115 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
116 <label class=
"cd-col-form-label"
117 [ngClass]=
"{'required': nfsForm.getValue('security_label')}"
119 i18n
>Security Label
</label>
121 <div class=
"cd-col-form-input">
122 <div class=
"custom-control custom-checkbox">
123 <input type=
"checkbox"
124 class=
"custom-control-input"
125 formControlName=
"security_label"
126 name=
"security_label"
128 <label for=
"security_label"
129 class=
"custom-control-label"
130 i18n
>Enable security label
</label>
136 *
ngIf=
"nfsForm.getValue('security_label')"
138 name=
"sec_label_xattr"
140 formControlName=
"sec_label_xattr">
142 <span class=
"invalid-feedback"
143 *
ngIf=
"nfsForm.showError('sec_label_xattr', formDir, 'required')"
144 i18n
>This field is required.
</span>
149 <div class=
"form-group row"
150 *
ngIf=
"nfsForm.getValue('name') === 'CEPH'">
151 <label class=
"cd-col-form-label"
153 <span class=
"required"
154 i18n
>CephFS Path
</span>
156 <p i18n
>A path in a CephFS file system.
</p>
159 <div class=
"cd-col-form-input">
164 data-testid=
"fs_path"
165 formControlName=
"path"
166 [ngbTypeahead]=
"pathDataSource"
167 (selectItem)=
"pathChangeHandler()"
168 (blur)=
"pathChangeHandler()">
169 <span class=
"invalid-feedback"
170 *
ngIf=
"nfsForm.showError('path', formDir, 'required')"
171 i18n
>This field is required.
</span>
173 <span class=
"invalid-feedback"
174 *
ngIf=
"nfsForm.showError('path', formDir, 'pattern')"
175 i18n
>Path need to start with a '/' and can be followed by a word
</span>
176 <span class=
"invalid-feedback"
177 *
ngIf=
"nfsForm.showError('path', formDir, 'pathNameNotAllowed')"
178 i18n
>The path does not exist in the selected volume.
</span>
183 <div class=
"form-group row"
184 *
ngIf=
"nfsForm.getValue('name') === 'RGW'">
185 <label class=
"cd-col-form-label"
187 <span class=
"required"
190 <div class=
"cd-col-form-input">
195 data-testid=
"rgw_path"
196 formControlName=
"path"
197 [ngbTypeahead]=
"bucketDataSource">
199 <span class=
"invalid-feedback"
200 *
ngIf=
"nfsForm.showError('path', formDir, 'required')"
201 i18n
>This field is required.
</span>
202 <span class=
"invalid-feedback"
203 *
ngIf=
"nfsForm.showError('path', formDir, 'bucketNameNotAllowed')"
204 i18n
>The bucket does not exist or is not in the default realm (if multiple realms are configured).
205 To continue,
<a routerLink=
"/rgw/bucket/create"
206 class=
"btn-link">create a new bucket
</a>.
</span>
210 <!-- NFS Protocol -->
211 <div class=
"form-group row">
212 <label class=
"cd-col-form-label required"
214 i18n
>NFS Protocol
</label>
215 <div class=
"cd-col-form-input">
216 <div class=
"custom-control custom-checkbox">
217 <input type=
"checkbox"
218 class=
"custom-control-input"
219 formControlName=
"protocolNfsv4"
224 class=
"custom-control-label"
225 for=
"protocolNfsv4">NFSv4
</label>
227 <span class=
"invalid-feedback"
228 *
ngIf=
"nfsForm.showError('protocolNfsv4', formDir, 'required')"
229 i18n
>This field is required.
</span>
234 <div class=
"form-group row"
235 *
ngIf=
"nfsForm.getValue('protocolNfsv4')">
236 <label class=
"cd-col-form-label"
238 <span class=
"required"
241 <p i18n
>The position that this
<strong>NFS v4
</strong> export occupies
242 in the
<strong>Pseudo FS
</strong> (it must be unique).
</p>
243 <p i18n
>By using different Pseudo options, the same Path may be exported multiple times.
</p>
246 <div class=
"cd-col-form-input">
251 formControlName=
"pseudo">
252 <span class=
"invalid-feedback"
253 *
ngIf=
"nfsForm.showError('pseudo', formDir, 'required')"
254 i18n
>This field is required.
</span>
255 <span class=
"invalid-feedback"
256 *
ngIf=
"nfsForm.showError('pseudo', formDir, 'pseudoAlreadyExists')"
257 i18n
>The pseudo is already in use by another export.
</span>
258 <span class=
"invalid-feedback"
259 *
ngIf=
"nfsForm.showError('pseudo', formDir, 'pattern')"
260 i18n
>Pseudo needs to start with a '/' and can't contain any of the following:
>,
<, |, &, ( or ).
</span>
265 <div class=
"form-group row">
266 <label class=
"cd-col-form-label required"
268 i18n
>Access Type
</label>
269 <div class=
"cd-col-form-input">
270 <select class=
"form-control"
271 formControlName=
"access_type"
274 (change)=
"accessTypeChangeHandler()">
275 <option *
ngIf=
"nfsAccessType === null"
277 i18n
>Loading...
</option>
278 <option *
ngIf=
"nfsAccessType !== null && nfsAccessType.length === 0"
280 i18n
>-- No access type available --
</option>
281 <option *
ngFor=
"let accessType of nfsAccessType"
282 [value]=
"accessType.value">{{ accessType.value }}
</option>
284 <span class=
"form-text text-muted"
285 *
ngIf=
"nfsForm.getValue('access_type')">
286 {{ getAccessTypeHelp(nfsForm.getValue('access_type')) }}
288 <span class=
"form-text text-warning"
289 *
ngIf=
"nfsForm.getValue('access_type') === 'RW' && nfsForm.getValue('name') === 'RGW'"
290 i18n
>The Object Gateway NFS backend has a number of
291 limitations which will seriously affect applications writing to
292 the share. Please consult the
<cd-doc section=
"rgw-nfs"></cd-doc>
293 for details before enabling write access.
</span>
294 <span class=
"invalid-feedback"
295 *
ngIf=
"nfsForm.showError('access_type', formDir, 'required')"
296 i18n
>This field is required.
</span>
301 <div class=
"form-group row">
302 <label class=
"cd-col-form-label"
304 <span i18n
>Squash
</span>
305 <ng-container *
ngTemplateOutlet=
"squashHelper"></ng-container>
307 <div class=
"cd-col-form-input">
308 <select class=
"form-control"
310 formControlName=
"squash"
312 <option *
ngIf=
"nfsSquash === null"
314 i18n
>Loading...
</option>
315 <option *
ngIf=
"nfsSquash !== null && nfsSquash.length === 0"
317 i18n
>-- No squash available --
</option>
318 <option *
ngFor=
"let squash of nfsSquash"
319 [value]=
"squash">{{ squash }}
</option>
322 <span class=
"invalid-feedback"
323 *
ngIf=
"nfsForm.showError('squash', formDir,'required')"
324 i18n
>This field is required.
</span>
328 <!-- Transport Protocol -->
329 <div class=
"form-group row">
330 <label class=
"cd-col-form-label required"
332 i18n
>Transport Protocol
</label>
333 <div class=
"cd-col-form-input">
334 <div class=
"custom-control custom-checkbox">
335 <input type=
"checkbox"
336 class=
"custom-control-input"
337 formControlName=
"transportUDP"
340 <label for=
"transportUDP"
341 class=
"custom-control-label"
344 <div class=
"custom-control custom-checkbox">
345 <input type=
"checkbox"
346 class=
"custom-control-input"
347 formControlName=
"transportTCP"
350 <label for=
"transportTCP"
351 class=
"custom-control-label"
354 <span class=
"invalid-feedback"
355 *
ngIf=
"nfsForm.showError('transportUDP', formDir, 'required') ||
356 nfsForm.showError('transportTCP', formDir, 'required')"
357 i18n
>This field is required.
</span>
363 <cd-nfs-form-client [form]=
"nfsForm"
366 <ng-template #squashHelper
>
368 <ul class=
"squash-helper">
370 <span class=
"squash-helper-item-value">no_root_squash:
</span>
371 <span i18n
>No user id squashing is performed.
</span>
374 <span class=
"squash-helper-item-value">root_id_squash:
</span>
375 <span i18n
>uid
0 and gid
0 are squashed to the Anonymous_Uid and Anonymous_Gid gid
0 in alt_groups lists is also squashed.
</span>
378 <span class=
"squash-helper-item-value">root_squash:
</span>
379 <span i18n
>uid
0 and gid of any value are squashed to the Anonymous_Uid and Anonymous_Gid alt_groups lists is discarded.
</span>
382 <span class=
"squash-helper-item-value">all_squash:
</span>
383 <span i18n
>All users are squashed.
</span>
388 </cd-nfs-form-client>
392 <div class=
"card-footer">
393 <cd-form-button-panel (submitActionEvent)=
"submitAction()"
395 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"
396 wrappingClass=
"text-right"></cd-form-button-panel>