1 <cd-modal [modalRef]="activeModal">
2 <ng-container i18n="form title"
3 class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container>
5 <ng-container class="modal-content">
6 <form name="multisiteZoneForm"
8 [formGroup]="multisiteZoneForm"
10 <div class="modal-body">
11 <div class="form-group row">
12 <label class="cd-col-form-label"
13 for="selectedZonegroup"
14 i18n>Select Zone Group</label>
15 <div class="cd-col-form-input">
16 <select class="form-select"
17 id="selectedZonegroup"
18 [attr.disabled]="action === 'edit' ? true : null"
19 formControlName="selectedZonegroup"
20 name="selectedZonegroup"
21 (change)="onZoneGroupChange($event.target.value)">
22 <option *ngFor="let zonegroupName of zonegroupList"
23 [value]="zonegroupName.name"
24 [selected]="zonegroupName.name === multisiteZoneForm.getValue('selectedZonegroup')">
25 {{ zonegroupName.name }}
30 <div class="form-group row">
31 <label class="cd-col-form-label required"
33 i18n>Zone Name</label>
34 <div class="cd-col-form-input">
35 <input class="form-control"
37 placeholder="Zone name..."
40 formControlName="zoneName">
41 <span class="invalid-feedback"
42 *ngIf="multisiteZoneForm.showError('zoneName', formDir, 'required')"
43 i18n>This field is required.</span>
44 <span class="invalid-feedback"
45 *ngIf="multisiteZoneForm.showError('zoneName', formDir, 'uniqueName')"
46 i18n>The chosen zone name is already in use.</span>
47 <div class="custom-control custom-checkbox">
48 <input class="form-check-input"
51 formControlName="default_zone"
52 [attr.disabled]="action === 'edit' ? true : null"
54 <label class="form-check-label"
57 <span *ngIf="disableDefault && action === 'create'">
58 <cd-helper i18n>Default zone can only exist in a default zone group.
61 <span *ngIf="isDefaultZone">
62 <cd-helper i18n>You cannot unset the default flag.
65 <cd-helper *ngIf="action === 'edit' && !isDefaultZone">
66 <span i18n>Please consult the <a href="{{ docUrl }}">documentation</a> to follow the failover mechanism</span>
69 <div class="custom-control custom-checkbox">
70 <input class="form-check-input"
73 formControlName="master_zone"
74 [attr.disabled]="action === 'edit' ? true : null"
76 <label class="form-check-label"
79 <span *ngIf="disableMaster">
80 <cd-helper i18n>Master zone already exists for the selected zone group.
83 <span *ngIf="isMasterZone">
84 <cd-helper i18n>You cannot unset the master flag.
87 <cd-helper *ngIf="action === 'edit' && !isMasterZone">
88 <span i18n>Please consult the <a href="{{ docUrl }}">documentation</a> to follow the failover mechanism</span>
93 <div class="form-group row">
94 <label class="cd-col-form-label required"
96 i18n>Endpoints</label>
97 <div class="cd-col-form-input">
98 <input class="form-control"
100 placeholder="e.g, http://ceph-node-00.com:80"
102 name="zone_endpoints"
103 formControlName="zone_endpoints">
104 <span class="invalid-feedback"
105 *ngIf="multisiteZoneForm.showError('zone_endpoints', formDir, 'required')"
106 i18n>This field is required.</span>
107 <span class="invalid-feedback"
108 *ngIf="multisiteZoneForm.showError('zone_endpoints', formDir, 'endpoint')"
109 i18n>Please enter a valid IP address.</span>
112 <div class="form-group row">
113 <label class="cd-col-form-label required"
117 <span>To see or copy your S3 access key, go to <b>Object Gateway > Users</b> and click on your user name. In <b>Keys</b>, click <b>Show</b>. View the access key by clicking Show and copy the key by clicking <b>Copy to Clipboard</b>.</span>
120 <div class="cd-col-form-input">
121 <input class="form-control"
123 placeholder="DiPt4V7WWvy2njL1z6aC"
126 formControlName="access_key">
129 <div class="form-group row">
130 <label class="cd-col-form-label required"
134 <span>To see or copy your S3 access key, go to <b>Object Gateway > Users</b> and click on your user name. In <b>Keys</b>, click <b>Show</b>. View the secret key by clicking Show and copy the key by clicking <b>Copy to Clipboard</b>.</span>
137 <div class="cd-col-form-input">
138 <input class="form-control"
140 placeholder="xSZUdYky0bTctAdCEEW8ikhfBVKsBV5LFYL82vvh"
143 formControlName="secret_key">
146 <div class="form-group row"
147 *ngIf="action === 'edit'">
148 <div *ngIf="action === 'edit'">
149 <legend>Placement Targets</legend>
150 <div class="form-group row">
151 <label class="cd-col-form-label"
152 for="placementTarget"
153 i18n>Placement target</label>
154 <div class="cd-col-form-input">
155 <select class="form-select"
157 formControlName="placementTarget"
158 name="placementTarget"
159 (change)="getZonePlacementData($event.target.value)">
160 <option *ngFor="let placement of placementTargets"
161 [value]="placement.name"
162 [selected]="placement.name === multisiteZoneForm.getValue('placementTarget')">
168 <div class="form-group row">
169 <label class="cd-col-form-label"
170 for="placementDataPool"
171 i18n>Data pool</label>
172 <div class="cd-col-form-input">
173 <select class="form-select"
174 id="placementDataPool"
175 formControlName="placementDataPool"
176 [value]="placementDataPool"
177 name="placementDataPool">
178 <option *ngFor="let pool of poolList"
179 [value]="pool.poolname"
180 [selected]="pool.poolname === multisiteZoneForm.getValue('placementDataPool')">
186 <div class="form-group row">
187 <label class="cd-col-form-label"
188 for="placementIndexPool"
189 i18n>Index pool</label>
190 <div class="cd-col-form-input">
191 <select class="form-select"
192 id="placementIndexPool"
193 formControlName="placementIndexPool"
194 name="placementIndexPool">
195 <option *ngFor="let pool of poolList"
196 [value]="pool.poolname"
197 [selected]="pool.poolname === multisiteZoneForm.getValue('placementIndexPool')">
203 <div class="form-group row">
204 <label class="cd-col-form-label"
205 for="placementDataExtraPool"
206 i18n>Data extra pool</label>
207 <div class="cd-col-form-input">
208 <select class="form-select"
209 id="placementDataExtraPool"
210 formControlName="placementDataExtraPool"
211 name="placementDataExtraPool">
212 <option *ngFor="let pool of poolList"
213 [value]="pool.poolname"
214 [selected]="pool.poolname === multisiteZoneForm.getValue('placementDataExtraPool')">
221 <legend>Storage Classes</legend>
222 <div class="form-group row">
223 <label class="cd-col-form-label"
225 i18n>Storage Class</label>
226 <div class="cd-col-form-input">
227 <select class="form-select"
229 formControlName="storageClass"
230 (change)="getStorageClassData($event.target.value)"
232 <option *ngFor="let str of storageClassList"
239 <div class="form-group row">
240 <label class="cd-col-form-label"
241 for="storageDataPool"
242 i18n>Data pool</label>
243 <div class="cd-col-form-input">
244 <select class="form-select"
246 formControlName="storageDataPool"
247 name="storageDataPool">
248 <option *ngFor="let pool of poolList"
249 [value]="pool.poolname"
250 [selected]="pool.poolname === multisiteZoneForm.getValue('storageDataPool')">
256 <div class="form-group row">
257 <label class="cd-col-form-label"
258 for="storageCompression"
259 i18n>Compression</label>
260 <div class="cd-col-form-input">
261 <select class="form-select"
262 id="storageCompression"
263 formControlName="storageCompression"
264 name="storageCompression">
265 <option *ngFor="let compression of compressionTypes"
266 [value]="compression">
276 <div class="modal-footer">
277 <cd-form-button-panel (submitActionEvent)="submit()"
278 [form]="multisiteZoneForm"
279 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>