bfg-common 1.6.92 → 1.6.93

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.
Files changed (194) hide show
  1. package/assets/localization/local_be.json +18 -438
  2. package/assets/localization/local_en.json +4221 -4642
  3. package/assets/localization/local_hy.json +4221 -4641
  4. package/assets/localization/local_kk.json +4220 -4640
  5. package/assets/localization/local_ru.json +4220 -4640
  6. package/assets/localization/local_zh.json +4218 -4638
  7. package/assets/scss/common/global.scss +0 -11
  8. package/assets/scss/common/normalize.scss +0 -3
  9. package/assets/scss/common/theme.scss +2 -2
  10. package/components/atoms/stack/StackBlock.vue +1 -1
  11. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +2 -2
  12. package/components/atoms/tooltip/TooltipError.vue +0 -3
  13. package/components/common/adapterManager/AdapterManagerNew.vue +0 -87
  14. package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +1 -1
  15. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +1 -0
  16. package/components/common/adapterManager/ui/actions/bar/Bar.vue +0 -2
  17. package/components/common/adapterManager/ui/actions/bar/BarNew.vue +2 -3
  18. package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +0 -1
  19. package/components/common/configure/physicalAdapters/PhysicalAdapters.vue +0 -6
  20. package/components/common/configure/physicalAdapters/PhysicalAdaptersNew.vue +192 -219
  21. package/components/common/configure/physicalAdapters/PhysicalAdaptersOld.vue +4 -6
  22. package/components/common/configure/physicalAdapters/buttons/Buttons.vue +0 -1
  23. package/components/common/configure/physicalAdapters/modals/edit/Edit.vue +1 -26
  24. package/components/common/configure/physicalAdapters/modals/edit/EditNew.vue +1 -30
  25. package/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces.ts +0 -5
  26. package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +1 -12
  27. package/components/common/configure/physicalAdapters/tableView/lib/config/physicalAdaptersTableConfigNew.ts +21 -21
  28. package/components/common/configure/physicalAdapters/tableView/lib/config/settings.ts +32 -39
  29. package/components/common/configure/physicalAdapters/tableView/lib/models/interfaces.ts +1 -4
  30. package/components/common/diagramMain/Diagram.vue +85 -169
  31. package/components/common/diagramMain/DiagramMain.vue +10 -40
  32. package/components/common/diagramMain/{header/HeaderOld.vue → Header.vue} +67 -78
  33. package/components/common/diagramMain/modals/{managePhysicalAdapters/ManagePhysicalAdaptersOld.vue → ManagePhysicalAdaptersModal.vue} +119 -33
  34. package/components/common/diagramMain/modals/Modals.vue +5 -5
  35. package/components/common/diagramMain/modals/editSettings/{confirmTeamingSettingsModal/ConfirmTeamingSettingsModalOld.vue → ConfirmTeamingSettingsModal.vue} +5 -2
  36. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +102 -104
  37. package/components/common/diagramMain/modals/editSettings/{modal/EditSettingsModalOld.vue → EditSettingsModal.vue} +51 -12
  38. package/components/common/diagramMain/modals/editSettings/lib/models/interfaces.ts +0 -6
  39. package/components/common/diagramMain/modals/editSettings/tabs/{networkProperties/NetworkPropertiesOld.vue → NetworkProperties.vue} +113 -12
  40. package/components/common/diagramMain/modals/editSettings/tabs/{security/SecurityOld.vue → Security.vue} +48 -25
  41. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +164 -0
  42. package/components/common/diagramMain/modals/editSettings/tabs/{teamingFailover/TeamingFailoverOld.vue → TeamingFailover.vue} +48 -11
  43. package/components/common/diagramMain/modals/editSettings/tabs/{trafficShaping/TrafficShapingOld.vue → TrafficShaping.vue} +134 -12
  44. package/components/common/diagramMain/modals/editSettings/tabs/port/{ipvFourSettings/IpvFourSettingsOld.vue → IpvFourSettings.vue} +152 -11
  45. package/components/common/diagramMain/modals/editSettings/tabs/port/{portProperties/PortPropertiesOld.vue → PortProperties.vue} +103 -12
  46. package/components/common/diagramMain/modals/lib/config/adapterModal.ts +9 -9
  47. package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +2 -43
  48. package/components/common/diagramMain/modals/lib/config/index.ts +1 -2
  49. package/components/common/diagramMain/modals/lib/config/networkModal.ts +15 -15
  50. package/components/common/diagramMain/modals/lib/config/portModal.ts +12 -12
  51. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +2 -2
  52. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +1 -1
  53. package/components/common/diagramMain/modals/lib/utils/index.ts +4 -34
  54. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +2 -2
  55. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +1 -1
  56. package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +16 -67
  57. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalNew.vue +0 -8
  58. package/components/common/layout/theHeader/ThemeSwitch.vue +1 -1
  59. package/components/common/layout/theHeader/modals/reconnect/New.vue +30 -38
  60. package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +9 -8
  61. package/components/common/layout/theHeader/userMenu/modals/preferences/New.vue +0 -4
  62. package/components/common/layout/theHeader/userMenu/modals/preferences/Old.vue +2 -9
  63. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +7 -11
  64. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +1 -7
  65. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +5 -8
  66. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +5 -9
  67. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions.ts +1 -1
  68. package/components/common/layout/theHeader/userMenu/modals/preferences/view/Old.vue +9 -5
  69. package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +6 -9
  70. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +1 -3
  71. package/components/common/modals/Rename.vue +1 -3
  72. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +2055 -2791
  73. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +295 -295
  74. package/components/common/monitor/advanced/tools/chartOptionsModal/lib/config/index.ts +20 -22
  75. package/components/common/monitor/advanced/tools/chartOptionsModal/lib/utils/checkSubmit.ts +2 -3
  76. package/components/common/monitor/lib/utils/local_be.json +702 -714
  77. package/components/common/monitor/lib/utils/local_en.json +702 -714
  78. package/components/common/monitor/lib/utils/local_hy.json +702 -714
  79. package/components/common/monitor/lib/utils/local_kk.json +702 -714
  80. package/components/common/monitor/lib/utils/local_ru.json +702 -714
  81. package/components/common/monitor/lib/utils/local_zh.json +702 -714
  82. package/components/common/monitor/utilization/Utilization.vue +65 -65
  83. package/components/common/monitor/utilization/lib/utils/index.ts +112 -112
  84. package/components/common/noDataProvided/NoDataProvidedNew.vue +1 -1
  85. package/components/common/pages/backups/lib/models/interfaces.ts +0 -1
  86. package/components/common/pages/backups/modals/Modals.vue +0 -1
  87. package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +4 -4
  88. package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/config/table.ts +4 -4
  89. package/components/common/pages/backups/modals/lib/config/restore.ts +0 -1
  90. package/components/common/pages/backups/modals/lib/models/interfaces.ts +0 -1
  91. package/components/common/pages/backups/modals/restore/Restore.vue +2 -4
  92. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +253 -184
  93. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/ActionsNew.vue +1 -1
  94. package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +0 -9
  95. package/components/common/pages/scheduledTasks/table/new/New.vue +10 -12
  96. package/components/common/pages/tasks/Tasks.vue +1 -4
  97. package/components/common/pages/tasks/table/Table.vue +23 -25
  98. package/components/common/readyToComplete/New.vue +0 -1
  99. package/components/common/split/horizontal/New.vue +1 -1
  100. package/components/common/split/horizontal/Old.vue +1 -1
  101. package/components/common/split/vertical/New.vue +8 -42
  102. package/components/common/split/vertical/Old.vue +2 -31
  103. package/components/common/split/vertical/Vertical.vue +0 -4
  104. package/components/common/tools/Actions.vue +3 -7
  105. package/components/common/tools/lib/models/interfaces.ts +0 -1
  106. package/components/common/vm/actions/add/New.vue +6 -21
  107. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +1 -14
  108. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/New.vue +0 -5
  109. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Old.vue +0 -1
  110. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/New.vue +0 -1
  111. package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/New.vue +0 -2
  112. package/components/common/vm/actions/common/select/options/New.vue +12 -14
  113. package/components/common/vm/actions/common/select/options/Old.vue +15 -16
  114. package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +15 -13
  115. package/components/common/vm/actions/confirm/Confirm.vue +0 -3
  116. package/components/common/vm/actions/rename/Old.vue +0 -1
  117. package/components/common/vm/snapshots/DetailView.vue +6 -6
  118. package/components/common/wizards/datastore/add/New.vue +0 -6
  119. package/components/common/wizards/datastore/add/lib/config/steps.ts +1 -1
  120. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +1 -1
  121. package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +1 -1
  122. package/components/common/wizards/network/add/Add.vue +2 -13
  123. package/components/common/wizards/network/add/AddNew.vue +26 -22
  124. package/components/common/wizards/network/add/lib/config/initialData.ts +4 -6
  125. package/components/common/wizards/network/add/lib/config/steps.ts +1 -1
  126. package/components/common/wizards/network/add/lib/models/interfaces.ts +0 -1
  127. package/components/common/wizards/network/add/lib/utils/utils.ts +1 -1
  128. package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsOld.vue +1 -5
  129. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +8 -2
  130. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsOld.vue +0 -3
  131. package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +8 -2
  132. package/components/common/wizards/network/add/steps/portProperties/PortPropertiesOld.vue +2 -6
  133. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +3 -10
  134. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +0 -4
  135. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectNetwork.vue +1 -5
  136. package/components/common/wizards/network/add/validations/common.ts +1 -1
  137. package/components/common/wizards/vm/migrate/New.vue +3 -13
  138. package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +0 -5
  139. package/components/common/wizards/vm/migrate/lib/config/steps.ts +2 -3
  140. package/components/common/wizards/vm/migrate/steps/computeResource/New.vue +1 -2
  141. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/New.vue +21 -40
  142. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable.ts +14 -44
  143. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/models/enums.ts +0 -4
  144. package/components/common/wizards/vm/migrate/steps/priority/New.vue +2 -7
  145. package/components/common/wizards/vm/migrate/steps/selectStorage/New.vue +7 -22
  146. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/New.vue +0 -6
  147. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/New.vue +1 -4
  148. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/lib/config/datastoreTable.ts +16 -12
  149. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/New.vue +5 -10
  150. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +11 -16
  151. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +1 -7
  152. package/components/common/wizards/vm/migrate/steps/selectStorage/selectedPerDisk/New.vue +10 -17
  153. package/components/common/wizards/vm/migrate/steps/type/TypeNew.vue +0 -1
  154. package/components/common/wizards/vm/migrate/vmOrigin/New.vue +15 -35
  155. package/lib/models/interfaces.ts +0 -1
  156. package/lib/models/store/tasks/enums.ts +0 -3
  157. package/lib/models/store/tasks/types.ts +6 -7
  158. package/package.json +2 -2
  159. package/plugins/directives.ts +5 -3
  160. package/public/spice-console/application/agent.js +17 -18
  161. package/store/tasks/actions.ts +8 -26
  162. package/store/tasks/mappers/recentTasks.ts +0 -1
  163. package/components/common/configure/physicalAdapters/modals/edit/lib/validations/validations.ts +0 -19
  164. package/components/common/diagramMain/header/Header.vue +0 -49
  165. package/components/common/diagramMain/header/HeaderNew.vue +0 -155
  166. package/components/common/diagramMain/modals/UnsavedChangesModal.vue +0 -32
  167. package/components/common/diagramMain/modals/editSettings/EditSettingsNew.vue +0 -285
  168. package/components/common/diagramMain/modals/editSettings/EditSettingsOld.vue +0 -254
  169. package/components/common/diagramMain/modals/editSettings/confirmTeamingSettingsModal/ConfirmTeamingSettingsModal.vue +0 -31
  170. package/components/common/diagramMain/modals/editSettings/confirmTeamingSettingsModal/ConfirmTeamingSettingsModalNew.vue +0 -82
  171. package/components/common/diagramMain/modals/editSettings/lib/config/config.ts +0 -15
  172. package/components/common/diagramMain/modals/editSettings/lib/utils/utils.ts +0 -177
  173. package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModal.vue +0 -137
  174. package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModalNew.vue +0 -91
  175. package/components/common/diagramMain/modals/editSettings/tabs/networkProperties/NetworkProperties.vue +0 -158
  176. package/components/common/diagramMain/modals/editSettings/tabs/networkProperties/NetworkPropertiesNew.vue +0 -262
  177. package/components/common/diagramMain/modals/editSettings/tabs/port/ipvFourSettings/IpvFourSettings.vue +0 -192
  178. package/components/common/diagramMain/modals/editSettings/tabs/port/ipvFourSettings/IpvFourSettingsNew.vue +0 -388
  179. package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortProperties.vue +0 -139
  180. package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortPropertiesNew.vue +0 -286
  181. package/components/common/diagramMain/modals/editSettings/tabs/security/Security.vue +0 -209
  182. package/components/common/diagramMain/modals/editSettings/tabs/security/SecurityNew.vue +0 -233
  183. package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchProperties.vue +0 -128
  184. package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchPropertiesNew.vue +0 -235
  185. package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchPropertiesOld.vue +0 -87
  186. package/components/common/diagramMain/modals/editSettings/tabs/teamingFailover/TeamingFailover.vue +0 -99
  187. package/components/common/diagramMain/modals/editSettings/tabs/teamingFailover/TeamingFailoverNew.vue +0 -319
  188. package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShaping.vue +0 -173
  189. package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShapingNew.vue +0 -348
  190. package/components/common/diagramMain/modals/managePhysicalAdapters/ManagePhysicalAdapters.vue +0 -164
  191. package/components/common/diagramMain/modals/managePhysicalAdapters/ManagePhysicalAdaptersNew.vue +0 -306
  192. package/components/common/diagramMain/skeleton/Header.vue +0 -31
  193. package/components/common/diagramMain/skeleton/Switch.vue +0 -75
  194. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable.ts +0 -340
@@ -1,65 +1,65 @@
1
- <template>
2
- <component
3
- :is="currentComponent"
4
- v-model:all-data="constructedData"
5
- :is-loading="props.isLoading"
6
- @set-items-show-settings="onSetItemsShowSettings"
7
- />
8
- </template>
9
-
10
- <script setup lang="ts">
11
- import type {
12
- API_UI_I_UtilizationData,
13
- UI_I_UtilizationDataItem,
14
- } from '~/components/common/monitor/utilization/lib/models/interfaces'
15
- import type { UI_I_Localization } from '~/lib/models/interfaces'
16
- import type { T_NodeType } from '~/components/templates/inventory/lib/models/types'
17
- import { constructApiData } from '~/components/common/monitor/utilization/lib/utils'
18
-
19
- const props = defineProps<{
20
- apiData: API_UI_I_UtilizationData | null
21
- isLoading: boolean
22
- }>()
23
-
24
- const { $store }: any = useNuxtApp()
25
-
26
- const routeType = computed<T_NodeType>(
27
- () => useRoute().params.type.toString() as T_NodeType
28
- )
29
-
30
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
31
-
32
- const currentComponent = computed(() =>
33
- isNewView.value
34
- ? defineAsyncComponent(() => import('./new/New.vue'))
35
- : defineAsyncComponent(() => import('./Old.vue'))
36
- )
37
-
38
- const localization = computed<UI_I_Localization>(() => useLocal())
39
-
40
- const constructedData = ref<UI_I_UtilizationDataItem[]>([])
41
-
42
- watch(
43
- [localization, () => props.apiData],
44
- () => {
45
- if (props.apiData) {
46
- constructedData.value = constructApiData(
47
- props.apiData,
48
- localization.value,
49
- routeType.value
50
- )
51
- }
52
- },
53
- { immediate: true, deep: true }
54
- )
55
-
56
- const onSetItemsShowSettings = (): void => {
57
- const showBlocksId: string[] = []
58
- constructedData.value.forEach((item) => {
59
- if (item.isShow) showBlocksId.push(item.id)
60
- })
61
- useLocalStorage('utilization-portlets-show', showBlocksId)
62
- }
63
- </script>
64
-
65
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <component
3
+ :is="currentComponent"
4
+ v-model:all-data="constructedData"
5
+ :is-loading="props.isLoading"
6
+ @set-items-show-settings="onSetItemsShowSettings"
7
+ />
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ import type {
12
+ API_UI_I_UtilizationData,
13
+ UI_I_UtilizationDataItem,
14
+ } from '~/components/common/monitor/utilization/lib/models/interfaces'
15
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
16
+ import type { T_NodeType } from '~/components/templates/inventory/lib/models/types'
17
+ import { constructApiData } from '~/components/common/monitor/utilization/lib/utils'
18
+
19
+ const props = defineProps<{
20
+ apiData: API_UI_I_UtilizationData | null
21
+ isLoading: boolean
22
+ }>()
23
+
24
+ const { $store }: any = useNuxtApp()
25
+
26
+ const routeType = computed<T_NodeType>(
27
+ () => useRoute().params.type.toString() as T_NodeType
28
+ )
29
+
30
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
31
+
32
+ const currentComponent = computed(() =>
33
+ isNewView.value
34
+ ? defineAsyncComponent(() => import('./new/New.vue'))
35
+ : defineAsyncComponent(() => import('./Old.vue'))
36
+ )
37
+
38
+ const localization = computed<UI_I_Localization>(() => useLocal())
39
+
40
+ const constructedData = ref<UI_I_UtilizationDataItem[]>([])
41
+
42
+ watch(
43
+ [localization, () => props.apiData],
44
+ () => {
45
+ if (props.apiData) {
46
+ constructedData.value = constructApiData(
47
+ props.apiData,
48
+ localization.value,
49
+ routeType.value
50
+ )
51
+ }
52
+ },
53
+ { immediate: true, deep: true }
54
+ )
55
+
56
+ const onSetItemsShowSettings = (): void => {
57
+ const showBlocksId: string[] = []
58
+ constructedData.value.forEach((item) => {
59
+ if (item.isShow) showBlocksId.push(item.id)
60
+ })
61
+ useLocalStorage('utilization-portlets-show', showBlocksId)
62
+ }
63
+ </script>
64
+
65
+ <style scoped lang="scss"></style>
@@ -1,112 +1,112 @@
1
- import type {
2
- API_UI_I_UtilizationData,
3
- UI_I_UtilizationDataItem,
4
- } from '~/components/common/monitor/utilization/lib/models/interfaces'
5
- import type { UI_I_Localization } from '~/lib/models/interfaces'
6
- import type { T_NodeType } from '~/components/templates/inventory/lib/models/types'
7
- import { getMetricsLocalizationByKey } from '~/components/common/monitor/lib/utils/localization'
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
- 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
-
52
- export const constructApiData = (
53
- apiData: API_UI_I_UtilizationData | null,
54
- localization: UI_I_Localization,
55
- routeType: T_NodeType
56
- ): UI_I_UtilizationDataItem[] => {
57
- if (!apiData) return []
58
-
59
- const result: UI_I_UtilizationDataItem[] = []
60
- const utilizationPortletsShow = useLocalStorage('utilization-portlets-show')
61
-
62
- Object.keys(apiData).forEach((key) => {
63
- let currentType = ''
64
- if (key.includes('cpu')) currentType = 'cpu'
65
- else if (key.includes('memory')) currentType = 'memory'
66
-
67
- let isShow = true
68
- if (utilizationPortletsShow) isShow = utilizationPortletsShow.includes(key)
69
-
70
- result.push({
71
- isShow,
72
- id: key,
73
- title: currentTitle(routeType, currentType, localization) || key,
74
- type: currentType,
75
- data: apiData[key].items.map((item) => {
76
- const color = ![
77
- 'capacity',
78
- 'limit',
79
- 'vcpus',
80
- 'usagepercent',
81
- 'ballooncurrentbytes',
82
- 'balloonmaxbytes',
83
- 'entitlement',
84
- ].find((item2) => item.label.toLowerCase().includes(item2))
85
- ? '#' +
86
- Math.floor(Math.random() * 0xffffff)
87
- .toString(16)
88
- .padStart(6, '0')
89
- : ''
90
- const colorKey = currentColorKey(item.label)
91
- const labelKey = item.label
92
- const label = getMetricsLocalizationByKey(item.label)
93
-
94
- const iconName =
95
- labelKey.toLowerCase().includes('limit') ||
96
- labelKey.toLowerCase().includes('entitlement')
97
- ? 'arrow3'
98
- : ''
99
-
100
- return {
101
- ...item,
102
- color,
103
- colorKey,
104
- labelKey,
105
- label,
106
- iconName,
107
- }
108
- }),
109
- })
110
- })
111
- return result
112
- }
1
+ import type {
2
+ API_UI_I_UtilizationData,
3
+ UI_I_UtilizationDataItem,
4
+ } from '~/components/common/monitor/utilization/lib/models/interfaces'
5
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
6
+ import type { T_NodeType } from '~/components/templates/inventory/lib/models/types'
7
+ import { getMetricsLocalizationByKey } from '~/components/common/monitor/lib/utils/localization'
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
+ 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
+
52
+ export const constructApiData = (
53
+ apiData: API_UI_I_UtilizationData | null,
54
+ localization: UI_I_Localization,
55
+ routeType: T_NodeType
56
+ ): UI_I_UtilizationDataItem[] => {
57
+ if (!apiData) return []
58
+
59
+ const result: UI_I_UtilizationDataItem[] = []
60
+ const utilizationPortletsShow = useLocalStorage('utilization-portlets-show')
61
+
62
+ Object.keys(apiData).forEach((key) => {
63
+ let currentType = ''
64
+ if (key.includes('cpu')) currentType = 'cpu'
65
+ else if (key.includes('memory')) currentType = 'memory'
66
+
67
+ let isShow = true
68
+ if (utilizationPortletsShow) isShow = utilizationPortletsShow.includes(key)
69
+
70
+ result.push({
71
+ isShow,
72
+ id: key,
73
+ title: currentTitle(routeType, currentType, localization) || key,
74
+ type: currentType,
75
+ data: apiData[key].items.map((item) => {
76
+ const color = ![
77
+ 'capacity',
78
+ 'limit',
79
+ 'vcpus',
80
+ 'usagepercent',
81
+ 'ballooncurrentbytes',
82
+ 'balloonmaxbytes',
83
+ 'entitlement',
84
+ ].find((item2) => item.label.toLowerCase().includes(item2))
85
+ ? '#' +
86
+ Math.floor(Math.random() * 0xffffff)
87
+ .toString(16)
88
+ .padStart(6, '0')
89
+ : ''
90
+ const colorKey = currentColorKey(item.label)
91
+ const labelKey = item.label
92
+ const label = getMetricsLocalizationByKey(item.label)
93
+
94
+ const iconName =
95
+ labelKey.toLowerCase().includes('limit') ||
96
+ labelKey.toLowerCase().includes('entitlement')
97
+ ? 'arrow3'
98
+ : ''
99
+
100
+ return {
101
+ ...item,
102
+ color,
103
+ colorKey,
104
+ labelKey,
105
+ label,
106
+ iconName,
107
+ }
108
+ }),
109
+ })
110
+ })
111
+ return result
112
+ }
@@ -43,7 +43,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
43
43
  }
44
44
 
45
45
  .ui-no-data-provided-title {
46
- font-weight: 400;
46
+ font-weight: 500;
47
47
  font-size: 16px;
48
48
  line-height: 19px;
49
49
  letter-spacing: 0;
@@ -31,7 +31,6 @@ export interface UI_I_BackupAction {
31
31
  id?: string
32
32
  name?: string
33
33
  backupId?: string
34
- vmId?: string
35
34
  bucketId?: string
36
35
  storageId?: string
37
36
  }
@@ -187,7 +187,6 @@ watch(
187
187
  case 'restoreBackup':
188
188
  isShowRestoreModal.value = true
189
189
  restoreForm.value.backup_storage = newValue.storageId || ''
190
- restoreForm.value.vm = newValue.vmId || ''
191
190
  restoreForm.value.bucket = newValue.bucketId || ''
192
191
  restoreForm.value.backup = newValue.backupId || ''
193
192
  break
@@ -191,19 +191,19 @@ export const getBodyDataFunc = (
191
191
  },
192
192
  {
193
193
  col: 'col2',
194
- text: $binary.round(datastore.capacity.capacity_mb || 0, false, lang)
194
+ text: $binary.round(datastore.capacity.capacity_mb, false, lang)
195
195
  },
196
196
  {
197
197
  col: 'col3',
198
- text: $binary.round(datastore.capacity.provisioned_mb || 0, false, lang)
198
+ text: $binary.round(datastore.capacity.provisioned_mb, false, lang)
199
199
  },
200
200
  {
201
201
  col: 'col4',
202
- text: $binary.round(datastore.capacity.free_mb || 0, false, lang)
202
+ text: $binary.round(datastore.capacity.free_mb, false, lang)
203
203
  },
204
204
  {
205
205
  col: 'col5',
206
- text: $binary.round(datastore.capacity.used_mb || 0, false, lang)
206
+ text: $binary.round(datastore.capacity.used_mb, false, lang)
207
207
  },
208
208
  {
209
209
  col: 'col6',
@@ -83,7 +83,7 @@ export const bodyItems = (
83
83
  },
84
84
  {
85
85
  key: 'col2',
86
- text: $binary.round(datastore.capacity[tableKeys[2]] || 0, false, lang),
86
+ text: $binary.round(datastore.capacity[tableKeys[2]], false, lang),
87
87
  id: datastore.id,
88
88
  testId: `backup-datastore-table-item-${datastore.id}`,
89
89
  data: {
@@ -93,7 +93,7 @@ export const bodyItems = (
93
93
  {
94
94
  key: 'col3',
95
95
  text: $binary.round(
96
- datastore.capacity[tableKeys[3]] || 0,
96
+ datastore.capacity[tableKeys[3]],
97
97
  false,
98
98
  lang
99
99
  ),
@@ -105,7 +105,7 @@ export const bodyItems = (
105
105
  },
106
106
  {
107
107
  key: 'col4',
108
- text: $binary.round(datastore.capacity[tableKeys[4]] || 0, false, lang),
108
+ text: $binary.round(datastore.capacity[tableKeys[4]], false, lang),
109
109
  id: datastore.id,
110
110
  testId: `backup-datastore-table-item-${datastore.id}`,
111
111
  data: {
@@ -114,7 +114,7 @@ export const bodyItems = (
114
114
  },
115
115
  {
116
116
  key: 'col5',
117
- text: $binary.round(datastore.capacity[tableKeys[5]] || 0, false, lang),
117
+ text: $binary.round(datastore.capacity[tableKeys[5]], false, lang),
118
118
  id: datastore.id,
119
119
  testId: `backup-datastore-table-item-${datastore.id}`,
120
120
  data: {
@@ -4,7 +4,6 @@ export const restoreDefaultFormFunc = (): UI_I_RestoreForm => {
4
4
  return {
5
5
  restore_code: 2,
6
6
  backup_storage: '',
7
- vm: '',
8
7
  bucket: '',
9
8
  backup: '',
10
9
  copy_disks: [],
@@ -163,7 +163,6 @@ export interface UI_I_CreateBackupForm {
163
163
  export interface UI_I_RestoreForm {
164
164
  restore_code: 1 | 2 | 3 // 1 - disk only, 2 - existing, 3 - as New
165
165
  backup_storage: string
166
- vm: string
167
166
  bucket: string
168
167
  backup: string
169
168
  copy_disks: UI_I_Pvm['disk_devices']
@@ -258,8 +258,7 @@ const getPvm = async (): Promise<void> => {
258
258
  loadingCount.value++
259
259
  await $store.dispatch('backup/A_GET_PVM', {
260
260
  target: model.value.backup_storage,
261
- vmId: model.value.vm,
262
- bucketId: model.value.bucket,
261
+ bucketId: model.value.bucket, // TODO bucket поменять на vm так как это сейчас vm
263
262
  backupId: model.value.backup,
264
263
  })
265
264
 
@@ -274,8 +273,7 @@ const getBackupDisks = async (): Promise<void> => {
274
273
  loadingCount.value++
275
274
  await $store.dispatch('backup/A_GET_BACKUP_DISKS', {
276
275
  target: model.value.backup_storage,
277
- vmId: model.value.vm,
278
- bucketId: model.value.bucket,
276
+ bucketId: model.value.bucket, // TODO bucket поменять на vm так как это сейчас vm
279
277
  backupId: model.value.backup,
280
278
  })
281
279