bfg-common 1.5.869 → 1.5.871

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 (53) hide show
  1. package/assets/img/icons/icons-sprite-dark-5.svg +15 -2
  2. package/assets/img/icons/icons-sprite-light-5.svg +18 -5
  3. package/assets/localization/local_be.json +4 -1
  4. package/assets/localization/local_en.json +7 -4
  5. package/assets/localization/local_hy.json +4 -1
  6. package/assets/localization/local_kk.json +4 -1
  7. package/assets/localization/local_ru.json +10 -7
  8. package/assets/localization/local_zh.json +4 -1
  9. package/components/common/adapterManager/AdapterManagerNew.vue +39 -5
  10. package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +3 -2
  11. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +3 -3
  12. package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +1 -0
  13. package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +1 -0
  14. package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +10 -4
  15. package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +15 -0
  16. package/components/common/adapterManager/ui/table/TableNew.vue +3 -2
  17. package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +69 -36
  18. package/components/common/adapterManager/ui/table/header/HeaderNew.vue +5 -1
  19. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +218 -218
  20. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
  21. package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +17 -0
  22. package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +13 -8
  23. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +1 -1
  24. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/lib/config/optionsMetrics.ts +6 -1
  25. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +20 -4
  26. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/New.vue +2 -1
  27. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Old.vue +3 -2
  28. package/components/common/wizards/network/add/Add.vue +872 -872
  29. package/components/common/wizards/network/add/AddNew.vue +483 -476
  30. package/components/common/wizards/network/add/lib/config/initialData.ts +86 -86
  31. package/components/common/wizards/network/add/lib/config/selectSwitch.ts +237 -237
  32. package/components/common/wizards/network/add/lib/utils/utils.ts +9 -9
  33. package/components/common/wizards/network/add/mappers/mappers.ts +199 -199
  34. package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettings.vue +89 -84
  35. package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsNew.vue +3 -0
  36. package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsOld.vue +126 -126
  37. package/components/common/wizards/network/add/steps/createStandardSwitch/CreateStandardSwitch.vue +81 -81
  38. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettings.vue +144 -144
  39. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +48 -9
  40. package/components/common/wizards/network/add/steps/portProperties/PortProperties.vue +196 -193
  41. package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +312 -294
  42. package/components/common/wizards/network/add/steps/readyComplete/ReadyComplete.vue +24 -24
  43. package/components/common/wizards/network/add/steps/selectConnectionType/SelectConnectionType.vue +34 -34
  44. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDevice.vue +187 -187
  45. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +455 -455
  46. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectNetwork.vue +63 -63
  47. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectStandardSwitch.vue +63 -63
  48. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectSwitch.vue +63 -63
  49. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectSwitch.vue +180 -180
  50. package/components/common/wizards/network/add/validations/common.ts +30 -30
  51. package/components/common/wizards/network/add/validations/networkValidation.ts +2 -2
  52. package/components/common/wizards/network/add/validations/portProperties.ts +115 -115
  53. package/package.json +2 -2
@@ -1,199 +1,199 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type {
3
- UI_I_EditFieldsData,
4
- UI_I_OverrideValue,
5
- UI_I_PropertiesFields,
6
- UI_I_SecurityFields,
7
- UI_I_TeamingFailoverWithAdaptersFields,
8
- UI_I_TrafficShapingFields,
9
- API_UI_I_Security,
10
- API_UI_I_Teaming,
11
- UI_I_ModalsInitialData,
12
- UI_I_NetworkEditSendData,
13
- } from '~/components/common/diagramMain/lib/models/interfaces'
14
-
15
- export const networkEditDataFunc = (
16
- networkData: UI_I_EditFieldsData,
17
- initialData: UI_I_ModalsInitialData,
18
- vlanLocal: [string, string]
19
- ): UI_I_NetworkEditSendData => {
20
- const { vlanId, networkLabel } =
21
- networkData.properties as UI_I_PropertiesFields
22
- const { promiscuousMode, macAddressChanges, forgedTransmits } =
23
- networkData.security as UI_I_SecurityFields
24
- const {
25
- status: shapingStatus,
26
- average,
27
- burstSize,
28
- peak,
29
- } = networkData.trafficShaping as UI_I_TrafficShapingFields
30
- const {
31
- loadBalancing,
32
- networkFailureDetection,
33
- notifySwitches,
34
- failback,
35
- failoverOrder,
36
- adapters: { active, unused, standby },
37
- } = networkData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
38
-
39
- const vlan: number =
40
- vlanId === vlanLocal[0]
41
- ? 0
42
- : vlanId === vlanLocal[1]
43
- ? 4095
44
- : Number(vlanId)
45
-
46
- const security: API_UI_I_Security = {}
47
-
48
- if (promiscuousMode.checked) {
49
- security.promiscuous = promiscuousMode.selected
50
- } else {
51
- security.promiscuous_computed = promiscuousMode.selected
52
- }
53
-
54
- if (forgedTransmits.checked) {
55
- security.forged_transmits = forgedTransmits.selected
56
- } else {
57
- security.forged_transmits_computed = forgedTransmits.selected
58
- }
59
-
60
- if (macAddressChanges.checked) {
61
- security.mac_change = macAddressChanges.selected
62
- } else {
63
- security.mac_change_computed = macAddressChanges.selected
64
- }
65
-
66
- const shaping = {
67
- inherit: !shapingStatus.checked,
68
- enabled: !!shapingStatus.selected,
69
- average_bw: average,
70
- peak_bw: peak,
71
- burst_size: burstSize,
72
- }
73
-
74
- const teaming: API_UI_I_Teaming = {}
75
-
76
- if (loadBalancing.checked) {
77
- teaming.mode = loadBalancing.selected
78
- } else {
79
- teaming.mode_computed = loadBalancing.selected
80
- }
81
-
82
- if (networkFailureDetection.checked) {
83
- teaming.link_detection_mode = networkFailureDetection.selected
84
- } else {
85
- teaming.link_detection_mode_computed = networkFailureDetection.selected
86
- }
87
-
88
- if (notifySwitches.checked) {
89
- teaming.notify_switches = notifySwitches.selected
90
- } else {
91
- teaming.notify_switches_computed = notifySwitches.selected
92
- }
93
-
94
- if (failback.checked) {
95
- teaming.failback = failback.selected
96
- } else {
97
- teaming.failback_computed = failback.selected
98
- }
99
-
100
- return {
101
- id: initialData.id || '',
102
- name: networkLabel,
103
- switch: initialData.switch_name || '',
104
- nics: {
105
- active,
106
- standby,
107
- unused,
108
- inherit: !failoverOrder.checked,
109
- },
110
- security,
111
- shaping,
112
- vlan,
113
- teaming,
114
- }
115
- }
116
-
117
- export const networkInitialDataFunc = (
118
- networkInitialData: UI_I_ModalsInitialData,
119
- vlanLocal: [string, string]
120
- ): UI_I_NetworkEditSendData => {
121
- const prMode = networkInitialData.securityPolicy?.find(
122
- (policy) => policy.id === 'promiscuous_mode'
123
- )?.initialValue as UI_I_OverrideValue
124
-
125
- const mAChMode = networkInitialData.securityPolicy?.find(
126
- (policy) => policy.id === 'mac_change'
127
- )?.initialValue as UI_I_OverrideValue
128
-
129
- const fTMode = networkInitialData.securityPolicy?.find(
130
- (policy) => policy.id === 'forged_transmits'
131
- )?.initialValue as UI_I_OverrideValue
132
-
133
- const failback = networkInitialData.nicTeamingPolicy?.find(
134
- (team) => team.id === 'failback'
135
- )?.initialValue as UI_I_OverrideValue
136
-
137
- const notifySwitches = networkInitialData.nicTeamingPolicy?.find(
138
- (team) => team.id === 'notify_switches'
139
- )?.initialValue as UI_I_OverrideValue
140
-
141
- const loadBalancing = networkInitialData.nicTeamingPolicy?.find(
142
- (team) => team.id === 'mode'
143
- )?.initialValue as UI_I_OverrideValue
144
-
145
- const networkDetection = networkInitialData.nicTeamingPolicy?.find(
146
- (team) => team.id === 'link_detect'
147
- )?.initialValue as UI_I_OverrideValue
148
-
149
- const vlan: number =
150
- networkInitialData.vlanId === vlanLocal[0]
151
- ? 0
152
- : networkInitialData.vlanId === vlanLocal[1]
153
- ? 4095
154
- : Number(networkInitialData.vlanId)
155
-
156
- const security = {
157
- promiscuous_mode: prMode.override ? (prMode.value as string) : 'inherit',
158
- mac_change: mAChMode.override ? (mAChMode.value as string) : 'inherit',
159
- forged_transmits: fTMode.override ? (fTMode.value as string) : 'inherit',
160
- }
161
-
162
- const shaping = {
163
- inherit: !(
164
- networkInitialData.shapingPolicy?.[0].initialValue as UI_I_OverrideValue
165
- ).override,
166
- enabled: !!Number(
167
- (networkInitialData.shapingPolicy?.[0].initialValue as UI_I_OverrideValue)
168
- .value
169
- ),
170
- average_bw: networkInitialData.average_bw!,
171
- peak_bw: networkInitialData.peak_bw!,
172
- burst_size: networkInitialData.burst_size!,
173
- }
174
-
175
- const teaming = {
176
- mode: loadBalancing.override ? (loadBalancing.value as string) : 'inherit',
177
- link_detect: networkDetection.override
178
- ? (networkDetection.value as string)
179
- : 'inherit',
180
- notify_switches: notifySwitches.override
181
- ? (notifySwitches.value as string)
182
- : 'inherit',
183
- failback: failback.override ? (failback.value as string) : 'inherit',
184
- }
185
-
186
- return {
187
- name: networkInitialData.networkLabel!,
188
- vlan,
189
- security,
190
- shaping,
191
- teaming,
192
- override_nics: !!networkInitialData.nics_override,
193
- nics: {
194
- active: networkInitialData.activeAdapters as string[],
195
- standby: networkInitialData.standbyAdapters as string[],
196
- unused: networkInitialData.unusedAdapters as string[],
197
- },
198
- }
199
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type {
3
+ UI_I_EditFieldsData,
4
+ UI_I_OverrideValue,
5
+ UI_I_PropertiesFields,
6
+ UI_I_SecurityFields,
7
+ UI_I_TeamingFailoverWithAdaptersFields,
8
+ UI_I_TrafficShapingFields,
9
+ API_UI_I_Security,
10
+ API_UI_I_Teaming,
11
+ UI_I_ModalsInitialData,
12
+ UI_I_NetworkEditSendData,
13
+ } from '~/components/common/diagramMain/lib/models/interfaces'
14
+
15
+ export const networkEditDataFunc = (
16
+ networkData: UI_I_EditFieldsData,
17
+ initialData: UI_I_ModalsInitialData,
18
+ vlanLocal: [string, string]
19
+ ): UI_I_NetworkEditSendData => {
20
+ const { vlanId, networkLabel } =
21
+ networkData.properties as UI_I_PropertiesFields
22
+ const { promiscuousMode, macAddressChanges, forgedTransmits } =
23
+ networkData.security as UI_I_SecurityFields
24
+ const {
25
+ status: shapingStatus,
26
+ average,
27
+ burstSize,
28
+ peak,
29
+ } = networkData.trafficShaping as UI_I_TrafficShapingFields
30
+ const {
31
+ loadBalancing,
32
+ networkFailureDetection,
33
+ notifySwitches,
34
+ failback,
35
+ failoverOrder,
36
+ adapters: { active, unused, standby },
37
+ } = networkData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
38
+
39
+ const vlan: number =
40
+ vlanId === vlanLocal[0]
41
+ ? 0
42
+ : vlanId === vlanLocal[1]
43
+ ? 4095
44
+ : Number(vlanId)
45
+
46
+ const security: API_UI_I_Security = {}
47
+
48
+ if (promiscuousMode.checked) {
49
+ security.promiscuous = promiscuousMode.selected
50
+ } else {
51
+ security.promiscuous_computed = promiscuousMode.selected
52
+ }
53
+
54
+ if (forgedTransmits.checked) {
55
+ security.forged_transmits = forgedTransmits.selected
56
+ } else {
57
+ security.forged_transmits_computed = forgedTransmits.selected
58
+ }
59
+
60
+ if (macAddressChanges.checked) {
61
+ security.mac_change = macAddressChanges.selected
62
+ } else {
63
+ security.mac_change_computed = macAddressChanges.selected
64
+ }
65
+
66
+ const shaping = {
67
+ inherit: !shapingStatus.checked,
68
+ enabled: !!shapingStatus.selected,
69
+ average_bw: average,
70
+ peak_bw: peak,
71
+ burst_size: burstSize,
72
+ }
73
+
74
+ const teaming: API_UI_I_Teaming = {}
75
+
76
+ if (loadBalancing.checked) {
77
+ teaming.mode = loadBalancing.selected
78
+ } else {
79
+ teaming.mode_computed = loadBalancing.selected
80
+ }
81
+
82
+ if (networkFailureDetection.checked) {
83
+ teaming.link_detection_mode = networkFailureDetection.selected
84
+ } else {
85
+ teaming.link_detection_mode_computed = networkFailureDetection.selected
86
+ }
87
+
88
+ if (notifySwitches.checked) {
89
+ teaming.notify_switches = notifySwitches.selected
90
+ } else {
91
+ teaming.notify_switches_computed = notifySwitches.selected
92
+ }
93
+
94
+ if (failback.checked) {
95
+ teaming.failback = failback.selected
96
+ } else {
97
+ teaming.failback_computed = failback.selected
98
+ }
99
+
100
+ return {
101
+ id: initialData.id || '',
102
+ name: networkLabel,
103
+ switch: initialData.switch_name || '',
104
+ nics: {
105
+ active,
106
+ standby,
107
+ unused,
108
+ inherit: !failoverOrder.checked,
109
+ },
110
+ security,
111
+ shaping,
112
+ vlan,
113
+ teaming,
114
+ }
115
+ }
116
+
117
+ export const networkInitialDataFunc = (
118
+ networkInitialData: UI_I_ModalsInitialData,
119
+ vlanLocal: [string, string]
120
+ ): UI_I_NetworkEditSendData => {
121
+ const prMode = networkInitialData.securityPolicy?.find(
122
+ (policy) => policy.id === 'promiscuous_mode'
123
+ )?.initialValue as UI_I_OverrideValue
124
+
125
+ const mAChMode = networkInitialData.securityPolicy?.find(
126
+ (policy) => policy.id === 'mac_change'
127
+ )?.initialValue as UI_I_OverrideValue
128
+
129
+ const fTMode = networkInitialData.securityPolicy?.find(
130
+ (policy) => policy.id === 'forged_transmits'
131
+ )?.initialValue as UI_I_OverrideValue
132
+
133
+ const failback = networkInitialData.nicTeamingPolicy?.find(
134
+ (team) => team.id === 'failback'
135
+ )?.initialValue as UI_I_OverrideValue
136
+
137
+ const notifySwitches = networkInitialData.nicTeamingPolicy?.find(
138
+ (team) => team.id === 'notify_switches'
139
+ )?.initialValue as UI_I_OverrideValue
140
+
141
+ const loadBalancing = networkInitialData.nicTeamingPolicy?.find(
142
+ (team) => team.id === 'mode'
143
+ )?.initialValue as UI_I_OverrideValue
144
+
145
+ const networkDetection = networkInitialData.nicTeamingPolicy?.find(
146
+ (team) => team.id === 'link_detect'
147
+ )?.initialValue as UI_I_OverrideValue
148
+
149
+ const vlan: number =
150
+ networkInitialData.vlanId === vlanLocal[0]
151
+ ? 0
152
+ : networkInitialData.vlanId === vlanLocal[1]
153
+ ? 4095
154
+ : Number(networkInitialData.vlanId)
155
+
156
+ const security = {
157
+ promiscuous_mode: prMode.override ? (prMode.value as string) : 'inherit',
158
+ mac_change: mAChMode.override ? (mAChMode.value as string) : 'inherit',
159
+ forged_transmits: fTMode.override ? (fTMode.value as string) : 'inherit',
160
+ }
161
+
162
+ const shaping = {
163
+ inherit: !(
164
+ networkInitialData.shapingPolicy?.[0].initialValue as UI_I_OverrideValue
165
+ ).override,
166
+ enabled: !!Number(
167
+ (networkInitialData.shapingPolicy?.[0].initialValue as UI_I_OverrideValue)
168
+ .value
169
+ ),
170
+ average_bw: networkInitialData.average_bw!,
171
+ peak_bw: networkInitialData.peak_bw!,
172
+ burst_size: networkInitialData.burst_size!,
173
+ }
174
+
175
+ const teaming = {
176
+ mode: loadBalancing.override ? (loadBalancing.value as string) : 'inherit',
177
+ link_detect: networkDetection.override
178
+ ? (networkDetection.value as string)
179
+ : 'inherit',
180
+ notify_switches: notifySwitches.override
181
+ ? (notifySwitches.value as string)
182
+ : 'inherit',
183
+ failback: failback.override ? (failback.value as string) : 'inherit',
184
+ }
185
+
186
+ return {
187
+ name: networkInitialData.networkLabel!,
188
+ vlan,
189
+ security,
190
+ shaping,
191
+ teaming,
192
+ override_nics: !!networkInitialData.nics_override,
193
+ nics: {
194
+ active: networkInitialData.activeAdapters as string[],
195
+ standby: networkInitialData.standbyAdapters as string[],
196
+ unused: networkInitialData.unusedAdapters as string[],
197
+ },
198
+ }
199
+ }
@@ -1,84 +1,89 @@
1
- <template>
2
- <component
3
- :is="currentComponent"
4
- v-model:fields="fields"
5
- :messages-fields="props.messagesFields"
6
- :alert-messages="props.alertMessages"
7
- @hide-alert="onHideAlert"
8
- />
9
- </template>
10
-
11
- <script setup lang="ts">
12
- import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
13
- import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
14
- import type {
15
- UI_I_ArbitraryObject,
16
- UI_I_Localization,
17
- } from '~/lib/models/interfaces'
18
- import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
19
- import {
20
- validateNetworkConnectionSettingsLocal,
21
- validateVlanIdConnectionSettingsLocal,
22
- } from '~/components/common/wizards/network/add/validations/validations'
23
-
24
- const props = defineProps<{
25
- wizard: Wizard
26
- connectionSettings: UI_I_ConnectionSettings
27
- alertMessages: string[]
28
- messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
29
- }>()
30
-
31
- const { $store }: any = useNuxtApp()
32
-
33
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
34
-
35
- const currentComponent = computed(() =>
36
- isNewView.value
37
- ? defineAsyncComponent(() => import('./ConnectionSettingsNew.vue'))
38
- : defineAsyncComponent(() => import('./ConnectionSettingsOld.vue'))
39
- )
40
-
41
- const emits = defineEmits<{
42
- (
43
- event: 'change-connection-settings',
44
- connectionSettings: UI_I_ConnectionSettings
45
- ): void
46
- (event: 'hide-alert', stepId: 5): void
47
- }>()
48
-
49
- const localization = computed<UI_I_Localization>(() => useLocal())
50
-
51
- const fields = ref<UI_I_ConnectionSettings>(
52
- useDeepCopy(props.connectionSettings)
53
- )
54
-
55
- let oldFields = useDeepCopy(fields.value)
56
-
57
- watch(
58
- fields,
59
- (newFields: UI_I_ConnectionSettings) => {
60
- oldFields.vlanId !== newFields.vlanId &&
61
- validateVlanIdConnectionSettingsLocal(
62
- localization.value,
63
- newFields,
64
- props.wizard
65
- )
66
-
67
- oldFields.networkLabel !== newFields.networkLabel &&
68
- validateNetworkConnectionSettingsLocal(
69
- localization.value,
70
- newFields,
71
- props.wizard
72
- )
73
-
74
- oldFields = useDeepCopy(fields.value)
75
-
76
- emits('change-connection-settings', newFields)
77
- },
78
- { deep: true, immediate: true }
79
- )
80
-
81
- const onHideAlert = (): void => {
82
- emits('hide-alert', 5)
83
- }
84
- </script>
1
+ <template>
2
+ <component
3
+ :is="currentComponent"
4
+ v-model:fields="fields"
5
+ :is-processing="props.isProcessing"
6
+ :messages-fields="props.messagesFields"
7
+ :alert-messages="props.alertMessages"
8
+ @hide-alert="onHideAlert"
9
+ />
10
+ </template>
11
+
12
+ <script setup lang="ts">
13
+ import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
14
+ import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
15
+ import type {
16
+ UI_I_ArbitraryObject,
17
+ UI_I_Localization,
18
+ } from '~/lib/models/interfaces'
19
+ import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
20
+ import {
21
+ validateNetworkConnectionSettingsLocal,
22
+ validateVlanIdConnectionSettingsLocal,
23
+ } from '~/components/common/wizards/network/add/validations/validations'
24
+
25
+ const props = withDefaults(
26
+ defineProps<{
27
+ wizard: Wizard
28
+ connectionSettings: UI_I_ConnectionSettings
29
+ alertMessages: string[]
30
+ messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
31
+ isProcessing?: boolean
32
+ }>(),
33
+ { isProcessing: false }
34
+ )
35
+
36
+ const { $store }: any = useNuxtApp()
37
+
38
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
39
+
40
+ const currentComponent = computed(() =>
41
+ isNewView.value
42
+ ? defineAsyncComponent(() => import('./ConnectionSettingsNew.vue'))
43
+ : defineAsyncComponent(() => import('./ConnectionSettingsOld.vue'))
44
+ )
45
+
46
+ const emits = defineEmits<{
47
+ (
48
+ event: 'change-connection-settings',
49
+ connectionSettings: UI_I_ConnectionSettings
50
+ ): void
51
+ (event: 'hide-alert', stepId: 5): void
52
+ }>()
53
+
54
+ const localization = computed<UI_I_Localization>(() => useLocal())
55
+
56
+ const fields = ref<UI_I_ConnectionSettings>(
57
+ useDeepCopy(props.connectionSettings)
58
+ )
59
+
60
+ let oldFields = useDeepCopy(fields.value)
61
+
62
+ watch(
63
+ fields,
64
+ (newFields: UI_I_ConnectionSettings) => {
65
+ oldFields.vlanId !== newFields.vlanId &&
66
+ validateVlanIdConnectionSettingsLocal(
67
+ localization.value,
68
+ newFields,
69
+ props.wizard
70
+ )
71
+
72
+ oldFields.networkLabel !== newFields.networkLabel &&
73
+ validateNetworkConnectionSettingsLocal(
74
+ localization.value,
75
+ newFields,
76
+ props.wizard
77
+ )
78
+
79
+ oldFields = useDeepCopy(fields.value)
80
+
81
+ emits('change-connection-settings', newFields)
82
+ },
83
+ { deep: true, immediate: true }
84
+ )
85
+
86
+ const onHideAlert = (): void => {
87
+ emits('hide-alert', 5)
88
+ }
89
+ </script>
@@ -14,6 +14,7 @@
14
14
  :placeholder="localization.common.networkLabel"
15
15
  size="md"
16
16
  :error="props.messagesFields.name.field"
17
+ :disabled="props.isProcessing"
17
18
  />
18
19
  </div>
19
20
  </div>
@@ -34,6 +35,7 @@
34
35
  :placeholder="localization.common.vlanId"
35
36
  :error="!!props.messagesFields.vlan.field"
36
37
  :error-text="props.messagesFields.vlan.field"
38
+ :disabled="props.isProcessing"
37
39
  error-type="default"
38
40
  width="auto"
39
41
  />
@@ -54,6 +56,7 @@ import { vlanIdSelectDataFunc } from '~/components/common/wizards/network/add/li
54
56
  const props = defineProps<{
55
57
  fields: UI_I_ConnectionSettings
56
58
  messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
59
+ isProcessing: boolean
57
60
  }>()
58
61
 
59
62
  const emits = defineEmits<{