]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
bd0151b2f009ba4940f7e6a593af90fc5ce4d180
[ceph.git] /
1 <cds-modal size="md"
2            [open]="open"
3            (overlaySelected)="closeModal()">
4   <cds-modal-header (closeSelect)="closeModal()">
5     <h3 cdsModalHeaderHeading
6         i18n>Edit pool mirror mode</h3>
7   </cds-modal-header>
8
9   <section cdsModalContent>
10     <form name="editModeForm"
11           class="form"
12           #formDir="ngForm"
13           [formGroup]="editModeForm"
14           novalidate>
15       <p>
16         <ng-container i18n>To edit the mirror mode for pool&nbsp;
17         <kbd>{{ poolName }}</kbd>, select a new mode from the list and click&nbsp;
18         <kbd>Update</kbd>.</ng-container>
19       </p>
20
21       <div class="form-item">
22         <cds-select label="Mode"
23                     for="mirrorMode"
24                     formControlName="mirrorMode"
25                     name="mirrorMode"
26                     id="mirrorMode"
27                     [invalid]="editModeForm.controls['mirrorMode'].invalid && (editModeForm.controls['mirrorMode'].dirty || editModeForm.controls['mirrorMode'].touched)"
28                     [invalidText]="mirrorModeError"
29                     cdRequiredField="Mode"
30                     i18n>
31           <option *ngFor="let mirrorMode of mirrorModes"
32                   [value]="mirrorMode.id">{{ mirrorMode.name }}</option>
33         </cds-select>
34         <ng-template #mirrorModeError>
35           <span class="invalid-feedback"
36                 *ngIf="editModeForm.showError('mirrorMode', formDir, 'cannotDisable')"
37                 i18n>Peer clusters must be removed prior to disabling mirror.</span>
38         </ng-template>
39       </div>
40     </form>
41   </section>
42
43   <cd-form-button-panel (submitActionEvent)="update()"
44                         [form]="editModeForm"
45                         [submitText]="actionLabels.UPDATE"
46                         [modalForm]="true"></cd-form-button-panel>
47 </cds-modal>