]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html
bump version to 15.2.11-pve1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / rgw / rgw-bucket-form / rgw-bucket-form.component.html
CommitLineData
11fdf7f2
TL
1<cd-loading-panel *ngIf="editing && loading && !error"
2 i18n>Loading bucket data...</cd-loading-panel>
11fdf7f2 3
9f95a23c 4<div class="cd-col-form"
11fdf7f2
TL
5 *ngIf="!loading && !error">
6 <form name="bucketForm"
11fdf7f2
TL
7 #frm="ngForm"
8 [formGroup]="bucketForm"
9 novalidate>
9f95a23c
TL
10 <div class="card">
11 <div i18n="form title|Example: Create Pool@@formTitle"
12 class="card-header">{{ action | titlecase }} {{ resource | upperFirst }}</div>
11fdf7f2 13
9f95a23c 14 <div class="card-body">
11fdf7f2 15 <!-- Id -->
9f95a23c 16 <div class="form-group row"
11fdf7f2
TL
17 *ngIf="editing">
18 <label i18n
9f95a23c 19 class="cd-col-form-label"
11fdf7f2 20 for="id">Id</label>
9f95a23c 21 <div class="cd-col-form-input">
11fdf7f2
TL
22 <input id="id"
23 name="id"
24 class="form-control"
25 type="text"
26 formControlName="id"
27 readonly>
28 </div>
29 </div>
30
31 <!-- Name -->
9f95a23c
TL
32 <div class="form-group row">
33 <label class="cd-col-form-label"
34 [ngClass]="{required: !editing}"
35 for="bid"
36 i18n>Name</label>
37 <div class="cd-col-form-input">
11fdf7f2
TL
38 <input id="bid"
39 name="bid"
40 class="form-control"
41 type="text"
42 i18n-placeholder
43 placeholder="Name..."
44 formControlName="bid"
45 [readonly]="editing"
9f95a23c
TL
46 [autofocus]="!editing">
47 <span class="invalid-feedback"
11fdf7f2
TL
48 *ngIf="bucketForm.showError('bid', frm, 'required')"
49 i18n>This field is required.</span>
9f95a23c 50 <span class="invalid-feedback"
11fdf7f2
TL
51 *ngIf="bucketForm.showError('bid', frm, 'bucketNameInvalid')"
52 i18n>The value is not valid.</span>
9f95a23c 53 <span class="invalid-feedback"
11fdf7f2
TL
54 *ngIf="bucketForm.showError('bid', frm, 'bucketNameExists')"
55 i18n>The chosen name is already in use.</span>
56 </div>
57 </div>
58
59 <!-- Owner -->
9f95a23c
TL
60 <div class="form-group row">
61 <label class="cd-col-form-label required"
62 for="owner"
63 i18n>Owner</label>
64 <div class="cd-col-form-input">
11fdf7f2
TL
65 <select id="owner"
66 name="owner"
9f95a23c
TL
67 class="form-control custom-select"
68 formControlName="owner"
69 [autofocus]="editing">
11fdf7f2
TL
70 <option i18n
71 *ngIf="owners === null"
72 [ngValue]="null">Loading...</option>
73 <option i18n
74 *ngIf="owners !== null"
75 [ngValue]="null">-- Select a user --</option>
76 <option *ngFor="let owner of owners"
77 [value]="owner">{{ owner }}</option>
78 </select>
9f95a23c 79 <span class="invalid-feedback"
11fdf7f2
TL
80 *ngIf="bucketForm.showError('owner', frm, 'required')"
81 i18n>This field is required.</span>
82 </div>
83 </div>
84
9f95a23c
TL
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">
97 <option i18n
98 *ngIf="placementTargets === null"
99 [ngValue]="null">Loading...</option>
100 <option i18n
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>
105 </select>
106 <span class="invalid-feedback"
107 *ngIf="bucketForm.showError('placement-target', frm, 'required')"
108 i18n>This field is required.</span>
109 </ng-template>
110 <ng-container *ngIf="editing; else placementTargetSelect">
111 <input id="placement-target"
112 name="placement-target"
113 formControlName="placement-target"
114 class="form-control"
115 type="text"
116 readonly>
117 </ng-container>
118 </div>
119 </div>
120
121 <!-- Versioning -->
122 <fieldset *ngIf="editing">
123 <legend class="cd-header"
124 i18n>Versioning</legend>
125
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"
131 id="versioning"
132 name="versioning"
133 formControlName="versioning"
134 [checked]="isVersioningEnabled"
135 (change)="updateVersioning()">
136 <label class="custom-control-label"
137 for="versioning"
138 i18n>Enabled</label>
139 <cd-helper>
140 <span i18n>Enables versioning for the objects in the bucket.</span>
141 </cd-helper>
142 </div>
143 </div>
144 </div>
145 </fieldset>
146
147 <!-- Multi-Factor Authentication -->
148 <fieldset *ngIf="editing">
149 <!-- MFA Delete -->
150 <legend class="cd-header"
151 i18n>Multi-Factor Authentication</legend>
152
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"
158 id="mfa-delete"
159 name="mfa-delete"
160 formControlName="mfa-delete"
161 [checked]="isMfaDeleteEnabled"
162 (change)="updateMfaDelete()">
163 <label class="custom-control-label"
164 for="mfa-delete"
165 i18n>Delete enabled</label>
166 <cd-helper>
167 <span i18n>Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.</span>
168 </cd-helper>
169 </div>
170 </div>
171 </div>
172 <div *ngIf="areMfaCredentialsRequired()"
173 class="form-group row">
174 <label i18n
175 class="cd-col-form-label"
176 for="mfa-token-serial">Token Serial Number</label>
177 <div class="cd-col-form-input">
178 <input type="text"
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>
186 </div>
187 </div>
188 <div *ngIf="areMfaCredentialsRequired()"
189 class="form-group row">
190 <label i18n
191 class="cd-col-form-label"
192 for="mfa-token-pin">Token PIN</label>
193 <div class="cd-col-form-input">
194 <input type="text"
195 id="mfa-token-pin"
196 name="mfa-token-pin"
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>
202 </div>
203 </div>
204 </fieldset>
205
206 <!-- Locking -->
207 <fieldset>
208 <legend class="cd-header"
209 i18n>Locking</legend>
210
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"
216 id="lock_enabled"
217 formControlName="lock_enabled"
218 type="checkbox">
219 <label class="custom-control-label"
220 for="lock_enabled"
221 i18n>Enabled</label>
222 <cd-helper>
223 <span i18n>Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.</span>
224 </cd-helper>
225 </div>
226 </div>
227 </div>
228
229 <!-- Locking mode -->
230 <div *ngIf="bucketForm.getValue('lock_enabled')"
231 class="form-group row">
232 <label class="cd-col-form-label"
233 for="lock_mode"
234 i18n>Mode</label>
235 <div class="cd-col-form-input">
236 <select class="form-control custom-select"
237 formControlName="lock_mode"
238 name="lock_mode"
239 id="lock_mode">
240 <option i18n
241 value="COMPLIANCE">Compliance</option>
242 <option i18n
243 value="GOVERNANCE">Governance</option>
244 </select>
245 </div>
246 </div>
247
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>
255 </label>
256 <div class="cd-col-form-input">
257 <input class="form-control"
258 type="number"
259 id="lock_retention_period_days"
260 formControlName="lock_retention_period_days"
261 min="0">
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>
268 </div>
269 </div>
270
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>
278 </label>
279 <div class="cd-col-form-input">
280 <input class="form-control"
281 type="number"
282 id="lock_retention_period_years"
283 formControlName="lock_retention_period_years"
284 min="0">
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>
291 </div>
292 </div>
293 </fieldset>
294
11fdf7f2 295 </div>
9f95a23c 296 <div class="card-footer">
11fdf7f2 297 <div class="button-group text-right">
9f95a23c
TL
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>
11fdf7f2
TL
301 <cd-back-button></cd-back-button>
302 </div>
303 </div>
304 </div>
305 </form>
306</div>