bfg-common 1.4.690 → 1.4.691

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.
@@ -51,6 +51,7 @@
51
51
  :is-dark-mode="props.isDarkMode"
52
52
  :get-date-format="props.getDateFormat"
53
53
  :main-selected-row="selectedRow"
54
+ @update-tools="onUpdateHistoryTestimonyTools"
54
55
  />
55
56
 
56
57
  <common-pages-hardware-health-table-view
@@ -75,7 +76,13 @@ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/model
75
76
  import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
76
77
  import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
77
78
  import { hardwareHealthTabsFunc } from '~/components/common/pages/hardwareHealth/lib/config/tabsPannel'
79
+ import type {
80
+ UI_I_HardwareHealthHistoryTestimonyTools
81
+ } from "~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces";
78
82
 
83
+ const emits = defineEmits<{
84
+ (event: 'update-history-testimony-tools', value: UI_I_HardwareHealthHistoryTestimonyTools): void
85
+ }>()
79
86
  const props = defineProps<{
80
87
  data: UI_I_HardwareHealthSensors[]
81
88
  loading: boolean
@@ -161,6 +168,10 @@ watch(activeTab, () => {
161
168
  uniqueKey.value++
162
169
  })
163
170
 
171
+ const onUpdateHistoryTestimonyTools = (tools: UI_I_HardwareHealthHistoryTestimonyTools): void => {
172
+ emits('update-history-testimony-tools', tools)
173
+ }
174
+
164
175
  onMounted(() => {
165
176
  $store.dispatch('main/A_CONTINUE_GLOBAL_REFRESH', 'hardwareHealth')
166
177
  })
@@ -83,10 +83,16 @@ import type { UI_I_OptionsForm } from '~/components/common/pages/hardwareHealth/
83
83
  import type { UI_I_Localization } from '~/lib/models/interfaces'
84
84
  import type { UI_T_Chart } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types'
85
85
  import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/lib/models/interfaces'
86
- import type { UI_I_HardwareHealthSensorsGraph } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
86
+ import type {
87
+ UI_I_HardwareHealthHistoryTestimonyTools,
88
+ UI_I_HardwareHealthSensorsGraph
89
+ } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
87
90
  import type { UI_I_SensorsGraphPayload } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/models/interfaces'
88
91
  import { containerMediumSize } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/config/containerSizes'
89
92
 
93
+ const emits = defineEmits<{
94
+ (event: 'update-tools', value: UI_I_HardwareHealthHistoryTestimonyTools): void
95
+ }>()
90
96
  const props = defineProps<{
91
97
  powerData: I_SeriesLine | null
92
98
  temperatureData: I_SeriesLine | null
@@ -349,7 +355,7 @@ const updateSelectedCountersKeys = (metricType: string): void => {
349
355
  }
350
356
  }
351
357
 
352
- const tools = {
358
+ const tools: UI_I_HardwareHealthHistoryTestimonyTools = {
353
359
  periodName: 'real_time',
354
360
  view: 'power',
355
361
  metricType: selectedMetric.value,
@@ -371,17 +377,6 @@ const onSubmitOptions = (data: UI_I_OptionsForm): void => {
371
377
  )
372
378
  }
373
379
 
374
- const getAllMetrics = (): void => {
375
- $store.dispatch(
376
- 'monitor/A_GET_HARDWARE_HEALTH_HISTORY_TESTIMONY_POWER',
377
- tools
378
- )
379
- $store.dispatch(
380
- 'monitor/A_GET_HARDWARE_HEALTH_HISTORY_TESTIMONY_TEMPERATURE',
381
- tools
382
- )
383
- }
384
-
385
380
  const onUpdateTools = (data: UI_I_SensorsGraphPayload): void => {
386
381
  const storageChartOptions = useLocalStorage(
387
382
  data.view + 'ChartOptionsSensors',
@@ -401,7 +396,7 @@ const onUpdateTools = (data: UI_I_SensorsGraphPayload): void => {
401
396
  tools.period = data.period
402
397
  tools.metricType = data.metricType || selectedMetric.value
403
398
 
404
- getAllMetrics()
399
+ emits('update-tools', tools)
405
400
  }
406
401
 
407
402
  const onDeleteOption = (): void => {}
@@ -1,3 +1,7 @@
1
+ import type {
2
+ UI_T_Chart
3
+ } from "~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types";
4
+
1
5
  export interface UI_I_HardwareHealthSensorsGraph {
2
6
  id: number
3
7
  name: string
@@ -8,3 +12,9 @@ export interface UI_I_HardwareHealthSensorsGraph {
8
12
  testId: string
9
13
  hidden: boolean
10
14
  }
15
+ export interface UI_I_HardwareHealthHistoryTestimonyTools {
16
+ periodName: string
17
+ view: string
18
+ metricType: UI_T_Chart
19
+ period: number[]
20
+ }
@@ -4,11 +4,6 @@ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/model
4
4
  export const hardwareHealthTabsFunc = (
5
5
  localization: UI_I_Localization
6
6
  ): UI_I_CollapseNavItem[] => {
7
- const config = useRuntimeConfig()
8
-
9
- const isDisabledHistoryTestimony =
10
- String(config.public.PRODUCT_NAME_EN).toLowerCase() === 'sphere'
11
-
12
7
  return [
13
8
  {
14
9
  text: localization.common.sensors,
@@ -37,7 +32,7 @@ export const hardwareHealthTabsFunc = (
37
32
  {
38
33
  text: localization.common.historyTestimony,
39
34
  value: 'history-testimony',
40
- disabled: isDisabledHistoryTestimony,
35
+ disabled: false,
41
36
  testId: 'hardware-health-history-testimony',
42
37
  },
43
38
  ]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.690",
4
+ "version": "1.4.691",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",