bfg-common 1.4.721 → 1.4.723
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/Advanced.vue +244 -239
- package/components/common/monitor/advanced/tools/Tools.vue +447 -440
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +511 -504
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +108 -106
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +95 -93
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +544 -539
- package/components/common/pages/hardwareHealth/HardwareHealth.vue +213 -206
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +456 -451
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +387 -380
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +494 -487
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +96 -94
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +68 -66
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/form/Form.vue +544 -539
- package/package.json +1 -1
|
@@ -1,206 +1,213 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hardware-health">
|
|
3
|
-
<common-headline :headline="localization.common.hardwareHealth" />
|
|
4
|
-
|
|
5
|
-
<div class="hardware-health__description">
|
|
6
|
-
{{ hardwareHealthDescription }}
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<atoms-tabs
|
|
10
|
-
v-model="activeTab"
|
|
11
|
-
test-id="hardware-health-tabs"
|
|
12
|
-
:items="hardwareHealthTabs"
|
|
13
|
-
size="small"
|
|
14
|
-
class="hardware-health__tabs"
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
<atoms-alert
|
|
18
|
-
v-if="activeTab === 'storage-sensor'"
|
|
19
|
-
:items="['content text']"
|
|
20
|
-
status="alert-warning"
|
|
21
|
-
test-id="select-storage-sensor-alert"
|
|
22
|
-
hide-close-icon
|
|
23
|
-
>
|
|
24
|
-
<template #default="">
|
|
25
|
-
<p>
|
|
26
|
-
{{ generateAlertTextWithLink.before }}
|
|
27
|
-
<a
|
|
28
|
-
:href="generateAlertTextWithLink.link"
|
|
29
|
-
data-id="general-alert-text-link"
|
|
30
|
-
>
|
|
31
|
-
{{ generateAlertTextWithLink.linkText }}
|
|
32
|
-
</a>
|
|
33
|
-
{{ generateAlertTextWithLink.after }}
|
|
34
|
-
</p>
|
|
35
|
-
</template>
|
|
36
|
-
</atoms-alert>
|
|
37
|
-
|
|
38
|
-
<common-pages-hardware-health-tools-panel :selected-tab="activeTab" />
|
|
39
|
-
|
|
40
|
-
<div :class="['hardware-health__content', activeTab]">
|
|
41
|
-
<common-pages-hardware-health-history-testimony-graph
|
|
42
|
-
v-if="activeTab === 'history-testimony'"
|
|
43
|
-
v-model:selected-view="selectedGraphView"
|
|
44
|
-
:power-data="props.historyTestimonyPower"
|
|
45
|
-
:temperature-data="props.historyTestimonyTemperature"
|
|
46
|
-
:counters-table-data="hardwareHealth"
|
|
47
|
-
:language="props.language"
|
|
48
|
-
:power-loading="props.loadingPowerData"
|
|
49
|
-
:temperature-loading="props.loadingTemperatureData"
|
|
50
|
-
:formatted-datetime="props.formattedDatetime"
|
|
51
|
-
:is-dark-mode="props.isDarkMode"
|
|
52
|
-
:get-date-format="props.getDateFormat"
|
|
53
|
-
:main-selected-row="selectedRow"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
:
|
|
61
|
-
:
|
|
62
|
-
:
|
|
63
|
-
:
|
|
64
|
-
:
|
|
65
|
-
:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
import type {
|
|
75
|
-
import type {
|
|
76
|
-
import type {
|
|
77
|
-
import type {
|
|
78
|
-
import {
|
|
79
|
-
import type {
|
|
80
|
-
|
|
81
|
-
} from
|
|
82
|
-
|
|
83
|
-
const emits = defineEmits<{
|
|
84
|
-
(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
&
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="hardware-health">
|
|
3
|
+
<common-headline :headline="localization.common.hardwareHealth" />
|
|
4
|
+
|
|
5
|
+
<div class="hardware-health__description">
|
|
6
|
+
{{ hardwareHealthDescription }}
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<atoms-tabs
|
|
10
|
+
v-model="activeTab"
|
|
11
|
+
test-id="hardware-health-tabs"
|
|
12
|
+
:items="hardwareHealthTabs"
|
|
13
|
+
size="small"
|
|
14
|
+
class="hardware-health__tabs"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<atoms-alert
|
|
18
|
+
v-if="activeTab === 'storage-sensor'"
|
|
19
|
+
:items="['content text']"
|
|
20
|
+
status="alert-warning"
|
|
21
|
+
test-id="select-storage-sensor-alert"
|
|
22
|
+
hide-close-icon
|
|
23
|
+
>
|
|
24
|
+
<template #default="">
|
|
25
|
+
<p>
|
|
26
|
+
{{ generateAlertTextWithLink.before }}
|
|
27
|
+
<a
|
|
28
|
+
:href="generateAlertTextWithLink.link"
|
|
29
|
+
data-id="general-alert-text-link"
|
|
30
|
+
>
|
|
31
|
+
{{ generateAlertTextWithLink.linkText }}
|
|
32
|
+
</a>
|
|
33
|
+
{{ generateAlertTextWithLink.after }}
|
|
34
|
+
</p>
|
|
35
|
+
</template>
|
|
36
|
+
</atoms-alert>
|
|
37
|
+
|
|
38
|
+
<common-pages-hardware-health-tools-panel :selected-tab="activeTab" />
|
|
39
|
+
|
|
40
|
+
<div :class="['hardware-health__content', activeTab]">
|
|
41
|
+
<common-pages-hardware-health-history-testimony-graph
|
|
42
|
+
v-if="activeTab === 'history-testimony'"
|
|
43
|
+
v-model:selected-view="selectedGraphView"
|
|
44
|
+
:power-data="props.historyTestimonyPower"
|
|
45
|
+
:temperature-data="props.historyTestimonyTemperature"
|
|
46
|
+
:counters-table-data="hardwareHealth"
|
|
47
|
+
:language="props.language"
|
|
48
|
+
:power-loading="props.loadingPowerData"
|
|
49
|
+
:temperature-loading="props.loadingTemperatureData"
|
|
50
|
+
:formatted-datetime="props.formattedDatetime"
|
|
51
|
+
:is-dark-mode="props.isDarkMode"
|
|
52
|
+
:get-date-format="props.getDateFormat"
|
|
53
|
+
:main-selected-row="selectedRow"
|
|
54
|
+
:valid-date-end="props.validDateEnd"
|
|
55
|
+
:format-date="props.formatDate"
|
|
56
|
+
@update-tools="onUpdateHistoryTestimonyTools"
|
|
57
|
+
/>
|
|
58
|
+
|
|
59
|
+
<common-pages-hardware-health-table-view
|
|
60
|
+
:key="uniqueKey"
|
|
61
|
+
v-model:selected-row="selectedRow"
|
|
62
|
+
:selected-graph-view="selectedGraphView"
|
|
63
|
+
:data-table="hardwareHealth"
|
|
64
|
+
:total-items="hardwareHealth.length"
|
|
65
|
+
:total-pages="1"
|
|
66
|
+
:table-mode="activeTab"
|
|
67
|
+
:loading="props.loading"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script lang="ts" setup>
|
|
74
|
+
import type { I_SeriesLine } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
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'
|
|
77
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
78
|
+
import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
|
|
79
|
+
import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
|
|
80
|
+
import { hardwareHealthTabsFunc } from '~/components/common/pages/hardwareHealth/lib/config/tabsPannel'
|
|
81
|
+
import type { UI_I_HardwareHealthHistoryTestimonyTools } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
|
|
82
|
+
|
|
83
|
+
const emits = defineEmits<{
|
|
84
|
+
(
|
|
85
|
+
event: 'update-history-testimony-tools',
|
|
86
|
+
value: UI_I_HardwareHealthHistoryTestimonyTools
|
|
87
|
+
): void
|
|
88
|
+
}>()
|
|
89
|
+
const props = defineProps<{
|
|
90
|
+
data: UI_I_HardwareHealthSensors[]
|
|
91
|
+
loading: boolean
|
|
92
|
+
historyTestimonyPower: I_SeriesLine | null
|
|
93
|
+
historyTestimonyTemperature: I_SeriesLine | null
|
|
94
|
+
loadingPowerData: boolean
|
|
95
|
+
loadingTemperatureData: boolean
|
|
96
|
+
isDarkMode: boolean
|
|
97
|
+
formattedDatetime: any
|
|
98
|
+
getDateFormat: any
|
|
99
|
+
language: string
|
|
100
|
+
validDateEnd: number
|
|
101
|
+
formatDate: string
|
|
102
|
+
}>()
|
|
103
|
+
|
|
104
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
105
|
+
const { $store }: any = useNuxtApp()
|
|
106
|
+
|
|
107
|
+
const activeTab = ref<UI_T_HardwareHealthTabMode>('sensor')
|
|
108
|
+
const selectedGraphView = ref<string>('all')
|
|
109
|
+
const uniqueKey = ref<number>(0)
|
|
110
|
+
|
|
111
|
+
const selectedRow = ref<number[]>([])
|
|
112
|
+
|
|
113
|
+
const hardwareHealthTabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
114
|
+
hardwareHealthTabsFunc(localization.value)
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
const hardwareHealth = computed<UI_I_HardwareHealthSensors[]>(
|
|
118
|
+
() => props.data || []
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
const hardwareHealthDescription = computed<string>(() => {
|
|
122
|
+
const { thereIsAlertAndWarningOutOfSensors, noAlertsOrWarningsOutOfSensors } =
|
|
123
|
+
localization.value.common
|
|
124
|
+
|
|
125
|
+
let alertCount = 0
|
|
126
|
+
let warningCount = 0
|
|
127
|
+
|
|
128
|
+
hardwareHealth.value.forEach((sensor: UI_I_HardwareHealthSensors) => {
|
|
129
|
+
if (sensor.status === 3) alertCount++
|
|
130
|
+
if (sensor.status === 2) warningCount++
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
// const hasStatusTwoOrThree = hardwareHealth.value.some((sensor) =>
|
|
134
|
+
// ['warning', 'alert'].includes(sensor.status)
|
|
135
|
+
// )
|
|
136
|
+
|
|
137
|
+
type Replacements = {
|
|
138
|
+
alert: number
|
|
139
|
+
warning: number
|
|
140
|
+
sensors: number
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const hasStatusTwoOrThree = alertCount > 0 || warningCount > 0
|
|
144
|
+
const replacements: Replacements = {
|
|
145
|
+
alert: alertCount,
|
|
146
|
+
warning: warningCount,
|
|
147
|
+
sensors: hardwareHealth.value.length || 0,
|
|
148
|
+
}
|
|
149
|
+
const text = hasStatusTwoOrThree
|
|
150
|
+
? thereIsAlertAndWarningOutOfSensors
|
|
151
|
+
: noAlertsOrWarningsOutOfSensors
|
|
152
|
+
|
|
153
|
+
return text?.replace(
|
|
154
|
+
/{(\w+)}/g,
|
|
155
|
+
(_, key: keyof Replacements) => replacements[key]
|
|
156
|
+
)
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
const generateAlertTextWithLink = computed<UI_I_StorageSensorsAlert>(() => {
|
|
160
|
+
const { storageSensorsAlert, thisKbArticle } = localization.value.common
|
|
161
|
+
|
|
162
|
+
const [before, after] = storageSensorsAlert.split('{ link }')
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
before,
|
|
166
|
+
after,
|
|
167
|
+
link: 'javascript:void(0)',
|
|
168
|
+
linkText: thisKbArticle,
|
|
169
|
+
}
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
watch(activeTab, () => {
|
|
173
|
+
uniqueKey.value++
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
const onUpdateHistoryTestimonyTools = (
|
|
177
|
+
tools: UI_I_HardwareHealthHistoryTestimonyTools
|
|
178
|
+
): void => {
|
|
179
|
+
emits('update-history-testimony-tools', tools)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
onMounted(() => {
|
|
183
|
+
$store.dispatch('main/A_CONTINUE_GLOBAL_REFRESH', 'hardwareHealth')
|
|
184
|
+
})
|
|
185
|
+
onUnmounted(() => {
|
|
186
|
+
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hardwareHealth')
|
|
187
|
+
})
|
|
188
|
+
</script>
|
|
189
|
+
|
|
190
|
+
<style lang="scss" scoped>
|
|
191
|
+
@import 'bfg-common/assets/scss/common/global.scss';
|
|
192
|
+
.hardware-health {
|
|
193
|
+
@extend %block-property;
|
|
194
|
+
&__description {
|
|
195
|
+
}
|
|
196
|
+
&__tabs {
|
|
197
|
+
:deep(.nav) {
|
|
198
|
+
margin-top: 0;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
&__content {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
height: inherit;
|
|
205
|
+
overflow: hidden;
|
|
206
|
+
|
|
207
|
+
&.history-testimony {
|
|
208
|
+
overflow-y: auto;
|
|
209
|
+
display: block;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
</style>
|