1 <div class=
"cd-col-form"
2 *
cdFormLoading=
"loading">
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 <label class=
"cd-col-form-label"
14 [ngClass]=
"{'required': !editing}"
17 <div class=
"cd-col-form-input">
21 formControlName=
"user_id"
23 <span class=
"invalid-feedback"
24 *
ngIf=
"userForm.showError('user_id', frm, 'required')"
25 i18n
>This field is required.
</span>
26 <span class=
"invalid-feedback"
27 *
ngIf=
"userForm.showError('user_id', frm, 'pattern')"
28 i18n
>The value is not valid.
</span>
29 <span class=
"invalid-feedback"
30 *
ngIf=
"!userForm.getValue('show_tenant') && userForm.showError('user_id', frm, 'notUnique')"
31 i18n
>The chosen user ID is already in use.
</span>
36 <div class=
"form-group row">
37 <div class=
"cd-col-form-offset">
38 <div class=
"custom-control custom-checkbox">
39 <input class=
"custom-control-input"
42 (click)=
"updateFieldsWhenTenanted()"
43 formControlName=
"show_tenant"
45 <label class=
"custom-control-label"
47 i18n
>Show Tenant
</label>
53 <div class=
"form-group row"
54 *
ngIf=
"userForm.getValue('show_tenant')">
55 <label class=
"cd-col-form-label"
58 <div class=
"cd-col-form-input">
62 formControlName=
"tenant"
65 <span class=
"invalid-feedback"
66 *
ngIf=
"userForm.showError('tenant', frm, 'pattern')"
67 i18n
>The value is not valid.
</span>
68 <span class=
"invalid-feedback"
69 *
ngIf=
"userForm.showError('tenant', frm, 'notUnique')"
70 i18n
>The chosen user ID exists in this tenant.
</span>
75 <div class=
"form-group row">
76 <label class=
"cd-col-form-label"
77 [ngClass]=
"{'required': !editing}"
79 i18n
>Full name
</label>
80 <div class=
"cd-col-form-input">
81 <input id=
"display_name"
84 formControlName=
"display_name">
85 <span class=
"invalid-feedback"
86 *
ngIf=
"userForm.showError('display_name', frm, 'required')"
87 i18n
>This field is required.
</span>
91 <!-- Email address -->
92 <div class=
"form-group row">
93 <label class=
"cd-col-form-label"
95 i18n
>Email address
</label>
96 <div class=
"cd-col-form-input">
100 formControlName=
"email">
101 <span class=
"invalid-feedback"
102 *
ngIf=
"userForm.showError('email', frm, 'email')"
103 i18n
>This is not a valid email address.
</span>
104 <span class=
"invalid-feedback"
105 *
ngIf=
"userForm.showError('email', frm, 'notUnique')"
106 i18n
>The chosen email address is already in use.
</span>
110 <!-- Max. buckets -->
111 <div class=
"form-group row">
112 <label class=
"cd-col-form-label"
113 for=
"max_buckets_mode"
114 i18n
>Max. buckets
</label>
115 <div class=
"cd-col-form-input">
116 <select class=
"form-control custom-select"
117 formControlName=
"max_buckets_mode"
118 name=
"max_buckets_mode"
119 id=
"max_buckets_mode"
120 (change)=
"onMaxBucketsModeChange($event.target.value)">
122 value=
"-1">Disabled
</option>
124 value=
"0">Unlimited
</option>
126 value=
"1">Custom
</option>
130 <div *
ngIf=
"1 == userForm.get('max_buckets_mode').value"
131 class=
"form-group row">
132 <label class=
"cd-col-form-label"></label>
133 <div class=
"cd-col-form-input">
134 <input id=
"max_buckets"
137 formControlName=
"max_buckets"
139 <span class=
"invalid-feedback"
140 *
ngIf=
"userForm.showError('max_buckets', frm, 'required')"
141 i18n
>This field is required.
</span>
142 <span class=
"invalid-feedback"
143 *
ngIf=
"userForm.showError('max_buckets', frm, 'min')"
144 i18n
>The entered value must be
>=
1.
</span>
149 <div class=
"form-group row">
150 <div class=
"cd-col-form-offset">
151 <div class=
"custom-control custom-checkbox">
152 <input class=
"custom-control-input"
155 formControlName=
"suspended">
156 <label class=
"custom-control-label"
158 i18n
>Suspended
</label>
164 <fieldset *
ngIf=
"!editing">
165 <legend i18n
>S3 key
</legend>
167 <!-- Auto-generate key -->
168 <div class=
"form-group row">
169 <div class=
"cd-col-form-offset">
170 <div class=
"custom-control custom-checkbox">
171 <input class=
"custom-control-input"
174 formControlName=
"generate_key">
175 <label class=
"custom-control-label"
177 i18n
>Auto-generate key
</label>
183 <div class=
"form-group row"
184 *
ngIf=
"!editing && !userForm.getValue('generate_key')">
185 <label class=
"cd-col-form-label required"
187 i18n
>Access key
</label>
188 <div class=
"cd-col-form-input">
189 <div class=
"input-group">
190 <input id=
"access_key"
193 formControlName=
"access_key">
194 <span class=
"input-group-append">
195 <button type=
"button"
196 class=
"btn btn-light"
197 cdPasswordButton=
"access_key">
199 <cd-copy-2-clipboard-button source=
"access_key">
200 </cd-copy-2-clipboard-button>
203 <span class=
"invalid-feedback"
204 *
ngIf=
"userForm.showError('access_key', frm, 'required')"
205 i18n
>This field is required.
</span>
210 <div class=
"form-group row"
211 *
ngIf=
"!editing && !userForm.getValue('generate_key')">
212 <label class=
"cd-col-form-label required"
214 i18n
>Secret key
</label>
215 <div class=
"cd-col-form-input">
216 <div class=
"input-group">
217 <input id=
"secret_key"
220 formControlName=
"secret_key">
221 <span class=
"input-group-append">
222 <button type=
"button"
223 class=
"btn btn-light"
224 cdPasswordButton=
"secret_key">
226 <cd-copy-2-clipboard-button source=
"secret_key">
227 </cd-copy-2-clipboard-button>
230 <span class=
"invalid-feedback"
231 *
ngIf=
"userForm.showError('secret_key', frm, 'required')"
232 i18n
>This field is required.
</span>
238 <fieldset *
ngIf=
"editing">
239 <legend i18n
>Subusers
</legend>
241 <div class=
"cd-col-form-offset">
242 <span *
ngIf=
"subusers.length === 0"
244 <span class=
"form-text text-muted"
245 i18n
>There are no subusers.
</span>
248 <span *
ngFor=
"let subuser of subusers; let i=index;">
249 <div class=
"input-group">
250 <div class=
"input-group-prepend">
251 <span class=
"input-group-text">
252 <i class=
"{{ icons.user }}"></i>
256 class=
"cd-form-control"
257 value=
"{{ subuser.id }}"
259 <div class=
"input-group-prepend border-left-0 border-right-0">
260 <span class=
"input-group-text">
261 <i class=
"{{ icons.share }}"></i>
265 class=
"cd-form-control"
266 value=
"{{ ('full-control' === subuser.permissions) ? 'full' : subuser.permissions }}"
268 <span class=
"input-group-append">
269 <button type=
"button"
270 class=
"btn btn-light tc_showSubuserButton"
273 (click)=
"showSubuserModal(i)">
274 <i [ngClass]=
"[icons.edit]"></i>
276 <button type=
"button"
277 class=
"btn btn-light tc_deleteSubuserButton"
280 (click)=
"deleteSubuser(i)">
281 <i [ngClass]=
"[icons.destroy]"></i>
285 <span class=
"form-text text-muted"></span>
290 <button type=
"button"
291 class=
"btn btn-light float-right tc_addSubuserButton"
292 (click)=
"showSubuserModal()">
293 <i [ngClass]=
"[icons.add]"></i>
294 <ng-container i18n
>{{ actionLabels.CREATE | titlecase }}
295 {{ subuserLabel | upperFirst }}
</ng-container>
299 <span class=
"help-block"></span>
305 <fieldset *
ngIf=
"editing">
306 <legend i18n
>Keys
</legend>
309 <div class=
"form-group row">
310 <label class=
"cd-col-form-label"
312 <div class=
"cd-col-form-input">
313 <span *
ngIf=
"s3Keys.length === 0"
315 <span class=
"form-text text-muted"
316 i18n
>There are no keys.
</span>
319 <span *
ngFor=
"let key of s3Keys; let i=index;">
320 <div class=
"input-group">
321 <div class=
"input-group-prepend">
322 <div class=
"input-group-text">
323 <i class=
"{{ icons.key }}"></i>
327 class=
"cd-form-control"
328 value=
"{{ key.user }}"
330 <span class=
"input-group-append">
331 <button type=
"button"
332 class=
"btn btn-light tc_showS3KeyButton"
335 (click)=
"showS3KeyModal(i)">
336 <i [ngClass]=
"[icons.show]"></i>
338 <button type=
"button"
339 class=
"btn btn-light tc_deleteS3KeyButton"
342 (click)=
"deleteS3Key(i)">
343 <i [ngClass]=
"[icons.destroy]"></i>
347 <span class=
"form-text text-muted"></span>
352 <button type=
"button"
353 class=
"btn btn-light float-right tc_addS3KeyButton"
354 (click)=
"showS3KeyModal()">
355 <i [ngClass]=
"[icons.add]"></i>
356 <ng-container i18n
>{{ actionLabels.CREATE | titlecase }}
357 {{ s3keyLabel | upperFirst }}
</ng-container>
362 <span class=
"help-block"></span>
369 <div class=
"form-group row">
370 <label class=
"cd-col-form-label"
373 <div class=
"cd-col-form-input">
374 <span *
ngIf=
"swiftKeys.length === 0"
376 <span class=
"form-text text-muted"
377 i18n
>There are no keys.
</span>
380 <span *
ngFor=
"let key of swiftKeys; let i=index;">
381 <div class=
"input-group">
382 <div class=
"input-group-prepend">
383 <span class=
"input-group-text">
384 <i class=
"{{ icons.key }}"></i>
388 class=
"cd-form-control"
389 value=
"{{ key.user }}"
391 <span class=
"input-group-append">
392 <button type=
"button"
393 class=
"btn btn-light tc_showSwiftKeyButton"
396 (click)=
"showSwiftKeyModal(i)">
397 <i [ngClass]=
"[icons.show]"></i>
401 <span class=
"form-text text-muted"></span>
407 <!-- Capabilities -->
408 <fieldset *
ngIf=
"editing">
409 <legend i18n
>Capabilities
</legend>
411 <div class=
"form-group row">
412 <div class=
"cd-col-form-offset">
413 <span *
ngIf=
"capabilities.length === 0"
415 <span class=
"form-text text-muted"
416 i18n
>There are no capabilities.
</span>
419 <span *
ngFor=
"let cap of capabilities; let i=index;">
420 <div class=
"input-group">
421 <span class=
"input-group-prepend">
422 <div class=
"input-group-text">
423 <i class=
"{{ icons.share }}"></i>
427 class=
"cd-form-control"
428 value=
"{{ cap.type }}:{{ cap.perm }}"
430 <span class=
"input-group-append">
431 <button type=
"button"
432 class=
"btn btn-light tc_editCapButton"
435 (click)=
"showCapabilityModal(i)">
436 <i [ngClass]=
"[icons.edit]"></i>
438 <button type=
"button"
439 class=
"btn btn-light tc_deleteCapButton"
442 (click)=
"deleteCapability(i)">
443 <i [ngClass]=
"[icons.destroy]"></i>
447 <span class=
"form-text text-muted"></span>
452 <button type=
"button"
453 class=
"btn btn-light float-right tc_addCapButton"
454 [disabled]=
"capabilities | pipeFunction:hasAllCapabilities"
456 ngbTooltip=
"All capabilities are already added."
457 [disableTooltip]=
"!(capabilities | pipeFunction:hasAllCapabilities)"
458 triggers=
"pointerenter:pointerleave"
459 (click)=
"showCapabilityModal()">
460 <i [ngClass]=
"[icons.add]"></i>
461 <ng-container i18n
>{{ actionLabels.ADD | titlecase }}
462 {{ capabilityLabel | upperFirst }}
</ng-container>
466 <span class=
"help-block"></span>
473 <legend i18n
>User quota
</legend>
476 <div class=
"form-group row">
477 <div class=
"cd-col-form-offset">
478 <div class=
"custom-control custom-checkbox">
479 <input class=
"custom-control-input"
480 id=
"user_quota_enabled"
482 formControlName=
"user_quota_enabled">
483 <label class=
"custom-control-label"
484 for=
"user_quota_enabled"
490 <!-- Unlimited size -->
491 <div class=
"form-group row"
492 *
ngIf=
"userForm.controls.user_quota_enabled.value">
493 <div class=
"cd-col-form-offset">
494 <div class=
"custom-control custom-checkbox">
495 <input class=
"custom-control-input"
496 id=
"user_quota_max_size_unlimited"
498 formControlName=
"user_quota_max_size_unlimited">
499 <label class=
"custom-control-label"
500 for=
"user_quota_max_size_unlimited"
501 i18n
>Unlimited size
</label>
506 <!-- Maximum size -->
507 <div class=
"form-group row"
508 *
ngIf=
"userForm.controls.user_quota_enabled.value && !userForm.getValue('user_quota_max_size_unlimited')">
509 <label class=
"cd-col-form-label required"
510 for=
"user_quota_max_size"
511 i18n
>Max. size
</label>
512 <div class=
"cd-col-form-input">
513 <input id=
"user_quota_max_size"
516 formControlName=
"user_quota_max_size"
518 <span class=
"invalid-feedback"
519 *
ngIf=
"userForm.showError('user_quota_max_size', frm, 'required')"
520 i18n
>This field is required.
</span>
521 <span class=
"invalid-feedback"
522 *
ngIf=
"userForm.showError('user_quota_max_size', frm, 'quotaMaxSize')"
523 i18n
>The value is not valid.
</span>
527 <!-- Unlimited objects -->
528 <div class=
"form-group row"
529 *
ngIf=
"userForm.controls.user_quota_enabled.value">
530 <div class=
"cd-col-form-offset">
531 <div class=
"custom-control custom-checkbox">
532 <input class=
"custom-control-input"
533 id=
"user_quota_max_objects_unlimited"
535 formControlName=
"user_quota_max_objects_unlimited">
536 <label class=
"custom-control-label"
537 for=
"user_quota_max_objects_unlimited"
538 i18n
>Unlimited objects
</label>
543 <!-- Maximum objects -->
544 <div class=
"form-group row"
545 *
ngIf=
"userForm.controls.user_quota_enabled.value && !userForm.getValue('user_quota_max_objects_unlimited')">
546 <label class=
"cd-col-form-label required"
547 for=
"user_quota_max_objects"
548 i18n
>Max. objects
</label>
549 <div class=
"cd-col-form-input">
550 <input id=
"user_quota_max_objects"
553 formControlName=
"user_quota_max_objects">
554 <span class=
"invalid-feedback"
555 *
ngIf=
"userForm.showError('user_quota_max_objects', frm, 'required')"
556 i18n
>This field is required.
</span>
557 <span class=
"invalid-feedback"
558 *
ngIf=
"userForm.showError('user_quota_max_objects', frm, 'min')"
559 i18n
>The entered value must be
>=
0.
</span>
564 <!-- Bucket quota -->
566 <legend i18n
>Bucket quota
</legend>
569 <div class=
"form-group row">
570 <div class=
"cd-col-form-offset">
571 <div class=
"custom-control custom-checkbox">
572 <input class=
"custom-control-input"
573 id=
"bucket_quota_enabled"
575 formControlName=
"bucket_quota_enabled">
576 <label class=
"custom-control-label"
577 for=
"bucket_quota_enabled"
583 <!-- Unlimited size -->
584 <div class=
"form-group row"
585 *
ngIf=
"userForm.controls.bucket_quota_enabled.value">
586 <div class=
"cd-col-form-offset">
587 <div class=
"custom-control custom-checkbox">
588 <input class=
"custom-control-input"
589 id=
"bucket_quota_max_size_unlimited"
591 formControlName=
"bucket_quota_max_size_unlimited">
592 <label class=
"custom-control-label"
593 for=
"bucket_quota_max_size_unlimited"
594 i18n
>Unlimited size
</label>
599 <!-- Maximum size -->
600 <div class=
"form-group row"
601 *
ngIf=
"userForm.controls.bucket_quota_enabled.value && !userForm.getValue('bucket_quota_max_size_unlimited')">
602 <label class=
"cd-col-form-label required"
603 for=
"bucket_quota_max_size"
604 i18n
>Max. size
</label>
605 <div class=
"cd-col-form-input">
606 <input id=
"bucket_quota_max_size"
609 formControlName=
"bucket_quota_max_size"
611 <span class=
"invalid-feedback"
612 *
ngIf=
"userForm.showError('bucket_quota_max_size', frm, 'required')"
613 i18n
>This field is required.
</span>
614 <span class=
"invalid-feedback"
615 *
ngIf=
"userForm.showError('bucket_quota_max_size', frm, 'quotaMaxSize')"
616 i18n
>The value is not valid.
</span>
620 <!-- Unlimited objects -->
621 <div class=
"form-group row"
622 *
ngIf=
"userForm.controls.bucket_quota_enabled.value">
623 <div class=
"cd-col-form-offset">
624 <div class=
"custom-control custom-checkbox">
625 <input class=
"custom-control-input"
626 id=
"bucket_quota_max_objects_unlimited"
628 formControlName=
"bucket_quota_max_objects_unlimited">
629 <label class=
"custom-control-label"
630 for=
"bucket_quota_max_objects_unlimited"
631 i18n
>Unlimited objects
</label>
636 <!-- Maximum objects -->
637 <div class=
"form-group row"
638 *
ngIf=
"userForm.controls.bucket_quota_enabled.value && !userForm.getValue('bucket_quota_max_objects_unlimited')">
639 <label class=
"cd-col-form-label required"
640 for=
"bucket_quota_max_objects"
641 i18n
>Max. objects
</label>
642 <div class=
"cd-col-form-input">
643 <input id=
"bucket_quota_max_objects"
646 formControlName=
"bucket_quota_max_objects">
647 <span class=
"invalid-feedback"
648 *
ngIf=
"userForm.showError('bucket_quota_max_objects', frm, 'required')"
649 i18n
>This field is required.
</span>
650 <span class=
"invalid-feedback"
651 *
ngIf=
"userForm.showError('bucket_quota_max_objects', frm, 'min')"
652 i18n
>The entered value must be
>=
0.
</span>
658 <div class=
"card-footer">
659 <cd-form-button-panel (submitActionEvent)=
"onSubmit()"
661 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"
662 wrappingClass=
"text-right"></cd-form-button-panel>