bfg-common 1.6.90 → 1.6.92
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 +8 -1
- package/assets/localization/local_en.json +8 -1
- package/assets/localization/local_hy.json +8 -1
- package/assets/localization/local_kk.json +8 -1
- package/assets/localization/local_ru.json +8 -1
- package/assets/localization/local_zh.json +8 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +2791 -2791
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +295 -295
- package/components/common/monitor/advanced/tools/chartOptionsModal/lib/config/index.ts +22 -22
- package/components/common/monitor/lib/utils/local_be.json +714 -714
- package/components/common/monitor/lib/utils/local_en.json +714 -714
- package/components/common/monitor/lib/utils/local_hy.json +714 -714
- package/components/common/monitor/lib/utils/local_kk.json +714 -714
- package/components/common/monitor/lib/utils/local_ru.json +714 -714
- package/components/common/monitor/lib/utils/local_zh.json +714 -714
- package/components/common/monitor/utilization/Utilization.vue +7 -1
- package/components/common/monitor/utilization/lib/utils/index.ts +24 -3
- package/lib/models/interfaces.ts +1 -0
- package/package.json +1 -1
- package/components/common/monitor/utilization/lib/models/enums.ts +0 -4
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
UI_I_UtilizationDataItem,
|
|
14
14
|
} from '~/components/common/monitor/utilization/lib/models/interfaces'
|
|
15
15
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
16
|
+
import type { T_NodeType } from '~/components/templates/inventory/lib/models/types'
|
|
16
17
|
import { constructApiData } from '~/components/common/monitor/utilization/lib/utils'
|
|
17
18
|
|
|
18
19
|
const props = defineProps<{
|
|
@@ -22,6 +23,10 @@ const props = defineProps<{
|
|
|
22
23
|
|
|
23
24
|
const { $store }: any = useNuxtApp()
|
|
24
25
|
|
|
26
|
+
const routeType = computed<T_NodeType>(
|
|
27
|
+
() => useRoute().params.type.toString() as T_NodeType
|
|
28
|
+
)
|
|
29
|
+
|
|
25
30
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
26
31
|
|
|
27
32
|
const currentComponent = computed(() =>
|
|
@@ -40,7 +45,8 @@ watch(
|
|
|
40
45
|
if (props.apiData) {
|
|
41
46
|
constructedData.value = constructApiData(
|
|
42
47
|
props.apiData,
|
|
43
|
-
localization.value
|
|
48
|
+
localization.value,
|
|
49
|
+
routeType.value
|
|
44
50
|
)
|
|
45
51
|
}
|
|
46
52
|
},
|
|
@@ -3,7 +3,7 @@ import type {
|
|
|
3
3
|
UI_I_UtilizationDataItem,
|
|
4
4
|
} from '~/components/common/monitor/utilization/lib/models/interfaces'
|
|
5
5
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
6
|
-
import {
|
|
6
|
+
import type { T_NodeType } from '~/components/templates/inventory/lib/models/types'
|
|
7
7
|
import { getMetricsLocalizationByKey } from '~/components/common/monitor/lib/utils/localization'
|
|
8
8
|
|
|
9
9
|
const currentColorKey = (value: string): string => {
|
|
@@ -29,9 +29,30 @@ const currentColorKey = (value: string): string => {
|
|
|
29
29
|
return result
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
const currentTitle = (
|
|
33
|
+
routeType: T_NodeType,
|
|
34
|
+
currentType: string,
|
|
35
|
+
localization: UI_I_Localization
|
|
36
|
+
): string => {
|
|
37
|
+
let result: string = ''
|
|
38
|
+
|
|
39
|
+
if (routeType === 'host') {
|
|
40
|
+
if (currentType === 'cpu') result = localization.common.hostCpu
|
|
41
|
+
if (currentType === 'memory') result = localization.common.hostMem
|
|
42
|
+
} else if (routeType === 'vm') {
|
|
43
|
+
if (currentType === 'cpu')
|
|
44
|
+
result = localization.inventoryMonitor.virtualMachineCpu
|
|
45
|
+
if (currentType === 'memory')
|
|
46
|
+
result = localization.inventoryMonitor.virtualMachineMemory
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return result
|
|
50
|
+
}
|
|
51
|
+
|
|
32
52
|
export const constructApiData = (
|
|
33
53
|
apiData: API_UI_I_UtilizationData | null,
|
|
34
|
-
localization: UI_I_Localization
|
|
54
|
+
localization: UI_I_Localization,
|
|
55
|
+
routeType: T_NodeType
|
|
35
56
|
): UI_I_UtilizationDataItem[] => {
|
|
36
57
|
if (!apiData) return []
|
|
37
58
|
|
|
@@ -49,7 +70,7 @@ export const constructApiData = (
|
|
|
49
70
|
result.push({
|
|
50
71
|
isShow,
|
|
51
72
|
id: key,
|
|
52
|
-
title: localization
|
|
73
|
+
title: currentTitle(routeType, currentType, localization) || key,
|
|
53
74
|
type: currentType,
|
|
54
75
|
data: apiData[key].items.map((item) => {
|
|
55
76
|
const color = ![
|
package/lib/models/interfaces.ts
CHANGED
|
@@ -68,6 +68,7 @@ export interface UI_I_Localization {
|
|
|
68
68
|
packages: UI_I_ArbitraryObject<string>
|
|
69
69
|
dhcpServer: UI_I_ArbitraryObject<string>
|
|
70
70
|
logs: UI_I_ArbitraryObject<string>
|
|
71
|
+
timeConfiguration: UI_I_ArbitraryObject<string>
|
|
71
72
|
}
|
|
72
73
|
export interface UI_I_SendTaskParams {
|
|
73
74
|
method: string
|
package/package.json
CHANGED