1 <cd-modal [modalRef]="activeModal">
2 <ng-container i18n="form title"
3 class="modal-title">Import Multi-Site Token</ng-container>
5 <ng-container class="modal-content">
6 <form name="importTokenForm"
8 [formGroup]="importTokenForm">
9 <div class="modal-body">
10 <cd-alert-panel type="info"
13 <li>This feature allows you to configure a connection between your primary and secondary Ceph clusters for data replication. By importing a token, you establish a link between the clusters, enabling data synchronization.</li>
14 <li>To obtain the token, generate it from your secondary Ceph cluster. This token includes encoded information about the secondary cluster's endpoint, access key, and secret key.</li>
15 <li>The secondary zone represents the destination cluster where your data will be replicated.</li>
18 <legend i18n>Zone Details</legend>
19 <div class="form-group row">
20 <label class="cd-col-form-label required"
24 <div class="cd-col-form-input">
25 <input id="realmToken"
29 formControlName="realmToken">
30 <span class="invalid-feedback"
31 *ngIf="importTokenForm.showError('realmToken', frm, 'required')"
32 i18n>This field is required.</span>
35 <div class="form-group row">
36 <label class="cd-col-form-label required"
38 i18n>Secondary Zone Name</label>
39 <div class="cd-col-form-input">
40 <input class="form-control"
42 placeholder="Zone name..."
45 formControlName="zoneName">
46 <span class="invalid-feedback"
47 *ngIf="importTokenForm.showError('zoneName', frm, 'required')"
48 i18n>This field is required.</span>
49 <span class="invalid-feedback"
50 *ngIf="importTokenForm.showError('zoneName', frm, 'uniqueName')"
51 i18n>The chosen zone name is already in use.</span>
55 <legend i18n>Service Details</legend>
56 <div class="form-group row">
57 <div class="cd-col-form-offset">
58 <div class="custom-control custom-checkbox">
59 <input class="custom-control-input"
62 formControlName="unmanaged">
63 <label class="custom-control-label"
65 i18n>Unmanaged</label>
66 <cd-helper i18n>If set to true, the orchestrator will not start nor stop any daemon associated with this service.
67 Placement and all other properties will be ignored.</cd-helper>
73 <div *ngIf="!importTokenForm.controls.unmanaged.value"
74 class="form-group row">
75 <label class="cd-col-form-label"
77 i18n>Placement</label>
78 <div class="cd-col-form-input">
79 <select id="placement"
81 formControlName="placement">
83 value="hosts">Hosts</option>
85 value="label">Label</option>
91 <div *ngIf="!importTokenForm.controls.unmanaged.value && importTokenForm.controls.placement.value === 'label'"
92 class="form-group row">
94 class="cd-col-form-label"
95 for="label">Label</label>
96 <div class="cd-col-form-input">
100 formControlName="label"
101 [ngbTypeahead]="searchLabels"
102 (focus)="labelFocus.next($any($event).target.value)"
103 (click)="labelClick.next($any($event).target.value)">
104 <span class="invalid-feedback"
105 *ngIf="importTokenForm.showError('label', frm, 'required')"
106 i18n>This field is required.</span>
111 <div *ngIf="!importTokenForm.controls.unmanaged.value && importTokenForm.controls.placement.value === 'hosts'"
112 class="form-group row">
113 <label class="cd-col-form-label"
116 <div class="cd-col-form-input">
117 <cd-select-badges id="hosts"
118 [data]="importTokenForm.controls.hosts.value"
119 [options]="hosts.options"
120 [messages]="hosts.messages">
126 <div *ngIf="!importTokenForm.controls.unmanaged.value"
127 class="form-group row">
128 <label class="cd-col-form-label"
130 <span i18n>Count</span>
131 <cd-helper i18n>Only that number of daemons will be created.</cd-helper>
133 <div class="cd-col-form-input">
137 formControlName="count"
139 <span class="invalid-feedback"
140 *ngIf="importTokenForm.showError('count', frm, 'min')"
141 i18n>The value must be at least 1.</span>
142 <span class="invalid-feedback"
143 *ngIf="importTokenForm.showError('count', frm, 'pattern')"
144 i18n>The entered value needs to be a number.</span>
149 <ng-container *ngIf="!importTokenForm.controls.unmanaged.value">
150 <!-- rgw_frontend_port -->
151 <div class="form-group row">
153 class="cd-col-form-label"
154 for="rgw_frontend_port">Port</label>
155 <div class="cd-col-form-input">
156 <input id="rgw_frontend_port"
159 formControlName="rgw_frontend_port"
162 <span class="invalid-feedback"
163 *ngIf="importTokenForm.showError('rgw_frontend_port', frm, 'pattern')"
164 i18n>The entered value needs to be a number.</span>
165 <span class="invalid-feedback"
166 *ngIf="importTokenForm.showError('rgw_frontend_port', frm, 'min')"
167 i18n>The value must be at least 1.</span>
168 <span class="invalid-feedback"
169 *ngIf="importTokenForm.showError('rgw_frontend_port', frm, 'max')"
170 i18n>The value cannot exceed 65535.</span>
175 <div class="modal-footer">
176 <cd-form-button-panel (submitActionEvent)="onSubmit()"
177 [submitText]="actionLabels.IMPORT"
178 [form]="importTokenForm"></cd-form-button-panel>