]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | <tabset> |
2 | <tab i18n-heading | |
3 | heading="OSDs List"> | |
4 | <cd-table [data]="osds" | |
5 | (fetchData)="getOsdList()" | |
6 | [columns]="columns" | |
7 | selectionType="single" | |
8 | (updateSelection)="updateSelection($event)" | |
9 | [updateSelectionOnRefresh]="'never'"> | |
10 | <div class="table-actions btn-toolbar"> | |
11 | <cd-table-actions [permission]="permissions.osd" | |
12 | [selection]="selection" | |
13 | class="btn-group" | |
14 | [tableActions]="tableActions"> | |
15 | </cd-table-actions> | |
16 | ||
17 | <div class="btn-group" | |
81eedcae TL |
18 | dropdown |
19 | *ngIf="advancedTableActions.length > 0"> | |
11fdf7f2 TL |
20 | <button type="button" |
21 | class="btn btn-sm btn-default btn-label tc_configureCluster" | |
81eedcae TL |
22 | (click)="advancedTableActions[0].click()"> |
23 | <i class="fa fa-fw {{ advancedTableActions[0].icon }}"></i><span>{{ advancedTableActions[0].name }}</span> | |
11fdf7f2 TL |
24 | </button> |
25 | <button type="button" | |
26 | dropdownToggle | |
81eedcae TL |
27 | class="btn btn-sm btn-default dropdown-toggle dropdown-toggle-split" |
28 | *ngIf="advancedTableActions.length > 1"> | |
11fdf7f2 TL |
29 | <span class="caret caret-black"></span> |
30 | </button> | |
31 | <ul *dropdownMenu | |
32 | class="dropdown-menu" | |
33 | role="menu"> | |
81eedcae TL |
34 | <ng-container *ngFor="let action of advancedTableActions | slice:1"> |
35 | <li role="menuitem"> | |
36 | <a class="dropdown-item" | |
37 | (click)="action.click()"> | |
38 | <i class="fa fa-fw {{ action.icon }}" | |
39 | aria-hidden="true"> | |
40 | </i> | |
41 | <ng-container>{{ action.name }}</ng-container> | |
42 | </a> | |
43 | </li> | |
44 | </ng-container> | |
11fdf7f2 TL |
45 | </ul> |
46 | </div> | |
47 | </div> | |
48 | ||
49 | <cd-osd-details cdTableDetail | |
50 | [selection]="selection"> | |
51 | </cd-osd-details> | |
52 | </cd-table> | |
53 | ||
54 | <ng-template #statusColor | |
55 | let-value="value"> | |
56 | <span *ngFor="let state of value; last as last"> | |
57 | <span class="label" | |
58 | [ngClass]="{'label-success': ['in', 'up'].includes(state), 'label-danger': ['down', 'out'].includes(state)}">{{ state }}</span> | |
59 | <span *ngIf="!last"> </span> | |
60 | </span> | |
61 | </ng-template> | |
62 | ||
63 | <ng-template #osdUsageTpl | |
64 | let-row="row"> | |
65 | <cd-usage-bar [totalBytes]="row.stats.stat_bytes" | |
66 | [usedBytes]="row.stats.stat_bytes_used"> | |
67 | </cd-usage-bar> | |
68 | </ng-template> | |
69 | </tab> | |
70 | <tab i18n-heading | |
71 | *ngIf="permissions.grafana.read" | |
72 | heading="Overall Performance"> | |
73 | <cd-grafana [grafanaPath]="'osd-overview?'" | |
74 | uid="lo02I1Aiz" | |
75 | grafanaStyle="three"> | |
76 | </cd-grafana> | |
77 | </tab> | |
78 | </tabset> | |
79 | ||
80 | <ng-template #markOsdConfirmationTpl | |
81 | let-markActionDescription="markActionDescription"> | |
82 | <ng-container i18n><strong>OSD {{ selection.first().id }}</strong> will be marked | |
83 | <strong>{{ markActionDescription }}</strong> if you proceed.</ng-container> | |
84 | </ng-template> | |
85 | ||
86 | <ng-template #criticalConfirmationTpl | |
87 | let-safeToDestroyResult="result" | |
88 | let-actionDescription="actionDescription"> | |
89 | <div *ngIf="!safeToDestroyResult['is_safe_to_destroy']" | |
90 | class="danger"> | |
91 | <cd-warning-panel i18n>The OSD is not safe to destroy!</cd-warning-panel> | |
92 | </div> | |
93 | <ng-container i18n><strong>OSD {{ selection.first().id }}</strong> will be | |
94 | <strong>{{ actionDescription }}</strong> if you proceed.</ng-container> | |
95 | </ng-template> |