1 <cd-loading-panel *
ngIf=
"editing && loading && !error"
2 i18n
>Loading bucket data...
</cd-loading-panel>
4 <div class=
"cd-col-form"
5 *
ngIf=
"!loading && !error">
6 <form name=
"bucketForm"
8 [formGroup]=
"bucketForm"
11 <div i18n=
"form title|Example: Create Pool@@formTitle"
12 class=
"card-header">{{ action | titlecase }} {{ resource | upperFirst }}
</div>
14 <div class=
"card-body">
16 <div class=
"form-group row"
19 class=
"cd-col-form-label"
21 <div class=
"cd-col-form-input">
32 <div class=
"form-group row">
33 <label class=
"cd-col-form-label"
34 [ngClass]=
"{required: !editing}"
37 <div class=
"cd-col-form-input">
46 [autofocus]=
"!editing">
47 <span class=
"invalid-feedback"
48 *
ngIf=
"bucketForm.showError('bid', frm, 'required')"
49 i18n
>This field is required.
</span>
50 <span class=
"invalid-feedback"
51 *
ngIf=
"bucketForm.showError('bid', frm, 'bucketNameInvalid')"
52 i18n
>The value is not valid.
</span>
53 <span class=
"invalid-feedback"
54 *
ngIf=
"bucketForm.showError('bid', frm, 'bucketNameExists')"
55 i18n
>The chosen name is already in use.
</span>
60 <div class=
"form-group row">
61 <label class=
"cd-col-form-label required"
64 <div class=
"cd-col-form-input">
67 class=
"form-control custom-select"
68 formControlName=
"owner"
69 [autofocus]=
"editing">
71 *
ngIf=
"owners === null"
72 [ngValue]=
"null">Loading...
</option>
74 *
ngIf=
"owners !== null"
75 [ngValue]=
"null">-- Select a user --
</option>
76 <option *
ngFor=
"let owner of owners"
77 [value]=
"owner">{{ owner }}
</option>
79 <span class=
"invalid-feedback"
80 *
ngIf=
"bucketForm.showError('owner', frm, 'required')"
81 i18n
>This field is required.
</span>
85 <!-- Placement target -->
86 <div class=
"form-group row">
87 <label class=
"cd-col-form-label"
88 [ngClass]=
"{required: !editing}"
89 for=
"placement-target"
90 i18n
>Placement target
</label>
91 <div class=
"cd-col-form-input">
92 <ng-template #placementTargetSelect
>
93 <select id=
"placement-target"
94 name=
"placement-target"
95 formControlName=
"placement-target"
96 class=
"form-control custom-select">
98 *
ngIf=
"placementTargets === null"
99 [ngValue]=
"null">Loading...
</option>
101 *
ngIf=
"placementTargets !== null"
102 [ngValue]=
"null">-- Select a placement target --
</option>
103 <option *
ngFor=
"let placementTarget of placementTargets"
104 [value]=
"placementTarget.name">{{ placementTarget.description }}
</option>
106 <span class=
"invalid-feedback"
107 *
ngIf=
"bucketForm.showError('placement-target', frm, 'required')"
108 i18n
>This field is required.
</span>
110 <ng-container *
ngIf=
"editing; else placementTargetSelect">
111 <input id=
"placement-target"
112 name=
"placement-target"
113 formControlName=
"placement-target"
122 <fieldset *
ngIf=
"editing">
123 <legend class=
"cd-header"
124 i18n
>Versioning
</legend>
126 <div class=
"form-group row">
127 <div class=
"cd-col-form-offset">
128 <div class=
"custom-control custom-checkbox">
129 <input type=
"checkbox"
130 class=
"custom-control-input"
133 formControlName=
"versioning"
134 [checked]=
"isVersioningEnabled"
135 (change)=
"updateVersioning()">
136 <label class=
"custom-control-label"
140 <span i18n
>Enables versioning for the objects in the bucket.
</span>
147 <!-- Multi-Factor Authentication -->
148 <fieldset *
ngIf=
"editing">
150 <legend class=
"cd-header"
151 i18n
>Multi-Factor Authentication
</legend>
153 <div class=
"form-group row">
154 <div class=
"cd-col-form-offset">
155 <div class=
"custom-control custom-checkbox">
156 <input type=
"checkbox"
157 class=
"custom-control-input"
160 formControlName=
"mfa-delete"
161 [checked]=
"isMfaDeleteEnabled"
162 (change)=
"updateMfaDelete()">
163 <label class=
"custom-control-label"
165 i18n
>Delete enabled
</label>
167 <span i18n
>Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.
</span>
172 <div *
ngIf=
"areMfaCredentialsRequired()"
173 class=
"form-group row">
175 class=
"cd-col-form-label"
176 for=
"mfa-token-serial">Token Serial Number
</label>
177 <div class=
"cd-col-form-input">
179 id=
"mfa-token-serial"
180 name=
"mfa-token-serial"
181 formControlName=
"mfa-token-serial"
182 class=
"form-control">
183 <span class=
"invalid-feedback"
184 *
ngIf=
"bucketForm.showError('mfa-token-serial', frm, 'required')"
185 i18n
>This field is required.
</span>
188 <div *
ngIf=
"areMfaCredentialsRequired()"
189 class=
"form-group row">
191 class=
"cd-col-form-label"
192 for=
"mfa-token-pin">Token PIN
</label>
193 <div class=
"cd-col-form-input">
197 formControlName=
"mfa-token-pin"
198 class=
"form-control">
199 <span class=
"invalid-feedback"
200 *
ngIf=
"bucketForm.showError('mfa-token-pin', frm, 'required')"
201 i18n
>This field is required.
</span>
208 <legend class=
"cd-header"
209 i18n
>Locking
</legend>
211 <!-- Locking enabled -->
212 <div class=
"form-group row">
213 <div class=
"cd-col-form-offset">
214 <div class=
"custom-control custom-checkbox">
215 <input class=
"custom-control-input"
217 formControlName=
"lock_enabled"
219 <label class=
"custom-control-label"
223 <span i18n
>Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.
</span>
229 <!-- Locking mode -->
230 <div *
ngIf=
"bucketForm.getValue('lock_enabled')"
231 class=
"form-group row">
232 <label class=
"cd-col-form-label"
235 <div class=
"cd-col-form-input">
236 <select class=
"form-control custom-select"
237 formControlName=
"lock_mode"
241 value=
"COMPLIANCE">Compliance
</option>
243 value=
"GOVERNANCE">Governance
</option>
248 <!-- Retention period (days) -->
249 <div *
ngIf=
"bucketForm.getValue('lock_enabled')"
250 class=
"form-group row">
251 <label class=
"cd-col-form-label"
252 for=
"lock_retention_period_days">
253 <ng-container i18n
>Days
</ng-container>
254 <cd-helper i18n
>The number of days that you want to specify for the default retention period that will be applied to new objects placed in this bucket.
</cd-helper>
256 <div class=
"cd-col-form-input">
257 <input class=
"form-control"
259 id=
"lock_retention_period_days"
260 formControlName=
"lock_retention_period_days"
262 <span class=
"invalid-feedback"
263 *
ngIf=
"bucketForm.showError('lock_retention_period_days', frm, 'pattern')"
264 i18n
>The entered value must be a positive integer.
</span>
265 <span class=
"invalid-feedback"
266 *
ngIf=
"bucketForm.showError('lock_retention_period_days', frm, 'eitherDaysOrYears')"
267 i18n
>Retention period requires either Days or Years.
</span>
271 <!-- Retention period (years) -->
272 <div *
ngIf=
"bucketForm.getValue('lock_enabled')"
273 class=
"form-group row">
274 <label class=
"cd-col-form-label"
275 for=
"lock_retention_period_years">
276 <ng-container i18n
>Years
</ng-container>
277 <cd-helper i18n
>The number of years that you want to specify for the default retention period that will be applied to new objects placed in this bucket.
</cd-helper>
279 <div class=
"cd-col-form-input">
280 <input class=
"form-control"
282 id=
"lock_retention_period_years"
283 formControlName=
"lock_retention_period_years"
285 <span class=
"invalid-feedback"
286 *
ngIf=
"bucketForm.showError('lock_retention_period_days', frm, 'pattern')"
287 i18n
>The entered value must be a positive integer.
</span>
288 <span class=
"invalid-feedback"
289 *
ngIf=
"bucketForm.showError('lock_retention_period_years', frm, 'eitherDaysOrYears')"
290 i18n
>Retention period requires either Days or Years.
</span>
296 <div class=
"card-footer">
297 <div class=
"button-group text-right">
298 <cd-submit-button (submitAction)=
"submit()"
299 i18n=
"form action button|Example: Create Pool@@formActionButton"
300 [form]=
"bucketForm">{{ action | titlecase }} {{ resource | upperFirst }}
</cd-submit-button>
301 <cd-back-button></cd-back-button>