1 <cd-loading-panel *
ngIf=
"editing && loading && !error"
2 i18n
>Loading user data...
</cd-loading-panel>
3 <cd-error-panel *
ngIf=
"editing && error"
4 (backAction)=
"goToListView()"
5 i18n
>The user data could not be loaded.
</cd-error-panel>
7 <div class=
"col-sm-12 col-lg-6"
8 *
ngIf=
"!loading && !error">
9 <form class=
"form-horizontal"
11 [formGroup]=
"userForm"
13 <div class=
"panel panel-default">
14 <div class=
"panel-heading">
15 <h3 i18n=
"form title|Example: Create Pool@@formTitle"
16 class=
"panel-title">{{ action | titlecase }} {{ resource | upperFirst }}
</h3>
18 <div class=
"panel-body">
21 <div class=
"form-group"
22 [ngClass]=
"{'has-error': userForm.showError('uid', frm)}">
23 <label class=
"control-label col-sm-3"
25 <ng-container i18n
>Username
</ng-container>
26 <span class=
"required"
30 <div class=
"col-sm-9">
37 <span class=
"help-block"
38 *
ngIf=
"userForm.showError('uid', frm, 'required')"
39 i18n
>This field is required.
</span>
40 <span class=
"help-block"
41 *
ngIf=
"userForm.showError('uid', frm, 'notUnique')"
42 i18n
>The chosen user ID is already in use.
</span>
47 <div class=
"form-group"
48 [ngClass]=
"{'has-error': userForm.showError('display_name', frm)}">
49 <label class=
"control-label col-sm-3"
51 <ng-container i18n
>Full name
</ng-container>
52 <span class=
"required"
56 <div class=
"col-sm-9">
57 <input id=
"display_name"
60 formControlName=
"display_name">
61 <span class=
"help-block"
62 *
ngIf=
"userForm.showError('display_name', frm, 'required')"
63 i18n
>This field is required.
</span>
67 <!-- Email address -->
68 <div class=
"form-group"
69 [ngClass]=
"{'has-error': userForm.showError('email', frm)}">
70 <label class=
"control-label col-sm-3"
72 i18n
>Email address
</label>
73 <div class=
"col-sm-9">
77 formControlName=
"email">
78 <span class=
"help-block"
79 *
ngIf=
"userForm.showError('email', frm, 'email')"
80 i18n
>This is not a valid email address.
</span>
81 <span class=
"help-block"
82 *
ngIf=
"userForm.showError('email', frm, 'notUnique')"
83 i18n
>The chosen email address is already in use.
</span>
88 <div class=
"form-group"
89 [ngClass]=
"{'has-error': userForm.showError('max_buckets', frm)}">
90 <label class=
"control-label col-sm-3"
92 <ng-container i18n
>Max. buckets
</ng-container>
93 <span class=
"required"></span>
95 <div class=
"col-sm-9">
96 <input id=
"max_buckets"
99 formControlName=
"max_buckets">
100 <span class=
"help-block"
101 *
ngIf=
"userForm.showError('max_buckets', frm, 'required')"
102 i18n
>This field is required.
</span>
103 <span class=
"help-block"
104 *
ngIf=
"userForm.showError('max_buckets', frm, 'min')"
105 i18n
>The entered value must be
>=
0.
</span>
110 <div class=
"form-group">
111 <div class=
"col-sm-offset-3 col-sm-9">
112 <div class=
"checkbox checkbox-primary">
113 <input id=
"suspended"
115 formControlName=
"suspended">
116 <label for=
"suspended"
117 i18n
>Suspended
</label>
123 <fieldset *
ngIf=
"!editing">
124 <legend i18n
>S3 key
</legend>
126 <!-- Auto-generate key -->
127 <div class=
"form-group">
128 <div class=
"col-sm-offset-3 col-sm-9">
129 <div class=
"checkbox checkbox-primary">
130 <input id=
"generate_key"
132 formControlName=
"generate_key">
133 <label for=
"generate_key"
134 i18n
>Auto-generate key
</label>
140 <div class=
"form-group"
141 [ngClass]=
"{'has-error': userForm.showError('access_key', frm)}"
142 *
ngIf=
"!editing && !userForm.getValue('generate_key')">
143 <label class=
"control-label col-sm-3"
145 <ng-container i18n
>Access key
</ng-container>
146 <span class=
"required"></span>
148 <div class=
"col-sm-9">
149 <div class=
"input-group">
150 <input id=
"access_key"
153 formControlName=
"access_key">
154 <span class=
"input-group-btn">
155 <button type=
"button"
156 class=
"btn btn-default"
157 cdPasswordButton=
"access_key">
159 <button type=
"button"
160 class=
"btn btn-default"
161 cdCopy2ClipboardButton=
"access_key">
165 <span class=
"help-block"
166 *
ngIf=
"userForm.showError('access_key', frm, 'required')"
167 i18n
>This field is required.
</span>
172 <div class=
"form-group"
173 [ngClass]=
"{'has-error': userForm.showError('secret_key', frm)}"
174 *
ngIf=
"!editing && !userForm.getValue('generate_key')">
175 <label class=
"control-label col-sm-3"
177 <ng-container i18n
>Secret key
</ng-container>
178 <span class=
"required"></span>
180 <div class=
"col-sm-9">
181 <div class=
"input-group">
182 <input id=
"secret_key"
185 formControlName=
"secret_key">
186 <span class=
"input-group-btn">
187 <button type=
"button"
188 class=
"btn btn-default"
189 cdPasswordButton=
"secret_key">
191 <button type=
"button"
192 class=
"btn btn-default"
193 cdCopy2ClipboardButton=
"secret_key">
197 <span class=
"help-block"
198 *
ngIf=
"userForm.showError('secret_key', frm, 'required')"
199 i18n
>This field is required.
</span>
205 <fieldset *
ngIf=
"editing">
206 <legend i18n
>Subusers
</legend>
208 <div class=
"col-sm-offset-3 col-sm-9">
209 <span *
ngIf=
"subusers.length === 0"
210 class=
"form-control no-border">
211 <span class=
"text-muted"
212 i18n
>There are no subusers.
</span>
215 <span *
ngFor=
"let subuser of subusers; let i=index;">
216 <div class=
"input-group">
217 <span class=
"input-group-addon">
218 <i class=
"icon-prepend fa fa-user"></i>
222 value=
"{{ subuser.id }}"
224 <span class=
"input-group-addon"
225 style=
"border-left: 0; border-right: 0;">
226 <i class=
"icon-prepend fa fa-share-alt"></i>
230 value=
"{{ ('full-control' === subuser.permissions) ? 'full' : subuser.permissions }}"
232 <span class=
"input-group-btn">
233 <button type=
"button"
234 class=
"btn btn-default tc_showSubuserButton"
237 (click)=
"showSubuserModal(i)">
238 <i class=
"fa fa-cogs"></i>
240 <button type=
"button"
241 class=
"btn btn-default tc_deleteSubuserButton"
244 (click)=
"deleteSubuser(i)">
245 <i class=
"fa fa-times"></i>
249 <span class=
"help-block"></span>
252 <span class=
"form-control no-border">
253 <button type=
"button"
254 class=
"btn btn-sm btn-default btn-label pull-right tc_addSubuserButton"
255 (click)=
"showSubuserModal()">
256 <i class=
"fa fa-fw fa-plus"></i>
257 <ng-container i18n
>{{ actionLabels.CREATE | titlecase }} {{ subuserLabel | upperFirst }}
</ng-container>
264 <fieldset *
ngIf=
"editing">
265 <legend i18n
>Keys
</legend>
268 <label class=
"col-sm-3 control-label"
270 <div class=
"col-sm-9">
271 <span *
ngIf=
"s3Keys.length === 0"
272 class=
"form-control no-border">
273 <span class=
"text-muted"
274 i18n
>There are no keys.
</span>
277 <span *
ngFor=
"let key of s3Keys; let i=index;">
278 <div class=
"input-group">
279 <span class=
"input-group-addon">
280 <i class=
"icon-prepend fa fa-key"></i>
284 value=
"{{ key.user }}"
286 <span class=
"input-group-btn">
287 <button type=
"button"
288 class=
"btn btn-default tc_showS3KeyButton"
291 (click)=
"showS3KeyModal(i)">
292 <i class=
"fa fa-eye"></i>
294 <button type=
"button"
295 class=
"btn btn-default tc_deleteS3KeyButton"
298 (click)=
"deleteS3Key(i)">
299 <i class=
"fa fa-times"></i>
303 <span class=
"help-block"></span>
306 <span class=
"form-control no-border">
307 <button type=
"button"
308 class=
"btn btn-sm btn-default btn-label pull-right tc_addS3KeyButton"
309 (click)=
"showS3KeyModal()">
310 <i class=
"fa fa-fw fa-plus"></i>
311 <ng-container i18n
>{{ actionLabels.CREATE | titlecase }} {{ s3keyLabel | upperFirst }}
</ng-container>
318 <label class=
"col-sm-3 control-label"
320 <div class=
"col-sm-9">
321 <span *
ngIf=
"swiftKeys.length === 0"
322 class=
"form-control no-border">
323 <span class=
"text-muted"
324 i18n
>There are no keys.
</span>
327 <span *
ngFor=
"let key of swiftKeys; let i=index;">
328 <div class=
"input-group">
329 <span class=
"input-group-addon">
330 <i class=
"icon-prepend fa fa-key"></i>
334 value=
"{{ key.user }}"
336 <span class=
"input-group-btn">
337 <button type=
"button"
338 class=
"btn btn-default tc_showSwiftKeyButton"
341 (click)=
"showSwiftKeyModal(i)">
342 <i class=
"fa fa-eye"></i>
346 <span class=
"help-block"></span>
351 <!-- Capabilities -->
352 <fieldset *
ngIf=
"editing">
353 <legend i18n
>Capabilities
</legend>
355 <div class=
"col-sm-offset-3 col-sm-9">
356 <span *
ngIf=
"capabilities.length === 0"
357 class=
"form-control no-border">
358 <span class=
"text-muted"
359 i18n
>There are no capabilities.
</span>
362 <span *
ngFor=
"let cap of capabilities; let i=index;">
363 <div class=
"input-group">
364 <span class=
"input-group-addon">
365 <i class=
"icon-prepend fa fa-share-alt"></i>
369 value=
"{{ cap.type }}:{{ cap.perm }}"
371 <span class=
"input-group-btn">
372 <button type=
"button"
373 class=
"btn btn-default tc_editCapButton"
376 (click)=
"showCapabilityModal(i)">
377 <i class=
"fa fa-cogs"></i>
379 <button type=
"button"
380 class=
"btn btn-default tc_deleteCapButton"
383 (click)=
"deleteCapability(i)">
384 <i class=
"fa fa-times"></i>
388 <span class=
"help-block"></span>
391 <span class=
"form-control no-border">
392 <button type=
"button"
393 class=
"btn btn-sm btn-default btn-label pull-right tc_addCapButton"
394 (click)=
"showCapabilityModal()">
395 <i class=
"fa fa-fw fa-plus"></i>
396 <ng-container i18n
>{{ actionLabels.ADD | titlecase }} {{ capabilityLabel | upperFirst }}
</ng-container>
404 <legend i18n
>User quota
</legend>
407 <div class=
"form-group">
408 <div class=
"col-sm-offset-3 col-sm-9">
409 <div class=
"checkbox checkbox-primary">
410 <input id=
"user_quota_enabled"
412 formControlName=
"user_quota_enabled">
413 <label for=
"user_quota_enabled"
419 <!-- Unlimited size -->
420 <div class=
"form-group"
421 *
ngIf=
"userForm.controls.user_quota_enabled.value">
422 <div class=
"col-sm-offset-3 col-sm-9">
423 <div class=
"checkbox checkbox-primary">
424 <input id=
"user_quota_max_size_unlimited"
426 formControlName=
"user_quota_max_size_unlimited">
427 <label for=
"user_quota_max_size_unlimited"
428 i18n
>Unlimited size
</label>
433 <!-- Maximum size -->
434 <div class=
"form-group"
435 [ngClass]=
"{'has-error': userForm.showError('user_quota_max_size', frm)}"
436 *
ngIf=
"!userForm.getValue('user_quota_max_size_unlimited')">
437 <label class=
"control-label col-sm-3"
438 for=
"user_quota_max_size">
439 <ng-container i18n
>Max. size
</ng-container>
440 <span class=
"required"></span>
442 <div class=
"col-sm-9">
443 <input id=
"user_quota_max_size"
446 formControlName=
"user_quota_max_size"
448 <span class=
"help-block"
449 *
ngIf=
"userForm.showError('user_quota_max_size', frm, 'required')"
450 i18n
>This field is required.
</span>
451 <span class=
"help-block"
452 *
ngIf=
"userForm.showError('user_quota_max_size', frm, 'quotaMaxSize')"
453 i18n
>The value is not valid.
</span>
457 <!-- Unlimited objects -->
458 <div class=
"form-group"
459 *
ngIf=
"userForm.controls.user_quota_enabled.value">
460 <div class=
"col-sm-offset-3 col-sm-9">
461 <div class=
"checkbox checkbox-primary">
462 <input id=
"user_quota_max_objects_unlimited"
464 formControlName=
"user_quota_max_objects_unlimited">
465 <label for=
"user_quota_max_objects_unlimited"
466 i18n
>Unlimited objects
</label>
471 <!-- Maximum objects -->
472 <div class=
"form-group"
473 [ngClass]=
"{'has-error': userForm.showError('user_quota_max_objects', frm)}"
474 *
ngIf=
"!userForm.getValue('user_quota_max_objects_unlimited')">
475 <label class=
"control-label col-sm-3"
476 for=
"user_quota_max_objects">
477 <ng-container i18n
>Max. objects
</ng-container>
478 <span class=
"required"></span>
480 <div class=
"col-sm-9">
481 <input id=
"user_quota_max_objects"
484 formControlName=
"user_quota_max_objects">
485 <span class=
"help-block"
486 *
ngIf=
"userForm.showError('user_quota_max_objects', frm, 'required')"
487 i18n
>This field is required.
</span>
488 <span class=
"help-block"
489 *
ngIf=
"userForm.showError('user_quota_max_objects', frm, 'min')"
490 i18n
>The entered value must be
>=
0.
</span>
495 <!-- Bucket quota -->
497 <legend i18n
>Bucket quota
</legend>
500 <div class=
"form-group">
501 <div class=
"col-sm-offset-3 col-sm-9">
502 <div class=
"checkbox checkbox-primary">
503 <input id=
"bucket_quota_enabled"
505 formControlName=
"bucket_quota_enabled">
506 <label for=
"bucket_quota_enabled"
512 <!-- Unlimited size -->
513 <div class=
"form-group"
514 *
ngIf=
"userForm.controls.bucket_quota_enabled.value">
515 <div class=
"col-sm-offset-3 col-sm-9">
516 <div class=
"checkbox checkbox-primary">
517 <input id=
"bucket_quota_max_size_unlimited"
519 formControlName=
"bucket_quota_max_size_unlimited">
520 <label for=
"bucket_quota_max_size_unlimited"
521 i18n
>Unlimited size
</label>
526 <!-- Maximum size -->
527 <div class=
"form-group"
528 [ngClass]=
"{'has-error': userForm.showError('bucket_quota_max_size', frm)}"
529 *
ngIf=
"!userForm.getValue('bucket_quota_max_size_unlimited')">
530 <label class=
"control-label col-sm-3"
531 for=
"bucket_quota_max_size">
532 <ng-container i18n
>Max. size
</ng-container>
533 <span class=
"required"></span>
535 <div class=
"col-sm-9">
536 <input id=
"bucket_quota_max_size"
539 formControlName=
"bucket_quota_max_size"
541 <span class=
"help-block"
542 *
ngIf=
"userForm.showError('bucket_quota_max_size', frm, 'required')"
543 i18n
>This field is required.
</span>
544 <span class=
"help-block"
545 *
ngIf=
"userForm.showError('bucket_quota_max_size', frm, 'quotaMaxSize')"
546 i18n
>The value is not valid.
</span>
550 <!-- Unlimited objects -->
551 <div class=
"form-group"
552 *
ngIf=
"userForm.controls.bucket_quota_enabled.value">
553 <div class=
"col-sm-offset-3 col-sm-9">
554 <div class=
"checkbox checkbox-primary">
555 <input id=
"bucket_quota_max_objects_unlimited"
557 formControlName=
"bucket_quota_max_objects_unlimited">
558 <label for=
"bucket_quota_max_objects_unlimited"
559 i18n
>Unlimited objects
</label>
564 <!-- Maximum objects -->
565 <div class=
"form-group"
566 [ngClass]=
"{'has-error': userForm.showError('bucket_quota_max_objects', frm)}"
567 *
ngIf=
"!userForm.getValue('bucket_quota_max_objects_unlimited')">
568 <label class=
"control-label col-sm-3"
569 for=
"bucket_quota_max_objects">
570 <ng-container i18n
>Max. objects
</ng-container>
571 <span class=
"required"></span>
573 <div class=
"col-sm-9">
574 <input id=
"bucket_quota_max_objects"
577 formControlName=
"bucket_quota_max_objects">
578 <span class=
"help-block"
579 *
ngIf=
"userForm.showError('bucket_quota_max_objects', frm, 'required')"
580 i18n
>This field is required.
</span>
581 <span class=
"help-block"
582 *
ngIf=
"userForm.showError('bucket_quota_max_objects', frm, 'min')"
583 i18n
>The entered value must be
>=
0.
</span>
589 <div class=
"panel-footer">
590 <div class=
"button-group text-right">
592 (submitAction)=
"onSubmit()"
594 i18n=
"form action button|Example: Create Pool@@formActionButton"
595 type=
"button">{{ action | titlecase }} {{ resource | upperFirst }}
</cd-submit-button>
596 <cd-back-button></cd-back-button>