bfg-common 1.6.63 → 1.6.64
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 +5 -1
- package/assets/localization/local_en.json +15 -11
- package/assets/localization/local_hy.json +5 -1
- package/assets/localization/local_kk.json +5 -1
- package/assets/localization/local_ru.json +5 -1
- package/assets/localization/local_zh.json +5 -1
- package/components/atoms/dropdown/dropdown/Dropdown.vue +8 -10
- package/components/atoms/dropdown/dropdown/lib/models/interfaces.ts +0 -1
- package/components/common/adapterManager/AdapterManager.vue +473 -473
- package/components/common/adapterManager/AdapterManagerNew.vue +86 -0
- package/components/common/adapterManager/AdapterManagerOld.vue +498 -498
- package/components/common/adapterManager/addAdapterModal/AddAdapterModal.vue +70 -70
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +110 -110
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalOld.vue +531 -531
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModal.vue +32 -32
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +37 -37
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalOld.vue +73 -73
- package/components/common/adapterManager/lib/config/index.ts +19 -19
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +34 -34
- package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +41 -41
- package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +10 -10
- package/components/common/adapterManager/ui/actions/bar/Bar.vue +2 -0
- package/components/common/adapterManager/ui/actions/bar/BarNew.vue +3 -2
- package/components/common/adapterManager/ui/actions/bar/BarOld.vue +95 -95
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +76 -76
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +77 -77
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapter.vue +24 -24
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +18 -18
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterOld.vue +38 -38
- package/components/common/adapterManager/ui/secondTitle/SecondTitle.vue +31 -31
- package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +51 -51
- package/components/common/adapterManager/ui/secondTitle/SecondTitleOld.vue +35 -35
- package/components/common/adapterManager/ui/table/Table.vue +88 -88
- package/components/common/adapterManager/ui/table/TableNew.vue +137 -137
- package/components/common/adapterManager/ui/table/TableOld.vue +141 -141
- package/components/common/adapterManager/ui/table/adapters/Adapters.vue +44 -44
- package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +187 -187
- package/components/common/adapterManager/ui/table/adapters/AdaptersOld.vue +87 -87
- package/components/common/adapterManager/ui/table/header/Header.vue +57 -57
- package/components/common/adapterManager/ui/table/header/HeaderNew.vue +81 -81
- package/components/common/adapterManager/ui/table/header/HeaderOld.vue +79 -79
- package/components/common/adapterManager/ui/table/lib/models/types.ts +1 -1
- package/components/common/diagramMain/Diagram.vue +459 -459
- package/components/common/diagramMain/DiagramMain.vue +929 -929
- package/components/common/diagramMain/adapter/Adapter.vue +123 -123
- package/components/common/diagramMain/adapter/AdapterItem.vue +438 -438
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/adapter/Contents.vue +212 -212
- package/components/common/diagramMain/adapter/Lines.vue +81 -81
- package/components/common/diagramMain/adapter/block/Block.vue +27 -27
- package/components/common/diagramMain/adapter/block/BlockNew.vue +58 -58
- package/components/common/diagramMain/adapter/block/BlockOld.vue +50 -50
- package/components/common/diagramMain/adapter/secondBlock/SecondBlock.vue +27 -27
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockNew.vue +60 -60
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockOld.vue +51 -51
- package/components/common/diagramMain/header/Header.vue +49 -49
- package/components/common/diagramMain/header/HeaderNew.vue +155 -155
- package/components/common/diagramMain/header/HeaderOld.vue +234 -234
- package/components/common/diagramMain/highlights/Highlights.vue +151 -151
- package/components/common/diagramMain/highlights/HighlightsNew.vue +124 -124
- package/components/common/diagramMain/highlights/HighlightsOld.vue +107 -107
- package/components/common/diagramMain/lib/config/index.ts +81 -81
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/config/positions.ts +194 -194
- package/components/common/diagramMain/lib/models/enums.ts +44 -44
- package/components/common/diagramMain/lib/models/interfaces.ts +760 -760
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +331 -331
- package/components/common/diagramMain/modals/Modals.vue +483 -483
- package/components/common/diagramMain/modals/UnsavedChangesModal.vue +32 -0
- package/components/common/diagramMain/modals/editSettings/EditSettings.vue +104 -102
- package/components/common/diagramMain/modals/editSettings/EditSettingsNew.vue +285 -0
- package/components/common/diagramMain/modals/editSettings/EditSettingsOld.vue +254 -0
- package/components/common/diagramMain/modals/editSettings/confirmTeamingSettingsModal/ConfirmTeamingSettingsModal.vue +31 -0
- package/components/common/diagramMain/modals/editSettings/confirmTeamingSettingsModal/ConfirmTeamingSettingsModalNew.vue +82 -0
- package/components/common/diagramMain/modals/editSettings/{ConfirmTeamingSettingsModal.vue → confirmTeamingSettingsModal/ConfirmTeamingSettingsModalOld.vue} +2 -5
- package/components/common/diagramMain/modals/editSettings/lib/config/config.ts +15 -0
- package/components/common/diagramMain/modals/editSettings/lib/models/interfaces.ts +6 -0
- package/components/common/diagramMain/modals/editSettings/lib/utils/utils.ts +177 -0
- package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModal.vue +137 -0
- package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModalNew.vue +91 -0
- package/components/common/diagramMain/modals/editSettings/{EditSettingsModal.vue → modal/EditSettingsModalOld.vue} +12 -51
- package/components/common/diagramMain/modals/editSettings/tabs/networkProperties/NetworkProperties.vue +158 -0
- package/components/common/diagramMain/modals/editSettings/tabs/networkProperties/NetworkPropertiesNew.vue +262 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{NetworkProperties.vue → networkProperties/NetworkPropertiesOld.vue} +12 -113
- package/components/common/diagramMain/modals/editSettings/tabs/port/ipvFourSettings/IpvFourSettings.vue +192 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/ipvFourSettings/IpvFourSettingsNew.vue +388 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/{IpvFourSettings.vue → ipvFourSettings/IpvFourSettingsOld.vue} +11 -152
- package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortProperties.vue +139 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortPropertiesNew.vue +286 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/{PortProperties.vue → portProperties/PortPropertiesOld.vue} +12 -103
- package/components/common/diagramMain/modals/editSettings/tabs/security/Security.vue +209 -0
- package/components/common/diagramMain/modals/editSettings/tabs/security/SecurityNew.vue +233 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{Security.vue → security/SecurityOld.vue} +25 -48
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchProperties.vue +128 -0
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchPropertiesNew.vue +235 -0
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchPropertiesOld.vue +87 -0
- package/components/common/diagramMain/modals/editSettings/tabs/teamingFailover/TeamingFailover.vue +99 -0
- package/components/common/diagramMain/modals/editSettings/tabs/teamingFailover/TeamingFailoverNew.vue +319 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{TeamingFailover.vue → teamingFailover/TeamingFailoverOld.vue} +11 -48
- package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShaping.vue +173 -0
- package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShapingNew.vue +348 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{TrafficShaping.vue → trafficShaping/TrafficShapingOld.vue} +12 -134
- package/components/common/diagramMain/modals/lib/config/adapterModal.ts +147 -147
- package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +66 -66
- package/components/common/diagramMain/modals/lib/config/index.ts +56 -56
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +405 -405
- package/components/common/diagramMain/modals/lib/config/portModal.ts +253 -253
- package/components/common/diagramMain/modals/lib/config/switchModal.ts +245 -245
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +88 -88
- package/components/common/diagramMain/modals/lib/utils/index.ts +34 -4
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +541 -541
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +170 -170
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/VmkernelAdapterReadyComplete.vue +49 -49
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +82 -82
- package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +106 -106
- package/components/common/diagramMain/modals/remove/RemoveModalOld.vue +241 -241
- package/components/common/diagramMain/modals/viewSettings/info/Info.vue +57 -57
- package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +174 -174
- package/components/common/diagramMain/modals/viewSettings/info/InfoOld.vue +141 -141
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettings.vue +45 -45
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +323 -323
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsOld.vue +203 -203
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModal.vue +60 -60
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalNew.vue +50 -50
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalOld.vue +70 -70
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces.ts +48 -48
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/diagramMain/network/Lines.vue +107 -107
- package/components/common/diagramMain/network/Network.vue +141 -141
- package/components/common/diagramMain/network/block/Block.vue +37 -37
- package/components/common/diagramMain/network/block/BlockNew.vue +68 -68
- package/components/common/diagramMain/network/block/BlockOld.vue +64 -64
- package/components/common/diagramMain/network/noNetwork/NoNetwork.vue +12 -12
- package/components/common/diagramMain/network/noNetwork/NoNetworkNew.vue +89 -89
- package/components/common/diagramMain/network/noNetwork/NoNetworkOld.vue +61 -61
- package/components/common/diagramMain/network/secondBlock/SecondBlock.vue +41 -41
- package/components/common/diagramMain/network/secondBlock/SecondBlockNew.vue +64 -64
- package/components/common/diagramMain/network/secondBlock/SecondBlockOld.vue +60 -60
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/diagramMain/skeleton/Header.vue +31 -31
- package/components/common/diagramMain/skeleton/Switch.vue +75 -75
- package/components/common/diagramMain/switch/Switch.vue +180 -180
- package/components/common/diagramMain/switch/SwitchSelected.vue +111 -111
- package/components/common/monitor/advanced/table/tableOld/TableOld.vue +93 -93
- package/components/common/monitor/utilization/New.vue +5 -0
- package/components/common/monitor/utilization/Old.vue +24 -65
- package/components/common/monitor/utilization/Utilization.vue +14 -22
- package/components/common/monitor/utilization/infoBlock/InfoBlock.vue +2 -125
- package/components/common/monitor/utilization/infoBlock/New.vue +3 -183
- package/components/common/monitor/utilization/infoBlock/Old.vue +66 -71
- package/components/common/monitor/utilization/lib/models/enums.ts +4 -4
- package/components/common/monitor/utilization/lib/models/interfaces.ts +12 -14
- package/components/common/monitor/utilization/lib/utils/index.ts +6 -64
- package/package.json +2 -2
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +0 -164
- package/components/common/monitor/utilization/infoBlock/progressBar/New.vue +0 -64
- package/components/common/monitor/utilization/infoBlock/progressBar/Old.vue +0 -65
- package/components/common/monitor/utilization/infoBlock/progressBar/ProgressBar.vue +0 -84
- package/components/common/monitor/utilization/infoBlock/progressBar/lib/models/interfaces.ts +0 -10
- package/components/common/monitor/utilization/lib/models/types.ts +0 -1
- package/components/common/monitor/utilization/new/New.vue +0 -167
- package/components/common/monitor/utilization/new/Portlet.vue +0 -42
- package/components/common/monitor/utilization/new/Skeleton.vue +0 -120
- package/components/common/monitor/utilization/new/lib/utils/newPortlet.ts +0 -7
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="currentComponent"
|
|
4
|
-
:info-data="props.infoData"
|
|
5
|
-
:max-item="maxItem"
|
|
6
|
-
:consumed-item="consumedItem"
|
|
7
|
-
:demand-item="demandItem"
|
|
8
|
-
:overhead-item="overheadItem"
|
|
9
|
-
:usage-item="usageItem"
|
|
10
|
-
:bar-percent="barPercent"
|
|
11
|
-
:current-title="currentTitle"
|
|
12
|
-
:limit-item="limitItem"
|
|
13
|
-
:limit-percent="limitPercent"
|
|
14
|
-
:entitlement-item="entitlementItem"
|
|
15
|
-
:entitlement-percent="entitlementPercent"
|
|
16
|
-
:min-value="minValue"
|
|
17
|
-
/>
|
|
2
|
+
<component :is="currentComponent" :info-data="props.infoData" />
|
|
18
3
|
</template>
|
|
19
4
|
|
|
20
5
|
<script setup lang="ts">
|
|
@@ -33,114 +18,6 @@ const currentComponent = computed(() =>
|
|
|
33
18
|
? defineAsyncComponent(() => import('./New.vue'))
|
|
34
19
|
: defineAsyncComponent(() => import('./Old.vue'))
|
|
35
20
|
)
|
|
36
|
-
|
|
37
|
-
const maxItem = ref<UI_I_UtilizationDataItem['data'][0] | null>(null)
|
|
38
|
-
const consumedItem = ref<UI_I_UtilizationDataItem['data'][0] | null>(null)
|
|
39
|
-
const demandItem = ref<UI_I_UtilizationDataItem['data'][0] | null>(null)
|
|
40
|
-
const overheadItem = ref<UI_I_UtilizationDataItem['data'][0] | null>(null)
|
|
41
|
-
const minValue = ref<string>('')
|
|
42
|
-
const usageItem = ref<UI_I_UtilizationDataItem['data'][0] | null>(null)
|
|
43
|
-
const limitItem = ref<UI_I_UtilizationDataItem['data'][0] | null>(null)
|
|
44
|
-
const entitlementItem = ref<UI_I_UtilizationDataItem['data'][0] | null>(null)
|
|
45
|
-
|
|
46
|
-
const parse = (value: string): number =>
|
|
47
|
-
parseFloat(value.replace(/[^\d.]/g, '')) || 0
|
|
48
|
-
|
|
49
|
-
const barPercent = computed<string>(() => {
|
|
50
|
-
if (!parse(maxItem.value?.value) || !parse(consumedItem.value?.value))
|
|
51
|
-
return '0'
|
|
52
|
-
|
|
53
|
-
return String(
|
|
54
|
-
Math.min(
|
|
55
|
-
(parse(consumedItem.value.value) / parse(maxItem.value.value)) * 100,
|
|
56
|
-
100
|
|
57
|
-
)
|
|
58
|
-
)
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
const limitPercent = computed<string>(() => {
|
|
62
|
-
if (
|
|
63
|
-
!limitItem.value ||
|
|
64
|
-
!parse(limitItem.value?.value) ||
|
|
65
|
-
!parse(maxItem.value?.value)
|
|
66
|
-
)
|
|
67
|
-
return '0'
|
|
68
|
-
|
|
69
|
-
return String(
|
|
70
|
-
Math.min(
|
|
71
|
-
(parse(limitItem.value.value) / parse(maxItem.value.value)) * 100,
|
|
72
|
-
100
|
|
73
|
-
)
|
|
74
|
-
)
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
const entitlementPercent = computed<string>(() => {
|
|
78
|
-
if (
|
|
79
|
-
!entitlementItem.value ||
|
|
80
|
-
!parse(entitlementItem.value?.value) ||
|
|
81
|
-
!parse(maxItem.value?.value)
|
|
82
|
-
)
|
|
83
|
-
return '0'
|
|
84
|
-
|
|
85
|
-
return String(
|
|
86
|
-
Math.min(
|
|
87
|
-
(parse(entitlementItem.value.value) / parse(maxItem.value.value)) * 100,
|
|
88
|
-
100
|
|
89
|
-
)
|
|
90
|
-
)
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
const currentTitle = computed<string>(
|
|
94
|
-
() =>
|
|
95
|
-
`${consumedItem.value?.value} / ${maxItem.value?.value} - ${usageItem.value?.value}`
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
watch(
|
|
99
|
-
() => props.infoData,
|
|
100
|
-
(newValue) => {
|
|
101
|
-
newValue.data.forEach((item) => {
|
|
102
|
-
const currentLabelKey = item.labelKey.toLowerCase()
|
|
103
|
-
|
|
104
|
-
if (currentLabelKey.includes('capacity')) maxItem.value = item
|
|
105
|
-
if (currentLabelKey.includes('consumed')) {
|
|
106
|
-
consumedItem.value = item
|
|
107
|
-
minValue.value = '0 ' + item.value.split(' ')[1]
|
|
108
|
-
}
|
|
109
|
-
if (currentLabelKey.includes('demand')) demandItem.value = item
|
|
110
|
-
if (currentLabelKey.includes('overhead')) overheadItem.value = item
|
|
111
|
-
|
|
112
|
-
if (currentLabelKey.includes('usagepercent')) usageItem.value = item
|
|
113
|
-
if (
|
|
114
|
-
currentLabelKey.includes('limit') &&
|
|
115
|
-
item.value.toLowerCase() !== 'unlimited'
|
|
116
|
-
)
|
|
117
|
-
limitItem.value = item
|
|
118
|
-
if (currentLabelKey.includes('entitlement')) entitlementItem.value = item
|
|
119
|
-
})
|
|
120
|
-
},
|
|
121
|
-
{ immediate: true, deep: true }
|
|
122
|
-
)
|
|
123
21
|
</script>
|
|
124
22
|
|
|
125
|
-
<style>
|
|
126
|
-
:root {
|
|
127
|
-
--utilization-settings-consumed-info-color: #008fd6;
|
|
128
|
-
--utilization-settings-demand-info-color: #0776b3;
|
|
129
|
-
--utilization-settings-overhead-info-color: #239332;
|
|
130
|
-
--utilization-settings-active-info-color: #239332;
|
|
131
|
-
--utilization-settings-granted-info-color: #6fb842;
|
|
132
|
-
--utilization-settings-swapped-info-color: #ea3223;
|
|
133
|
-
--utilization-settings-ballooned-info-color: #fbce28;
|
|
134
|
-
--utilization-settings-unaccessed-info-color: #bdc3c7;
|
|
135
|
-
}
|
|
136
|
-
:root.dark-theme {
|
|
137
|
-
--utilization-settings-consumed-info-color: #2ba2de;
|
|
138
|
-
--utilization-settings-demand-info-color: #0776b3;
|
|
139
|
-
--utilization-settings-overhead-info-color: #3cae4c;
|
|
140
|
-
--utilization-settings-active-info-color: #3cae4c;
|
|
141
|
-
--utilization-settings-granted-info-color: #84bb42;
|
|
142
|
-
--utilization-settings-swapped-info-color: #ec4235;
|
|
143
|
-
--utilization-settings-ballooned-info-color: #fbce28;
|
|
144
|
-
--utilization-settings-unaccessed-info-color: #bdc3c770;
|
|
145
|
-
}
|
|
146
|
-
</style>
|
|
23
|
+
<style scoped lang="scss"></style>
|
|
@@ -1,185 +1,5 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="info-block-new">
|
|
3
|
-
<div class="header-block mb-4">
|
|
4
|
-
<div
|
|
5
|
-
:class="[
|
|
6
|
-
'progress-bar-container flex-col gap-2',
|
|
7
|
-
{ 'has-icon': props.limitItem || props.entitlementItem },
|
|
8
|
-
]"
|
|
9
|
-
>
|
|
10
|
-
<common-monitor-utilization-info-block-progress-bar
|
|
11
|
-
:percent="props.barPercent"
|
|
12
|
-
:color="`var(${props.consumedItem.colorKey})`"
|
|
13
|
-
:info-data="null"
|
|
14
|
-
:max-item="props.maxItem"
|
|
15
|
-
/>
|
|
16
|
-
<common-monitor-utilization-info-block-progress-bar
|
|
17
|
-
v-if="props.demandItem"
|
|
18
|
-
:percent="props.barPercent"
|
|
19
|
-
:info-data="props.infoData"
|
|
20
|
-
:max-item="props.maxItem"
|
|
21
|
-
:color="`var(${props.demandItem.colorKey})`"
|
|
22
|
-
/>
|
|
23
|
-
<common-monitor-utilization-info-block-progress-bar
|
|
24
|
-
v-if="props.overheadItem"
|
|
25
|
-
:percent="props.barPercent"
|
|
26
|
-
:info-data="props.infoData"
|
|
27
|
-
:max-item="props.maxItem"
|
|
28
|
-
:color="`var(${props.overheadItem.colorKey})`"
|
|
29
|
-
/>
|
|
30
|
-
<div
|
|
31
|
-
v-if="props.limitItem"
|
|
32
|
-
:style="`left: calc(${props.limitPercent}% - 8px)`"
|
|
33
|
-
class="icon-box limit"
|
|
34
|
-
>
|
|
35
|
-
<ui-icon name="dotes-with-arrow" class="icon-limit" />
|
|
36
|
-
</div>
|
|
37
|
-
<div
|
|
38
|
-
v-if="props.entitlementItem"
|
|
39
|
-
:style="`left: calc(${props.entitlementPercent}% - 8px)`"
|
|
40
|
-
class="icon-box entitlement"
|
|
41
|
-
>
|
|
42
|
-
<ui-icon name="dotes-with-arrow" class="icon-entitlement" />
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="header-block-info-texts-block flex justify-between mt-3 pb-4">
|
|
46
|
-
<p class="text-info">{{ props.minValue }}</p>
|
|
47
|
-
<p class="text-info">{{ props.maxItem?.value }}</p>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="footer-block flex flex-col gap-3">
|
|
51
|
-
<div
|
|
52
|
-
v-for="(item, key) in props.infoData.data"
|
|
53
|
-
:key="key"
|
|
54
|
-
class="footer-block-item flex justify-between"
|
|
55
|
-
>
|
|
56
|
-
<div class="left-block flex items-center gap-2">
|
|
57
|
-
<div
|
|
58
|
-
v-if="item.color"
|
|
59
|
-
:style="`background-color: ${
|
|
60
|
-
item.colorKey ? `var(${item.colorKey})` : item.color
|
|
61
|
-
}`"
|
|
62
|
-
class="color-block"
|
|
63
|
-
></div>
|
|
64
|
-
<ui-icon
|
|
65
|
-
v-else-if="item.iconName"
|
|
66
|
-
:name="item.iconName"
|
|
67
|
-
:class="`icon-block ${item.labelKey}`"
|
|
68
|
-
/>
|
|
69
|
-
<p class="name">{{ item.label }}</p>
|
|
70
|
-
</div>
|
|
71
|
-
<p class="value">{{ item.value }}</p>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
</template>
|
|
1
|
+
<template>New</template>
|
|
76
2
|
|
|
77
|
-
<script setup lang="ts">
|
|
78
|
-
import type { UI_I_UtilizationDataItem } from '~/components/common/monitor/utilization/lib/models/interfaces'
|
|
3
|
+
<script setup lang="ts"></script>
|
|
79
4
|
|
|
80
|
-
|
|
81
|
-
infoData: UI_I_UtilizationDataItem
|
|
82
|
-
maxItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
83
|
-
consumedItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
84
|
-
demandItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
85
|
-
overheadItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
86
|
-
limitItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
87
|
-
entitlementItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
88
|
-
entitlementPercent: string
|
|
89
|
-
barPercent: string
|
|
90
|
-
limitPercent: string
|
|
91
|
-
minValue: string
|
|
92
|
-
}>()
|
|
93
|
-
</script>
|
|
94
|
-
|
|
95
|
-
<style>
|
|
96
|
-
:root {
|
|
97
|
-
--utilization-settings-info-text-color: #4d5d69;
|
|
98
|
-
--utilization-settings-value-info-text-color: #182531;
|
|
99
|
-
--utilization-settings-limit-icon-color: #ea3223;
|
|
100
|
-
--utilization-settings-entitlement-icon-color: #213444;
|
|
101
|
-
}
|
|
102
|
-
:root.dark-theme {
|
|
103
|
-
--utilization-settings-info-text-color: #e9eaec;
|
|
104
|
-
--utilization-settings-value-info-text-color: #e9eaec;
|
|
105
|
-
--utilization-settings-limit-icon-color: #ec4235;
|
|
106
|
-
--utilization-settings-entitlement-icon-color: #e9eaec;
|
|
107
|
-
}
|
|
108
|
-
</style>
|
|
109
|
-
|
|
110
|
-
<style scoped lang="scss">
|
|
111
|
-
.info-block-new {
|
|
112
|
-
.header-block {
|
|
113
|
-
.progress-bar-container {
|
|
114
|
-
&.has-icon {
|
|
115
|
-
display: flex;
|
|
116
|
-
position: relative;
|
|
117
|
-
height: 60px;
|
|
118
|
-
justify-content: center;
|
|
119
|
-
|
|
120
|
-
.icon-box {
|
|
121
|
-
position: absolute;
|
|
122
|
-
top: 0;
|
|
123
|
-
|
|
124
|
-
&.entitlement {
|
|
125
|
-
z-index: 2;
|
|
126
|
-
transform: rotateY(170deg);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.progress-line {
|
|
132
|
-
width: 100%;
|
|
133
|
-
}
|
|
134
|
-
.icon-limit {
|
|
135
|
-
color: var(--utilization-settings-limit-icon-color);
|
|
136
|
-
}
|
|
137
|
-
.icon-entitlement {
|
|
138
|
-
color: var(--utilization-settings-entitlement-icon-color);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
.header-block-info-texts-block {
|
|
142
|
-
border-bottom: 1px solid #e9ebeda3;
|
|
143
|
-
|
|
144
|
-
.text-info {
|
|
145
|
-
font-size: 12px;
|
|
146
|
-
font-weight: 500;
|
|
147
|
-
color: var(--utilization-settings-info-text-color);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.footer-block {
|
|
153
|
-
.footer-block-item {
|
|
154
|
-
.left-block {
|
|
155
|
-
.color-block {
|
|
156
|
-
width: 16px;
|
|
157
|
-
height: 16px;
|
|
158
|
-
border-radius: 50%;
|
|
159
|
-
}
|
|
160
|
-
.icon-block.limitMHz {
|
|
161
|
-
fill: var(--utilization-settings-limit-icon-color);
|
|
162
|
-
transform: rotate(225deg);
|
|
163
|
-
}
|
|
164
|
-
.icon-block.entitlementMHz,
|
|
165
|
-
.icon-block.entitlementBytes {
|
|
166
|
-
transform: rotate(145deg);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.name {
|
|
170
|
-
font-size: 13px;
|
|
171
|
-
line-height: 18px;
|
|
172
|
-
font-weight: 400;
|
|
173
|
-
color: var(--utilization-settings-info-text-color);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
.value {
|
|
177
|
-
font-size: 13px;
|
|
178
|
-
font-weight: 400;
|
|
179
|
-
line-height: 18px;
|
|
180
|
-
color: var(--utilization-settings-value-info-text-color);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
</style>
|
|
5
|
+
<style scoped lang="scss"></style>
|
|
@@ -3,47 +3,23 @@
|
|
|
3
3
|
<div class="header-block">
|
|
4
4
|
<p class="title">{{ props.infoData.title }}</p>
|
|
5
5
|
</div>
|
|
6
|
-
<div class="
|
|
7
|
-
<div class="
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
:info-data="props.infoData"
|
|
18
|
-
:max-item="props.maxItem"
|
|
19
|
-
:color="`var(${props.demandItem.colorKey})`"
|
|
20
|
-
/>
|
|
21
|
-
<common-monitor-utilization-info-block-progress-bar
|
|
22
|
-
v-if="props.overheadItem"
|
|
23
|
-
:percent="props.barPercent"
|
|
24
|
-
:info-data="props.infoData"
|
|
25
|
-
:max-item="props.maxItem"
|
|
26
|
-
:color="`var(${props.overheadItem.colorKey})`"
|
|
27
|
-
/>
|
|
28
|
-
<div class="footer-body-block">
|
|
29
|
-
<p>{{ props.minValue }}</p>
|
|
30
|
-
<p>{{ props.maxItem?.value }}</p>
|
|
6
|
+
<div class="body-block">
|
|
7
|
+
<div class="bar">
|
|
8
|
+
<div :title="currentTitle" class="track">
|
|
9
|
+
<div
|
|
10
|
+
:style="{
|
|
11
|
+
width: animated ? barPercent + '%' : '0%',
|
|
12
|
+
background: consumedItem?.color,
|
|
13
|
+
boxShadow: `0 0 6px ${consumedItem?.color}88`,
|
|
14
|
+
}"
|
|
15
|
+
class="fill"
|
|
16
|
+
/>
|
|
31
17
|
</div>
|
|
32
18
|
</div>
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
width="18px"
|
|
38
|
-
height="18px"
|
|
39
|
-
/>
|
|
40
|
-
<ui-icon
|
|
41
|
-
v-if="props.entitlementItem"
|
|
42
|
-
name="arrow3"
|
|
43
|
-
class="entitlement-icon"
|
|
44
|
-
width="18px"
|
|
45
|
-
height="18px"
|
|
46
|
-
/>
|
|
19
|
+
<div class="footer-body-block">
|
|
20
|
+
<p>{{ consumedItem?.value }}</p>
|
|
21
|
+
<p>{{ maxItem?.value }}</p>
|
|
22
|
+
</div>
|
|
47
23
|
</div>
|
|
48
24
|
<div class="footer-block">
|
|
49
25
|
<div
|
|
@@ -54,9 +30,7 @@
|
|
|
54
30
|
<div class="left-block">
|
|
55
31
|
<div
|
|
56
32
|
v-if="item.color"
|
|
57
|
-
:style="`background-color: ${
|
|
58
|
-
item.colorKey ? `var(${item.colorKey})` : item.color
|
|
59
|
-
}`"
|
|
33
|
+
:style="`background-color: ${item.color}`"
|
|
60
34
|
class="color-block"
|
|
61
35
|
></div>
|
|
62
36
|
<p class="name">{{ item.label }}</p>
|
|
@@ -68,20 +42,59 @@
|
|
|
68
42
|
</template>
|
|
69
43
|
|
|
70
44
|
<script setup lang="ts">
|
|
71
|
-
import type {
|
|
45
|
+
import type {
|
|
46
|
+
UI_I_UtilizationDataItem,
|
|
47
|
+
UI_I_UtilizationDataItems,
|
|
48
|
+
} from '~/components/common/monitor/utilization/lib/models/interfaces'
|
|
49
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
72
50
|
|
|
73
51
|
const props = defineProps<{
|
|
74
52
|
infoData: UI_I_UtilizationDataItem
|
|
75
|
-
maxItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
76
|
-
consumedItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
77
|
-
overheadItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
78
|
-
demandItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
79
|
-
limitItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
80
|
-
entitlementItem: UI_I_UtilizationDataItem['data'][0] | null
|
|
81
|
-
barPercent: string
|
|
82
|
-
currentTitle: string
|
|
83
|
-
minValue: string
|
|
84
53
|
}>()
|
|
54
|
+
|
|
55
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
56
|
+
|
|
57
|
+
const animated = ref<boolean>(false)
|
|
58
|
+
|
|
59
|
+
const maxItem = computed<UI_I_UtilizationDataItems | null>(
|
|
60
|
+
() =>
|
|
61
|
+
props.infoData.data.find((item) =>
|
|
62
|
+
item.label.toLowerCase().includes('capacity')
|
|
63
|
+
) || null
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
const consumedItem = computed<UI_I_UtilizationDataItems | null>(
|
|
67
|
+
() =>
|
|
68
|
+
props.infoData.data.find((item) =>
|
|
69
|
+
item.label.toLowerCase().includes('consumed')
|
|
70
|
+
) || null
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
const usageItem = computed<UI_I_UtilizationDataItems | null>(
|
|
74
|
+
() =>
|
|
75
|
+
props.infoData.data.find((item) =>
|
|
76
|
+
item.label.toLowerCase().includes('usagepercent')
|
|
77
|
+
) || null
|
|
78
|
+
)
|
|
79
|
+
const currentTitle = computed<string>(
|
|
80
|
+
() =>
|
|
81
|
+
`${consumedItem.value?.value} / ${maxItem.value?.value} - ${usageItem.value?.value}`
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
const barPercent = computed<string>(() => {
|
|
85
|
+
const parse = (v: string) => parseFloat(v.replace(/[^\d.]/g, '')) || 0
|
|
86
|
+
if (!maxItem.value || !consumedItem.value) return '0'
|
|
87
|
+
return String(
|
|
88
|
+
Math.min(
|
|
89
|
+
(parse(consumedItem.value.value) / parse(maxItem.value.value)) * 100,
|
|
90
|
+
100
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
onMounted(() => {
|
|
96
|
+
setTimeout(() => (animated.value = true), 100)
|
|
97
|
+
})
|
|
85
98
|
</script>
|
|
86
99
|
|
|
87
100
|
<style scoped lang="scss">
|
|
@@ -90,7 +103,7 @@ const props = defineProps<{
|
|
|
90
103
|
padding: 20px;
|
|
91
104
|
border: 1px solid #ccc;
|
|
92
105
|
border-radius: 4px;
|
|
93
|
-
box-shadow:
|
|
106
|
+
box-shadow: 0px 0px 2px #ccc;
|
|
94
107
|
|
|
95
108
|
.header-block {
|
|
96
109
|
margin-bottom: 20px;
|
|
@@ -102,20 +115,12 @@ const props = defineProps<{
|
|
|
102
115
|
}
|
|
103
116
|
|
|
104
117
|
.body-block {
|
|
105
|
-
width: 80%;
|
|
106
118
|
display: flex;
|
|
107
119
|
flex-direction: column;
|
|
108
|
-
align-items: flex-start;
|
|
109
120
|
gap: 8px;
|
|
110
121
|
margin-bottom: 20px;
|
|
111
|
-
position: relative;
|
|
112
122
|
|
|
113
123
|
.bar {
|
|
114
|
-
width: 100%;
|
|
115
|
-
display: grid;
|
|
116
|
-
grid-template-columns: auto max-content;
|
|
117
|
-
position: relative;
|
|
118
|
-
|
|
119
124
|
.track {
|
|
120
125
|
height: 18px;
|
|
121
126
|
background: #e5e7eb;
|
|
@@ -129,18 +134,8 @@ const props = defineProps<{
|
|
|
129
134
|
border-radius: 2px;
|
|
130
135
|
transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
|
131
136
|
}
|
|
132
|
-
|
|
133
|
-
.limit-icon {
|
|
134
|
-
position: absolute;
|
|
135
|
-
right: -18px;
|
|
136
|
-
}
|
|
137
|
-
.entitlement-icon {
|
|
138
|
-
position: absolute;
|
|
139
|
-
right: -36px;
|
|
140
|
-
}
|
|
141
137
|
}
|
|
142
138
|
.footer-body-block {
|
|
143
|
-
width: 100%;
|
|
144
139
|
display: flex;
|
|
145
140
|
align-items: center;
|
|
146
141
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export enum UI_E_UtilizationBlockCurrentKeys {
|
|
2
|
-
cpuUtilization = 'hostCpu',
|
|
3
|
-
hostMemoryUtilization = 'hostMem',
|
|
4
|
-
}
|
|
1
|
+
export enum UI_E_UtilizationBlockCurrentKeys {
|
|
2
|
+
cpuUtilization = 'hostCpu',
|
|
3
|
+
hostMemoryUtilization = 'hostMem',
|
|
4
|
+
}
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
export interface API_UI_I_UtilizationDataItems {
|
|
2
|
+
label: string
|
|
3
|
+
value: string
|
|
4
|
+
}
|
|
2
5
|
|
|
3
6
|
export interface API_UI_I_UtilizationDataItem {
|
|
4
|
-
items:
|
|
5
|
-
label: string
|
|
6
|
-
value: string
|
|
7
|
-
}[]
|
|
7
|
+
items: API_UI_I_UtilizationDataItems[]
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface API_UI_I_UtilizationData {
|
|
11
11
|
[key: string]: API_UI_I_UtilizationDataItem
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export interface UI_I_UtilizationDataItems {
|
|
15
|
+
label: string
|
|
16
|
+
value: string
|
|
17
|
+
color: string
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
export interface UI_I_UtilizationDataItem {
|
|
15
21
|
id: string
|
|
16
22
|
isShow: boolean
|
|
17
23
|
title: string
|
|
18
|
-
|
|
19
|
-
data: {
|
|
20
|
-
label: string
|
|
21
|
-
labelKey: string
|
|
22
|
-
value: string
|
|
23
|
-
color: string
|
|
24
|
-
colorKey: string
|
|
25
|
-
iconName: string
|
|
26
|
-
}[]
|
|
24
|
+
data: UI_I_UtilizationDataItems[]
|
|
27
25
|
}
|
|
@@ -6,84 +6,26 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
|
6
6
|
import { UI_E_UtilizationBlockCurrentKeys } from '~/components/common/monitor/utilization/lib/models/enums'
|
|
7
7
|
import { getMetricsLocalizationByKey } from '~/components/common/monitor/lib/utils/localization'
|
|
8
8
|
|
|
9
|
-
const currentColorKey = (value: string): string => {
|
|
10
|
-
let result: string = ''
|
|
11
|
-
const valueLowerCase = value.toLowerCase()
|
|
12
|
-
if (valueLowerCase.includes('consumed'))
|
|
13
|
-
result = '--utilization-settings-consumed-info-color'
|
|
14
|
-
if (valueLowerCase.includes('demand'))
|
|
15
|
-
result = '--utilization-settings-demand-info-color'
|
|
16
|
-
if (valueLowerCase.includes('overhead'))
|
|
17
|
-
result = '--utilization-settings-overhead-info-color'
|
|
18
|
-
if (valueLowerCase.includes('granted'))
|
|
19
|
-
result = '--utilization-settings-granted-info-color'
|
|
20
|
-
if (valueLowerCase.includes('active'))
|
|
21
|
-
result = '--utilization-settings-active-info-color'
|
|
22
|
-
if (valueLowerCase.includes('swapped'))
|
|
23
|
-
result = '--utilization-settings-swapped-info-color'
|
|
24
|
-
if (valueLowerCase.includes('ballooned'))
|
|
25
|
-
result = '--utilization-settings-ballooned-info-color'
|
|
26
|
-
if (valueLowerCase.includes('unaccessed'))
|
|
27
|
-
result = '--utilization-settings-unaccessed-info-color'
|
|
28
|
-
|
|
29
|
-
return result
|
|
30
|
-
}
|
|
31
|
-
|
|
32
9
|
export const constructApiData = (
|
|
33
|
-
apiData: API_UI_I_UtilizationData
|
|
10
|
+
apiData: API_UI_I_UtilizationData,
|
|
34
11
|
localization: UI_I_Localization
|
|
35
12
|
): UI_I_UtilizationDataItem[] => {
|
|
36
|
-
if (!apiData) return []
|
|
37
|
-
|
|
38
13
|
const result: UI_I_UtilizationDataItem[] = []
|
|
39
|
-
const utilizationPortletsShow = useLocalStorage('utilization-portlets-show')
|
|
40
|
-
|
|
41
14
|
Object.keys(apiData).forEach((key) => {
|
|
42
|
-
let currentType = ''
|
|
43
|
-
if (key.includes('cpu')) currentType = 'cpu'
|
|
44
|
-
else if (key.includes('memory')) currentType = 'memory'
|
|
45
|
-
|
|
46
|
-
let isShow = true
|
|
47
|
-
if (utilizationPortletsShow) isShow = utilizationPortletsShow.includes(key)
|
|
48
|
-
|
|
49
15
|
result.push({
|
|
50
|
-
isShow,
|
|
51
16
|
id: key,
|
|
52
|
-
|
|
53
|
-
|
|
17
|
+
isShow: true,
|
|
18
|
+
title: localization.common[UI_E_UtilizationBlockCurrentKeys[key]],
|
|
54
19
|
data: apiData[key].items.map((item) => {
|
|
55
|
-
|
|
56
|
-
'capacity',
|
|
57
|
-
'limit',
|
|
58
|
-
'vcpus',
|
|
59
|
-
'usagepercent',
|
|
60
|
-
'ballooncurrentbytes',
|
|
61
|
-
'balloonmaxbytes',
|
|
62
|
-
'entitlement',
|
|
63
|
-
].find((item2) => item.label.toLowerCase().includes(item2))
|
|
20
|
+
item.color = !item.label.toLowerCase().includes('capacity')
|
|
64
21
|
? '#' +
|
|
65
22
|
Math.floor(Math.random() * 0xffffff)
|
|
66
23
|
.toString(16)
|
|
67
24
|
.padStart(6, '0')
|
|
68
25
|
: ''
|
|
69
|
-
|
|
70
|
-
const labelKey = item.label
|
|
71
|
-
const label = getMetricsLocalizationByKey(item.label)
|
|
72
|
-
|
|
73
|
-
const iconName =
|
|
74
|
-
labelKey.toLowerCase().includes('limit') ||
|
|
75
|
-
labelKey.toLowerCase().includes('entitlement')
|
|
76
|
-
? 'arrow3'
|
|
77
|
-
: ''
|
|
26
|
+
item.label = getMetricsLocalizationByKey(item.label)
|
|
78
27
|
|
|
79
|
-
return
|
|
80
|
-
...item,
|
|
81
|
-
color,
|
|
82
|
-
colorKey,
|
|
83
|
-
labelKey,
|
|
84
|
-
label,
|
|
85
|
-
iconName,
|
|
86
|
-
}
|
|
28
|
+
return item
|
|
87
29
|
}),
|
|
88
30
|
})
|
|
89
31
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.64",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@vueuse/core": "10.1.2",
|
|
19
19
|
"@vueuse/nuxt": "10.1.2",
|
|
20
20
|
"bfg-nuxt-3-graph": "1.0.28",
|
|
21
|
-
"bfg-uikit": "1.1.
|
|
21
|
+
"bfg-uikit": "1.1.31",
|
|
22
22
|
"eslint-config-prettier": "^8.5.0",
|
|
23
23
|
"eslint-plugin-myrules": "file:./eslint",
|
|
24
24
|
"nuxt": "3.11.2",
|