]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | <ng-container *ngIf="!loading; else isLoading"> |
2 | <cd-alert-panel *ngIf="error" | |
3 | type="error" | |
4 | i18n>Failed to retrieve SMART data.</cd-alert-panel> | |
5 | <cd-alert-panel *ngIf="incompatible" | |
6 | type="warning" | |
7 | i18n>The data received has the JSON format version 2.x and is currently incompatible with the dashboard.</cd-alert-panel> | |
8 | ||
9 | <ng-container *ngIf="!error && !incompatible"> | |
10 | <cd-alert-panel *ngIf="!(data | keyvalue).length" | |
11 | type="info" | |
12 | i18n>No SMART data available.</cd-alert-panel> | |
13 | ||
14 | <tabset *ngFor="let device of data | keyvalue"> | |
15 | <tab [heading]="device.value.device + ' (' + device.value.identifier + ')'"> | |
16 | <ng-container *ngIf="device.value.error; else noError"> | |
17 | <cd-alert-panel id="alert-error" | |
18 | type="warning">{{ device.value.userMessage }}</cd-alert-panel> | |
19 | </ng-container> | |
20 | <ng-template #noError> | |
21 | <!-- HDD/NVMe self test --> | |
22 | <ng-container *ngIf="device.value.info.smart_status.passed; else selfTestFailed"> | |
23 | <cd-alert-panel id="alert-self-test-passed" | |
24 | size="slim" | |
25 | type="info" | |
26 | i18n-title | |
27 | title="SMART overall-health self-assessment test result" | |
28 | i18n>passed</cd-alert-panel> | |
29 | </ng-container> | |
30 | <ng-template #selfTestFailed> | |
31 | <cd-alert-panel id="alert-self-test-failed" | |
32 | size="slim" | |
33 | type="warning" | |
34 | i18n-title | |
35 | title="SMART overall-health self-assessment test result" | |
36 | i18n>failed</cd-alert-panel> | |
37 | </ng-template> | |
38 | ||
39 | <tabset> | |
40 | <tab i18n-heading | |
41 | heading="Device Information"> | |
42 | <cd-table-key-value [renderObjects]="true" | |
43 | [data]="device.value.info"></cd-table-key-value> | |
44 | </tab> | |
45 | ||
46 | <tab i18n-heading | |
47 | heading="SMART"> | |
48 | <cd-table *ngIf="device.value.smart.attributes" | |
49 | [data]="device.value.smart.attributes.table" | |
50 | updateSelectionOnRefresh="never" | |
51 | [columns]="smartDataColumns"></cd-table> | |
52 | <cd-table-key-value *ngIf="device.value.smart.nvmeData" | |
53 | [renderObjects]="true" | |
54 | [data]="device.value.smart.nvmeData" | |
55 | updateSelectionOnRefresh="never"></cd-table-key-value> | |
56 | <cd-alert-panel *ngIf="!device.value.smart.attributes && !device.value.smart.nvmeData" | |
57 | type="info" | |
58 | i18n>No SMART data available for this device.</cd-alert-panel> | |
59 | </tab> | |
60 | </tabset> | |
61 | </ng-template> | |
62 | </tab> | |
63 | </tabset> | |
64 | </ng-container> | |
65 | </ng-container> | |
66 | <ng-template #isLoading> | |
67 | <cd-loading-panel i18n>SMART data is loading.</cd-loading-panel> | |
68 | </ng-template> |