bfg-common 1.4.640 → 1.4.642

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 (135) hide show
  1. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  2. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  3. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  5. package/components/atoms/TheIcon3.vue +50 -50
  6. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  7. package/components/atoms/stack/StackBlock.vue +185 -185
  8. package/components/atoms/table/dataGrid/DataGrid.vue +1633 -1633
  9. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +222 -222
  10. package/components/common/browse/BrowseNew.vue +237 -237
  11. package/components/common/browse/BrowseOld.vue +217 -217
  12. package/components/common/browse/blocks/contents/Files.vue +37 -37
  13. package/components/common/browse/blocks/contents/FilesOld.vue +72 -72
  14. package/components/common/browse/blocks/contents/filesNew/FilesNew.vue +96 -96
  15. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  16. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  17. package/components/common/browse/lib/models/interfaces.ts +5 -5
  18. package/components/common/context/lib/models/interfaces.ts +30 -30
  19. package/components/common/context/recursion/Recursion.vue +86 -86
  20. package/components/common/context/recursion/RecursionNew.vue +199 -199
  21. package/components/common/context/recursion/RecursionOld.vue +213 -213
  22. package/components/common/diagramMain/Header.vue +211 -211
  23. package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
  24. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  25. package/components/common/diagramMain/lib/models/types.ts +21 -21
  26. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  27. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +330 -330
  28. package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
  29. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +497 -497
  30. package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +812 -812
  31. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
  32. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
  33. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
  34. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
  35. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +398 -398
  36. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
  37. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +205 -205
  38. package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +23 -23
  39. package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
  40. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  41. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
  42. package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
  43. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +537 -537
  44. package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
  45. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
  46. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
  47. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
  48. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
  49. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
  50. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  51. package/components/common/diagramMain/port/Ports.vue +47 -47
  52. package/components/common/layout/theHeader/TheHeader.vue +14 -22
  53. package/components/common/layout/theHeader/helpMenu/About.vue +85 -85
  54. package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +105 -103
  55. package/components/common/layout/theHeader/modals/RedirectLogin.vue +1 -1
  56. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +152 -152
  57. package/components/common/modals/confirmByInput/ConfirmByInput.vue +206 -206
  58. package/components/common/spiceConsole/Drawer.vue +370 -370
  59. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  60. package/components/common/split/vertical/Vertical.vue +160 -160
  61. package/components/common/vm/actions/add/Add.vue +617 -617
  62. package/components/common/vm/actions/clone/lib/config/steps.ts +129 -129
  63. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +267 -267
  64. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +269 -269
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +1 -0
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +219 -219
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/BusNew.vue +118 -118
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +161 -161
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveOld.vue +165 -165
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
  71. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +55 -55
  72. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +338 -338
  73. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +147 -147
  74. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +220 -220
  75. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/ModeOld.vue +55 -55
  76. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/SharingNew.vue +44 -44
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +281 -281
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetworkNew.vue +124 -124
  79. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/LocationOld.vue +134 -134
  80. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/New.vue +63 -63
  81. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +95 -95
  82. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  83. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressNew.vue +69 -69
  84. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressOld.vue +83 -83
  85. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +85 -85
  86. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +91 -91
  87. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +35 -35
  88. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoNew.vue +48 -48
  89. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
  90. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
  91. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
  92. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridNew.vue +30 -30
  93. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +46 -46
  94. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +56 -56
  95. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  96. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/OtherNew.vue +30 -27
  97. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/TotalVideoMemoryNew.vue +54 -54
  98. package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +145 -145
  99. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +102 -102
  100. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +75 -75
  101. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +26 -26
  102. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +57 -57
  103. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/FirmwareNew.vue +42 -42
  104. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/MenuNew.vue +25 -25
  105. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +171 -171
  106. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +50 -50
  107. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +141 -141
  108. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +140 -140
  109. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +30 -30
  110. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +30 -30
  111. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/FolderSharingNew.vue +30 -30
  112. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  113. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/KeymapNew.vue +39 -39
  114. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
  115. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +102 -102
  116. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordOld.vue +94 -94
  117. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  118. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionNew.vue +38 -38
  119. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
  120. package/components/common/vm/actions/common/select/storage/Storage.vue +130 -130
  121. package/components/common/vm/actions/common/select/storage/StorageOld.vue +129 -129
  122. package/components/common/vm/actions/editSettings/EditSettings.vue +232 -232
  123. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +183 -183
  124. package/components/common/vm/actions/editSettings/new/New.vue +177 -177
  125. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  126. package/components/common/wizards/network/add/lib/config/steps.ts +464 -464
  127. package/composables/productNameLocal.ts +30 -30
  128. package/package.json +1 -1
  129. package/plugins/date.ts +233 -233
  130. package/plugins/recursion.ts +311 -311
  131. package/public/spice-console/lib/images/bitmap.js +203 -203
  132. package/public/spice-console/network/spicechannel.js +383 -383
  133. package/store/main/mutations.ts +7 -7
  134. package/store/main/state.ts +7 -7
  135. package/store/tasks/mappers/recentTasks.ts +64 -64
@@ -1,464 +1,464 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type {
3
- UI_I_ConnectionSettings,
4
- UI_I_IpFourSettings,
5
- UI_I_PortProperties,
6
- UI_I_ReadyCompleteData,
7
- UI_I_ReadyCompleteFirstColumn,
8
- UI_I_TargetDevice,
9
- } from '~/components/common/wizards/network/add/lib/models/interfaces'
10
- import type {
11
- UI_I_DiagramData,
12
- UI_I_AdapterStatus,
13
- UI_I_Adapter,
14
- } from '~/components/common/diagramMain/lib/models/interfaces'
15
- import { UI_E_ValidationFields } from '~/components/common/wizards/network/add/lib/models/enums'
16
- import type {
17
- UI_I_WizardStep,
18
- UI_I_WizardSchemeData,
19
- } from '~/components/atoms/wizard/lib/models/interfaces'
20
- import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
21
-
22
- export const stepsFunc = (
23
- localization: UI_I_Localization
24
- ): UI_I_WizardStep[] => [
25
- {
26
- id: 0,
27
- title: localization.common.selectConnectionType,
28
- subTitle: localization.common.selectConnectionTypeToCreate,
29
- status: UI_E_WIZARD_STATUS.SELECTED,
30
- fields: {},
31
- isValid: true,
32
- testId: 'select-connection-type',
33
- // accessDynamicTestIdForStep: true,
34
- // accessDynamicTestIdForHide: true,
35
- // accessDynamicTestIdForBack: true,
36
- // accessDynamicTestIdForNext: true,
37
- },
38
- {
39
- id: 1,
40
- title: localization.common.selectTargetDevice,
41
- subTitle: localization.common.selectTargetDeviceForNewConnection,
42
- status: UI_E_WIZARD_STATUS.INACTIVE,
43
- fields: {
44
- [UI_E_ValidationFields.TARGET_DEVICE_STANDARD_SWITCH]: {
45
- alert: '',
46
- field: '',
47
- },
48
- [UI_E_ValidationFields.TARGET_DEVICE_NETWORK]: {
49
- alert: '',
50
- field: '',
51
- },
52
- [UI_E_ValidationFields.TARGET_DEVICE_SWITCH]: {
53
- alert: '',
54
- field: '',
55
- },
56
- [UI_E_ValidationFields.TARGET_DEVICE_MTU]: {
57
- alert: '',
58
- field: '',
59
- },
60
- },
61
- isValid: true,
62
- testId: 'select-target-device',
63
- },
64
- {
65
- id: 2,
66
- title: localization.common.createStandardSwitch,
67
- subTitle:
68
- localization.common.assignFreePhysicalNetworkAdaptersToTheNewSwitch,
69
- status: UI_E_WIZARD_STATUS.INACTIVE,
70
- fields: {},
71
- isValid: true,
72
- testId: 'create-standard-switch',
73
- },
74
- {
75
- id: 3,
76
- title: localization.common.portProperties,
77
- subTitle: localization.common.specifyVMkernelPortSettings,
78
- status: UI_E_WIZARD_STATUS.INACTIVE,
79
- fields: {
80
- [UI_E_ValidationFields.PORT_PROPERTIES_NETWORK]: {
81
- field: '',
82
- alert: '',
83
- },
84
- [UI_E_ValidationFields.PORT_PROPERTIES_VLAN]: {
85
- field: '',
86
- alert: '',
87
- },
88
- [UI_E_ValidationFields.PORT_PROPERTIES_MTU]: {
89
- field: '',
90
- alert: '',
91
- },
92
- },
93
- isValid: true,
94
- testId: 'port-properties',
95
- },
96
- {
97
- id: 4,
98
- title: localization.common.ipV4Settings,
99
- subTitle: localization.common.specifyVMkernelIPv4Settings,
100
- status: UI_E_WIZARD_STATUS.INACTIVE,
101
- fields: {
102
- [UI_E_ValidationFields.IPV_SETTINGS_IPV]: {
103
- field: '',
104
- alert: '',
105
- },
106
- [UI_E_ValidationFields.IPV_SETTINGS_MASK]: {
107
- field: '',
108
- alert: '',
109
- },
110
- [UI_E_ValidationFields.IPV_SETTINGS_GATEWAY]: {
111
- field: '',
112
- alert: '',
113
- },
114
- },
115
- isValid: true,
116
- testId: 'ipv4-settings',
117
- },
118
- {
119
- id: 5,
120
- title: localization.common.connectionSettings,
121
- subTitle:
122
- localization.common.useNetworkLabelsToIdentifyMigrationCompatibleTwoHosts,
123
- status: UI_E_WIZARD_STATUS.INACTIVE,
124
- fields: {
125
- [UI_E_ValidationFields.CONNECTION_SETTINGS_NETWORK]: {
126
- field: '',
127
- alert: '',
128
- },
129
- [UI_E_ValidationFields.CONNECTION_SETTINGS_VLAN]: {
130
- field: '',
131
- alert: '',
132
- },
133
- },
134
- isValid: true,
135
- testId: 'connection-settings',
136
- },
137
- {
138
- id: 6,
139
- title: localization.common.addPhysicalNetworkAdapter,
140
- subTitle: localization.common.assignPhysicalNetworkAdaptersToTheSwitch,
141
- status: UI_E_WIZARD_STATUS.INACTIVE,
142
- fields: {},
143
- isValid: true,
144
- testId: 'add-physical-network-adapter',
145
- },
146
- {
147
- id: 7,
148
- title: localization.common.readyComplete,
149
- subTitle: localization.common.reviewYourSettingsSelectionsWizard,
150
- status: UI_E_WIZARD_STATUS.INACTIVE,
151
- fields: {},
152
- isValid: true,
153
- testId: 'ready-complete',
154
- },
155
- ]
156
-
157
- export const stepsSchemeInitial: (number | UI_I_WizardSchemeData)[][] = [
158
- [0, 1, 3, 4, 7], // { stepId: 1, dataId: 'step type 1' } || { stepId: 3, dataId: 'step type 10' }
159
- [0, 1, 2, 3, 4, 7],
160
- [0, 1, 5, 7],
161
- [0, 1, 2, 5, 7],
162
- [0, 1, 6, 7],
163
- [0, 1, 2, 7],
164
- ]
165
-
166
- export const createSecondSchemeReadyCompleteFunc = (
167
- connectionSettingsValues: UI_I_ConnectionSettings,
168
- targetDeviceValues: UI_I_TargetDevice,
169
- localization: UI_I_Localization
170
- ): UI_I_ReadyCompleteData[] => [
171
- {
172
- id: 0,
173
- type: 0,
174
- rows: [
175
- {
176
- name: localization.common.virtualMachinePortGroup,
177
- value: connectionSettingsValues.networkLabel,
178
- },
179
- {
180
- name: localization.common.standardSwitch,
181
- value: targetDeviceValues.standardSwitch,
182
- },
183
- {
184
- name: localization.common.vlanId,
185
- value: connectionSettingsValues.vlanId,
186
- },
187
- ],
188
- },
189
- ]
190
-
191
- export const createThirdSchemeReadyCompleteFunc = (
192
- connectionSettingsValues: UI_I_ConnectionSettings,
193
- targetDeviceValues: UI_I_TargetDevice,
194
- addedAdapters: string[],
195
- localization: UI_I_Localization
196
- ): UI_I_ReadyCompleteData[] => [
197
- {
198
- id: 0,
199
- type: 0,
200
- rows: [
201
- {
202
- name: localization.common.newStandardSwitch,
203
- value: '--',
204
- },
205
- {
206
- name: localization.common.virtualMachinePortGroup,
207
- value: connectionSettingsValues.networkLabel,
208
- },
209
- {
210
- name: localization.common.assignedAdapters,
211
- value: addedAdapters.join(', '),
212
- },
213
- {
214
- name: localization.common.switchMTU,
215
- value: targetDeviceValues.mtu?.toString(),
216
- },
217
- {
218
- name: localization.common.vlanId,
219
- value: connectionSettingsValues.vlanId,
220
- },
221
- ],
222
- },
223
- ]
224
-
225
- const makeFirstColumnOfZeroAndFirstScheme = (
226
- targetDevice: UI_I_TargetDevice,
227
- portProperties: UI_I_PortProperties,
228
- localization: UI_I_Localization,
229
- isNewSwitch = false,
230
- addedAdapters: string[] = []
231
- ): UI_I_ReadyCompleteFirstColumn[] => {
232
- let zero: UI_I_ReadyCompleteFirstColumn[] = [
233
- {
234
- name: localization.common.newPortGroup,
235
- value: portProperties.networkLabel,
236
- },
237
- {
238
- name: localization.common.standardSwitch,
239
- value: targetDevice.standardSwitch,
240
- },
241
- {
242
- name: localization.common.vlanId,
243
- value: portProperties.vlanId,
244
- },
245
- {
246
- name: localization.common.vMotion,
247
- value: portProperties.services.vMotion
248
- ? localization.common.enabled
249
- : localization.common.disabled,
250
- },
251
- {
252
- name: localization.common.provisioning,
253
- value: portProperties.services.provisioning
254
- ? localization.common.enabled
255
- : localization.common.disabled,
256
- },
257
- // {
258
- // name: localization.common.faultToleranceLogging,
259
- // value: portProperties.services.faultToleranceLogging
260
- // ? localization.common.enabled
261
- // : localization.common.disabled,
262
- // },
263
- {
264
- name: localization.common.management,
265
- value: portProperties.services.management
266
- ? localization.common.enabled
267
- : localization.common.disabled,
268
- },
269
- // {
270
- // name: localization.common.procuratorReplication,
271
- // value: portProperties.services.replication
272
- // ? localization.common.enabled
273
- // : localization.common.disabled,
274
- // },
275
- // {
276
- // name: localization.common.procuratorReplicationNFC,
277
- // value: portProperties.services.replicationNFC
278
- // ? localization.common.enabled
279
- // : localization.common.disabled,
280
- // },
281
- {
282
- name: localization.common.vSAN,
283
- value: portProperties.services.vSAN
284
- ? localization.common.enabled
285
- : localization.common.disabled,
286
- },
287
- // {
288
- // name: localization.common.procuratorBackupNFC,
289
- // value: portProperties.services.backupNFC
290
- // ? localization.common.enabled
291
- // : localization.common.disabled,
292
- // },
293
- // {
294
- // name: localization.common.nvmEOverTCP,
295
- // value: portProperties.services.nVMeOverTCP
296
- // ? localization.common.enabled
297
- // : localization.common.disabled,
298
- // },
299
- // {
300
- // name: localization.common.nvmEOverRDMA,
301
- // value: portProperties.services.nVMeOverRDMA
302
- // ? localization.common.enabled
303
- // : localization.common.disabled,
304
- // },
305
- ]
306
- if (isNewSwitch) {
307
- zero.splice(1, 1)
308
- const newSwitchFields = [
309
- {
310
- name: localization.common.newStandardSwitch,
311
- value: '--',
312
- },
313
- {
314
- name: localization.common.assignedAdapters,
315
- value: addedAdapters.join(', '),
316
- },
317
- {
318
- name: localization.common.switchMTU,
319
- value: targetDevice.mtu?.toString(),
320
- },
321
- ]
322
-
323
- zero = [...newSwitchFields, ...zero]
324
- }
325
-
326
- return zero
327
- }
328
-
329
- export const createZeroSchemeReadyCompleteFunc = (
330
- targetDevice: UI_I_TargetDevice,
331
- portProperties: UI_I_PortProperties,
332
- ipFourSettings: UI_I_IpFourSettings,
333
- localization: UI_I_Localization,
334
- isNewSwitch = false,
335
- addedAdapters: string[] = []
336
- ): UI_I_ReadyCompleteData[] => [
337
- {
338
- id: 0,
339
- type: 0,
340
- rows: makeFirstColumnOfZeroAndFirstScheme(
341
- targetDevice,
342
- portProperties,
343
- localization,
344
- isNewSwitch,
345
- addedAdapters
346
- ),
347
- },
348
- {
349
- id: 1,
350
- type: 0,
351
- title: localization.common.nicSettings,
352
- rows: [
353
- {
354
- name: localization.common.mtu,
355
- value: portProperties.mtu.size.toString(),
356
- },
357
- {
358
- name: localization.common.tcpIpStack,
359
- value: localization[portProperties.tcp],
360
- },
361
- ],
362
- },
363
- {
364
- id: 2,
365
- type: 0,
366
- title: localization.common.ipV4Settings,
367
- rows:
368
- ipFourSettings.ipSettings === '0'
369
- ? [
370
- {
371
- name: localization.common.dhcp,
372
- value: localization.common.enabled,
373
- },
374
- ]
375
- : ipFourSettings.static.defaultGateway.override
376
- ? [
377
- {
378
- name: localization.common.ipv4address,
379
- value: ipFourSettings.static.ipFourAddress,
380
- },
381
- {
382
- name: localization.common.subnetMask,
383
- value: ipFourSettings.static.subnetMask,
384
- },
385
- {
386
- name: localization.common.defaultGatewayForIPv4,
387
- value: ipFourSettings.static.defaultGateway.value,
388
- },
389
- ]
390
- : [
391
- {
392
- name: localization.common.ipv4address,
393
- value: ipFourSettings.static.ipFourAddress,
394
- },
395
- {
396
- name: localization.common.subnetMask,
397
- value: ipFourSettings.static.subnetMask,
398
- },
399
- ],
400
- },
401
- ]
402
-
403
- export const createFirstSchemeReadyCompleteFunc = (
404
- targetDevice: UI_I_TargetDevice,
405
- portProperties: UI_I_PortProperties,
406
- ipFourSettings: UI_I_IpFourSettings,
407
- addedAdapters: string[],
408
- localization: UI_I_Localization
409
- ): UI_I_ReadyCompleteData[] =>
410
- createZeroSchemeReadyCompleteFunc(
411
- targetDevice,
412
- portProperties,
413
- ipFourSettings,
414
- localization,
415
- true,
416
- addedAdapters
417
- )
418
-
419
- export const createFourthSchemeReadyCompleteFunc = (
420
- switchId: string,
421
- diagramsData: UI_I_DiagramData[],
422
- adapterStatus: UI_I_AdapterStatus,
423
- localization: UI_I_Localization
424
- ): UI_I_ReadyCompleteData[] => {
425
- const adapters = [
426
- ...(adapterStatus.active as string[]),
427
- ...(adapterStatus.standby as string[]),
428
- ...(adapterStatus.unused as string[]),
429
- ]
430
-
431
- const switchData: UI_I_DiagramData | undefined = diagramsData.find(
432
- (diagram: UI_I_DiagramData) => diagram.id === switchId
433
- )
434
-
435
- if (!switchData) {
436
- return []
437
- }
438
-
439
- const existing: string[] =
440
- switchData.physicalAdapters?.adapters.map(
441
- (adapter: UI_I_Adapter) => adapter.id
442
- ) || []
443
-
444
- const assignedAdapters: string[] = adapters.filter(
445
- (adapterId: string) => !existing.includes(adapterId)
446
- )
447
-
448
- return [
449
- {
450
- id: 0,
451
- type: 0,
452
- rows: [
453
- {
454
- name: localization.common.standardSwitch,
455
- value: switchId,
456
- },
457
- {
458
- name: localization.common.assignedAdapters,
459
- value: assignedAdapters.join(', '),
460
- },
461
- ],
462
- },
463
- ]
464
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type {
3
+ UI_I_ConnectionSettings,
4
+ UI_I_IpFourSettings,
5
+ UI_I_PortProperties,
6
+ UI_I_ReadyCompleteData,
7
+ UI_I_ReadyCompleteFirstColumn,
8
+ UI_I_TargetDevice,
9
+ } from '~/components/common/wizards/network/add/lib/models/interfaces'
10
+ import type {
11
+ UI_I_DiagramData,
12
+ UI_I_AdapterStatus,
13
+ UI_I_Adapter,
14
+ } from '~/components/common/diagramMain/lib/models/interfaces'
15
+ import { UI_E_ValidationFields } from '~/components/common/wizards/network/add/lib/models/enums'
16
+ import type {
17
+ UI_I_WizardStep,
18
+ UI_I_WizardSchemeData,
19
+ } from '~/components/atoms/wizard/lib/models/interfaces'
20
+ import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
21
+
22
+ export const stepsFunc = (
23
+ localization: UI_I_Localization
24
+ ): UI_I_WizardStep[] => [
25
+ {
26
+ id: 0,
27
+ title: localization.common.selectConnectionType,
28
+ subTitle: localization.common.selectConnectionTypeToCreate,
29
+ status: UI_E_WIZARD_STATUS.SELECTED,
30
+ fields: {},
31
+ isValid: true,
32
+ testId: 'select-connection-type',
33
+ // accessDynamicTestIdForStep: true,
34
+ // accessDynamicTestIdForHide: true,
35
+ // accessDynamicTestIdForBack: true,
36
+ // accessDynamicTestIdForNext: true,
37
+ },
38
+ {
39
+ id: 1,
40
+ title: localization.common.selectTargetDevice,
41
+ subTitle: localization.common.selectTargetDeviceForNewConnection,
42
+ status: UI_E_WIZARD_STATUS.INACTIVE,
43
+ fields: {
44
+ [UI_E_ValidationFields.TARGET_DEVICE_STANDARD_SWITCH]: {
45
+ alert: '',
46
+ field: '',
47
+ },
48
+ [UI_E_ValidationFields.TARGET_DEVICE_NETWORK]: {
49
+ alert: '',
50
+ field: '',
51
+ },
52
+ [UI_E_ValidationFields.TARGET_DEVICE_SWITCH]: {
53
+ alert: '',
54
+ field: '',
55
+ },
56
+ [UI_E_ValidationFields.TARGET_DEVICE_MTU]: {
57
+ alert: '',
58
+ field: '',
59
+ },
60
+ },
61
+ isValid: true,
62
+ testId: 'select-target-device',
63
+ },
64
+ {
65
+ id: 2,
66
+ title: localization.common.createStandardSwitch,
67
+ subTitle:
68
+ localization.common.assignFreePhysicalNetworkAdaptersToTheNewSwitch,
69
+ status: UI_E_WIZARD_STATUS.INACTIVE,
70
+ fields: {},
71
+ isValid: true,
72
+ testId: 'create-standard-switch',
73
+ },
74
+ {
75
+ id: 3,
76
+ title: localization.common.portProperties,
77
+ subTitle: localization.common.specifyVMkernelPortSettings,
78
+ status: UI_E_WIZARD_STATUS.INACTIVE,
79
+ fields: {
80
+ [UI_E_ValidationFields.PORT_PROPERTIES_NETWORK]: {
81
+ field: '',
82
+ alert: '',
83
+ },
84
+ [UI_E_ValidationFields.PORT_PROPERTIES_VLAN]: {
85
+ field: '',
86
+ alert: '',
87
+ },
88
+ [UI_E_ValidationFields.PORT_PROPERTIES_MTU]: {
89
+ field: '',
90
+ alert: '',
91
+ },
92
+ },
93
+ isValid: true,
94
+ testId: 'port-properties',
95
+ },
96
+ {
97
+ id: 4,
98
+ title: localization.common.ipV4Settings,
99
+ subTitle: localization.common.specifyVMkernelIPv4Settings,
100
+ status: UI_E_WIZARD_STATUS.INACTIVE,
101
+ fields: {
102
+ [UI_E_ValidationFields.IPV_SETTINGS_IPV]: {
103
+ field: '',
104
+ alert: '',
105
+ },
106
+ [UI_E_ValidationFields.IPV_SETTINGS_MASK]: {
107
+ field: '',
108
+ alert: '',
109
+ },
110
+ [UI_E_ValidationFields.IPV_SETTINGS_GATEWAY]: {
111
+ field: '',
112
+ alert: '',
113
+ },
114
+ },
115
+ isValid: true,
116
+ testId: 'ipv4-settings',
117
+ },
118
+ {
119
+ id: 5,
120
+ title: localization.common.connectionSettings,
121
+ subTitle:
122
+ localization.common.useNetworkLabelsToIdentifyMigrationCompatibleTwoHosts,
123
+ status: UI_E_WIZARD_STATUS.INACTIVE,
124
+ fields: {
125
+ [UI_E_ValidationFields.CONNECTION_SETTINGS_NETWORK]: {
126
+ field: '',
127
+ alert: '',
128
+ },
129
+ [UI_E_ValidationFields.CONNECTION_SETTINGS_VLAN]: {
130
+ field: '',
131
+ alert: '',
132
+ },
133
+ },
134
+ isValid: true,
135
+ testId: 'connection-settings',
136
+ },
137
+ {
138
+ id: 6,
139
+ title: localization.common.addPhysicalNetworkAdapter,
140
+ subTitle: localization.common.assignPhysicalNetworkAdaptersToTheSwitch,
141
+ status: UI_E_WIZARD_STATUS.INACTIVE,
142
+ fields: {},
143
+ isValid: true,
144
+ testId: 'add-physical-network-adapter',
145
+ },
146
+ {
147
+ id: 7,
148
+ title: localization.common.readyComplete,
149
+ subTitle: localization.common.reviewYourSettingsSelectionsWizard,
150
+ status: UI_E_WIZARD_STATUS.INACTIVE,
151
+ fields: {},
152
+ isValid: true,
153
+ testId: 'ready-complete',
154
+ },
155
+ ]
156
+
157
+ export const stepsSchemeInitial: (number | UI_I_WizardSchemeData)[][] = [
158
+ [0, 1, 3, 4, 7], // { stepId: 1, dataId: 'step type 1' } || { stepId: 3, dataId: 'step type 10' }
159
+ [0, 1, 2, 3, 4, 7],
160
+ [0, 1, 5, 7],
161
+ [0, 1, 2, 5, 7],
162
+ [0, 1, 6, 7],
163
+ [0, 1, 2, 7],
164
+ ]
165
+
166
+ export const createSecondSchemeReadyCompleteFunc = (
167
+ connectionSettingsValues: UI_I_ConnectionSettings,
168
+ targetDeviceValues: UI_I_TargetDevice,
169
+ localization: UI_I_Localization
170
+ ): UI_I_ReadyCompleteData[] => [
171
+ {
172
+ id: 0,
173
+ type: 0,
174
+ rows: [
175
+ {
176
+ name: localization.common.virtualMachinePortGroup,
177
+ value: connectionSettingsValues.networkLabel,
178
+ },
179
+ {
180
+ name: localization.common.standardSwitch,
181
+ value: targetDeviceValues.standardSwitch,
182
+ },
183
+ {
184
+ name: localization.common.vlanId,
185
+ value: connectionSettingsValues.vlanId,
186
+ },
187
+ ],
188
+ },
189
+ ]
190
+
191
+ export const createThirdSchemeReadyCompleteFunc = (
192
+ connectionSettingsValues: UI_I_ConnectionSettings,
193
+ targetDeviceValues: UI_I_TargetDevice,
194
+ addedAdapters: string[],
195
+ localization: UI_I_Localization
196
+ ): UI_I_ReadyCompleteData[] => [
197
+ {
198
+ id: 0,
199
+ type: 0,
200
+ rows: [
201
+ {
202
+ name: localization.common.newStandardSwitch,
203
+ value: '--',
204
+ },
205
+ {
206
+ name: localization.common.virtualMachinePortGroup,
207
+ value: connectionSettingsValues.networkLabel,
208
+ },
209
+ {
210
+ name: localization.common.assignedAdapters,
211
+ value: addedAdapters.join(', '),
212
+ },
213
+ {
214
+ name: localization.common.switchMTU,
215
+ value: targetDeviceValues.mtu?.toString(),
216
+ },
217
+ {
218
+ name: localization.common.vlanId,
219
+ value: connectionSettingsValues.vlanId,
220
+ },
221
+ ],
222
+ },
223
+ ]
224
+
225
+ const makeFirstColumnOfZeroAndFirstScheme = (
226
+ targetDevice: UI_I_TargetDevice,
227
+ portProperties: UI_I_PortProperties,
228
+ localization: UI_I_Localization,
229
+ isNewSwitch = false,
230
+ addedAdapters: string[] = []
231
+ ): UI_I_ReadyCompleteFirstColumn[] => {
232
+ let zero: UI_I_ReadyCompleteFirstColumn[] = [
233
+ {
234
+ name: localization.common.newPortGroup,
235
+ value: portProperties.networkLabel,
236
+ },
237
+ {
238
+ name: localization.common.standardSwitch,
239
+ value: targetDevice.standardSwitch,
240
+ },
241
+ {
242
+ name: localization.common.vlanId,
243
+ value: portProperties.vlanId,
244
+ },
245
+ {
246
+ name: localization.common.vMotion,
247
+ value: portProperties.services.vMotion
248
+ ? localization.common.enabled
249
+ : localization.common.disabled,
250
+ },
251
+ {
252
+ name: localization.common.provisioning,
253
+ value: portProperties.services.provisioning
254
+ ? localization.common.enabled
255
+ : localization.common.disabled,
256
+ },
257
+ // {
258
+ // name: localization.common.faultToleranceLogging,
259
+ // value: portProperties.services.faultToleranceLogging
260
+ // ? localization.common.enabled
261
+ // : localization.common.disabled,
262
+ // },
263
+ {
264
+ name: localization.common.management,
265
+ value: portProperties.services.management
266
+ ? localization.common.enabled
267
+ : localization.common.disabled,
268
+ },
269
+ // {
270
+ // name: localization.common.procuratorReplication,
271
+ // value: portProperties.services.replication
272
+ // ? localization.common.enabled
273
+ // : localization.common.disabled,
274
+ // },
275
+ // {
276
+ // name: localization.common.procuratorReplicationNFC,
277
+ // value: portProperties.services.replicationNFC
278
+ // ? localization.common.enabled
279
+ // : localization.common.disabled,
280
+ // },
281
+ {
282
+ name: localization.common.vSAN,
283
+ value: portProperties.services.vSAN
284
+ ? localization.common.enabled
285
+ : localization.common.disabled,
286
+ },
287
+ // {
288
+ // name: localization.common.procuratorBackupNFC,
289
+ // value: portProperties.services.backupNFC
290
+ // ? localization.common.enabled
291
+ // : localization.common.disabled,
292
+ // },
293
+ // {
294
+ // name: localization.common.nvmEOverTCP,
295
+ // value: portProperties.services.nVMeOverTCP
296
+ // ? localization.common.enabled
297
+ // : localization.common.disabled,
298
+ // },
299
+ // {
300
+ // name: localization.common.nvmEOverRDMA,
301
+ // value: portProperties.services.nVMeOverRDMA
302
+ // ? localization.common.enabled
303
+ // : localization.common.disabled,
304
+ // },
305
+ ]
306
+ if (isNewSwitch) {
307
+ zero.splice(1, 1)
308
+ const newSwitchFields = [
309
+ {
310
+ name: localization.common.newStandardSwitch,
311
+ value: '--',
312
+ },
313
+ {
314
+ name: localization.common.assignedAdapters,
315
+ value: addedAdapters.join(', '),
316
+ },
317
+ {
318
+ name: localization.common.switchMTU,
319
+ value: targetDevice.mtu?.toString(),
320
+ },
321
+ ]
322
+
323
+ zero = [...newSwitchFields, ...zero]
324
+ }
325
+
326
+ return zero
327
+ }
328
+
329
+ export const createZeroSchemeReadyCompleteFunc = (
330
+ targetDevice: UI_I_TargetDevice,
331
+ portProperties: UI_I_PortProperties,
332
+ ipFourSettings: UI_I_IpFourSettings,
333
+ localization: UI_I_Localization,
334
+ isNewSwitch = false,
335
+ addedAdapters: string[] = []
336
+ ): UI_I_ReadyCompleteData[] => [
337
+ {
338
+ id: 0,
339
+ type: 0,
340
+ rows: makeFirstColumnOfZeroAndFirstScheme(
341
+ targetDevice,
342
+ portProperties,
343
+ localization,
344
+ isNewSwitch,
345
+ addedAdapters
346
+ ),
347
+ },
348
+ {
349
+ id: 1,
350
+ type: 0,
351
+ title: localization.common.nicSettings,
352
+ rows: [
353
+ {
354
+ name: localization.common.mtu,
355
+ value: portProperties.mtu.size.toString(),
356
+ },
357
+ {
358
+ name: localization.common.tcpIpStack,
359
+ value: localization[portProperties.tcp],
360
+ },
361
+ ],
362
+ },
363
+ {
364
+ id: 2,
365
+ type: 0,
366
+ title: localization.common.ipV4Settings,
367
+ rows:
368
+ ipFourSettings.ipSettings === '0'
369
+ ? [
370
+ {
371
+ name: localization.common.dhcp,
372
+ value: localization.common.enabled,
373
+ },
374
+ ]
375
+ : ipFourSettings.static.defaultGateway.override
376
+ ? [
377
+ {
378
+ name: localization.common.ipv4address,
379
+ value: ipFourSettings.static.ipFourAddress,
380
+ },
381
+ {
382
+ name: localization.common.subnetMask,
383
+ value: ipFourSettings.static.subnetMask,
384
+ },
385
+ {
386
+ name: localization.common.defaultGatewayForIPv4,
387
+ value: ipFourSettings.static.defaultGateway.value,
388
+ },
389
+ ]
390
+ : [
391
+ {
392
+ name: localization.common.ipv4address,
393
+ value: ipFourSettings.static.ipFourAddress,
394
+ },
395
+ {
396
+ name: localization.common.subnetMask,
397
+ value: ipFourSettings.static.subnetMask,
398
+ },
399
+ ],
400
+ },
401
+ ]
402
+
403
+ export const createFirstSchemeReadyCompleteFunc = (
404
+ targetDevice: UI_I_TargetDevice,
405
+ portProperties: UI_I_PortProperties,
406
+ ipFourSettings: UI_I_IpFourSettings,
407
+ addedAdapters: string[],
408
+ localization: UI_I_Localization
409
+ ): UI_I_ReadyCompleteData[] =>
410
+ createZeroSchemeReadyCompleteFunc(
411
+ targetDevice,
412
+ portProperties,
413
+ ipFourSettings,
414
+ localization,
415
+ true,
416
+ addedAdapters
417
+ )
418
+
419
+ export const createFourthSchemeReadyCompleteFunc = (
420
+ switchId: string,
421
+ diagramsData: UI_I_DiagramData[],
422
+ adapterStatus: UI_I_AdapterStatus,
423
+ localization: UI_I_Localization
424
+ ): UI_I_ReadyCompleteData[] => {
425
+ const adapters = [
426
+ ...(adapterStatus.active as string[]),
427
+ ...(adapterStatus.standby as string[]),
428
+ ...(adapterStatus.unused as string[]),
429
+ ]
430
+
431
+ const switchData: UI_I_DiagramData | undefined = diagramsData.find(
432
+ (diagram: UI_I_DiagramData) => diagram.id === switchId
433
+ )
434
+
435
+ if (!switchData) {
436
+ return []
437
+ }
438
+
439
+ const existing: string[] =
440
+ switchData.physicalAdapters?.adapters.map(
441
+ (adapter: UI_I_Adapter) => adapter.id
442
+ ) || []
443
+
444
+ const assignedAdapters: string[] = adapters.filter(
445
+ (adapterId: string) => !existing.includes(adapterId)
446
+ )
447
+
448
+ return [
449
+ {
450
+ id: 0,
451
+ type: 0,
452
+ rows: [
453
+ {
454
+ name: localization.common.standardSwitch,
455
+ value: switchId,
456
+ },
457
+ {
458
+ name: localization.common.assignedAdapters,
459
+ value: assignedAdapters.join(', '),
460
+ },
461
+ ],
462
+ },
463
+ ]
464
+ }