bfg-common 1.3.387 → 1.3.389
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/common/pages/hardwareHealth/tableView/TableView.vue +16 -1
- package/components/common/pages/hardwareHealth/tableView/lib/config/alertWarningTable.ts +15 -8
- package/package.json +1 -1
- /package/components/common/pages/hardwareHealth/tableView/{lib/modal → modal}/sensorWarning.vue +0 -0
|
@@ -108,7 +108,22 @@ const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
|
108
108
|
)
|
|
109
109
|
|
|
110
110
|
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
111
|
-
const tableData = ['sensor'].includes(props.tableMode) ? props.dataTable : [] // TODO временно так
|
|
111
|
+
// const tableData = ['sensor'].includes(props.tableMode) ? props.dataTable : [] // TODO временно так
|
|
112
|
+
let tableData = props.dataTable
|
|
113
|
+
|
|
114
|
+
switch (props.tableMode) {
|
|
115
|
+
case 'storage-sensor':
|
|
116
|
+
tableData = []
|
|
117
|
+
break
|
|
118
|
+
case 'alert-warning':
|
|
119
|
+
tableData = tableData.filter((sensor: UI_I_HardwareHealthSensors) =>
|
|
120
|
+
[2, 3].includes(sensor.status)
|
|
121
|
+
)
|
|
122
|
+
break
|
|
123
|
+
case 'system-log':
|
|
124
|
+
tableData = []
|
|
125
|
+
break
|
|
126
|
+
}
|
|
112
127
|
|
|
113
128
|
return table[props.tableMode].bodyItems(tableData, localization.value)
|
|
114
129
|
})
|
|
@@ -9,8 +9,11 @@ import {
|
|
|
9
9
|
constructColumnKey,
|
|
10
10
|
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
11
11
|
import type { UI_I_HardwareHealthAlertWarnings } from '~/components/common/pages/hardwareHealth/tableView/lib/models/interfaces'
|
|
12
|
-
// import { E_HostStatusIcon } from '~/components/templates/inventory/treeView/lib/models/enums'
|
|
13
12
|
import { hardwareHealthAlertWarningTableKeys } from '~/components/common/pages/hardwareHealth/tableView/lib/config/tableKeys'
|
|
13
|
+
import {
|
|
14
|
+
sensorsLocalizationByStatus,
|
|
15
|
+
sensorsIconByStatus,
|
|
16
|
+
} from '~/components/common/pages/hardwareHealth/lib/config/status'
|
|
14
17
|
|
|
15
18
|
const getItems = (
|
|
16
19
|
localization: UI_I_Localization
|
|
@@ -68,7 +71,8 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
export const bodyItems = (
|
|
71
|
-
data: UI_I_HardwareHealthAlertWarnings[]
|
|
74
|
+
data: UI_I_HardwareHealthAlertWarnings[],
|
|
75
|
+
localization: UI_I_Localization
|
|
72
76
|
): UI_I_BodyItem[][] => {
|
|
73
77
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
74
78
|
data.forEach((sensor: UI_I_HardwareHealthAlertWarnings, key) => {
|
|
@@ -81,13 +85,16 @@ export const bodyItems = (
|
|
|
81
85
|
},
|
|
82
86
|
{
|
|
83
87
|
key: 'icon',
|
|
84
|
-
text:
|
|
88
|
+
text: localization[
|
|
89
|
+
sensorsLocalizationByStatus[
|
|
90
|
+
sensor[hardwareHealthAlertWarningTableKeys[1]]
|
|
91
|
+
]
|
|
92
|
+
],
|
|
85
93
|
id: key,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
data: {},
|
|
94
|
+
data: {
|
|
95
|
+
iconClassName: sensorsIconByStatus[sensor.status],
|
|
96
|
+
isSprite: false,
|
|
97
|
+
},
|
|
91
98
|
testId: `table-item-${key}`,
|
|
92
99
|
},
|
|
93
100
|
{
|
package/package.json
CHANGED
/package/components/common/pages/hardwareHealth/tableView/{lib/modal → modal}/sensorWarning.vue
RENAMED
|
File without changes
|