summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-peer-modal/pool-edit-peer-modal.component.html
blob: 97774ebe3ffbb8fd63398fdf302aa208fb901ca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<cd-modal [modalRef]="activeModal">
  <span class="modal-title"
        i18n>{mode, select, edit {Edit} other {Add}} pool mirror peer</span>

  <ng-container class="modal-content">
    <form name="editPeerForm"
          class="form"
          #formDir="ngForm"
          [formGroup]="editPeerForm"
          novalidate>
      <div class="modal-body">
        <p>
          <span i18n>{mode, select, edit {Edit} other {Add}} the pool
          mirror peer attributes for pool <kbd>{{ poolName }}</kbd> and click
          <kbd>Submit</kbd>.</span>
        </p>

        <div class="form-group">
          <label class="col-form-label required"
                 for="clusterName"
                 i18n>Cluster Name</label>
          <input class="form-control"
                 type="text"
                 placeholder="Name..."
                 i18n-placeholder
                 id="clusterName"
                 name="clusterName"
                 formControlName="clusterName"
                 autofocus>
          <span class="invalid-feedback"
                *ngIf="editPeerForm.showError('clusterName', formDir, 'required')"
                i18n>This field is required.</span>
          <span class="invalid-feedback"
                *ngIf="editPeerForm.showError('clusterName', formDir, 'invalidClusterName')"
                i18n>The cluster name is not valid.</span>
        </div>

        <div class="form-group">
          <label class="col-form-label required"
                 for="clientID"
                 i18n>CephX ID</label>
          <input class="form-control"
                 type="text"
                 placeholder="CephX ID..."
                 i18n-placeholder
                 id="clientID"
                 name="clientID"
                 formControlName="clientID">
          <span class="invalid-feedback"
                *ngIf="editPeerForm.showError('clientID', formDir, 'required')"
                i18n>This field is required.</span>
          <span class="invalid-feedback"
                *ngIf="editPeerForm.showError('clientID', formDir, 'invalidClientID')"
                i18n>The CephX ID is not valid.</span>
        </div>

        <div class="form-group">
          <label class="col-form-label"
                 for="monAddr">
            <span i18n>Monitor Addresses</span>
          </label>
          <input class="form-control"
                 type="text"
                 placeholder="Comma-delimited addresses..."
                 i18n-placeholder
                 id="monAddr"
                 name="monAddr"
                 formControlName="monAddr">
          <span class="invalid-feedback"
                *ngIf="editPeerForm.showError('monAddr', formDir, 'invalidMonAddr')"
                i18n>The monitory address is not valid.</span>
        </div>

        <div class="form-group">
          <label class="col-form-label"
                 for="key">
            <span i18n>CephX Key</span>
          </label>
          <input class="form-control"
                 type="text"
                 placeholder="Base64-encoded key..."
                 i18n-placeholder
                 id="key"
                 name="key"
                 formControlName="key">
          <span class="invalid-feedback"
                *ngIf="editPeerForm.showError('key', formDir, 'invalidKey')"
                i18n>CephX key must be base64 encoded.</span>
        </div>

      </div>

      <div class="modal-footer">
        <cd-form-button-panel (submitActionEvent)="update()"
                              [form]="editPeerForm"
                              [submitText]="actionLabels.SUBMIT"></cd-form-button-panel>
      </div>
    </form>
  </ng-container>
</cd-modal>