bfg-common 1.6.47 → 1.6.49

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 (122) hide show
  1. package/assets/localization/local_be.json +9 -255
  2. package/assets/localization/local_en.json +17 -264
  3. package/assets/localization/local_hy.json +11 -257
  4. package/assets/localization/local_kk.json +9 -255
  5. package/assets/localization/local_ru.json +18 -264
  6. package/assets/localization/local_zh.json +9 -255
  7. package/assets/scss/common/global.scss +0 -11
  8. package/assets/scss/common/theme.scss +2 -2
  9. package/components/atoms/stack/StackBlock.vue +1 -1
  10. package/components/atoms/tooltip/TooltipError.vue +0 -3
  11. package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +1 -1
  12. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +1 -0
  13. package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +0 -1
  14. package/components/common/certificate/CertificateInfo.vue +1 -7
  15. package/components/common/configure/physicalAdapters/PhysicalAdapters.vue +0 -6
  16. package/components/common/configure/physicalAdapters/PhysicalAdaptersNew.vue +192 -219
  17. package/components/common/configure/physicalAdapters/PhysicalAdaptersOld.vue +4 -6
  18. package/components/common/configure/physicalAdapters/buttons/Buttons.vue +0 -1
  19. package/components/common/configure/physicalAdapters/modals/edit/Edit.vue +1 -26
  20. package/components/common/configure/physicalAdapters/modals/edit/EditNew.vue +1 -30
  21. package/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces.ts +0 -5
  22. package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +1 -12
  23. package/components/common/configure/physicalAdapters/tableView/lib/config/physicalAdaptersTableConfigNew.ts +21 -21
  24. package/components/common/configure/physicalAdapters/tableView/lib/config/settings.ts +5 -12
  25. package/components/common/configure/physicalAdapters/tableView/lib/models/interfaces.ts +1 -4
  26. package/components/common/diagramMain/Diagram.vue +85 -167
  27. package/components/common/diagramMain/DiagramMain.vue +10 -34
  28. package/components/common/diagramMain/{header/HeaderOld.vue → Header.vue} +67 -78
  29. package/components/common/diagramMain/modals/Modals.vue +0 -4
  30. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +2 -2
  31. package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +2 -43
  32. package/components/common/diagramMain/modals/lib/config/index.ts +1 -2
  33. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +1 -1
  34. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +2 -2
  35. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +1 -1
  36. package/components/common/layout/theHeader/ThemeSwitch.vue +1 -1
  37. package/components/common/layout/theHeader/modals/reconnect/New.vue +30 -38
  38. package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +9 -8
  39. package/components/common/layout/theHeader/userMenu/modals/preferences/New.vue +0 -4
  40. package/components/common/layout/theHeader/userMenu/modals/preferences/Old.vue +2 -9
  41. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +7 -11
  42. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +1 -7
  43. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +5 -8
  44. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +5 -9
  45. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions.ts +1 -1
  46. package/components/common/layout/theHeader/userMenu/modals/preferences/view/Old.vue +9 -5
  47. package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +6 -9
  48. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +1 -3
  49. package/components/common/noDataProvided/NoDataProvidedNew.vue +1 -1
  50. package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +4 -4
  51. package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/config/table.ts +4 -4
  52. package/components/common/pages/hardwareHealth/HardwareHealthNew.vue +1 -1
  53. package/components/common/pages/hardwareHealth/historyTestimony/GraphNew.vue +1 -1
  54. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/ActionsNew.vue +1 -1
  55. package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +0 -9
  56. package/components/common/pages/scheduledTasks/table/new/New.vue +10 -12
  57. package/components/common/pages/tasks/Tasks.vue +1 -4
  58. package/components/common/pages/tasks/table/Table.vue +23 -25
  59. package/components/common/readyToComplete/New.vue +0 -1
  60. package/components/common/split/vertical/New.vue +8 -42
  61. package/components/common/split/vertical/Old.vue +2 -31
  62. package/components/common/split/vertical/Vertical.vue +0 -4
  63. package/components/common/vm/actions/add/New.vue +6 -21
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +1 -14
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/New.vue +0 -5
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Old.vue +0 -1
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/New.vue +0 -1
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +2 -1
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/New.vue +0 -2
  70. package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +15 -13
  71. package/components/common/vm/actions/confirm/Confirm.vue +0 -3
  72. package/components/common/vm/snapshots/DetailView.vue +6 -6
  73. package/components/common/wizards/datastore/add/New.vue +0 -6
  74. package/components/common/wizards/datastore/add/lib/config/steps.ts +1 -1
  75. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +1 -1
  76. package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +1 -1
  77. package/components/common/wizards/network/add/Add.vue +2 -13
  78. package/components/common/wizards/network/add/AddNew.vue +26 -22
  79. package/components/common/wizards/network/add/lib/config/initialData.ts +4 -6
  80. package/components/common/wizards/network/add/lib/config/steps.ts +1 -1
  81. package/components/common/wizards/network/add/lib/models/interfaces.ts +0 -1
  82. package/components/common/wizards/network/add/lib/utils/utils.ts +1 -1
  83. package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsOld.vue +1 -5
  84. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +8 -2
  85. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsOld.vue +0 -3
  86. package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +8 -2
  87. package/components/common/wizards/network/add/steps/portProperties/PortPropertiesOld.vue +2 -6
  88. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +3 -10
  89. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +0 -4
  90. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectNetwork.vue +1 -5
  91. package/components/common/wizards/network/add/validations/common.ts +1 -1
  92. package/components/common/wizards/vm/migrate/New.vue +3 -13
  93. package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +0 -5
  94. package/components/common/wizards/vm/migrate/lib/config/steps.ts +2 -3
  95. package/components/common/wizards/vm/migrate/steps/computeResource/New.vue +1 -2
  96. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/New.vue +21 -40
  97. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable.ts +14 -44
  98. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/models/enums.ts +0 -4
  99. package/components/common/wizards/vm/migrate/steps/priority/New.vue +2 -7
  100. package/components/common/wizards/vm/migrate/steps/selectStorage/New.vue +7 -22
  101. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/New.vue +0 -6
  102. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/New.vue +1 -4
  103. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/lib/config/datastoreTable.ts +16 -12
  104. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/New.vue +5 -10
  105. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +11 -16
  106. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +1 -7
  107. package/components/common/wizards/vm/migrate/steps/selectStorage/selectedPerDisk/New.vue +10 -17
  108. package/components/common/wizards/vm/migrate/steps/type/TypeNew.vue +0 -1
  109. package/components/common/wizards/vm/migrate/vmOrigin/New.vue +15 -35
  110. package/lib/models/store/tasks/enums.ts +0 -3
  111. package/lib/models/store/tasks/types.ts +6 -7
  112. package/package.json +2 -2
  113. package/plugins/directives.ts +5 -3
  114. package/public/spice-console/application/agent.js +17 -18
  115. package/store/tasks/actions.ts +8 -26
  116. package/store/tasks/mappers/recentTasks.ts +0 -1
  117. package/components/common/configure/physicalAdapters/modals/edit/lib/validations/validations.ts +0 -19
  118. package/components/common/diagramMain/header/Header.vue +0 -49
  119. package/components/common/diagramMain/header/HeaderNew.vue +0 -155
  120. package/components/common/diagramMain/skeleton/Header.vue +0 -31
  121. package/components/common/diagramMain/skeleton/Switch.vue +0 -75
  122. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable.ts +0 -340
@@ -82,7 +82,6 @@ export const recentTasks = (
82
82
  statusIcon = 'error-outline'
83
83
  break
84
84
  case 5:
85
- case 6:
86
85
  statusIcon = 'warning-outline'
87
86
  break
88
87
  }
@@ -1,19 +0,0 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
-
3
- export const vfNumberValidationFunc = (
4
- vfNumber: number,
5
- localization: UI_I_Localization,
6
- isAlert = false
7
- ): string => {
8
- if (vfNumber !== 0 && !vfNumber) {
9
- return isAlert
10
- ? localization.inventoryConfigure.vfRequiredMessage
11
- : localization.common.fieldRequired
12
- } else if (vfNumber < 1 || vfNumber > 63) {
13
- return isAlert
14
- ? localization.inventoryConfigure.vfNotNegativeMessage
15
- : localization.inventoryConfigure.vfNotNegativeMessage
16
- }
17
-
18
- return ''
19
- }
@@ -1,49 +0,0 @@
1
- <template>
2
- <component
3
- :is="currentComponent"
4
- :project="props.project"
5
- :is-show-diagram="props.isShowDiagram"
6
- :diagram-name="props.diagramName"
7
- :test-id="props.testId"
8
- @toggle-diagram="emits('toggle-diagram')"
9
- @show-modal="onShowModal"
10
- />
11
- </template>
12
-
13
- <script setup lang="ts">
14
- import type { UI_I_ModalsInitialData } from '~/components/common/diagramMain/lib/models/interfaces'
15
- import type { UI_T_Project } from '~/lib/models/types'
16
-
17
- const props = withDefaults(
18
- defineProps<{
19
- isShowDiagram: boolean
20
- diagramName: string
21
- testId: string
22
- project?: UI_T_Project
23
- }>(),
24
- {
25
- project: undefined,
26
- }
27
- )
28
-
29
- const emits = defineEmits<{
30
- (event: 'toggle-diagram'): void
31
- (event: 'show-modal', modalName: string, data?: { switch_name: string }): void
32
- }>()
33
-
34
- const { $store }: any = useNuxtApp()
35
-
36
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
37
-
38
- const currentComponent = computed(() =>
39
- isNewView.value
40
- ? defineAsyncComponent(() => import('./HeaderNew.vue'))
41
- : defineAsyncComponent(() => import('./HeaderOld.vue'))
42
- )
43
-
44
- const onShowModal = (modalName: string, data?: { switch_name: string }) => {
45
- emits('show-modal', modalName, data)
46
- }
47
- </script>
48
-
49
- <style scoped lang="scss"></style>
@@ -1,155 +0,0 @@
1
- <template>
2
- <div class="diagram-header">
3
- <div class="diagram-header-left">
4
- <span
5
- class="diagram-header-left-icon"
6
- :data-id="`${props.testId}-toggle-icon`"
7
- >
8
- <ui-icon
9
- name="arrow"
10
- width="20"
11
- height="20"
12
- :class="[
13
- 'diagram-header-left-icon-arrow',
14
- {
15
- open: props.isShowDiagram,
16
- },
17
- ]"
18
- @click="emits('toggle-diagram')"
19
- />
20
- </span>
21
-
22
- <span class="diagram-header-left-title" @click="emits('toggle-diagram')">
23
- {{ localization.common.standardSwitch }}:
24
- {{ props.diagramName }}
25
- </span>
26
- </div>
27
- <div v-if="props.isShowDiagram" class="diagram-header-right">
28
- <ui-button-group
29
- :buttons="buttons"
30
- :left-line="true"
31
- :group-id="props.diagramName"
32
- class="switch-actions"
33
- @action="onSelectAction"
34
- />
35
- </div>
36
- </div>
37
- </template>
38
-
39
- <script setup lang="ts">
40
- import type { UI_I_Button } from '~/node_modules/bfg-common/components/common/tools/lib/models/interfaces'
41
- import type { UI_I_Localization } from '~/lib/models/interfaces'
42
- import type { UI_I_ModalsInitialData } from '~/components/common/diagramMain/lib/models/interfaces'
43
- import type { UI_T_Project } from '~/lib/models/types'
44
- import { switchMainNavigationNewFunc } from '~/components/common/diagramMain/modals/lib/config'
45
-
46
- const props = withDefaults(
47
- defineProps<{
48
- isShowDiagram: boolean
49
- diagramName: string
50
- testId: string
51
- project?: UI_T_Project
52
- }>(),
53
- {
54
- project: undefined,
55
- }
56
- )
57
-
58
- const emits = defineEmits<{
59
- (event: 'toggle-diagram'): void
60
- (
61
- event: 'show-modal',
62
- modalName: string,
63
- properties?: UI_I_ModalsInitialData
64
- ): void
65
- }>()
66
-
67
- const localization = computed<UI_I_Localization>(() => useLocal())
68
-
69
- const buttons = computed<UI_I_Button[]>(() =>
70
- switchMainNavigationNewFunc(localization.value, props.testId)
71
- )
72
-
73
- const onShowModal = (modalName: string, diagramName?: string) => {
74
- diagramName
75
- ? emits(
76
- 'show-modal',
77
- modalName,
78
- diagramName && { switch_name: diagramName }
79
- )
80
- : emits('show-modal', modalName)
81
- }
82
-
83
- const onSelectAction = (event: string): void => {
84
- onShowModal(event, event === 'add-networking' && props.diagramName)
85
- }
86
- </script>
87
-
88
- <style scoped lang="scss">
89
- .diagram-header {
90
- display: flex;
91
- height: 20px;
92
-
93
- &-left {
94
- display: flex;
95
- flex-wrap: nowrap;
96
- align-items: center;
97
- column-gap: 12px;
98
- height: 20px;
99
- min-width: max-content;
100
-
101
- &-icon {
102
- width: 20px;
103
- height: 20px;
104
- color: var(--select-arrow);
105
-
106
- &-arrow {
107
- transform: rotate(90deg);
108
- cursor: pointer;
109
-
110
- &.open {
111
- transform: rotate(180deg);
112
- }
113
- }
114
- }
115
-
116
- &-title {
117
- font-weight: 500;
118
- font-size: 16px;
119
- line-height: 19px;
120
- letter-spacing: 0;
121
- color: var(--title-form-first-color);
122
- cursor: pointer;
123
-
124
- &:hover {
125
- color: var(--dropdown-item-hover-color);
126
- }
127
- }
128
- }
129
-
130
- &-right {
131
- height: 20px;
132
- width: 100%;
133
-
134
- :deep(.ui-button-group) {
135
- .ui-button-group-line {
136
- height: 20px;
137
- top: 0;
138
- }
139
-
140
- .ui-button-group-items {
141
- height: 20px !important;
142
-
143
- .button-from-group {
144
- height: 20px !important;
145
- }
146
- }
147
- .ui-button-group-dots {
148
- margin-top: 0;
149
- padding-top: 0;
150
- height: 20px;
151
- }
152
- }
153
- }
154
- }
155
- </style>
@@ -1,31 +0,0 @@
1
- <template>
2
- <div class="diagram-header-skeleton">
3
- <div class="diagram-header-skeleton-title">
4
- <ui-skeleton-item width="160" height="22" />
5
- </div>
6
- <div class="diagram-header-skeleton-buttons">
7
- <ui-skeleton-item width="112" height="36" border-radius="8" />
8
- <ui-skeleton-item width="160" height="36" border-radius="8" />
9
- </div>
10
- </div>
11
- </template>
12
-
13
- <script setup lang="ts"></script>
14
-
15
- <style scoped lang="scss">
16
- .diagram-header-skeleton {
17
- padding: 16px;
18
- display: flex;
19
- align-items: flex-start;
20
- justify-content: space-between;
21
- flex-wrap: wrap;
22
- row-gap: 24px;
23
- column-gap: 24px;
24
-
25
- &-buttons {
26
- display: flex;
27
- column-gap: 16px;
28
- margin-left: auto;
29
- }
30
- }
31
- </style>
@@ -1,75 +0,0 @@
1
- <template>
2
- <div class="diagram-skeleton">
3
- <div class="diagram-skeleton-item-header">
4
- <div class="diagram-skeleton-item-header-icon">
5
- <ui-icon
6
- class="diagram-skeleton-item-header-icon-arrow"
7
- name="arrow"
8
- width="20"
9
- height="20"
10
- />
11
- </div>
12
- <ui-skeleton-item width="160" height="20" />
13
- <div class="diagram-skeleton-item-header-line"></div>
14
- <ui-skeleton-item width="400" height="20" />
15
- </div>
16
- <div class="diagram-skeleton-container">
17
- <ui-skeleton-switch width="712" />
18
- </div>
19
- <div class="diagram-skeleton-footer">
20
- <ui-skeleton-item width="80" height="20" />
21
- </div>
22
- </div>
23
- </template>
24
-
25
- <script setup lang="ts"></script>
26
-
27
- <style scoped lang="scss">
28
- .diagram-skeleton {
29
- margin: 0 16px 16px;
30
- border-radius: 8px;
31
- background: var(--diagram-container-bg);
32
- box-shadow: 0 1px 4px 0 #00000014;
33
- padding: 16px;
34
- overflow-clip-margin: content-box;
35
- overflow: clip;
36
-
37
- &-item-header {
38
- display: flex;
39
- column-gap: 16px;
40
-
41
- &-icon {
42
- width: 20px;
43
- height: 20px;
44
- color: var(--select-arrow);
45
-
46
- &-arrow {
47
- transform: rotate(180deg);
48
- margin-right: -4px;
49
- }
50
- }
51
-
52
- &-line {
53
- height: 20px;
54
- border-left: 1px solid var(--horizontal-line);
55
- }
56
- }
57
-
58
- &-container {
59
- display: flex;
60
- justify-content: center;
61
- min-width: 759px;
62
- padding: 48px 23.5px 24px 23.5px;
63
-
64
- //:deep(svg) {
65
- // padding: 22px 14.5px;
66
- //}
67
- }
68
-
69
- &-footer {
70
- padding-top: 16px;
71
- display: flex;
72
- justify-content: flex-end;
73
- }
74
- }
75
- </style>
@@ -1,340 +0,0 @@
1
- import type {
2
- UI_I_DataTableBody,
3
- UI_I_DataTableOptions,
4
- UI_I_DataTableHeader,
5
- } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
6
- import type { UI_I_Localization } from '~/lib/models/interfaces'
7
- import type { UI_I_ClusterTableItem } from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/lib/models/interfaces'
8
- // import {
9
- // UI_E_DeviceStatus,
10
- // UI_E_DeviceStatusChipColor,
11
- // UI_E_DeviceStatusIcon,
12
- // } from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/models/enums'
13
-
14
- // // Маппинг для статусов
15
- // const STATUS_MAPPING = {
16
- // [UI_E_DeviceStatus.Unknown]: {
17
- // icon: UI_E_DeviceStatusIcon.HelpIcon,
18
- // chipColor: UI_E_DeviceStatusChipColor.Primary,
19
- // },
20
- // [UI_E_DeviceStatus.Supported]: {
21
- // icon: UI_E_DeviceStatusIcon.StatusCheck,
22
- // chipColor: UI_E_DeviceStatusChipColor.Green,
23
- // },
24
- // [UI_E_DeviceStatus.NotSupported]: {
25
- // icon: UI_E_DeviceStatusIcon.Close,
26
- // chipColor: UI_E_DeviceStatusChipColor.Red,
27
- // },
28
- // }
29
-
30
- export const getHeaderDataFunc = (
31
- localization: UI_I_Localization
32
- ): UI_I_DataTableHeader[] => [
33
- {
34
- col: 'col0',
35
- colName: 'name',
36
- text: localization.common.name,
37
- isSortable: true,
38
- sort: 'asc',
39
- width: '180px',
40
- show: true,
41
- filter: false,
42
- },
43
- {
44
- col: 'col1',
45
- colName: 'available_cpu',
46
- text: localization.common.availableCpu,
47
- isSortable: true,
48
- sort: 'asc',
49
- width: '96px',
50
- show: true,
51
- filter: false,
52
- },
53
- {
54
- col: 'col2',
55
- colName: 'available_memory',
56
- text: localization.common.availableMemory,
57
- isSortable: true,
58
- sort: 'asc',
59
- width: '96px',
60
- show: true,
61
- filter: false,
62
- },
63
- {
64
- col: 'col3',
65
- colName: 'available_storage',
66
- text: localization.common.availableStorage,
67
- isSortable: true,
68
- sort: 'asc',
69
- width: '96px',
70
- show: true,
71
- filter: false,
72
- },
73
- {
74
- col: 'col4',
75
- colName: 'drs',
76
- text: localization.common.vSphere_DRS,
77
- isSortable: true,
78
- sort: 'asc',
79
- width: '96px',
80
- show: true,
81
- filter: false,
82
- },
83
- {
84
- col: 'col5',
85
- colName: 'ha',
86
- text: localization.common.vSphere_HA,
87
- isSortable: true,
88
- sort: 'asc',
89
- width: '96px',
90
- show: true,
91
- filter: false,
92
- },
93
- {
94
- col: 'col6',
95
- colName: 'total_cpu',
96
- text: localization.common.totalCpu,
97
- isSortable: true,
98
- sort: 'asc',
99
- width: '96px',
100
- show: true,
101
- filter: false,
102
- },
103
- {
104
- col: 'col7',
105
- colName: 'total_memory',
106
- text: localization.common.totalMemory,
107
- isSortable: true,
108
- sort: 'asc',
109
- width: '96px',
110
- show: true,
111
- filter: false,
112
- },
113
- {
114
- col: 'col8',
115
- colName: 'total_storage',
116
- text: localization.common.totalStorage,
117
- isSortable: true,
118
- sort: 'asc',
119
- width: '96px',
120
- show: true,
121
- filter: false,
122
- },
123
- {
124
- col: 'col9',
125
- colName: 'vms',
126
- text: localization.common.vms,
127
- isSortable: true,
128
- sort: 'asc',
129
- width: '96px',
130
- show: true,
131
- filter: false,
132
- },
133
- {
134
- col: 'col10',
135
- colName: 'hosts',
136
- text: localization.common.hosts,
137
- isSortable: true,
138
- sort: 'asc',
139
- width: '96px',
140
- show: true,
141
- filter: false,
142
- },
143
- {
144
- col: 'col11',
145
- colName: 'cpus',
146
- text: localization.common.cpus,
147
- isSortable: true,
148
- sort: 'asc',
149
- width: '96px',
150
- show: true,
151
- filter: false,
152
- },
153
- {
154
- col: 'col12',
155
- colName: 'datastores',
156
- text: localization.common.datastores,
157
- isSortable: true,
158
- sort: 'asc',
159
- width: '96px',
160
- show: true,
161
- filter: false,
162
- },
163
- {
164
- col: 'col13',
165
- colName: 'vsan',
166
- text: localization.common.vSAN,
167
- isSortable: true,
168
- sort: 'asc',
169
- width: '96px',
170
- show: true,
171
- filter: false,
172
- },
173
- {
174
- col: 'col14',
175
- colName: 'vc',
176
- text: localization.common.vc,
177
- isSortable: true,
178
- sort: 'asc',
179
- width: '96px',
180
- show: true,
181
- filter: false,
182
- },
183
- {
184
- col: 'col15',
185
- colName: 'evc_cpu_mode',
186
- text: localization.common.evcCpuMode,
187
- isSortable: true,
188
- sort: 'asc',
189
- width: '96px',
190
- show: true,
191
- filter: false,
192
- },
193
- {
194
- col: 'col16',
195
- colName: 'evc_graphics_mode',
196
- text: localization.common.evcGraphicsMode,
197
- isSortable: true,
198
- sort: 'asc',
199
- width: '96px',
200
- show: true,
201
- filter: false,
202
- },
203
- ]
204
- export const options: UI_I_DataTableOptions = {
205
- perPageOptions: [{ text: '10', value: 100, default: true }],
206
- isSelectable: true,
207
- selectType: 'radio',
208
- showPagination: false,
209
- showPageInfo: false,
210
- isSortable: true,
211
- server: true,
212
- isResizable: true,
213
- showSelectedRows: false,
214
- showColumnManager: true,
215
- inModal: true,
216
- inBlock: false,
217
- // isFocusable: false,
218
- // showPaginationOnTop: false,
219
- // showSearch: false,
220
- // withActions: false,
221
- // showExport: false,
222
- // withCollapse: false,
223
- }
224
-
225
- export const getBodyDataFunc = (
226
- bodyData: UI_I_ClusterTableItem[],
227
- _localization: UI_I_Localization
228
- ): UI_I_DataTableBody[] => {
229
- const { $binary }: any = useNuxtApp()
230
-
231
- return bodyData.map((cluster, index: number) => {
232
- // const statusKey = host.state
233
- // ? UI_E_DeviceStatus.Unknown
234
- // : UI_E_DeviceStatus.Supported
235
- // const statusData = {
236
- // ...STATUS_MAPPING[statusKey],
237
- // testId: `${host.name}-${index}-status`,
238
- // }
239
-
240
- return {
241
- row: index,
242
- collapse: false,
243
- isHiddenCollapse: false,
244
- collapseToggle: false,
245
-
246
- data: [
247
- {
248
- key: 'icon',
249
- col: 'col0',
250
- text: cluster.name,
251
- data: {
252
- iconClassName: 'vsphere-icon-cluster',
253
- },
254
- testId: `migrate-cluster-table-item-${index}`,
255
- },
256
-
257
- {
258
- col: 'col1',
259
- text: $binary.roundHz(cluster.available_cpu),
260
- testId: `migrate-cluster-table-item-${index}`,
261
- },
262
- {
263
- col: 'col2',
264
- text: $binary.round(cluster.available_memory),
265
- testId: `migrate-cluster-table-item-${index}`,
266
- },
267
- {
268
- col: 'col3',
269
- text: $binary.round(cluster.available_storage),
270
- testId: `migrate-cluster-table-item-${index}`,
271
- },
272
- {
273
- col: 'col4',
274
- text: cluster.drs,
275
- testId: `migrate-cluster-table-item-${index}`,
276
- },
277
- {
278
- col: 'col5',
279
- text: cluster.ha,
280
- testId: `migrate-cluster-table-item-${index}`,
281
- },
282
- {
283
- col: 'col6',
284
- text: $binary.roundHz(cluster.total_cpu),
285
- testId: `migrate-cluster-table-item-${index}`,
286
- },
287
- {
288
- col: 'col7',
289
- text: $binary.round(cluster.total_memory),
290
- testId: `migrate-cluster-table-item-${index}`,
291
- },
292
- {
293
- col: 'col8',
294
- text: $binary.round(cluster.total_storage),
295
- testId: `migrate-cluster-table-item-${index}`,
296
- },
297
- {
298
- col: 'col9',
299
- text: cluster.vms,
300
- testId: `migrate-cluster-table-item-${index}`,
301
- },
302
- {
303
- col: 'col10',
304
- text: cluster.hosts,
305
- testId: `migrate-cluster-table-item-${index}`,
306
- },
307
- {
308
- col: 'col11',
309
- text: cluster.cpus,
310
- testId: `migrate-cluster-table-item-${index}`,
311
- },
312
- {
313
- col: 'col12',
314
- text: cluster.datastores,
315
- testId: `migrate-cluster-table-item-${index}`,
316
- },
317
- {
318
- col: 'col13',
319
- text: cluster.vsan,
320
- testId: `migrate-cluster-table-item-${index}`,
321
- },
322
- {
323
- col: 'col14',
324
- text: cluster.vc,
325
- testId: `migrate-cluster-table-item-${index}`,
326
- },
327
- {
328
- col: 'col15',
329
- text: cluster.evc_cpu_mode,
330
- testId: `migrate-cluster-table-item-${index}`,
331
- },
332
- {
333
- col: 'col16',
334
- text: cluster.evc_graphics_mode,
335
- testId: `migrate-cluster-table-item-${index}`,
336
- },
337
- ],
338
- }
339
- })
340
- }