1 <div class=
"cd-col-form"
2 *
cdFormLoading=
"loading">
3 <form name=
"bucketForm"
5 [formGroup]=
"bucketForm"
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"
16 class=
"cd-col-form-label"
18 <div class=
"cd-col-form-input">
29 <div class=
"form-group row">
30 <label class=
"cd-col-form-label"
31 [ngClass]=
"{required: !editing}"
34 <div class=
"cd-col-form-input">
43 [autofocus]=
"!editing">
44 <span class=
"invalid-feedback"
45 *
ngIf=
"bucketForm.showError('bid', frm, 'required')"
46 i18n
>This field is required.
</span>
47 <span class=
"invalid-feedback"
48 *
ngIf=
"bucketForm.showError('bid', frm, 'bucketNameInvalid')"
49 i18n
>The value is not valid.
</span>
50 <span class=
"invalid-feedback"
51 *
ngIf=
"bucketForm.showError('bid', frm, 'bucketNameExists')"
52 i18n
>The chosen name is already in use.
</span>
53 <span class=
"invalid-feedback"
54 *
ngIf=
"bucketForm.showError('bid', frm, 'containsUpperCase')"
55 i18n
>Bucket names must not contain uppercase characters or underscores.
</span>
56 <span class=
"invalid-feedback"
57 *
ngIf=
"bucketForm.showError('bid', frm, 'lowerCaseOrNumber')"
58 i18n
>Each label must start and end with a lowercase letter or a number.
</span>
59 <span class=
"invalid-feedback"
60 *
ngIf=
"bucketForm.showError('bid', frm, 'ipAddress')"
61 i18n
>Bucket names cannot be formatted as IP address.
</span>
62 <span class=
"invalid-feedback"
63 *
ngIf=
"bucketForm.showError('bid', frm, 'onlyLowerCaseAndNumbers')"
64 i18n
>Bucket names can only contain lowercase letters, numbers, and hyphens.
</span>
65 <span class=
"invalid-feedback"
66 *
ngIf=
"bucketForm.showError('bid', frm, 'shouldBeInRange')"
67 i18n
>Bucket names must be
3 to
63 characters long.
</span>
72 <div class=
"form-group row">
73 <label class=
"cd-col-form-label required"
76 <div class=
"cd-col-form-input">
79 class=
"form-control custom-select"
80 formControlName=
"owner"
81 [autofocus]=
"editing">
83 *
ngIf=
"owners === null"
84 [ngValue]=
"null">Loading...
</option>
86 *
ngIf=
"owners !== null"
87 [ngValue]=
"null">-- Select a user --
</option>
88 <option *
ngFor=
"let owner of owners"
89 [value]=
"owner">{{ owner }}
</option>
91 <span class=
"invalid-feedback"
92 *
ngIf=
"bucketForm.showError('owner', frm, 'required')"
93 i18n
>This field is required.
</span>
97 <!-- Placement target -->
98 <div class=
"form-group row">
99 <label class=
"cd-col-form-label"
100 [ngClass]=
"{required: !editing}"
101 for=
"placement-target"
102 i18n
>Placement target
</label>
103 <div class=
"cd-col-form-input">
104 <ng-template #placementTargetSelect
>
105 <select id=
"placement-target"
106 name=
"placement-target"
107 formControlName=
"placement-target"
108 class=
"form-control custom-select">
110 *
ngIf=
"placementTargets === null"
111 [ngValue]=
"null">Loading...
</option>
113 *
ngIf=
"placementTargets !== null"
114 [ngValue]=
"null">-- Select a placement target --
</option>
115 <option *
ngFor=
"let placementTarget of placementTargets"
116 [value]=
"placementTarget.name">{{ placementTarget.description }}
</option>
118 <span class=
"invalid-feedback"
119 *
ngIf=
"bucketForm.showError('placement-target', frm, 'required')"
120 i18n
>This field is required.
</span>
122 <ng-container *
ngIf=
"editing; else placementTargetSelect">
123 <input id=
"placement-target"
124 name=
"placement-target"
125 formControlName=
"placement-target"
134 <fieldset *
ngIf=
"editing">
135 <legend class=
"cd-header"
136 i18n
>Versioning
</legend>
138 <div class=
"form-group row">
139 <div class=
"cd-col-form-offset">
140 <div class=
"custom-control custom-checkbox">
141 <input type=
"checkbox"
142 class=
"custom-control-input"
145 formControlName=
"versioning"
146 (change)=
"setMfaDeleteValidators()">
147 <label class=
"custom-control-label"
151 <span i18n
>Enables versioning for the objects in the bucket.
</span>
158 <!-- Multi-Factor Authentication -->
159 <fieldset *
ngIf=
"editing">
161 <legend class=
"cd-header"
162 i18n
>Multi-Factor Authentication
</legend>
164 <div class=
"form-group row">
165 <div class=
"cd-col-form-offset">
166 <div class=
"custom-control custom-checkbox">
167 <input type=
"checkbox"
168 class=
"custom-control-input"
171 formControlName=
"mfa-delete"
172 (change)=
"setMfaDeleteValidators()">
173 <label class=
"custom-control-label"
175 i18n
>Delete enabled
</label>
177 <span i18n
>Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.
</span>
182 <div *
ngIf=
"areMfaCredentialsRequired()"
183 class=
"form-group row">
185 class=
"cd-col-form-label"
186 for=
"mfa-token-serial">Token Serial Number
</label>
187 <div class=
"cd-col-form-input">
189 id=
"mfa-token-serial"
190 name=
"mfa-token-serial"
191 formControlName=
"mfa-token-serial"
192 class=
"form-control">
193 <span class=
"invalid-feedback"
194 *
ngIf=
"bucketForm.showError('mfa-token-serial', frm, 'required')"
195 i18n
>This field is required.
</span>
198 <div *
ngIf=
"areMfaCredentialsRequired()"
199 class=
"form-group row">
201 class=
"cd-col-form-label"
202 for=
"mfa-token-pin">Token PIN
</label>
203 <div class=
"cd-col-form-input">
207 formControlName=
"mfa-token-pin"
208 class=
"form-control">
209 <span class=
"invalid-feedback"
210 *
ngIf=
"bucketForm.showError('mfa-token-pin', frm, 'required')"
211 i18n
>This field is required.
</span>
218 <legend class=
"cd-header"
219 i18n
>Locking
</legend>
221 <!-- Locking enabled -->
222 <div class=
"form-group row">
223 <div class=
"cd-col-form-offset">
224 <div class=
"custom-control custom-checkbox">
225 <input class=
"custom-control-input"
227 formControlName=
"lock_enabled"
229 <label class=
"custom-control-label"
233 <span i18n
>Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.
</span>
239 <!-- Locking mode -->
240 <div *
ngIf=
"bucketForm.getValue('lock_enabled')"
241 class=
"form-group row">
242 <label class=
"cd-col-form-label"
245 <div class=
"cd-col-form-input">
246 <select class=
"form-control custom-select"
247 formControlName=
"lock_mode"
251 value=
"COMPLIANCE">Compliance
</option>
253 value=
"GOVERNANCE">Governance
</option>
258 <!-- Retention period (days) -->
259 <div *
ngIf=
"bucketForm.getValue('lock_enabled')"
260 class=
"form-group row">
261 <label class=
"cd-col-form-label"
262 for=
"lock_retention_period_days">
263 <ng-container i18n
>Days
</ng-container>
264 <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>
266 <div class=
"cd-col-form-input">
267 <input class=
"form-control"
269 id=
"lock_retention_period_days"
270 formControlName=
"lock_retention_period_days"
272 <span class=
"invalid-feedback"
273 *
ngIf=
"bucketForm.showError('lock_retention_period_days', frm, 'pattern')"
274 i18n
>The entered value must be a positive integer.
</span>
275 <span class=
"invalid-feedback"
276 *
ngIf=
"bucketForm.showError('lock_retention_period_days', frm, 'lockDays')"
277 i18n
>Retention Days must be a positive integer.
</span>
283 <div class=
"card-footer">
284 <cd-form-button-panel (submitActionEvent)=
"submit()"
286 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"
287 wrappingClass=
"text-right"></cd-form-button-panel>