bfg-common 1.5.442 → 1.5.443

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 (115) hide show
  1. package/assets/localization/local_be.json +9 -3
  2. package/assets/localization/local_en.json +17 -11
  3. package/assets/localization/local_hy.json +9 -3
  4. package/assets/localization/local_kk.json +9 -3
  5. package/assets/localization/local_ru.json +9 -3
  6. package/assets/localization/local_zh.json +9 -3
  7. package/components/atoms/wizard/Wizard.vue +2 -2
  8. package/components/atoms/wizard/step/Step.vue +1 -1
  9. package/components/common/backup/storage/actions/add/Add.vue +5 -5
  10. package/components/common/backup/storage/actions/add/Old.vue +1 -1
  11. package/components/common/backup/storage/actions/add/lib/config/steps.ts +2 -2
  12. package/components/common/backup/storage/actions/add/lib/validations.ts +4 -4
  13. package/components/common/backup/storage/actions/add/steps/name/Name.vue +1 -1
  14. package/components/common/backup/storage/actions/add/steps/name/New.vue +1 -1
  15. package/components/common/backup/storage/actions/add/steps/name/Old.vue +1 -1
  16. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigure.vue +1 -1
  17. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureNew.vue +1 -1
  18. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureOld.vue +1 -1
  19. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  20. package/components/common/browse/lib/models/interfaces.ts +5 -5
  21. package/components/common/countdownTimer/CountdownTimer.vue +26 -15
  22. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  23. package/components/common/diagramMain/lib/models/types.ts +21 -21
  24. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  25. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  26. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
  27. package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
  28. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +5 -5
  29. package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +2 -2
  30. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +2 -2
  31. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
  32. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +5 -5
  33. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +2 -2
  34. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  35. package/components/common/diagramMain/port/Ports.vue +47 -47
  36. package/components/common/layout/theHeader/modals/{reconnect/Reconnect.vue → Reconnect.vue} +56 -43
  37. package/components/common/pages/backups/modals/Modals.vue +1 -1
  38. package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +5 -2
  39. package/components/common/pages/backups/modals/createBackup/lib/config/steps.ts +2 -2
  40. package/components/common/pages/backups/modals/restore/Restore.vue +3 -3
  41. package/components/common/pages/backups/modals/restore/lib/config/steps.ts +2 -2
  42. package/components/common/vm/actions/add/Add.vue +5 -5
  43. package/components/common/vm/actions/add/New.vue +2 -2
  44. package/components/common/vm/actions/add/Old.vue +2 -2
  45. package/components/common/vm/actions/add/lib/config/steps.ts +2 -2
  46. package/components/common/vm/actions/clone/Clone.vue +5 -5
  47. package/components/common/vm/actions/clone/lib/config/steps.ts +2 -2
  48. package/components/common/vm/actions/clone/toTemplate/ToTemplate.vue +5 -5
  49. package/components/common/vm/actions/clone/toTemplate/lib/config/steps.ts +2 -2
  50. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/maximumSize/MaximumSize.vue +23 -23
  51. package/components/common/vmt/actions/add/Add.vue +5 -5
  52. package/components/common/vmt/actions/add/New.vue +2 -3
  53. package/components/common/vmt/actions/add/Old.vue +2 -2
  54. package/components/common/vmt/actions/add/lib/config/steps.ts +2 -2
  55. package/components/common/wizards/datastore/add/Add.vue +2 -2
  56. package/components/common/wizards/datastore/add/Old.vue +2 -2
  57. package/components/common/wizards/datastore/add/lib/config/steps.ts +2 -2
  58. package/components/common/wizards/datastore/add/lib/utils.ts +1 -1
  59. package/components/common/wizards/datastore/add/lib/validations.ts +3 -3
  60. package/components/common/wizards/datastore/add/steps/_local/Local.vue +1 -1
  61. package/components/common/wizards/datastore/add/steps/_local/createName/CreateName.vue +1 -1
  62. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigure.vue +2 -1
  63. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureNew.vue +1 -1
  64. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureOld.vue +1 -1
  65. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDevice.vue +1 -1
  66. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +1 -1
  67. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceOld.vue +1 -1
  68. package/components/common/wizards/network/add/Add.vue +109 -333
  69. package/components/common/wizards/network/add/AddNew.vue +514 -0
  70. package/components/common/wizards/network/add/AddOld.vue +457 -0
  71. package/components/common/wizards/network/add/lib/config/config.ts +11 -1
  72. package/components/common/wizards/network/add/lib/config/selectConnectionTypeStep.ts +31 -0
  73. package/components/common/wizards/network/add/lib/config/selectSwitch.ts +217 -0
  74. package/components/common/wizards/network/add/lib/config/steps.ts +5 -5
  75. package/components/common/wizards/network/add/lib/models/interfaces.ts +9 -0
  76. package/components/common/wizards/network/add/steps/ConnectionSettings.vue +2 -2
  77. package/components/common/wizards/network/add/steps/IpFourSettings.vue +2 -2
  78. package/components/common/wizards/network/add/steps/PortProperties.vue +2 -2
  79. package/components/common/wizards/network/add/steps/selectConnectionType/SelectConnectionType.vue +35 -0
  80. package/components/common/wizards/network/add/steps/selectConnectionType/SelectConnectionTypeNew.vue +104 -0
  81. package/components/common/wizards/network/add/steps/selectConnectionType/SelectConnectionTypeOld.vue +80 -0
  82. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDevice.vue +183 -0
  83. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +393 -0
  84. package/components/common/wizards/network/add/steps/{SelectedTargetDevice.vue → selectTargetDevice/SelectTargetDeviceOld.vue} +42 -139
  85. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/Modals.vue +55 -0
  86. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectNetwork.vue +64 -0
  87. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectStandardSwitch.vue +64 -0
  88. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectSwitch.vue +64 -0
  89. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectNetwork.vue +163 -0
  90. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectStandardSwitch.vue +163 -0
  91. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectSwitch.vue +163 -0
  92. package/components/common/wizards/network/add/{modals → steps/selectTargetDevice/modals/old}/SelectNetwork.vue +53 -56
  93. package/components/common/wizards/network/add/{modals → steps/selectTargetDevice/modals/old}/SelectStandardSwitch.vue +37 -52
  94. package/components/common/wizards/network/add/{modals → steps/selectTargetDevice/modals/old}/SelectSwitch.vue +38 -42
  95. package/components/common/wizards/network/add/validations/connectionSettings.ts +5 -5
  96. package/components/common/wizards/network/add/validations/createStandardSwitch.ts +4 -4
  97. package/components/common/wizards/network/add/validations/ipFourSettings.ts +5 -5
  98. package/components/common/wizards/network/add/validations/networkValidation.ts +4 -4
  99. package/components/common/wizards/network/add/validations/physicalAdapter.ts +4 -4
  100. package/components/common/wizards/network/add/validations/portProperties.ts +2 -2
  101. package/components/common/wizards/network/add/validations/targetDevice.ts +11 -10
  102. package/components/common/wizards/vm/migrate/Migrate.vue +2 -2
  103. package/components/common/wizards/vm/migrate/lib/config/steps.ts +2 -2
  104. package/components/common/wizards/vm/migrate/lib/validations.ts +3 -3
  105. package/components/common/wizards/vm/migrate/select/targetServer/new/New.vue +1 -1
  106. package/components/common/wizards/vm/migrate/select/targetServer/targetServer.vue +1 -1
  107. package/package.json +2 -2
  108. package/components/atoms/wizard/lib/models/enums.ts +0 -8
  109. package/components/atoms/wizard/lib/models/interfaces.ts +0 -59
  110. package/components/atoms/wizard/lib/utils/utils.ts +0 -954
  111. package/components/common/countdownTimer/CountdownTimerNew.vue +0 -53
  112. package/components/common/countdownTimer/CountdownTimerOld.vue +0 -33
  113. package/components/common/layout/theHeader/modals/reconnect/ReconnectNew.vue +0 -74
  114. package/components/common/layout/theHeader/modals/reconnect/ReconnectOld.vue +0 -67
  115. package/components/common/wizards/network/add/steps/SelectConnectionType.vue +0 -112
@@ -1,90 +1,90 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type {
3
- UI_I_ModalTabs,
4
- UI_I_VmkernelAdapterTableData,
5
- } from '~/components/common/diagramMain/lib/models/interfaces'
6
- import type {
7
- UI_I_BodyItems,
8
- UI_I_ReadyCompleteFields,
9
- UI_I_TableHead,
10
- } from '~/components/common/wizards/network/add/lib/models/interfaces'
11
-
12
- export const vmKernelAdapterViewSettingsFunc = (
13
- localization: UI_I_Localization
14
- ): UI_I_ReadyCompleteFields[] => [
15
- {
16
- id: 0,
17
- title: localization.common.portProperties,
18
- type: 0,
19
- rows: [
20
- { name: localization.common.networkLabel, value: '' },
21
- { name: localization.common.vlanId, value: 'None (0)' },
22
- { name: localization.common.tcpIpStack, value: 'Default' },
23
- { name: localization.common.enabledServices },
24
- ],
25
- },
26
- {
27
- id: 1,
28
- title: localization.common.nicSettings,
29
- type: 0,
30
- rows: [
31
- { name: localization.common.macAddress, value: '00:50:56:62:d7:8d' },
32
- { name: localization.common.mtu, value: '1500' },
33
- ],
34
- },
35
- {
36
- id: 2,
37
- title: localization.common.ipV4Settings,
38
- type: 1,
39
- rows: [
40
- { name: localization.common.dhcp, value: 'Enabled' },
41
- { name: localization.common.ipv4address, value: '169.254.195.224 (DHCP)' },
42
- { name: localization.common.subnetMask, value: '255.255.0.0' },
43
- { name: localization.common.defaultGateway, value: '10.10.101.1' },
44
- { name: localization.common.dnsServerAddresses, value: '10.10.101.1' },
45
- ],
46
- },
47
- ]
48
-
49
- export const vmKernelAdapterViewSettingsModalTabsFunc = (
50
- localization: UI_I_Localization
51
- ): UI_I_ModalTabs[] => [
52
- { text: localization.common.properties, value: 0 },
53
- { text: localization.common.ipSettings, value: 1 },
54
- ]
55
-
56
- export const vmKernelAdapterViewSettingsTableHeadFunc = (
57
- localization: UI_I_Localization
58
- ): UI_I_TableHead[] => [
59
- { text: localization.common.device },
60
- { text: localization.common.networkLabel },
61
- { text: localization.common.switch },
62
- { text: localization.common.ipAddress },
63
- { text: localization.common.tcpIpStack },
64
- ]
65
-
66
- export const vmKernelAdapterTableBodyMapperFunc = (
67
- vmkernelAdapterData: UI_I_VmkernelAdapterTableData
68
- ): UI_I_BodyItems[] => [
69
- {
70
- editable: false,
71
- text: vmkernelAdapterData.name,
72
- id: vmkernelAdapterData.name,
73
- },
74
- {
75
- editable: false,
76
- text: vmkernelAdapterData.networkLabel,
77
- },
78
- {
79
- editable: false,
80
- text: vmkernelAdapterData.switch,
81
- },
82
- {
83
- editable: false,
84
- text: vmkernelAdapterData.ipAddress,
85
- },
86
- {
87
- editable: false,
88
- text: vmkernelAdapterData.tcp,
89
- },
90
- ]
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type {
3
+ UI_I_ModalTabs,
4
+ UI_I_VmkernelAdapterTableData,
5
+ } from '~/components/common/diagramMain/lib/models/interfaces'
6
+ import type {
7
+ UI_I_BodyItems,
8
+ UI_I_ReadyCompleteFields,
9
+ UI_I_TableHead,
10
+ } from '~/components/common/wizards/network/add/lib/models/interfaces'
11
+
12
+ export const vmKernelAdapterViewSettingsFunc = (
13
+ localization: UI_I_Localization
14
+ ): UI_I_ReadyCompleteFields[] => [
15
+ {
16
+ id: 0,
17
+ title: localization.common.portProperties,
18
+ type: 0,
19
+ rows: [
20
+ { name: localization.common.networkLabel, value: '' },
21
+ { name: localization.common.vlanId, value: 'None (0)' },
22
+ { name: localization.common.tcpIpStack, value: 'Default' },
23
+ { name: localization.common.enabledServices },
24
+ ],
25
+ },
26
+ {
27
+ id: 1,
28
+ title: localization.common.nicSettings,
29
+ type: 0,
30
+ rows: [
31
+ { name: localization.common.macAddress, value: '00:50:56:62:d7:8d' },
32
+ { name: localization.common.mtu, value: '1500' },
33
+ ],
34
+ },
35
+ {
36
+ id: 2,
37
+ title: localization.common.ipV4Settings,
38
+ type: 1,
39
+ rows: [
40
+ { name: localization.common.dhcp, value: 'Enabled' },
41
+ { name: localization.common.ipv4address, value: '169.254.195.224 (DHCP)' },
42
+ { name: localization.common.subnetMask, value: '255.255.0.0' },
43
+ { name: localization.common.defaultGateway, value: '10.10.101.1' },
44
+ { name: localization.common.dnsServerAddresses, value: '10.10.101.1' },
45
+ ],
46
+ },
47
+ ]
48
+
49
+ export const vmKernelAdapterViewSettingsModalTabsFunc = (
50
+ localization: UI_I_Localization
51
+ ): UI_I_ModalTabs[] => [
52
+ { text: localization.common.properties, value: 0 },
53
+ { text: localization.common.ipSettings, value: 1 },
54
+ ]
55
+
56
+ export const vmKernelAdapterViewSettingsTableHeadFunc = (
57
+ localization: UI_I_Localization
58
+ ): UI_I_TableHead[] => [
59
+ { text: localization.common.device },
60
+ { text: localization.common.networkLabel },
61
+ { text: localization.common.switch },
62
+ { text: localization.common.ipAddress },
63
+ { text: localization.common.tcpIpStack },
64
+ ]
65
+
66
+ export const vmKernelAdapterTableBodyMapperFunc = (
67
+ vmkernelAdapterData: UI_I_VmkernelAdapterTableData
68
+ ): UI_I_BodyItems[] => [
69
+ {
70
+ editable: false,
71
+ text: vmkernelAdapterData.name,
72
+ id: vmkernelAdapterData.name,
73
+ },
74
+ {
75
+ editable: false,
76
+ text: vmkernelAdapterData.networkLabel,
77
+ },
78
+ {
79
+ editable: false,
80
+ text: vmkernelAdapterData.switch,
81
+ },
82
+ {
83
+ editable: false,
84
+ text: vmkernelAdapterData.ipAddress,
85
+ },
86
+ {
87
+ editable: false,
88
+ text: vmkernelAdapterData.tcp,
89
+ },
90
+ ]
@@ -1,87 +1,87 @@
1
- import type {
2
- UI_I_EditFieldsData,
3
- UI_I_PortEditSendData,
4
- UI_I_PortPropertiesFields,
5
- UI_I_IpvFourSettingsFields,
6
- UI_I_SwitchEditSendData,
7
- } from '~/components/common/diagramMain/lib/models/interfaces'
8
-
9
- export const portEditDataFunc = (
10
- editFieldsData: UI_I_EditFieldsData,
11
- id: string
12
- ): UI_I_PortEditSendData => {
13
- const { $binary } = useNuxtApp()
14
-
15
- const properties = editFieldsData.properties as UI_I_PortPropertiesFields
16
- const ipvFourSettings: UI_I_IpvFourSettingsFields | undefined =
17
- editFieldsData.ipvFourSettings
18
-
19
- const body: UI_I_PortEditSendData = {
20
- id,
21
- mtu: properties?.mtu,
22
- services: {
23
- Management: !!properties?.services.management,
24
- Provisioning: !!properties?.services.provisioning,
25
- VSAN: !!properties?.services.vSAN,
26
- },
27
- tcp_stack: properties?.tcpIp,
28
- ipv4_settings: {
29
- auto: ipvFourSettings?.ipv4Settings === '0',
30
- },
31
- }
32
-
33
- if (ipvFourSettings?.ipv4Settings === '1') {
34
- body.ipv4_settings = {
35
- auto: false,
36
- ipv4: ipvFourSettings?.ipv4Address
37
- ? $binary.stringToByteIP(ipvFourSettings?.ipv4Address)
38
- : 0,
39
- mask: ipvFourSettings?.subnetMask
40
- ? $binary.stringToByteIP(ipvFourSettings?.subnetMask)
41
- : 0,
42
- gateway_override: !!ipvFourSettings?.defaultGateway?.checked,
43
- gateway: ipvFourSettings?.defaultGateway?.checked
44
- ? ipvFourSettings?.defaultGateway?.value
45
- ? $binary.stringToByteIP(ipvFourSettings?.defaultGateway?.value)
46
- : 0
47
- : 0,
48
- }
49
- }
50
-
51
- return body
52
- }
53
-
54
- export const switchEditDataFunc = (
55
- editFieldsData: UI_I_EditFieldsData,
56
- id: string
57
- ): UI_I_SwitchEditSendData => {
58
- const body: UI_I_SwitchEditSendData = {
59
- id,
60
- mtu: editFieldsData.properties?.mtu,
61
- nics: editFieldsData.teamingFailover?.adapters || {},
62
- security: {
63
- forged_transmits: editFieldsData.security?.forgedTransmits.selected,
64
- mac_change: editFieldsData.security?.macAddressChanges.selected,
65
- promiscuous: editFieldsData.security?.promiscuousMode.selected,
66
- },
67
- shaping: {},
68
- teaming: {
69
- mode: editFieldsData.teamingFailover?.loadBalancing.selected,
70
- link_detection_mode:
71
- editFieldsData.teamingFailover?.networkFailureDetection.selected,
72
- notify_switches: editFieldsData.teamingFailover?.notifySwitches.selected,
73
- failback: editFieldsData.teamingFailover?.failback.selected,
74
- },
75
- }
76
-
77
- if (editFieldsData.trafficShaping?.status?.selected) {
78
- body.shaping = {
79
- enabled: true,
80
- average_bw: editFieldsData.trafficShaping?.average,
81
- peak_bw: editFieldsData.trafficShaping?.peak,
82
- burst_size: editFieldsData.trafficShaping?.burstSize,
83
- }
84
- }
85
-
86
- return body
87
- }
1
+ import type {
2
+ UI_I_EditFieldsData,
3
+ UI_I_PortEditSendData,
4
+ UI_I_PortPropertiesFields,
5
+ UI_I_IpvFourSettingsFields,
6
+ UI_I_SwitchEditSendData,
7
+ } from '~/components/common/diagramMain/lib/models/interfaces'
8
+
9
+ export const portEditDataFunc = (
10
+ editFieldsData: UI_I_EditFieldsData,
11
+ id: string
12
+ ): UI_I_PortEditSendData => {
13
+ const { $binary } = useNuxtApp()
14
+
15
+ const properties = editFieldsData.properties as UI_I_PortPropertiesFields
16
+ const ipvFourSettings: UI_I_IpvFourSettingsFields | undefined =
17
+ editFieldsData.ipvFourSettings
18
+
19
+ const body: UI_I_PortEditSendData = {
20
+ id,
21
+ mtu: properties?.mtu,
22
+ services: {
23
+ Management: !!properties?.services.management,
24
+ Provisioning: !!properties?.services.provisioning,
25
+ VSAN: !!properties?.services.vSAN,
26
+ },
27
+ tcp_stack: properties?.tcpIp,
28
+ ipv4_settings: {
29
+ auto: ipvFourSettings?.ipv4Settings === '0',
30
+ },
31
+ }
32
+
33
+ if (ipvFourSettings?.ipv4Settings === '1') {
34
+ body.ipv4_settings = {
35
+ auto: false,
36
+ ipv4: ipvFourSettings?.ipv4Address
37
+ ? $binary.stringToByteIP(ipvFourSettings?.ipv4Address)
38
+ : 0,
39
+ mask: ipvFourSettings?.subnetMask
40
+ ? $binary.stringToByteIP(ipvFourSettings?.subnetMask)
41
+ : 0,
42
+ gateway_override: !!ipvFourSettings?.defaultGateway?.checked,
43
+ gateway: ipvFourSettings?.defaultGateway?.checked
44
+ ? ipvFourSettings?.defaultGateway?.value
45
+ ? $binary.stringToByteIP(ipvFourSettings?.defaultGateway?.value)
46
+ : 0
47
+ : 0,
48
+ }
49
+ }
50
+
51
+ return body
52
+ }
53
+
54
+ export const switchEditDataFunc = (
55
+ editFieldsData: UI_I_EditFieldsData,
56
+ id: string
57
+ ): UI_I_SwitchEditSendData => {
58
+ const body: UI_I_SwitchEditSendData = {
59
+ id,
60
+ mtu: editFieldsData.properties?.mtu,
61
+ nics: editFieldsData.teamingFailover?.adapters || {},
62
+ security: {
63
+ forged_transmits: editFieldsData.security?.forgedTransmits.selected,
64
+ mac_change: editFieldsData.security?.macAddressChanges.selected,
65
+ promiscuous: editFieldsData.security?.promiscuousMode.selected,
66
+ },
67
+ shaping: {},
68
+ teaming: {
69
+ mode: editFieldsData.teamingFailover?.loadBalancing.selected,
70
+ link_detection_mode:
71
+ editFieldsData.teamingFailover?.networkFailureDetection.selected,
72
+ notify_switches: editFieldsData.teamingFailover?.notifySwitches.selected,
73
+ failback: editFieldsData.teamingFailover?.failback.selected,
74
+ },
75
+ }
76
+
77
+ if (editFieldsData.trafficShaping?.status?.selected) {
78
+ body.shaping = {
79
+ enabled: true,
80
+ average_bw: editFieldsData.trafficShaping?.average,
81
+ peak_bw: editFieldsData.trafficShaping?.peak,
82
+ burst_size: editFieldsData.trafficShaping?.burstSize,
83
+ }
84
+ }
85
+
86
+ return body
87
+ }
@@ -1,24 +1,24 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_I_EditSettingsErrorMessage } from '~/components/common/diagramMain/lib/models/interfaces'
3
-
4
- export const validationMessagesArrayFunc = (
5
- arr: (keyof UI_I_EditSettingsErrorMessage)[],
6
- errorMessages: UI_I_EditSettingsErrorMessage
7
- ) =>
8
- arr
9
- .map((ar: keyof UI_I_EditSettingsErrorMessage) => errorMessages[ar])
10
- .filter((err) => err !== '')
11
-
12
- export const getNicSpeed = (
13
- speedInitial: number = 0,
14
- localization: UI_I_Localization,
15
- defaultValue: string = '--'
16
- ): string => {
17
- const speed = Number(speedInitial)
18
-
19
- return speed > 0
20
- ? speed >= 1000
21
- ? `${speed / 1000} ${localization.common.gbitS}`
22
- : `${speed} ${localization.common.mbits}`
23
- : defaultValue
24
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type { UI_I_EditSettingsErrorMessage } from '~/components/common/diagramMain/lib/models/interfaces'
3
+
4
+ export const validationMessagesArrayFunc = (
5
+ arr: (keyof UI_I_EditSettingsErrorMessage)[],
6
+ errorMessages: UI_I_EditSettingsErrorMessage
7
+ ) =>
8
+ arr
9
+ .map((ar: keyof UI_I_EditSettingsErrorMessage) => errorMessages[ar])
10
+ .filter((err) => err !== '')
11
+
12
+ export const getNicSpeed = (
13
+ speedInitial: number = 0,
14
+ localization: UI_I_Localization,
15
+ defaultValue: string = '--'
16
+ ): string => {
17
+ const speed = Number(speedInitial)
18
+
19
+ return speed > 0
20
+ ? speed >= 1000
21
+ ? `${speed / 1000} ${localization.common.gbitS}`
22
+ : `${speed} ${localization.common.mbits}`
23
+ : defaultValue
24
+ }
@@ -42,6 +42,11 @@
42
42
  </template>
43
43
 
44
44
  <script setup lang="ts">
45
+ import type {
46
+ UI_I_WizardStep,
47
+ UI_I_ValidationReturn,
48
+ } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
49
+ import Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
45
50
  import type { UI_I_Localization } from '~/lib/models/interfaces'
46
51
  import type {
47
52
  UI_I_Network,
@@ -52,10 +57,6 @@ import type {
52
57
  UI_I_ConnectionSettings,
53
58
  UI_I_SelectVmkernelAdapter,
54
59
  } from '~/components/common/wizards/network/add/lib/models/interfaces'
55
- import type {
56
- UI_I_WizardStep,
57
- UI_I_ValidationReturn,
58
- } from '~/components/atoms/wizard/lib/models/interfaces'
59
60
  import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
60
61
  import {
61
62
  stepsFunc,
@@ -66,7 +67,6 @@ import {
66
67
  checkConnectionSettingsSync,
67
68
  checkSelectedVmSync,
68
69
  } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations'
69
- import Wizard from '~/components/atoms/wizard/lib/utils/utils'
70
70
  import { readyCompleteInitial } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps'
71
71
 
72
72
  const props = withDefaults(
@@ -1,8 +1,8 @@
1
+ import type { UI_I_WizardStep } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
2
+ import { UI_E_WIZARD_STATUS } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/enums'
1
3
  import type { UI_I_MigrationVmkernelAdapterReadyComplete } from '~/components/common/diagramMain/lib/models/interfaces'
2
- import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
3
4
  import type { UI_I_Localization } from '~/lib/models/interfaces'
4
5
  import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
5
- import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
6
6
 
7
7
  export const stepsFunc = (
8
8
  localization: UI_I_Localization
@@ -88,14 +88,14 @@
88
88
  </template>
89
89
 
90
90
  <script setup lang="ts">
91
+ import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
92
+ import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
91
93
  import type {
92
94
  UI_I_ArbitraryObject,
93
95
  UI_I_Localization,
94
96
  } from '~/lib/models/interfaces'
95
97
  import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
96
- import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
97
98
  import { vlanIdSelectData } from '~/components/common/wizards/network/add/lib/config/config'
98
- import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
99
99
  import {
100
100
  validateNetworkConnectionSettingsLocal,
101
101
  validateVlanIdConnectionSettingsLocal,
@@ -1,14 +1,14 @@
1
- export const isIntegerNumberInRange = (
2
- value: number | string | undefined,
3
- down: number,
4
- up: number
5
- ): boolean =>
6
- isNaN(Number(value)) ||
7
- Number(value) < down ||
8
- Number(value) > up ||
9
- Number(value) !== Math.round(Number(value))
10
-
11
- export const checkVlanId = (vlanId: string): boolean =>
12
- vlanId !== 'None (0)' &&
13
- vlanId !== 'All (4095)' &&
14
- (isIntegerNumberInRange(vlanId, 0, 4095) || vlanId === '')
1
+ export const isIntegerNumberInRange = (
2
+ value: number | string | undefined,
3
+ down: number,
4
+ up: number
5
+ ): boolean =>
6
+ isNaN(Number(value)) ||
7
+ Number(value) < down ||
8
+ Number(value) > up ||
9
+ Number(value) !== Math.round(Number(value))
10
+
11
+ export const checkVlanId = (vlanId: string): boolean =>
12
+ vlanId !== 'None (0)' &&
13
+ vlanId !== 'All (4095)' &&
14
+ (isIntegerNumberInRange(vlanId, 0, 4095) || vlanId === '')
@@ -1,13 +1,13 @@
1
- import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
2
- import type { UI_I_MigrateVmkernelAdapterEmits } from '~/components/common/diagramMain/lib/models/interfaces'
3
- import type { UI_I_Localization } from '~/lib/models/interfaces'
4
1
  import type {
5
2
  UI_I_AsyncCheckReturn,
6
3
  UI_I_ValidationReturn,
7
4
  UI_I_WizardStep,
8
- } from '~/components/atoms/wizard/lib/models/interfaces'
5
+ } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
6
+ import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
7
+ import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
8
+ import type { UI_I_MigrateVmkernelAdapterEmits } from '~/components/common/diagramMain/lib/models/interfaces'
9
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
9
10
  import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
10
- import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
11
11
  import { checkVlanId } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common'
12
12
 
13
13
  export const validateVlanIdConnectionSettingsLocal = (
@@ -1,8 +1,8 @@
1
+ import type { UI_I_WizardStep, UI_I_ValidationReturn } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
2
+ import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
1
3
  import type { UI_I_SelectVmkernelAdapter } from '~/components/common/wizards/network/add/lib/models/interfaces'
2
4
  import type { UI_I_Localization } from '~/lib/models/interfaces'
3
- import type { UI_I_WizardStep, UI_I_ValidationReturn } from '~/components/atoms/wizard/lib/models/interfaces'
4
5
  import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
5
- import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
6
6
 
7
7
  export const validateSelectedVmLocal = (
8
8
  localization: UI_I_Localization,
@@ -1,19 +1,19 @@
1
- import {
2
- validateVlanIdConnectionSettingsLocal,
3
- validateNetworkConnectionSettingsLocal,
4
- checkConnectionSettingsSync,
5
- checkNetworkAsync,
6
- } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings'
7
- import {
8
- checkSelectedVmSync,
9
- validateSelectedVmLocal,
10
- } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter'
11
-
12
- export {
13
- validateVlanIdConnectionSettingsLocal,
14
- validateNetworkConnectionSettingsLocal,
15
- checkConnectionSettingsSync,
16
- checkNetworkAsync,
17
- checkSelectedVmSync,
18
- validateSelectedVmLocal,
19
- }
1
+ import {
2
+ validateVlanIdConnectionSettingsLocal,
3
+ validateNetworkConnectionSettingsLocal,
4
+ checkConnectionSettingsSync,
5
+ checkNetworkAsync,
6
+ } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings'
7
+ import {
8
+ checkSelectedVmSync,
9
+ validateSelectedVmLocal,
10
+ } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter'
11
+
12
+ export {
13
+ validateVlanIdConnectionSettingsLocal,
14
+ validateNetworkConnectionSettingsLocal,
15
+ checkConnectionSettingsSync,
16
+ checkNetworkAsync,
17
+ checkSelectedVmSync,
18
+ validateSelectedVmLocal,
19
+ }
@@ -1,47 +1,47 @@
1
- <template>
2
- <g>
3
- <template v-if="props.network.toggle">
4
- <template v-for="port in props.network.ports" :key="port.id">
5
- <common-diagram-main-port
6
- :network="props.network"
7
- :port="port"
8
- :is-dark-mode="props.isDarkMode"
9
- :selected-port="props.selectedPort"
10
- :selected-adapter="props.selectedAdapter"
11
- @select-port="onSelectPort"
12
- @show-modal="onShowModal"
13
- />
14
- </template>
15
- </template>
16
- </g>
17
- </template>
18
-
19
- <script setup lang="ts">
20
- import type {
21
- UI_I_ModalsInitialData,
22
- UI_I_NetworkFullWithPositions,
23
- UI_I_SelectedAdapter,
24
- UI_I_SelectedPort,
25
- } from '~/components/common/diagramMain/lib/models/interfaces'
26
-
27
- const props = defineProps<{
28
- network: UI_I_NetworkFullWithPositions
29
- selectedPort: UI_I_SelectedPort
30
- selectedAdapter: UI_I_SelectedAdapter
31
- isDarkMode: boolean
32
- }>()
33
-
34
- const emits = defineEmits<{
35
- (event: 'select-port', networkId: string, portId: string): void
36
- (
37
- event: 'show-modal',
38
- value: string,
39
- properties?: UI_I_ModalsInitialData
40
- ): void
41
- }>()
42
-
43
- const onSelectPort = (networkId: string, portId: string) =>
44
- emits('select-port', networkId, portId)
45
- const onShowModal = (value: string, properties?: UI_I_ModalsInitialData) =>
46
- emits('show-modal', value, properties)
47
- </script>
1
+ <template>
2
+ <g>
3
+ <template v-if="props.network.toggle">
4
+ <template v-for="port in props.network.ports" :key="port.id">
5
+ <common-diagram-main-port
6
+ :network="props.network"
7
+ :port="port"
8
+ :is-dark-mode="props.isDarkMode"
9
+ :selected-port="props.selectedPort"
10
+ :selected-adapter="props.selectedAdapter"
11
+ @select-port="onSelectPort"
12
+ @show-modal="onShowModal"
13
+ />
14
+ </template>
15
+ </template>
16
+ </g>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import type {
21
+ UI_I_ModalsInitialData,
22
+ UI_I_NetworkFullWithPositions,
23
+ UI_I_SelectedAdapter,
24
+ UI_I_SelectedPort,
25
+ } from '~/components/common/diagramMain/lib/models/interfaces'
26
+
27
+ const props = defineProps<{
28
+ network: UI_I_NetworkFullWithPositions
29
+ selectedPort: UI_I_SelectedPort
30
+ selectedAdapter: UI_I_SelectedAdapter
31
+ isDarkMode: boolean
32
+ }>()
33
+
34
+ const emits = defineEmits<{
35
+ (event: 'select-port', networkId: string, portId: string): void
36
+ (
37
+ event: 'show-modal',
38
+ value: string,
39
+ properties?: UI_I_ModalsInitialData
40
+ ): void
41
+ }>()
42
+
43
+ const onSelectPort = (networkId: string, portId: string) =>
44
+ emits('select-port', networkId, portId)
45
+ const onShowModal = (value: string, properties?: UI_I_ModalsInitialData) =>
46
+ emits('show-modal', value, properties)
47
+ </script>