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.
@@ -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: sensor[hardwareHealthAlertWarningTableKeys[1]],
88
+ text: localization[
89
+ sensorsLocalizationByStatus[
90
+ sensor[hardwareHealthAlertWarningTableKeys[1]]
91
+ ]
92
+ ],
85
93
  id: key,
86
- // data: {
87
- // iconClassName:
88
- // E_HostStatusIcon[sensor[hardwareHealthAlertWarningTableKeys[1]]],
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.387",
4
+ "version": "1.3.389",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",