bfg-common 1.4.16 → 1.4.17
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/assets/localization/local_be.json +6 -0
- package/assets/localization/local_en.json +6 -0
- package/assets/localization/local_hy.json +6 -0
- package/assets/localization/local_kk.json +6 -0
- package/assets/localization/local_ru.json +6 -0
- package/assets/localization/local_zh.json +6 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +4 -4
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/lib/config/dateForm.ts +1 -1
- package/components/common/pages/hardwareHealth/HardwareHealth.vue +43 -61
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +331 -0
- package/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces.ts +9 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +375 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +469 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/Notification.vue +30 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/Actions.vue +157 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/SaveOptionsModal.vue +81 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/lib/utils/optionsActions.ts +25 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +89 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/Table.vue +174 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/lib/config/tableConfig.ts +89 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/lib/models/types.ts +5 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +64 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/form/Form.vue +539 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/form/lib/config/dateForm.ts +115 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/config/optionsMetrics.ts +17 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/interfaces.ts +15 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types.ts +1 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/metrics/Metrics.vue +31 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar.ts +78 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/lib/models/interfaces.ts +9 -0
- package/components/common/pages/hardwareHealth/tableView/TableView.vue +4 -10
- package/components/common/pages/hardwareHealth/tableView/lib/config/historyTestimonyTable.ts +128 -0
- package/components/common/pages/hardwareHealth/tableView/lib/config/sensorTable.ts +7 -11
- package/components/common/pages/hardwareHealth/tableView/lib/config/tableKeys.ts +6 -7
- package/components/common/pages/hardwareHealth/tableView/lib/models/interfaces.ts +2 -0
- package/components/common/pages/hardwareHealth/tableView/lib/models/types.ts +9 -4
- package/lib/models/interfaces.ts +1 -0
- package/lib/models/types.ts +1 -0
- package/package.json +1 -1
- package/components/common/pages/hardwareHealth/Graph.vue +0 -84
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="chart-option-groups-container">
|
|
3
|
+
<span>{{ localization.common.chartMetrics }}</span>
|
|
4
|
+
<atoms-tabs-vertical-tabs
|
|
5
|
+
v-model="selectedMetric"
|
|
6
|
+
:items="props.metricsItems"
|
|
7
|
+
/>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
13
|
+
import type { UI_I_VerticalTabs } from '~/components/atoms/tabs/lib/models/interfaces'
|
|
14
|
+
import type { UI_T_Chart } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types'
|
|
15
|
+
|
|
16
|
+
const props = defineProps<{
|
|
17
|
+
metricsItems: UI_I_VerticalTabs[]
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
21
|
+
|
|
22
|
+
const selectedMetric = defineModel<UI_T_Chart>('selectedMetric')
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style scoped lang="scss">
|
|
26
|
+
.chart-option-groups-container {
|
|
27
|
+
margin-top: 10px;
|
|
28
|
+
flex-basis: 20%;
|
|
29
|
+
//min-width: 20%;
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
export const periodFunc = (
|
|
5
|
+
localization: UI_I_Localization,
|
|
6
|
+
selectedTimespanType: string
|
|
7
|
+
): UI_I_OptionItem[] => {
|
|
8
|
+
const result = [
|
|
9
|
+
{
|
|
10
|
+
text: localization.common.realTime,
|
|
11
|
+
value: 'real_time',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
text: localization.common.lastDay,
|
|
15
|
+
value: 'last_day',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
text: localization.common.lastWeek,
|
|
19
|
+
value: 'last_week',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
text: localization.common.lastMonth,
|
|
23
|
+
value: 'last_month',
|
|
24
|
+
},
|
|
25
|
+
// {
|
|
26
|
+
// text: localization.common.lastYear,
|
|
27
|
+
// value: 'last_year',
|
|
28
|
+
// },
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
if (selectedTimespanType === 'custom_interval') {
|
|
32
|
+
result.push({
|
|
33
|
+
text: localization.common.customInterval,
|
|
34
|
+
value: 'custom_interval',
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return result
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const viewFunc = (
|
|
42
|
+
localization: UI_I_Localization,
|
|
43
|
+
optionsNames: string[]
|
|
44
|
+
): UI_I_OptionItem[] => {
|
|
45
|
+
const result = [
|
|
46
|
+
{
|
|
47
|
+
text: localization.common.power,
|
|
48
|
+
value: 'power',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
text: localization.inventoryMonitor.temperature,
|
|
52
|
+
value: 'temperature',
|
|
53
|
+
},
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
if (optionsNames) {
|
|
57
|
+
optionsNames.forEach((item) => {
|
|
58
|
+
result.push({
|
|
59
|
+
text: item,
|
|
60
|
+
value: item,
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return result
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const getCurrentOptionsStorageFunc = (): string[] => {
|
|
69
|
+
const optionsNames = []
|
|
70
|
+
for (const key of Object.entries(localStorage)) {
|
|
71
|
+
if (key[0].includes('ChartOptionsSensors')) {
|
|
72
|
+
if (key[0].includes('ChartOptionsSensors')) {
|
|
73
|
+
optionsNames.push(key[0].replace('ChartOptionsSensors', ''))
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return optionsNames
|
|
78
|
+
}
|
package/components/common/pages/hardwareHealth/historyTestimony/tools/lib/models/interfaces.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UI_T_Chart } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types'
|
|
2
|
+
|
|
3
|
+
export interface UI_I_SensorsGraphPayload {
|
|
4
|
+
fields: string
|
|
5
|
+
period: number[]
|
|
6
|
+
periodName: string
|
|
7
|
+
view: string
|
|
8
|
+
metricType: UI_T_Chart
|
|
9
|
+
}
|
|
@@ -73,14 +73,12 @@ import type {
|
|
|
73
73
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
74
74
|
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/lib/models/interfaces'
|
|
75
75
|
import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
|
|
76
|
-
import type {
|
|
77
|
-
UI_T_DataGridType,
|
|
78
|
-
UI_T_SelectedRow,
|
|
79
|
-
} from '~/components/atoms/table/dataGrid/lib/models/types'
|
|
76
|
+
import type { UI_T_DataGridType } from '~/components/atoms/table/dataGrid/lib/models/types'
|
|
80
77
|
import * as sensorTable from '~/components/common/pages/hardwareHealth/tableView/lib/config/sensorTable'
|
|
81
78
|
import * as storageSensorTable from '~/components/common/pages/hardwareHealth/tableView/lib/config/storageSensorTable'
|
|
82
79
|
import * as alertWarningTable from '~/components/common/pages/hardwareHealth/tableView/lib/config/alertWarningTable'
|
|
83
80
|
import * as systemLogTable from '~/components/common/pages/hardwareHealth/tableView/lib/config/systemLogTable'
|
|
81
|
+
import * as historyTestimonyTable from '~/components/common/pages/hardwareHealth/tableView/lib/config/historyTestimonyTable'
|
|
84
82
|
|
|
85
83
|
const props = defineProps<{
|
|
86
84
|
dataTable: UI_I_HardwareHealthSensors[]
|
|
@@ -97,7 +95,7 @@ const table: any = {
|
|
|
97
95
|
'storage-sensor': storageSensorTable,
|
|
98
96
|
'alert-warning': alertWarningTable,
|
|
99
97
|
'system-log': systemLogTable,
|
|
100
|
-
'history-testimony':
|
|
98
|
+
'history-testimony': historyTestimonyTable,
|
|
101
99
|
}
|
|
102
100
|
|
|
103
101
|
const tableType = computed<UI_T_DataGridType | undefined>(() =>
|
|
@@ -137,11 +135,7 @@ const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
|
137
135
|
break
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
return table[props.tableMode].bodyItems(
|
|
141
|
-
tableData,
|
|
142
|
-
localization.value,
|
|
143
|
-
props.tableMode
|
|
144
|
-
)
|
|
138
|
+
return table[props.tableMode].bodyItems(tableData, localization.value)
|
|
145
139
|
})
|
|
146
140
|
|
|
147
141
|
const isShowSensorWarningDetails = ref<boolean>(false)
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import { UI_E_SensorsCategoryIcon } from '~/components/common/pages/hardwareHealth/lib/models/enums'
|
|
3
|
+
import {
|
|
4
|
+
constructHeadItem,
|
|
5
|
+
constructColumnKey,
|
|
6
|
+
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
7
|
+
import {
|
|
8
|
+
sensorsLocalizationByStatus,
|
|
9
|
+
sensorsIconByStatus,
|
|
10
|
+
} from '~/components/common/pages/hardwareHealth/lib/config/status'
|
|
11
|
+
import { hardwareHealthHistoryTestimonyTableKeys } from '~/components/common/pages/hardwareHealth/tableView/lib/config/tableKeys'
|
|
12
|
+
import type {
|
|
13
|
+
UI_I_BodyItem,
|
|
14
|
+
UI_I_ColumnKey,
|
|
15
|
+
UI_I_HeadItem,
|
|
16
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
17
|
+
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/lib/models/interfaces'
|
|
18
|
+
|
|
19
|
+
const getItems = (
|
|
20
|
+
localization: UI_I_Localization
|
|
21
|
+
): [string, boolean, string, string][] => {
|
|
22
|
+
return [
|
|
23
|
+
[
|
|
24
|
+
localization.common.sensors,
|
|
25
|
+
true,
|
|
26
|
+
'330px',
|
|
27
|
+
hardwareHealthHistoryTestimonyTableKeys[0],
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
localization.common.status,
|
|
31
|
+
true,
|
|
32
|
+
'140px',
|
|
33
|
+
hardwareHealthHistoryTestimonyTableKeys[1],
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
localization.common.categories,
|
|
37
|
+
true,
|
|
38
|
+
'130px',
|
|
39
|
+
hardwareHealthHistoryTestimonyTableKeys[2],
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
localization.common.path,
|
|
43
|
+
true,
|
|
44
|
+
'130px',
|
|
45
|
+
hardwareHealthHistoryTestimonyTableKeys[3],
|
|
46
|
+
],
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
export const columnKeys = (
|
|
50
|
+
localization: UI_I_Localization
|
|
51
|
+
): UI_I_ColumnKey[] => {
|
|
52
|
+
const result: UI_I_ColumnKey[] = []
|
|
53
|
+
getItems(localization).forEach((item, i) => {
|
|
54
|
+
const col = i === 1 || i === 2 ? 'icon' : `col${i}`
|
|
55
|
+
result.push(
|
|
56
|
+
constructColumnKey(col, item[0], item[1], `show-column-${item[3]}`)
|
|
57
|
+
)
|
|
58
|
+
})
|
|
59
|
+
return result
|
|
60
|
+
}
|
|
61
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
62
|
+
const result: UI_I_HeadItem[] = []
|
|
63
|
+
getItems(localization).forEach((item, i) => {
|
|
64
|
+
const col = i === 1 || i === 2 ? 'icon' : `col${i}`
|
|
65
|
+
result.push(
|
|
66
|
+
constructHeadItem(
|
|
67
|
+
col,
|
|
68
|
+
item[0],
|
|
69
|
+
item[3],
|
|
70
|
+
true,
|
|
71
|
+
item[2],
|
|
72
|
+
undefined,
|
|
73
|
+
item[3]
|
|
74
|
+
)
|
|
75
|
+
)
|
|
76
|
+
})
|
|
77
|
+
return result
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const bodyItems = (
|
|
81
|
+
data: UI_I_HardwareHealthSensors[],
|
|
82
|
+
localization: UI_I_Localization
|
|
83
|
+
): UI_I_BodyItem[][] => {
|
|
84
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
|
85
|
+
data.forEach((sensor: UI_I_HardwareHealthSensors, key) => {
|
|
86
|
+
const statusData = {
|
|
87
|
+
iconClassName: sensorsIconByStatus[sensor.status],
|
|
88
|
+
isSprite: false,
|
|
89
|
+
warning: sensor.warning,
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (!['disk health'].includes(sensor.category.toLowerCase()))
|
|
93
|
+
bodyItems.push([
|
|
94
|
+
{
|
|
95
|
+
key: 'col0',
|
|
96
|
+
text: sensor[hardwareHealthHistoryTestimonyTableKeys[0]],
|
|
97
|
+
id: key,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
key: 'icon',
|
|
101
|
+
text: localization[
|
|
102
|
+
sensorsLocalizationByStatus[
|
|
103
|
+
sensor[hardwareHealthHistoryTestimonyTableKeys[1]]
|
|
104
|
+
]
|
|
105
|
+
],
|
|
106
|
+
id: key,
|
|
107
|
+
data: statusData,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
key: 'icon',
|
|
111
|
+
text: sensor[hardwareHealthHistoryTestimonyTableKeys[2]],
|
|
112
|
+
id: key,
|
|
113
|
+
data: {
|
|
114
|
+
iconClassName:
|
|
115
|
+
UI_E_SensorsCategoryIcon[sensor.category.toLowerCase()],
|
|
116
|
+
isSprite: true,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: 'col3',
|
|
121
|
+
text: sensor[hardwareHealthHistoryTestimonyTableKeys[3]],
|
|
122
|
+
id: key,
|
|
123
|
+
},
|
|
124
|
+
])
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
return bodyItems
|
|
128
|
+
}
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
constructColumnKey,
|
|
10
10
|
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
11
11
|
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/lib/models/interfaces'
|
|
12
|
-
import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
|
|
13
12
|
import { UI_E_SensorsCategoryIcon } from '~/components/common/pages/hardwareHealth/lib/models/enums'
|
|
14
13
|
import { hardwareHealthSensorTableKeys } from '~/components/common/pages/hardwareHealth/tableView/lib/config/tableKeys'
|
|
15
14
|
import {
|
|
@@ -31,6 +30,7 @@ const getItems = (
|
|
|
31
30
|
[localization.common.reading, true, '115px', hardwareHealthSensorTableKeys[2]],
|
|
32
31
|
[localization.common.categories, true, '130px', hardwareHealthSensorTableKeys[3]],
|
|
33
32
|
[localization.common.lastUpdated, true, '195px', hardwareHealthSensorTableKeys[4]],
|
|
33
|
+
[localization.common.path, true, '195px', hardwareHealthSensorTableKeys[5]],
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
36
|
export const columnKeys = (
|
|
@@ -66,8 +66,7 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
|
66
66
|
|
|
67
67
|
export const bodyItems = (
|
|
68
68
|
data: UI_I_HardwareHealthSensors[],
|
|
69
|
-
localization: UI_I_Localization
|
|
70
|
-
tableMode: UI_T_HardwareHealthTabMode
|
|
69
|
+
localization: UI_I_Localization
|
|
71
70
|
): UI_I_BodyItem[][] => {
|
|
72
71
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
73
72
|
data.forEach((sensor: UI_I_HardwareHealthSensors, key) => {
|
|
@@ -77,13 +76,6 @@ export const bodyItems = (
|
|
|
77
76
|
warning: sensor.warning,
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
let isDisabledRow = false
|
|
81
|
-
if (
|
|
82
|
-
tableMode === 'history-testimony' &&
|
|
83
|
-
!['power', 'temperature'].includes(sensor.category.toLowerCase())
|
|
84
|
-
)
|
|
85
|
-
isDisabledRow = true
|
|
86
|
-
|
|
87
79
|
bodyItems.push([
|
|
88
80
|
// {
|
|
89
81
|
// data,
|
|
@@ -96,7 +88,6 @@ export const bodyItems = (
|
|
|
96
88
|
key: 'col0',
|
|
97
89
|
text: sensor[hardwareHealthSensorTableKeys[0]],
|
|
98
90
|
id: key,
|
|
99
|
-
disabled: isDisabledRow,
|
|
100
91
|
},
|
|
101
92
|
{
|
|
102
93
|
key: 'icon',
|
|
@@ -131,6 +122,11 @@ export const bodyItems = (
|
|
|
131
122
|
text: sensor[hardwareHealthSensorTableKeys[4]],
|
|
132
123
|
id: key,
|
|
133
124
|
},
|
|
125
|
+
{
|
|
126
|
+
key: 'col5',
|
|
127
|
+
text: sensor[hardwareHealthSensorTableKeys[5]],
|
|
128
|
+
id: key,
|
|
129
|
+
},
|
|
134
130
|
])
|
|
135
131
|
})
|
|
136
132
|
return bodyItems
|
|
@@ -3,15 +3,11 @@ import type {
|
|
|
3
3
|
UI_T_HardwareHealthStorageSensorsTableItemTuple,
|
|
4
4
|
UI_T_HardwareHealthAlertWarningTableItemTuple,
|
|
5
5
|
UI_T_HardwareHealthSystemLogTableItemTuple,
|
|
6
|
+
UI_T_HardwareHealthSensorsGraphTableItemTuple,
|
|
6
7
|
} from '~/components/common/pages/hardwareHealth/tableView/lib/models/types'
|
|
7
8
|
|
|
8
|
-
export const hardwareHealthSensorTableKeys: UI_T_HardwareHealthSensorsTableItemTuple =
|
|
9
|
-
'name',
|
|
10
|
-
'status',
|
|
11
|
-
'reading',
|
|
12
|
-
'category',
|
|
13
|
-
'lastUpdated',
|
|
14
|
-
]
|
|
9
|
+
export const hardwareHealthSensorTableKeys: UI_T_HardwareHealthSensorsTableItemTuple =
|
|
10
|
+
['name', 'status', 'reading', 'category', 'lastUpdated', 'path']
|
|
15
11
|
|
|
16
12
|
export const hardwareHealthStorageSensorTableKeys: UI_T_HardwareHealthStorageSensorsTableItemTuple =
|
|
17
13
|
['name', 'health', 'categories']
|
|
@@ -21,3 +17,6 @@ export const hardwareHealthAlertWarningTableKeys: UI_T_HardwareHealthAlertWarnin
|
|
|
21
17
|
|
|
22
18
|
export const hardwareHealthSystemLogTableKeys: UI_T_HardwareHealthSystemLogTableItemTuple =
|
|
23
19
|
['time', 'event']
|
|
20
|
+
|
|
21
|
+
export const hardwareHealthHistoryTestimonyTableKeys: UI_T_HardwareHealthSensorsGraphTableItemTuple =
|
|
22
|
+
['name', 'status', 'category', 'path']
|
|
@@ -3,7 +3,8 @@ export type UI_T_HardwareHealthSensorsTableItemTuple = [
|
|
|
3
3
|
'status',
|
|
4
4
|
'reading',
|
|
5
5
|
'category',
|
|
6
|
-
'lastUpdated'
|
|
6
|
+
'lastUpdated',
|
|
7
|
+
'path'
|
|
7
8
|
]
|
|
8
9
|
export type UI_T_HardwareHealthStorageSensorsTableItemTuple = [
|
|
9
10
|
'name',
|
|
@@ -15,7 +16,11 @@ export type UI_T_HardwareHealthAlertWarningTableItemTuple = [
|
|
|
15
16
|
'status',
|
|
16
17
|
'reading'
|
|
17
18
|
]
|
|
18
|
-
export type UI_T_HardwareHealthSystemLogTableItemTuple = [
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
export type UI_T_HardwareHealthSystemLogTableItemTuple = ['time', 'event']
|
|
20
|
+
|
|
21
|
+
export type UI_T_HardwareHealthSensorsGraphTableItemTuple = [
|
|
22
|
+
'name',
|
|
23
|
+
'status',
|
|
24
|
+
'category',
|
|
25
|
+
'path'
|
|
21
26
|
]
|
package/lib/models/interfaces.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface UI_I_Localization {
|
|
|
27
27
|
contextMenu: UI_I_ArbitraryObject<string>
|
|
28
28
|
networks: UI_I_ArbitraryObject<string>
|
|
29
29
|
inventory: UI_I_ArbitraryObject<string>
|
|
30
|
+
inventoryMonitor: UI_I_ArbitraryObject<string>
|
|
30
31
|
inventoryTabs: UI_I_ArbitraryObject<string>
|
|
31
32
|
snapshots: UI_I_ArbitraryObject<string>
|
|
32
33
|
}
|
package/lib/models/types.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hardware-health-graph">
|
|
3
|
-
<common-graph
|
|
4
|
-
v-if="dataLocal && !props.loading"
|
|
5
|
-
:data="dataLocal"
|
|
6
|
-
:update="updateHelper"
|
|
7
|
-
/>
|
|
8
|
-
<div v-else-if="props.loading" class="graphic-loader-block">
|
|
9
|
-
<div class="spinner"></div>
|
|
10
|
-
</div>
|
|
11
|
-
<div v-else class="empty-content"></div>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
import { format } from 'date-fns'
|
|
17
|
-
import type { I_SeriesLine } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
18
|
-
import type { I_LineGraph } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
19
|
-
import { graphDataFunc } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/utils/renderGraph'
|
|
20
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
21
|
-
|
|
22
|
-
const props = defineProps<{
|
|
23
|
-
data: I_SeriesLine | null
|
|
24
|
-
loading: boolean
|
|
25
|
-
formattedDatetime: any
|
|
26
|
-
isDarkMode: boolean
|
|
27
|
-
getDateFormat: any
|
|
28
|
-
language: string
|
|
29
|
-
}>()
|
|
30
|
-
|
|
31
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
32
|
-
|
|
33
|
-
const dataLocal = ref<I_LineGraph | null>(null)
|
|
34
|
-
const updateHelper = ref<number>(0)
|
|
35
|
-
let dateFormat = ''
|
|
36
|
-
|
|
37
|
-
const updateChart = (): void => {
|
|
38
|
-
if (!props.data) return
|
|
39
|
-
|
|
40
|
-
dataLocal.value = graphDataFunc(
|
|
41
|
-
props.data,
|
|
42
|
-
props.isDarkMode,
|
|
43
|
-
localization.value,
|
|
44
|
-
() => {},
|
|
45
|
-
false,
|
|
46
|
-
false,
|
|
47
|
-
true,
|
|
48
|
-
'spline',
|
|
49
|
-
'',
|
|
50
|
-
undefined,
|
|
51
|
-
() => {},
|
|
52
|
-
props.formattedDatetime,
|
|
53
|
-
format,
|
|
54
|
-
dateFormat
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
updateHelper.value++
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
watch(
|
|
61
|
-
() => [props.data, props.isDarkMode, props.language],
|
|
62
|
-
(newValue) => {
|
|
63
|
-
dateFormat = props.getDateFormat(newValue[2])
|
|
64
|
-
updateChart()
|
|
65
|
-
},
|
|
66
|
-
{ immediate: true, deep: true }
|
|
67
|
-
)
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<style scoped lang="scss">
|
|
71
|
-
.hardware-health-graph {
|
|
72
|
-
height: 300px;
|
|
73
|
-
|
|
74
|
-
.graphic-loader-block {
|
|
75
|
-
height: inherit;
|
|
76
|
-
display: flex;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
align-items: center;
|
|
79
|
-
}
|
|
80
|
-
.empty-content {
|
|
81
|
-
height: inherit;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
</style>
|