bfg-common 1.5.892 → 1.5.893
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/monitor/advanced/tools/chartOptionsModal/counters/table/tableOld/lib/config/tableConfig.ts +4 -4
- package/components/common/pages/hardwareHealth/HardwareHealth.vue +61 -5
- package/components/common/pages/hardwareHealth/HardwareHealthNew.vue +178 -22
- package/components/common/pages/hardwareHealth/HardwareHealthOld.vue +33 -57
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +197 -247
- package/components/common/pages/hardwareHealth/historyTestimony/GraphNew.vue +193 -0
- package/components/common/pages/hardwareHealth/historyTestimony/GraphOld.vue +205 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +79 -249
- package/components/common/pages/hardwareHealth/historyTestimony/tools/ToolsNew.vue +255 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/ToolsOld.vue +317 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +88 -93
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModalNew.vue +165 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModalOld.vue +154 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/NotificationNew.vue +22 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/Actions.vue +33 -52
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/ActionsNew.vue +119 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/ActionsOld.vue +82 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +68 -49
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/CountersNew.vue +101 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/CountersOld.vue +91 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/Table.vue +23 -68
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/lib/models/interfaces.ts +13 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/tableNew/TableNew.vue +73 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/tableNew/lib/config/options.ts +19 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/tableNew/lib/config/tableData.ts +73 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/tableNew/lib/utils/constructTable.ts +31 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/tableOld/TableOld.vue +95 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +50 -33
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/TimespanNew.vue +162 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/TimespanOld.vue +65 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/metrics/Metrics.vue +15 -9
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/metrics/MetricsNew.vue +118 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/metrics/MetricsOld.vue +22 -0
- package/components/common/pages/hardwareHealth/indicators/Indicators.vue +7 -21
- package/components/common/pages/hardwareHealth/indicators/lib/models/interfaces.ts +1 -0
- package/components/common/pages/hardwareHealth/tableView/new/New.vue +50 -23
- package/components/common/pages/hardwareHealth/tableView/new/lib/config/alertWarningTable.ts +98 -0
- package/components/common/pages/hardwareHealth/tableView/new/lib/config/historyTestimonyTable.ts +124 -0
- package/components/common/pages/hardwareHealth/tableView/new/lib/config/storageSensorsTable.ts +90 -0
- package/components/common/pages/hardwareHealth/tableView/new/lib/config/systemLogTable.ts +76 -0
- package/package.json +1 -1
- /package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/{Notification.vue → NotificationOld.vue} +0 -0
- /package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/{lib → tableOld/lib}/config/tableConfig.ts +0 -0
- /package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/table/{lib → tableOld/lib}/models/types.ts +0 -0
|
@@ -62,25 +62,25 @@ export const bodyItems = (
|
|
|
62
62
|
{
|
|
63
63
|
key: 'col1',
|
|
64
64
|
text: counters[countersTableKey[0]],
|
|
65
|
-
id: key,
|
|
65
|
+
id: counters.id ?? key,
|
|
66
66
|
testId: `counters-item-${countersTableKey[0]}-${key}`,
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
key: 'col2',
|
|
70
70
|
text: counters[countersTableKey[1]],
|
|
71
|
-
id: key,
|
|
71
|
+
id: counters.id ?? key,
|
|
72
72
|
testId: `counters-item-${countersTableKey[1]}-${key}`,
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
key: 'col3',
|
|
76
76
|
text: counters[countersTableKey[2]],
|
|
77
|
-
id: key,
|
|
77
|
+
id: counters.id ?? key,
|
|
78
78
|
testId: `counters-item-${countersTableKey[2]}-${key}`,
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
key: 'col4',
|
|
82
82
|
text: counters[countersTableKey[3]],
|
|
83
|
-
id: key,
|
|
83
|
+
id: counters.id ?? key,
|
|
84
84
|
testId: `counters-item-${countersTableKey[3]}-${key}`,
|
|
85
85
|
},
|
|
86
86
|
])
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-pages-hardware-health-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
:
|
|
4
|
+
v-model:active-tab="activeTab"
|
|
5
|
+
v-model:selected-graph-view="selectedGraphView"
|
|
6
|
+
v-model:main-selected-row="selectedRow"
|
|
7
|
+
:data="hardwareHealth"
|
|
5
8
|
:history-testimony-power="props.historyTestimonyPower"
|
|
6
9
|
:history-testimony-temperature="props.historyTestimonyTemperature"
|
|
7
10
|
:loading="props.loading"
|
|
@@ -13,13 +16,19 @@
|
|
|
13
16
|
:language="props.language"
|
|
14
17
|
:valid-date-end="props.validDateEnd"
|
|
15
18
|
:format-date="props.formatDate"
|
|
19
|
+
:selected-host-name="props.selectedHostName"
|
|
20
|
+
:hardware-health-tabs="tabItems"
|
|
21
|
+
:generated-alert-text="generateAlertTextWithLink"
|
|
16
22
|
@update-history-testimony-tools="
|
|
17
23
|
emits('update-history-testimony-tools', $event)
|
|
18
24
|
"
|
|
19
25
|
/>
|
|
20
26
|
<common-pages-hardware-health-old
|
|
21
27
|
v-else
|
|
22
|
-
:
|
|
28
|
+
v-model:active-tab="activeTab"
|
|
29
|
+
v-model:selected-graph-view="selectedGraphView"
|
|
30
|
+
v-model:main-selected-row="selectedRow"
|
|
31
|
+
:data="hardwareHealth"
|
|
23
32
|
:history-testimony-power="props.historyTestimonyPower"
|
|
24
33
|
:history-testimony-temperature="props.historyTestimonyTemperature"
|
|
25
34
|
:loading="props.loading"
|
|
@@ -31,6 +40,8 @@
|
|
|
31
40
|
:language="props.language"
|
|
32
41
|
:valid-date-end="props.validDateEnd"
|
|
33
42
|
:format-date="props.formatDate"
|
|
43
|
+
:hardware-health-tabs="hardwareHealthTabs"
|
|
44
|
+
:generated-alert-text="generateAlertTextWithLink"
|
|
34
45
|
@update-history-testimony-tools="
|
|
35
46
|
emits('update-history-testimony-tools', $event)
|
|
36
47
|
"
|
|
@@ -39,10 +50,17 @@
|
|
|
39
50
|
|
|
40
51
|
<script lang="ts" setup>
|
|
41
52
|
import type { I_SeriesLine } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
53
|
+
import type { UI_I_TabItem } from '~/node_modules/bfg-uikit/components/ui/tabs/models/interfaces'
|
|
54
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
42
55
|
import type { UI_I_HardwareHealthHistoryTestimonyTools } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
|
|
43
|
-
import type {
|
|
44
|
-
|
|
45
|
-
} from
|
|
56
|
+
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/old/lib/models/interfaces'
|
|
57
|
+
import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
|
|
58
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
59
|
+
import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
|
|
60
|
+
import {
|
|
61
|
+
hardwareHealthTabsFunc,
|
|
62
|
+
hardwareHealthTabsNewFunc,
|
|
63
|
+
} from '~/components/common/pages/hardwareHealth/lib/config/tabsPannel'
|
|
46
64
|
|
|
47
65
|
const props = defineProps<{
|
|
48
66
|
data: UI_I_HardwareHealthSensors[]
|
|
@@ -57,6 +75,7 @@ const props = defineProps<{
|
|
|
57
75
|
language: string
|
|
58
76
|
validDateEnd: number
|
|
59
77
|
formatDate: string
|
|
78
|
+
selectedHostName: string
|
|
60
79
|
}>()
|
|
61
80
|
|
|
62
81
|
const emits = defineEmits<{
|
|
@@ -69,6 +88,43 @@ const emits = defineEmits<{
|
|
|
69
88
|
const { $store }: any = useNuxtApp()
|
|
70
89
|
|
|
71
90
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
91
|
+
|
|
92
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
93
|
+
|
|
94
|
+
const activeTab = ref<UI_T_HardwareHealthTabMode>('sensor')
|
|
95
|
+
const selectedGraphView = ref<string>('all')
|
|
96
|
+
const selectedRow = ref<number[]>([])
|
|
97
|
+
|
|
98
|
+
const hardwareHealthTabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
99
|
+
hardwareHealthTabsFunc(localization.value)
|
|
100
|
+
)
|
|
101
|
+
const tabItems = computed<UI_I_TabItem[]>(() =>
|
|
102
|
+
hardwareHealthTabsNewFunc(localization.value)
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
const hardwareHealth = computed<UI_I_HardwareHealthSensors[]>(
|
|
106
|
+
() => props.data || []
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
const generateAlertTextWithLink = computed<UI_I_StorageSensorsAlert>(() => {
|
|
110
|
+
const { storageSensorsAlert, thisKbArticle } = localization.value.common
|
|
111
|
+
|
|
112
|
+
const [before, after] = storageSensorsAlert.split('{ link }')
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
before,
|
|
116
|
+
after,
|
|
117
|
+
link: 'javascript:void(0)',
|
|
118
|
+
linkText: thisKbArticle,
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
onMounted(() => {
|
|
123
|
+
$store.dispatch('main/A_CONTINUE_GLOBAL_REFRESH', 'hardwareHealth')
|
|
124
|
+
})
|
|
125
|
+
onUnmounted(() => {
|
|
126
|
+
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hardwareHealth')
|
|
127
|
+
})
|
|
72
128
|
</script>
|
|
73
129
|
|
|
74
130
|
<style lang="scss" scoped></style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="hardware-health flex flex-col h-full overflow-hidden">
|
|
3
|
-
<div class="flex flex-wrap justify-between gap-6 mb-5">
|
|
3
|
+
<div class="flex flex-wrap justify-between gap-6 mb-5 px-[6px]">
|
|
4
4
|
<h3
|
|
5
5
|
v-if="!props.loading"
|
|
6
6
|
class="hardware-health-title text-[18px] font-[500]"
|
|
@@ -10,61 +10,180 @@
|
|
|
10
10
|
<ui-skeleton-item v-else width="160" height="22" />
|
|
11
11
|
|
|
12
12
|
<common-pages-hardware-health-indicators
|
|
13
|
-
:
|
|
13
|
+
:status-counts="statusCounts"
|
|
14
14
|
:loading="props.loading"
|
|
15
15
|
/>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
-
<div class="tab-list">
|
|
18
|
+
<div class="tab-list px-[6px]">
|
|
19
19
|
<ui-tabs
|
|
20
20
|
v-if="!props.loading"
|
|
21
21
|
v-model="activeTab"
|
|
22
|
-
:tabs="
|
|
22
|
+
:tabs="props.hardwareHealthTabs"
|
|
23
23
|
type="outline"
|
|
24
24
|
test-id="hardware-health-tab-list"
|
|
25
25
|
/>
|
|
26
26
|
<ui-skeleton-item v-else width="640" height="36" border-radius="8" />
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
<div
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
:
|
|
33
|
-
|
|
29
|
+
<div v-if="activeTab === 'storage-sensor'" class="px-[6px]">
|
|
30
|
+
<ui-alert
|
|
31
|
+
v-if="!props.loading"
|
|
32
|
+
:messages="['content text']"
|
|
33
|
+
type="warning"
|
|
34
|
+
test-id="select-storage-sensor-alert"
|
|
35
|
+
size="lg"
|
|
36
|
+
hide-close-button
|
|
37
|
+
>
|
|
38
|
+
<template #content>
|
|
39
|
+
<p class="alert-text text-[14px]">
|
|
40
|
+
{{ props.generatedAlertText.before }}
|
|
41
|
+
<a
|
|
42
|
+
:href="props.generatedAlertText.link"
|
|
43
|
+
data-id="general-alert-text-link"
|
|
44
|
+
class="alert-text-link"
|
|
45
|
+
>
|
|
46
|
+
{{ props.generatedAlertText.linkText }}
|
|
47
|
+
</a>
|
|
48
|
+
{{ props.generatedAlertText.after }}
|
|
49
|
+
</p>
|
|
50
|
+
</template>
|
|
51
|
+
</ui-alert>
|
|
52
|
+
|
|
53
|
+
<div v-else class="alert-skeleton p-4 mt-4">
|
|
54
|
+
<ui-skeleton-item width="960" height="20" />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div
|
|
59
|
+
:class="[
|
|
60
|
+
'h-full overflow-hidden',
|
|
61
|
+
{ 'history-testimony': activeTab === 'history-testimony' },
|
|
62
|
+
]"
|
|
63
|
+
>
|
|
64
|
+
<common-pages-hardware-health-history-testimony-graph
|
|
65
|
+
v-if="activeTab === 'history-testimony'"
|
|
66
|
+
v-model:selected-view="selectedGraphView"
|
|
67
|
+
:power-data="props.historyTestimonyPower"
|
|
68
|
+
:power-loading="props.loadingPowerData"
|
|
69
|
+
:valid-date-end="props.validDateEnd"
|
|
70
|
+
:format-date="props.formatDate"
|
|
34
71
|
:loading="props.loading"
|
|
35
|
-
:
|
|
36
|
-
:
|
|
72
|
+
:is-dark-mode="props.isDarkMode"
|
|
73
|
+
:formatted-datetime="props.formattedDatetime"
|
|
74
|
+
:language="props.language"
|
|
75
|
+
:get-date-format="props.getDateFormat"
|
|
76
|
+
:temperature-loading="props.loadingTemperatureData"
|
|
77
|
+
:temperature-data="props.historyTestimonyTemperature"
|
|
78
|
+
:main-selected-row="mainSelectedRow"
|
|
79
|
+
:counters-table-data="props.data"
|
|
80
|
+
:selected-host-name="props.selectedHostName"
|
|
81
|
+
@update-tools="emits('update-history-testimony-tools', $event)"
|
|
37
82
|
/>
|
|
83
|
+
|
|
84
|
+
<div class="table-content pt-4 h-full overflow-hidden px-[6px]">
|
|
85
|
+
<common-pages-hardware-health-table-view-new
|
|
86
|
+
:table-data="tableData || []"
|
|
87
|
+
:total-items="tableData?.length || 0"
|
|
88
|
+
:total-pages="1"
|
|
89
|
+
:loading="props.loading"
|
|
90
|
+
:selected-graph-view="selectedGraphView"
|
|
91
|
+
:table-mode="activeTab"
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
38
94
|
</div>
|
|
39
95
|
</div>
|
|
40
96
|
</template>
|
|
41
97
|
|
|
42
98
|
<script setup lang="ts">
|
|
43
|
-
import type {
|
|
99
|
+
import type { I_SeriesLine } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
44
100
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
45
101
|
import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
|
|
46
|
-
import {
|
|
47
|
-
import type {
|
|
48
|
-
|
|
49
|
-
} from
|
|
102
|
+
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/old/lib/models/interfaces'
|
|
103
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
104
|
+
import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
|
|
105
|
+
import type { UI_I_HardwareHealthHistoryTestimonyTools } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
|
|
106
|
+
import type { UI_I_IndicatorAlerts } from '~/components/common/pages/hardwareHealth/indicators/lib/models/interfaces'
|
|
107
|
+
|
|
108
|
+
const activeTab = defineModel<UI_T_HardwareHealthTabMode>('activeTab', {
|
|
109
|
+
required: true,
|
|
110
|
+
})
|
|
111
|
+
const selectedGraphView = defineModel<string>('selectedGraphView', {
|
|
112
|
+
required: true,
|
|
113
|
+
})
|
|
114
|
+
const mainSelectedRow = defineModel<number[]>('mainSelectedRow', {
|
|
115
|
+
required: true,
|
|
116
|
+
})
|
|
50
117
|
|
|
51
118
|
const props = defineProps<{
|
|
52
119
|
data: UI_I_HardwareHealthSensors[]
|
|
53
120
|
loading: boolean
|
|
121
|
+
historyTestimonyPower: I_SeriesLine | null
|
|
122
|
+
historyTestimonyTemperature: I_SeriesLine | null
|
|
123
|
+
loadingPowerData: boolean
|
|
124
|
+
loadingTemperatureData: boolean
|
|
125
|
+
validDateEnd: number
|
|
126
|
+
formatDate: string
|
|
127
|
+
formattedDatetime: any
|
|
128
|
+
getDateFormat: any
|
|
129
|
+
language: string
|
|
130
|
+
isDarkMode: boolean
|
|
131
|
+
selectedHostName: string
|
|
132
|
+
|
|
133
|
+
hardwareHealthTabs: UI_I_CollapseNavItem[]
|
|
134
|
+
generatedAlertText: UI_I_StorageSensorsAlert
|
|
135
|
+
}>()
|
|
136
|
+
const emits = defineEmits<{
|
|
137
|
+
(
|
|
138
|
+
event: 'update-history-testimony-tools',
|
|
139
|
+
value: UI_I_HardwareHealthHistoryTestimonyTools
|
|
140
|
+
): void
|
|
54
141
|
}>()
|
|
55
142
|
|
|
56
143
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
57
144
|
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
)
|
|
145
|
+
const tableData = computed<UI_I_HardwareHealthSensors[]>(() => {
|
|
146
|
+
if (
|
|
147
|
+
activeTab.value === 'storage-sensor' ||
|
|
148
|
+
activeTab.value === 'system-log'
|
|
149
|
+
) {
|
|
150
|
+
return []
|
|
151
|
+
}
|
|
152
|
+
if (activeTab.value === 'alert-warning') {
|
|
153
|
+
return props.data.filter((sensor: UI_I_HardwareHealthSensors) =>
|
|
154
|
+
[2, 3].includes(sensor.status)
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
if (activeTab.value === 'history-testimony') {
|
|
158
|
+
return props.data.filter(
|
|
159
|
+
(sensor: UI_I_HardwareHealthSensors) =>
|
|
160
|
+
sensor.category?.toLowerCase() !== 'disk health'
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
return props.data
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
const statusCounts = computed<UI_I_IndicatorAlerts>(() => {
|
|
167
|
+
let alertStatus = 0
|
|
168
|
+
let warningStatus = 0
|
|
169
|
+
let length = props.data.length
|
|
170
|
+
|
|
171
|
+
props.data.forEach((item) => {
|
|
172
|
+
if (item.status === 3) alertStatus++
|
|
173
|
+
if (item.status === 2) warningStatus++
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
alertStatus,
|
|
178
|
+
warningStatus,
|
|
179
|
+
length,
|
|
180
|
+
}
|
|
181
|
+
})
|
|
63
182
|
</script>
|
|
64
183
|
|
|
65
184
|
<style scoped lang="scss">
|
|
66
185
|
.hardware-health {
|
|
67
|
-
padding: 6px
|
|
186
|
+
padding-top: 6px;
|
|
68
187
|
|
|
69
188
|
&-title {
|
|
70
189
|
color: var(--title-form-first-color);
|
|
@@ -74,5 +193,42 @@ const tabItems = computed<UI_I_TabItem[]>(() =>
|
|
|
74
193
|
overflow-x: auto;
|
|
75
194
|
min-height: max-content;
|
|
76
195
|
}
|
|
196
|
+
|
|
197
|
+
:deep(.ui-alert-item.lg) {
|
|
198
|
+
padding: 16px;
|
|
199
|
+
margin-top: 16px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.alert-text {
|
|
203
|
+
color: var(--title-form-first-color);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.alert-text-link {
|
|
207
|
+
color: var(--btn-primary-fill-bg-color);
|
|
208
|
+
text-decoration: none;
|
|
209
|
+
|
|
210
|
+
&:hover {
|
|
211
|
+
color: var(--btn-primary-fill-hover-bg-color);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.alert-skeleton {
|
|
216
|
+
background: #ffffff;
|
|
217
|
+
box-shadow: 0 1px 4px 0 #00000014;
|
|
218
|
+
border-radius: 8px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.history-testimony {
|
|
223
|
+
overflow-y: auto;
|
|
224
|
+
margin-top: 24px;
|
|
225
|
+
|
|
226
|
+
:deep(.graph-containers) {
|
|
227
|
+
padding-bottom: 16px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.table-content {
|
|
231
|
+
margin-top: 0;
|
|
232
|
+
}
|
|
77
233
|
}
|
|
78
234
|
</style>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<atoms-tabs
|
|
10
10
|
v-model="activeTab"
|
|
11
|
-
:items="hardwareHealthTabs"
|
|
11
|
+
:items="props.hardwareHealthTabs"
|
|
12
12
|
test-id="hardware-health-tabs"
|
|
13
13
|
size="small"
|
|
14
14
|
class="hardware-health__tabs"
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
>
|
|
24
24
|
<template #default="">
|
|
25
25
|
<p>
|
|
26
|
-
{{
|
|
26
|
+
{{ props.generatedAlertText.before }}
|
|
27
27
|
<a
|
|
28
|
-
:href="
|
|
28
|
+
:href="props.generatedAlertText.link"
|
|
29
29
|
data-id="general-alert-text-link"
|
|
30
30
|
>
|
|
31
|
-
{{
|
|
31
|
+
{{ props.generatedAlertText.linkText }}
|
|
32
32
|
</a>
|
|
33
|
-
{{
|
|
33
|
+
{{ props.generatedAlertText.after }}
|
|
34
34
|
</p>
|
|
35
35
|
</template>
|
|
36
36
|
</atoms-alert>
|
|
@@ -43,25 +43,25 @@
|
|
|
43
43
|
v-model:selected-view="selectedGraphView"
|
|
44
44
|
:power-data="props.historyTestimonyPower"
|
|
45
45
|
:temperature-data="props.historyTestimonyTemperature"
|
|
46
|
-
:counters-table-data="
|
|
46
|
+
:counters-table-data="props.data"
|
|
47
47
|
:language="props.language"
|
|
48
48
|
:power-loading="props.loadingPowerData"
|
|
49
49
|
:temperature-loading="props.loadingTemperatureData"
|
|
50
50
|
:formatted-datetime="props.formattedDatetime"
|
|
51
51
|
:is-dark-mode="props.isDarkMode"
|
|
52
52
|
:get-date-format="props.getDateFormat"
|
|
53
|
-
:main-selected-row="
|
|
53
|
+
:main-selected-row="mainSelectedRow"
|
|
54
54
|
:valid-date-end="props.validDateEnd"
|
|
55
55
|
:format-date="props.formatDate"
|
|
56
|
-
@update-tools="
|
|
56
|
+
@update-tools="emits('update-history-testimony-tools', $event)"
|
|
57
57
|
/>
|
|
58
58
|
|
|
59
59
|
<common-pages-hardware-health-table-view-old
|
|
60
60
|
:key="uniqueKey"
|
|
61
|
-
v-model:selected-row="
|
|
61
|
+
v-model:selected-row="mainSelectedRow"
|
|
62
62
|
:selected-graph-view="selectedGraphView"
|
|
63
|
-
:data-table="
|
|
64
|
-
:total-items="
|
|
63
|
+
:data-table="props.data"
|
|
64
|
+
:total-items="props.data.length"
|
|
65
65
|
:total-pages="1"
|
|
66
66
|
:table-mode="activeTab"
|
|
67
67
|
:loading="props.loading"
|
|
@@ -73,12 +73,21 @@
|
|
|
73
73
|
<script lang="ts" setup>
|
|
74
74
|
import type { I_SeriesLine } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
75
75
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
76
|
-
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/lib/models/interfaces'
|
|
76
|
+
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/old/lib/models/interfaces'
|
|
77
77
|
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
78
78
|
import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
|
|
79
79
|
import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
|
|
80
80
|
import type { UI_I_HardwareHealthHistoryTestimonyTools } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
|
|
81
|
-
|
|
81
|
+
|
|
82
|
+
const activeTab = defineModel<UI_T_HardwareHealthTabMode>('activeTab', {
|
|
83
|
+
required: true,
|
|
84
|
+
})
|
|
85
|
+
const selectedGraphView = defineModel<string>('selectedGraphView', {
|
|
86
|
+
required: true,
|
|
87
|
+
})
|
|
88
|
+
const mainSelectedRow = defineModel<number[]>('mainSelectedRow', {
|
|
89
|
+
required: true,
|
|
90
|
+
})
|
|
82
91
|
|
|
83
92
|
const props = defineProps<{
|
|
84
93
|
data: UI_I_HardwareHealthSensors[]
|
|
@@ -93,6 +102,9 @@ const props = defineProps<{
|
|
|
93
102
|
language: string
|
|
94
103
|
validDateEnd: number
|
|
95
104
|
formatDate: string
|
|
105
|
+
|
|
106
|
+
hardwareHealthTabs: UI_I_CollapseNavItem[]
|
|
107
|
+
generatedAlertText: UI_I_StorageSensorsAlert
|
|
96
108
|
}>()
|
|
97
109
|
|
|
98
110
|
const emits = defineEmits<{
|
|
@@ -103,21 +115,12 @@ const emits = defineEmits<{
|
|
|
103
115
|
}>()
|
|
104
116
|
|
|
105
117
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
106
|
-
const { $store }: any = useNuxtApp()
|
|
107
118
|
|
|
108
|
-
const activeTab = ref<UI_T_HardwareHealthTabMode>('sensor')
|
|
109
|
-
const selectedGraphView = ref<string>('all')
|
|
110
119
|
const uniqueKey = ref<number>(0)
|
|
111
120
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
hardwareHealthTabsFunc(localization.value)
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
const hardwareHealth = computed<UI_I_HardwareHealthSensors[]>(
|
|
119
|
-
() => props.data || []
|
|
120
|
-
)
|
|
121
|
+
watch(activeTab, () => {
|
|
122
|
+
uniqueKey.value++
|
|
123
|
+
})
|
|
121
124
|
|
|
122
125
|
const hardwareHealthDescription = computed<string>(() => {
|
|
123
126
|
const { thereIsAlertAndWarningOutOfSensors, noAlertsOrWarningsOutOfSensors } =
|
|
@@ -126,7 +129,7 @@ const hardwareHealthDescription = computed<string>(() => {
|
|
|
126
129
|
let alertCount = 0
|
|
127
130
|
let warningCount = 0
|
|
128
131
|
|
|
129
|
-
|
|
132
|
+
props.data.forEach((sensor: UI_I_HardwareHealthSensors) => {
|
|
130
133
|
if (sensor.status === 3) alertCount++
|
|
131
134
|
if (sensor.status === 2) warningCount++
|
|
132
135
|
})
|
|
@@ -145,7 +148,7 @@ const hardwareHealthDescription = computed<string>(() => {
|
|
|
145
148
|
const replacements: Replacements = {
|
|
146
149
|
alert: alertCount,
|
|
147
150
|
warning: warningCount,
|
|
148
|
-
sensors:
|
|
151
|
+
sensors: props.data.length || 0,
|
|
149
152
|
}
|
|
150
153
|
const text = hasStatusTwoOrThree
|
|
151
154
|
? thereIsAlertAndWarningOutOfSensors
|
|
@@ -156,47 +159,20 @@ const hardwareHealthDescription = computed<string>(() => {
|
|
|
156
159
|
(_, key: keyof Replacements) => replacements[key]
|
|
157
160
|
)
|
|
158
161
|
})
|
|
159
|
-
|
|
160
|
-
const generateAlertTextWithLink = computed<UI_I_StorageSensorsAlert>(() => {
|
|
161
|
-
const { storageSensorsAlert, thisKbArticle } = localization.value.common
|
|
162
|
-
|
|
163
|
-
const [before, after] = storageSensorsAlert.split('{ link }')
|
|
164
|
-
|
|
165
|
-
return {
|
|
166
|
-
before,
|
|
167
|
-
after,
|
|
168
|
-
link: 'javascript:void(0)',
|
|
169
|
-
linkText: thisKbArticle,
|
|
170
|
-
}
|
|
171
|
-
})
|
|
172
|
-
|
|
173
|
-
watch(activeTab, () => {
|
|
174
|
-
uniqueKey.value++
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
const onUpdateHistoryTestimonyTools = (
|
|
178
|
-
tools: UI_I_HardwareHealthHistoryTestimonyTools
|
|
179
|
-
): void => {
|
|
180
|
-
emits('update-history-testimony-tools', tools)
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
onMounted(() => {
|
|
184
|
-
$store.dispatch('main/A_CONTINUE_GLOBAL_REFRESH', 'hardwareHealth')
|
|
185
|
-
})
|
|
186
|
-
onUnmounted(() => {
|
|
187
|
-
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hardwareHealth')
|
|
188
|
-
})
|
|
189
162
|
</script>
|
|
190
163
|
|
|
191
164
|
<style lang="scss" scoped>
|
|
192
165
|
@import 'bfg-common/assets/scss/common/global.scss';
|
|
166
|
+
|
|
193
167
|
.hardware-health {
|
|
194
168
|
@extend %block-property;
|
|
169
|
+
|
|
195
170
|
&__tabs {
|
|
196
171
|
:deep(.nav) {
|
|
197
172
|
margin-top: 0;
|
|
198
173
|
}
|
|
199
174
|
}
|
|
175
|
+
|
|
200
176
|
&__content {
|
|
201
177
|
display: flex;
|
|
202
178
|
flex-direction: column;
|