]>
Commit | Line | Data |
---|---|---|
1 | <nav ngbNav | |
2 | #nav="ngbNav" | |
3 | class="nav-tabs"> | |
4 | <ng-container ngbNavItem> | |
5 | <a ngbNavLink | |
6 | i18n>OSDs List</a> | |
7 | <ng-template ngbNavContent> | |
8 | <cd-table [data]="osds" | |
9 | (fetchData)="getOsdList()" | |
10 | [columns]="columns" | |
11 | selectionType="multiClick" | |
12 | [hasDetails]="true" | |
13 | (setExpandedRow)="setExpandedRow($event)" | |
14 | (updateSelection)="updateSelection($event)" | |
15 | [updateSelectionOnRefresh]="'never'"> | |
16 | ||
17 | <div class="table-actions btn-toolbar"> | |
18 | <cd-table-actions [permission]="permissions.osd" | |
19 | [selection]="selection" | |
20 | class="btn-group" | |
21 | id="osd-actions" | |
22 | [tableActions]="tableActions"> | |
23 | </cd-table-actions> | |
24 | <cd-table-actions [permission]="{read: true}" | |
25 | [selection]="selection" | |
26 | dropDownOnly="Cluster-wide configuration" | |
27 | btnColor="light" | |
28 | class="btn-group" | |
29 | id="cluster-wide-actions" | |
30 | [tableActions]="clusterWideActions"> | |
31 | </cd-table-actions> | |
32 | </div> | |
33 | ||
34 | <cd-osd-details cdTableDetail | |
35 | [selection]="expandedRow"> | |
36 | </cd-osd-details> | |
37 | </cd-table> | |
38 | </ng-template> | |
39 | </ng-container> | |
40 | ||
41 | <ng-container ngbNavItem | |
42 | *ngIf="permissions.grafana.read"> | |
43 | <a ngbNavLink | |
44 | i18n>Overall Performance</a> | |
45 | <ng-template ngbNavContent> | |
46 | <cd-grafana i18n-title | |
47 | title="OSD list" | |
48 | [grafanaPath]="'osd-overview?'" | |
49 | [type]="'metrics'" | |
50 | uid="lo02I1Aiz" | |
51 | grafanaStyle="four"> | |
52 | </cd-grafana> | |
53 | </ng-template> | |
54 | </ng-container> | |
55 | </nav> | |
56 | ||
57 | <div [ngbNavOutlet]="nav"></div> | |
58 | ||
59 | <ng-template #markOsdConfirmationTpl | |
60 | let-markActionDescription="markActionDescription" | |
61 | let-osdIds="osdIds"> | |
62 | <ng-container i18n><strong>OSD(s) {{ osdIds | join }}</strong> will be marked | |
63 | <strong>{{ markActionDescription }}</strong> if you proceed.</ng-container> | |
64 | </ng-template> | |
65 | ||
66 | <ng-template #criticalConfirmationTpl | |
67 | let-safeToPerform="safeToPerform" | |
68 | let-message="message" | |
69 | let-active="active" | |
70 | let-missingStats="missingStats" | |
71 | let-storedPgs="storedPgs" | |
72 | let-actionDescription="actionDescription" | |
73 | let-osdIds="osdIds"> | |
74 | <div *ngIf="!safeToPerform" | |
75 | class="danger mb-3"> | |
76 | <cd-alert-panel type="warning"> | |
77 | <span i18n> | |
78 | The {selection.hasSingleSelection, select, true {OSD is} other {OSDs are}} not safe to be | |
79 | {{ actionDescription }}! | |
80 | </span> | |
81 | <br> | |
82 | <ul class="mb-0 ps-4"> | |
83 | <li *ngIf="active.length > 0" | |
84 | i18n> | |
85 | {selection.hasSingleSelection, select, true {} other {{{ active | join }} : }} | |
86 | Some PGs are currently mapped to | |
87 | {active.length === 1, select, true {it} other {them}}. | |
88 | </li> | |
89 | <li *ngIf="missingStats.length > 0" | |
90 | i18n> | |
91 | {selection.hasSingleSelection, select, true {} other {{{ missingStats | join }} : }} | |
92 | There are no reported stats and not all PGs are active and clean. | |
93 | </li> | |
94 | <li *ngIf="storedPgs.length > 0" | |
95 | i18n> | |
96 | {selection.hasSingleSelection, select, true {OSD} other {{{ storedPgs | join }} : OSDs }} | |
97 | still store some PG data and not all PGs are active and clean. | |
98 | </li> | |
99 | <li *ngIf="message"> | |
100 | {{ message }} | |
101 | </li> | |
102 | </ul> | |
103 | </cd-alert-panel> | |
104 | </div> | |
105 | <div *ngIf="safeToPerform" | |
106 | class="danger mb-3"> | |
107 | <cd-alert-panel type="info"> | |
108 | <span i18n> | |
109 | The {selection.hasSingleSelection, select, true {OSD is} other {OSDs are}} | |
110 | safe to destroy without reducing data durability. | |
111 | </span> | |
112 | </cd-alert-panel> | |
113 | </div> | |
114 | <ng-container i18n><strong>OSD {{ osdIds | join }}</strong> will be | |
115 | <strong>{{ actionDescription }}</strong> if you proceed.</ng-container> | |
116 | </ng-template> | |
117 | ||
118 | <ng-template #flagsTpl | |
119 | let-row="row"> | |
120 | <span *ngFor="let flag of row.cdClusterFlags;" | |
121 | class="badge badge-hdd me-1">{{ flag }}</span> | |
122 | <span *ngFor="let flag of row.cdIndivFlags;" | |
123 | class="badge badge-info me-1">{{ flag }}</span> | |
124 | </ng-template> | |
125 | ||
126 | <ng-template #osdUsageTpl | |
127 | let-row="row"> | |
128 | <cd-usage-bar [title]="'osd ' + row.osd" | |
129 | [total]="row.stats.stat_bytes" | |
130 | [used]="row.stats.stat_bytes_used" | |
131 | [warningThreshold]="osdSettings.nearfull_ratio" | |
132 | [errorThreshold]="osdSettings.full_ratio"> | |
133 | </cd-usage-bar> | |
134 | </ng-template> | |
135 | ||
136 | <ng-template #deleteOsdExtraTpl | |
137 | let-form="form"> | |
138 | <ng-container [formGroup]="form"> | |
139 | <ng-container formGroupName="child"> | |
140 | <div class="form-group"> | |
141 | <div class="custom-control custom-checkbox"> | |
142 | <input type="checkbox" | |
143 | class="custom-control-input" | |
144 | name="preserve" | |
145 | id="preserve" | |
146 | formControlName="preserve"> | |
147 | <label class="custom-control-label" | |
148 | for="preserve" | |
149 | i18n>Preserve OSD ID(s) for replacement.</label> | |
150 | </div> | |
151 | </div> | |
152 | </ng-container> | |
153 | </ng-container> | |
154 | </ng-template> |