1 <div class="custom-modal-content">
2 <cd-modal [modalRef]="activeModal"
4 <ng-container i18n="form title"
5 class="modal-title">Set up Multi-site Replication</ng-container>
6 <ng-container class="modal-content">
8 <div class="container-fluid">
9 <cd-wizard [stepsTitle]="stepTitles"></cd-wizard>
10 <div class="card-body vertical-line">
11 <form [formGroup]="multisiteSetupForm"
14 <ng-container [ngSwitch]="currentStep?.stepIndex">
15 <cd-alert-panel *ngIf="loading"
18 <span i18n>Please note that this process can take some time. During this period, do not click the back button or close the wizard. Thank you for your patience.</span>
20 <div *ngSwitchCase="'1'"
23 i18n>Create Realm & Zonegroup</h4>
25 <div class="modal-body">
26 <div class="form-group row">
27 <label class="cd-col-form-label required"
29 i18n>Realm Name</label>
30 <div class="cd-col-form-input">
31 <input class="form-control"
33 placeholder="Realm name..."
36 formControlName="realmName">
38 <span i18n>Enter a unique name for the Realm. The Realm is a logical grouping of all your Zonegroups.</span>
40 <span class="invalid-feedback"
41 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'required')"
42 i18n>This field is required.</span>
43 <span class="invalid-feedback"
44 *ngIf="multisiteSetupForm.showError('realmName', formDir, 'uniqueName')"
45 i18n>The chosen realm name is already in use.</span>
48 <div class="form-group row">
49 <label class="cd-col-form-label required"
51 i18n>Zone Group Name</label>
52 <div class="cd-col-form-input">
53 <input class="form-control"
55 placeholder="Zone group name..."
58 formControlName="zonegroupName">
60 <span i18n>Enter a name for the Zonegroup. Zonegroup will help you identify and manage the group of zones.</span>
62 <span class="invalid-feedback"
63 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'required')"
64 i18n>This field is required.</span>
65 <span class="invalid-feedback"
66 *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'uniqueName')"
67 i18n>The chosen zone group name is already in use.</span>
70 <div class="form-group row">
71 <label class="cd-col-form-label required"
72 for="zonegroup_endpoints"
73 i18n>Zonegroup Endpoints</label>
74 <div class="cd-col-form-input">
75 <cd-select-badges id="zonegroup_endpoints"
76 [data]="rgwEndpoints.value"
77 [options]="rgwEndpoints.options"
78 [customBadges]="true">
81 <span i18n>Select the endpoints for the Zonegroup. Endpoints are the URLs or IP addresses from which the rgw gateways in that zonegroup can be accessed. You can select multiple endpoints in case you have multiple rgw gateways in a zonegroup</span>
87 <div *ngSwitchCase="'2'"
91 <div class="form-group row">
92 <label class="cd-col-form-label required"
94 i18n>Zone Name</label>
95 <div class="cd-col-form-input">
96 <input class="form-control"
98 placeholder="Zone name..."
101 formControlName="zoneName">
103 <span i18n>Enter a unique name for the Zone. A Zone represents a distinct data center or geographical location within a Zonegroup.</span>
105 <span class="invalid-feedback"
106 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'required')"
107 i18n>This field is required.</span>
108 <span class="invalid-feedback"
109 *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'uniqueName')"
110 i18n>The chosen zone name is already in use.</span>
113 <div class="form-group row">
114 <label class="cd-col-form-label required"
116 i18n>Zone Endpoints</label>
117 <div class="cd-col-form-input">
118 <cd-select-badges id="zone_endpoints"
119 [data]="rgwEndpoints.value"
120 [options]="rgwEndpoints.options"
121 [customBadges]="true">
124 <span i18n>Select the endpoints for the Zone. Endpoints are the URLs or IP addresses from which the rgw gateways in that zone can be accessed. You can select multiple endpoints in case you have multiple rgw gateways in a zone</span>
128 <div class="form-group row">
129 <label class="cd-col-form-label required"
131 i18n>Username</label>
132 <div class="cd-col-form-input">
133 <input class="form-control"
135 placeholder="Username..."
138 formControlName="username"
139 ngbTooltip="White spaces at the beginning and end will be trimmed"
143 <span i18n>Specify the username for the system user.</span>
145 <cd-alert-panel type="info"
147 <span i18n>This user will be created automatically as part of the process, and it will have the necessary permissions to manage and synchronize resources across zones.</span>
149 <span class="invalid-feedback"
150 *ngIf="multisiteSetupForm.showError('username', formDir, 'required')"
151 i18n>This field is required.</span>
152 <span class="invalid-feedback"
153 *ngIf="multisiteSetupForm.showError('username', formDir, 'notUnique')"
154 i18n>The username already exists.</span>
160 <div *ngIf="isMultiClusterConfigured; else exportTokenTemplate">
162 i18n>Select Cluster</h4>
163 <div class="form-group row">
164 <label class="cd-col-form-label required"
167 <div class="cd-col-form-input">
168 <select class="form-select"
170 [(ngModel)]="selectedCluster"
171 formControlName="cluster"
173 <option *ngFor="let cluster_detail of clusterDetailsArray"
174 [value]="cluster_detail.name">
175 {{ cluster_detail.cluster_alias }} - {{ cluster_detail.name }}
179 <span i18n>Choose the cluster where you want to apply this multisite configuration. The selected cluster will integrate the defined Realm, Zonegroup, and Zones, enabling data synchronization and management across the multisite setup.</span>
181 <cd-alert-panel type="info"
183 <span i18n>Before submitting this form, please verify that the selected cluster has an active RGW (Rados Gateway) service running.</span>
188 <ng-template #exportTokenTemplate>
190 i18n>Export Token</h4>
191 <div *ngFor="let realminfo of realms">
192 <div class="form-group row">
193 <label class="cd-col-form-label"
195 i18n>Realm Name</label>
196 <div class="cd-col-form-input">
197 <input id="realmName"
200 [value]="realminfo.realm"
203 <span i18n>Name of the realm that will be involved in replication.</span>
207 <div class="form-group row">
208 <label class="cd-col-form-label"
211 <div class="cd-col-form-input">
212 <input id="realmToken"
215 [value]="realminfo.token"
218 <cd-copy-2-clipboard-button [source]="realminfo.token"
220 </cd-copy-2-clipboard-button>
222 <span i18n>This field displays the token needed to import the multisite configuration into a secondary cluster. Copy this token securely and use it on the secondary cluster to replicate the current multisite setup. Ensure that the token is handled securely to prevent unauthorized access.</span>
226 <hr *ngIf="realms.length > 1">
234 <div class="card-footer">
235 <button class="btn btn-accent m-2 float-end"
236 (click)="onNextStep()"
238 i18n>{{ showSubmitButtonLabel() }}
239 <span *ngIf="loading">
240 <i [ngClass]="[icons.spinner, icons.spin]"></i>
243 <cd-back-button class="m-2 float-end"
245 (backAction)="onPreviousStep()"
246 [name]="showCancelButtonLabel()"
247 [disabled]="loading">