bfg-common 1.2.189 → 1.2.190
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.
- package/assets/localization/local_be.json +2 -3
- package/assets/localization/local_en.json +2 -3
- package/assets/localization/local_hy.json +2 -3
- package/assets/localization/local_kk.json +2 -3
- package/assets/localization/local_ru.json +2 -3
- package/assets/localization/local_zh.json +2 -3
- package/components/atoms/table/simpleTable/SimpleTable.vue +2 -5
- package/components/atoms/wizard/Wizard.vue +4 -4
- package/components/atoms/wizard/models/interfaces.ts +3 -4
- package/components/atoms/wizard/utils/utils.ts +27 -106
- package/components/common/addNetworking/AddNetworking.vue +1123 -0
- package/components/common/addNetworking/Wizard.vue +286 -0
- package/components/common/{wizards/network/add/config/steps.ts → addNetworking/config/addNetworkingSteps.ts} +60 -107
- package/components/common/{wizards/network/add → addNetworking}/config/index.ts +16 -2
- package/components/common/{wizards/network/add → addNetworking}/config/initialData.ts +19 -4
- package/components/common/{wizards/network/add → addNetworking}/config/portPropertiesStep.ts +1 -1
- package/components/common/{wizards/network/add → addNetworking}/config/selectSwitch.ts +1 -1
- package/components/common/{wizards/network/add → addNetworking}/config/sendData.ts +1 -1
- package/components/common/addNetworking/config/temporaryData.ts +8 -0
- package/components/common/addNetworking/config/validation.ts +23 -0
- package/components/common/{wizards/network/add → addNetworking}/modals/SelectNetwork.vue +2 -2
- package/components/common/{wizards/network/add → addNetworking}/modals/SelectStandardSwitch.vue +2 -2
- package/components/common/{wizards/network/add → addNetworking}/modals/SelectSwitch.vue +2 -2
- package/components/common/addNetworking/models/enums.ts +7 -0
- package/components/common/{wizards/network/add → addNetworking}/models/interfaces.ts +37 -30
- package/components/common/addNetworking/models/types.ts +13 -0
- package/components/common/addNetworking/steps/ConnectionSettings.vue +269 -0
- package/components/common/{wizards/network/add → addNetworking}/steps/CreateStandardSwitch.vue +7 -0
- package/components/common/addNetworking/steps/Header.vue +53 -0
- package/components/common/addNetworking/steps/IpFourSettings.vue +361 -0
- package/components/common/{wizards/network/add → addNetworking}/steps/PhysicalAdapter.vue +12 -1
- package/components/common/{wizards/network/add → addNetworking}/steps/PortProperties.vue +180 -57
- package/components/common/{wizards/network/add → addNetworking}/steps/ReadyComplete.vue +10 -1
- package/components/common/{wizards/network/add → addNetworking}/steps/SelectConnectionType.vue +15 -3
- package/components/common/{wizards/network/add → addNetworking}/steps/SelectedTargetDevice.vue +212 -106
- package/components/common/addNetworking/utils/index.ts +212 -0
- package/components/common/diagramMain/DiagramMain.vue +47 -11
- package/components/common/diagramMain/modals/MigrateVmkernelAdapter.vue +603 -0
- package/components/common/diagramMain/modals/config/index.ts +6 -0
- package/components/common/diagramMain/modals/config/migrateVmkernelAdapterSteps.ts +81 -0
- package/components/common/diagramMain/modals/config/validation.ts +3 -0
- package/components/common/diagramMain/modals/config/vmKernelAdapter.ts +2 -2
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +1 -1
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +1 -1
- package/components/common/diagramMain/modals/steps/ConnectionSettings.vue +221 -0
- package/components/common/diagramMain/modals/steps/Header.vue +60 -0
- package/components/common/diagramMain/modals/{migrateVmkernelAdapter/steps → steps}/SelectVmkernelAdapter.vue +86 -24
- package/components/common/diagramMain/modals/{migrateVmkernelAdapter/steps → steps}/VmkernelAdapterReadyComplete.vue +11 -7
- package/components/common/diagramMain/models/enums.ts +7 -6
- package/components/common/diagramMain/models/interfaces.ts +29 -28
- package/components/common/diagramMain/models/types.ts +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +447 -447
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +77 -77
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +177 -177
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +181 -181
- package/package.json +1 -1
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +0 -531
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/config/steps.ts +0 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +0 -161
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +0 -47
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +0 -146
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +0 -54
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +0 -19
- package/components/common/wizards/network/add/Add.vue +0 -874
- package/components/common/wizards/network/add/models/enums.ts +0 -17
- package/components/common/wizards/network/add/models/types.ts +0 -2
- package/components/common/wizards/network/add/steps/ConnectionSettings.vue +0 -148
- package/components/common/wizards/network/add/steps/IpFourSettings.vue +0 -245
- package/components/common/wizards/network/add/utils/index.ts +0 -4
- package/components/common/wizards/network/add/validations/common.ts +0 -58
- package/components/common/wizards/network/add/validations/connectionSettings.ts +0 -75
- package/components/common/wizards/network/add/validations/createStandardSwitch.ts +0 -58
- package/components/common/wizards/network/add/validations/ipFourSettings.ts +0 -188
- package/components/common/wizards/network/add/validations/networkValidation.ts +0 -73
- package/components/common/wizards/network/add/validations/portProperties.ts +0 -87
- package/components/common/wizards/network/add/validations/targetDevice.ts +0 -113
- package/components/common/wizards/network/add/validations/validations.ts +0 -43
- /package/components/common/{wizards/network/add → addNetworking}/mappers/mappers.ts +0 -0
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { UI_I_IpFourSettings } from '~/components/common/wizards/network/add/models/interfaces'
|
|
2
|
-
import { UI_E_ValidationFields } from '~/components/common/wizards/network/add/models/enums'
|
|
3
|
-
import { UI_I_Localization } from '~/models/interfaces'
|
|
4
|
-
import type Wizard from '~/components/atoms/wizard/utils/utils'
|
|
5
|
-
import {
|
|
6
|
-
UI_I_ValidationReturn,
|
|
7
|
-
UI_I_WizardStep,
|
|
8
|
-
} from '~/components/atoms/wizard/models/interfaces'
|
|
9
|
-
import {
|
|
10
|
-
validateFieldLocal,
|
|
11
|
-
checkIfValidIP,
|
|
12
|
-
} from '~/components/common/wizards/network/add/validations/common'
|
|
13
|
-
|
|
14
|
-
export const validateAddressIpFourSettingsLocal = (
|
|
15
|
-
localization: UI_I_Localization,
|
|
16
|
-
data: UI_I_IpFourSettings,
|
|
17
|
-
wizard: Wizard
|
|
18
|
-
): void => {
|
|
19
|
-
validateFieldLocal(
|
|
20
|
-
wizard,
|
|
21
|
-
4,
|
|
22
|
-
UI_E_ValidationFields.IPV_SETTINGS_IPV,
|
|
23
|
-
[!data.static.ipFourAddress, !checkIfValidIP(data.static.ipFourAddress)],
|
|
24
|
-
[localization.ipFourAddressEmpty, localization.ipFourAddressInvalid],
|
|
25
|
-
[localization.ipFourAddressEmpty, localization.ipFourAddressInvalid]
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const validateMaskIpFourSettingsLocal = (
|
|
30
|
-
localization: UI_I_Localization,
|
|
31
|
-
data: UI_I_IpFourSettings,
|
|
32
|
-
wizard: Wizard
|
|
33
|
-
): void => {
|
|
34
|
-
validateFieldLocal(
|
|
35
|
-
wizard,
|
|
36
|
-
4,
|
|
37
|
-
UI_E_ValidationFields.IPV_SETTINGS_MASK,
|
|
38
|
-
[!data.static.subnetMask, !checkIfValidIP(data.static.subnetMask)],
|
|
39
|
-
[localization.subnetMaskEmpty, localization.subnetMaskInvalid],
|
|
40
|
-
[localization.subnetMaskEmpty, localization.subnetMaskInvalid]
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const validateGatewayIpFourSettingsLocal = (
|
|
45
|
-
localization: UI_I_Localization,
|
|
46
|
-
data: UI_I_IpFourSettings,
|
|
47
|
-
wizard: Wizard
|
|
48
|
-
): void => {
|
|
49
|
-
validateFieldLocal(
|
|
50
|
-
wizard,
|
|
51
|
-
4,
|
|
52
|
-
UI_E_ValidationFields.IPV_SETTINGS_GATEWAY,
|
|
53
|
-
[
|
|
54
|
-
data.static.defaultGateway.override && !data.static.defaultGateway.value,
|
|
55
|
-
data.static.defaultGateway.override &&
|
|
56
|
-
!checkIfValidIP(data.static.defaultGateway.value),
|
|
57
|
-
],
|
|
58
|
-
[localization.defaultGatewayEmpty, localization.defaultGatewayInvalid],
|
|
59
|
-
[localization.defaultGatewayEmpty, localization.defaultGatewayInvalid]
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export const removeIpFourSettingsValidationLocal = (wizard: Wizard): void => {
|
|
64
|
-
wizard.removeValidationLocal(4, UI_E_ValidationFields.IPV_SETTINGS_IPV)
|
|
65
|
-
wizard.removeValidationLocal(4, UI_E_ValidationFields.IPV_SETTINGS_MASK)
|
|
66
|
-
wizard.removeValidationLocal(4, UI_E_ValidationFields.IPV_SETTINGS_GATEWAY)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export const checkIpFourSettingsSync = (
|
|
70
|
-
localization: UI_I_Localization,
|
|
71
|
-
data: UI_I_IpFourSettings,
|
|
72
|
-
wizard: Wizard,
|
|
73
|
-
value: UI_I_WizardStep[]
|
|
74
|
-
): UI_I_ValidationReturn => {
|
|
75
|
-
let stepHasError = false
|
|
76
|
-
|
|
77
|
-
if (data.ipSettings === '0') {
|
|
78
|
-
value = wizard.removeValidation(
|
|
79
|
-
4,
|
|
80
|
-
UI_E_ValidationFields.IPV_SETTINGS_IPV,
|
|
81
|
-
value
|
|
82
|
-
)
|
|
83
|
-
value = wizard.removeValidation(
|
|
84
|
-
4,
|
|
85
|
-
UI_E_ValidationFields.IPV_SETTINGS_MASK,
|
|
86
|
-
value
|
|
87
|
-
)
|
|
88
|
-
value = wizard.removeValidation(
|
|
89
|
-
4,
|
|
90
|
-
UI_E_ValidationFields.IPV_SETTINGS_GATEWAY,
|
|
91
|
-
value
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
return {
|
|
95
|
-
newValue: value,
|
|
96
|
-
stepHasError: false,
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (!data.static.ipFourAddress) {
|
|
101
|
-
stepHasError = wizard.setValidation(
|
|
102
|
-
4,
|
|
103
|
-
UI_E_ValidationFields.IPV_SETTINGS_IPV,
|
|
104
|
-
{
|
|
105
|
-
fieldMessage: localization.ipFourAddressEmpty,
|
|
106
|
-
alertMessage: localization.ipFourAddressEmpty,
|
|
107
|
-
}
|
|
108
|
-
)
|
|
109
|
-
} else if (!checkIfValidIP(data.static.ipFourAddress)) {
|
|
110
|
-
stepHasError = wizard.setValidation(
|
|
111
|
-
4,
|
|
112
|
-
UI_E_ValidationFields.IPV_SETTINGS_IPV,
|
|
113
|
-
{
|
|
114
|
-
fieldMessage: localization.ipFourAddressInvalid,
|
|
115
|
-
alertMessage: localization.ipFourAddressInvalid,
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
} else if (wizard.hasMessage(4, UI_E_ValidationFields.IPV_SETTINGS_IPV)) {
|
|
119
|
-
value = wizard.removeValidation(
|
|
120
|
-
4,
|
|
121
|
-
UI_E_ValidationFields.IPV_SETTINGS_IPV,
|
|
122
|
-
value
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (!data.static.subnetMask) {
|
|
127
|
-
stepHasError = wizard.setValidation(
|
|
128
|
-
4,
|
|
129
|
-
UI_E_ValidationFields.IPV_SETTINGS_MASK,
|
|
130
|
-
{
|
|
131
|
-
fieldMessage: localization.subnetMaskEmpty,
|
|
132
|
-
alertMessage: localization.subnetMaskEmpty,
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
} else if (!checkIfValidIP(data.static.subnetMask)) {
|
|
136
|
-
stepHasError = wizard.setValidation(
|
|
137
|
-
4,
|
|
138
|
-
UI_E_ValidationFields.IPV_SETTINGS_MASK,
|
|
139
|
-
{
|
|
140
|
-
fieldMessage: localization.subnetMaskInvalid,
|
|
141
|
-
alertMessage: localization.subnetMaskInvalid,
|
|
142
|
-
}
|
|
143
|
-
)
|
|
144
|
-
} else if (wizard.hasMessage(4, UI_E_ValidationFields.IPV_SETTINGS_MASK)) {
|
|
145
|
-
value = wizard.removeValidation(
|
|
146
|
-
4,
|
|
147
|
-
UI_E_ValidationFields.IPV_SETTINGS_MASK,
|
|
148
|
-
value
|
|
149
|
-
)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (
|
|
153
|
-
data.static.defaultGateway.override &&
|
|
154
|
-
!data.static.defaultGateway.value
|
|
155
|
-
) {
|
|
156
|
-
stepHasError = wizard.setValidation(
|
|
157
|
-
4,
|
|
158
|
-
UI_E_ValidationFields.IPV_SETTINGS_GATEWAY,
|
|
159
|
-
{
|
|
160
|
-
fieldMessage: localization.defaultGatewayEmpty,
|
|
161
|
-
alertMessage: localization.defaultGatewayEmpty,
|
|
162
|
-
}
|
|
163
|
-
)
|
|
164
|
-
} else if (
|
|
165
|
-
data.static.defaultGateway.override &&
|
|
166
|
-
!checkIfValidIP(data.static.defaultGateway.value)
|
|
167
|
-
) {
|
|
168
|
-
stepHasError = wizard.setValidation(
|
|
169
|
-
4,
|
|
170
|
-
UI_E_ValidationFields.IPV_SETTINGS_GATEWAY,
|
|
171
|
-
{
|
|
172
|
-
fieldMessage: localization.defaultGatewayInvalid,
|
|
173
|
-
alertMessage: localization.defaultGatewayInvalid,
|
|
174
|
-
}
|
|
175
|
-
)
|
|
176
|
-
} else if (wizard.hasMessage(4, UI_E_ValidationFields.IPV_SETTINGS_GATEWAY)) {
|
|
177
|
-
value = wizard.removeValidation(
|
|
178
|
-
4,
|
|
179
|
-
UI_E_ValidationFields.IPV_SETTINGS_GATEWAY,
|
|
180
|
-
value
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
return {
|
|
185
|
-
newValue: value,
|
|
186
|
-
stepHasError,
|
|
187
|
-
}
|
|
188
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { UI_I_AddNetworkingEmits } from '~/components/common/wizards/network/add/models/interfaces'
|
|
2
|
-
import { UI_I_Localization } from '~/models/interfaces'
|
|
3
|
-
import type Wizard from '~/components/atoms/wizard/utils/utils'
|
|
4
|
-
import {
|
|
5
|
-
UI_I_AsyncCheckReturn, UI_I_ValidationReturn,
|
|
6
|
-
UI_I_WizardStep,
|
|
7
|
-
} from '~/components/atoms/wizard/models/interfaces'
|
|
8
|
-
|
|
9
|
-
const checkNetwork = async (
|
|
10
|
-
networkLabel: string,
|
|
11
|
-
localization: UI_I_Localization,
|
|
12
|
-
emits: UI_I_AddNetworkingEmits
|
|
13
|
-
): Promise<UI_I_AsyncCheckReturn> => {
|
|
14
|
-
if (networkLabel) {
|
|
15
|
-
return new Promise((resolve, _reject) =>
|
|
16
|
-
emits('check-network-label', networkLabel, (error_message: string) => {
|
|
17
|
-
if (error_message === '') {
|
|
18
|
-
resolve({
|
|
19
|
-
isValid: true,
|
|
20
|
-
message: '',
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (error_message !== '') {
|
|
25
|
-
resolve({
|
|
26
|
-
isValid: false,
|
|
27
|
-
message: error_message,
|
|
28
|
-
})
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
)
|
|
32
|
-
} else {
|
|
33
|
-
return {
|
|
34
|
-
isValid: false,
|
|
35
|
-
message: localization.networkLabelInvalidMessage,
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const checkNetworkAsync = async (
|
|
41
|
-
value: UI_I_WizardStep[],
|
|
42
|
-
networkLabel: string,
|
|
43
|
-
stepId: number,
|
|
44
|
-
fieldName: string,
|
|
45
|
-
emits: UI_I_AddNetworkingEmits,
|
|
46
|
-
localization: UI_I_Localization,
|
|
47
|
-
wizard: Wizard
|
|
48
|
-
): Promise<UI_I_ValidationReturn> => {
|
|
49
|
-
let stepHasError = false
|
|
50
|
-
|
|
51
|
-
wizard.setLoader(true)
|
|
52
|
-
|
|
53
|
-
const labelValidation: {
|
|
54
|
-
isValid: boolean
|
|
55
|
-
message: string
|
|
56
|
-
} = await checkNetwork(networkLabel, localization, emits)
|
|
57
|
-
|
|
58
|
-
wizard.setLoader(false)
|
|
59
|
-
|
|
60
|
-
if (!labelValidation.isValid) {
|
|
61
|
-
stepHasError = wizard.setValidation(stepId, fieldName, {
|
|
62
|
-
fieldMessage: labelValidation.message,
|
|
63
|
-
alertMessage: labelValidation.message,
|
|
64
|
-
})
|
|
65
|
-
} else if (wizard.hasMessage(stepId, fieldName)) {
|
|
66
|
-
value = wizard.removeValidation(stepId, fieldName, value)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
newValue: value,
|
|
71
|
-
stepHasError,
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { UI_I_PortProperties } from '~/components/common/wizards/network/add/models/interfaces'
|
|
2
|
-
import { UI_E_ValidationFields } from '~/components/common/wizards/network/add/models/enums'
|
|
3
|
-
import { UI_I_Localization } from '~/models/interfaces'
|
|
4
|
-
import type Wizard from '~/components/atoms/wizard/utils/utils'
|
|
5
|
-
import {UI_I_ValidationReturn, UI_I_WizardStep} from '~/components/atoms/wizard/models/interfaces'
|
|
6
|
-
import {
|
|
7
|
-
validateFieldLocal,
|
|
8
|
-
checkVlanId,
|
|
9
|
-
checkMtu,
|
|
10
|
-
} from '~/components/common/wizards/network/add/validations/common'
|
|
11
|
-
|
|
12
|
-
export const validateNetworkPortPropertiesLocal = (
|
|
13
|
-
localization: UI_I_Localization,
|
|
14
|
-
data: UI_I_PortProperties,
|
|
15
|
-
wizard: Wizard
|
|
16
|
-
): void => {
|
|
17
|
-
validateFieldLocal(
|
|
18
|
-
wizard,
|
|
19
|
-
3,
|
|
20
|
-
UI_E_ValidationFields.PORT_PROPERTIES_NETWORK,
|
|
21
|
-
data.networkLabel === '',
|
|
22
|
-
localization.networkLabelInvalidMessage,
|
|
23
|
-
localization.networkLabelInvalidMessage
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const validateVlanIdPortPropertiesLocal = (
|
|
28
|
-
localization: UI_I_Localization,
|
|
29
|
-
data: UI_I_PortProperties,
|
|
30
|
-
wizard: Wizard
|
|
31
|
-
): void => {
|
|
32
|
-
validateFieldLocal(
|
|
33
|
-
wizard,
|
|
34
|
-
3,
|
|
35
|
-
UI_E_ValidationFields.PORT_PROPERTIES_VLAN,
|
|
36
|
-
checkVlanId(data.vlanId),
|
|
37
|
-
localization.vlanIdInvalidMessage,
|
|
38
|
-
localization.vlanIdInvalidMessage
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const validateMtuPortPropertiesLocal = (
|
|
43
|
-
localization: UI_I_Localization,
|
|
44
|
-
data: UI_I_PortProperties,
|
|
45
|
-
wizard: Wizard
|
|
46
|
-
): void => {
|
|
47
|
-
validateFieldLocal(
|
|
48
|
-
wizard,
|
|
49
|
-
3,
|
|
50
|
-
UI_E_ValidationFields.PORT_PROPERTIES_MTU,
|
|
51
|
-
data.mtu.option === '1' && checkMtu(data.mtu.size),
|
|
52
|
-
localization.mtuInvalidMessage,
|
|
53
|
-
localization.mtuInvalidMessage
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const checkPortPropertiesSync = (
|
|
58
|
-
localization: UI_I_Localization,
|
|
59
|
-
data: UI_I_PortProperties,
|
|
60
|
-
wizard: Wizard,
|
|
61
|
-
value: UI_I_WizardStep[]
|
|
62
|
-
): UI_I_ValidationReturn => {
|
|
63
|
-
let stepHasError = false
|
|
64
|
-
|
|
65
|
-
if (checkVlanId(data.vlanId)) {
|
|
66
|
-
stepHasError = wizard.setValidation(3, UI_E_ValidationFields.PORT_PROPERTIES_VLAN, {
|
|
67
|
-
fieldMessage: localization.vlanIdInvalidMessage,
|
|
68
|
-
alertMessage: localization.vlanIdInvalidMessage,
|
|
69
|
-
})
|
|
70
|
-
} else if (wizard.hasMessage(3, UI_E_ValidationFields.PORT_PROPERTIES_VLAN)) {
|
|
71
|
-
value = wizard.removeValidation(3, UI_E_ValidationFields.PORT_PROPERTIES_VLAN, value)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (data.mtu.option === '1' && checkMtu(data.mtu.size)) {
|
|
75
|
-
stepHasError = wizard.setValidation(3, UI_E_ValidationFields.PORT_PROPERTIES_MTU, {
|
|
76
|
-
fieldMessage: localization.mtuInvalidMessage,
|
|
77
|
-
alertMessage: localization.mtuInvalidMessage,
|
|
78
|
-
})
|
|
79
|
-
} else if (wizard.hasMessage(3, UI_E_ValidationFields.PORT_PROPERTIES_MTU)) {
|
|
80
|
-
value = wizard.removeValidation(3, UI_E_ValidationFields.PORT_PROPERTIES_MTU, value)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return {
|
|
84
|
-
newValue: value,
|
|
85
|
-
stepHasError,
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { UI_I_TargetDevice } from '~/components/common/wizards/network/add/models/interfaces'
|
|
2
|
-
import { UI_E_ValidationFields } from '~/components/common/wizards/network/add/models/enums'
|
|
3
|
-
import { UI_I_Localization } from '~/models/interfaces'
|
|
4
|
-
import type Wizard from '~/components/atoms/wizard/utils/utils'
|
|
5
|
-
import {
|
|
6
|
-
UI_I_ValidationReturn,
|
|
7
|
-
UI_I_WizardStep,
|
|
8
|
-
} from '~/components/atoms/wizard/models/interfaces'
|
|
9
|
-
import {
|
|
10
|
-
validateFieldLocal,
|
|
11
|
-
checkMtu,
|
|
12
|
-
} from '~/components/common/wizards/network/add/validations/common'
|
|
13
|
-
|
|
14
|
-
export const validateMtuTargetDeviceLocal = (
|
|
15
|
-
localization: UI_I_Localization,
|
|
16
|
-
data: UI_I_TargetDevice,
|
|
17
|
-
wizard: Wizard
|
|
18
|
-
): void => {
|
|
19
|
-
validateFieldLocal(
|
|
20
|
-
wizard,
|
|
21
|
-
1,
|
|
22
|
-
UI_E_ValidationFields.TARGET_DEVICE_MTU,
|
|
23
|
-
data.selected === '3' && checkMtu(data.mtu || 0),
|
|
24
|
-
localization.mtuInvalidMessage,
|
|
25
|
-
localization.mtuInvalidMessage
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const checkTargetDeviceSync = (
|
|
30
|
-
localization: UI_I_Localization,
|
|
31
|
-
data: UI_I_TargetDevice,
|
|
32
|
-
wizard: Wizard,
|
|
33
|
-
value: UI_I_WizardStep[]
|
|
34
|
-
): UI_I_ValidationReturn => {
|
|
35
|
-
let stepHasError = false
|
|
36
|
-
|
|
37
|
-
if (data.selected === '0' && !data.network) {
|
|
38
|
-
stepHasError = wizard.setValidation(
|
|
39
|
-
1,
|
|
40
|
-
UI_E_ValidationFields.TARGET_DEVICE_NETWORK,
|
|
41
|
-
{
|
|
42
|
-
fieldMessage: localization.networkInvalidMessage,
|
|
43
|
-
alertMessage: localization.networkInvalidMessage,
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
} else if (
|
|
47
|
-
wizard.hasMessage(1, UI_E_ValidationFields.TARGET_DEVICE_NETWORK)
|
|
48
|
-
) {
|
|
49
|
-
value = wizard.removeValidation(
|
|
50
|
-
1,
|
|
51
|
-
UI_E_ValidationFields.TARGET_DEVICE_NETWORK,
|
|
52
|
-
value
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (data.selected === '1' && !data.standardSwitch) {
|
|
57
|
-
stepHasError = wizard.setValidation(
|
|
58
|
-
1,
|
|
59
|
-
UI_E_ValidationFields.TARGET_DEVICE_STANDARD_SWITCH,
|
|
60
|
-
{
|
|
61
|
-
fieldMessage: localization.standardSwitchInvalidMessage,
|
|
62
|
-
alertMessage: localization.standardSwitchInvalidMessage,
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
} else if (
|
|
66
|
-
wizard.hasMessage(1, UI_E_ValidationFields.TARGET_DEVICE_STANDARD_SWITCH)
|
|
67
|
-
) {
|
|
68
|
-
value = wizard.removeValidation(
|
|
69
|
-
1,
|
|
70
|
-
UI_E_ValidationFields.TARGET_DEVICE_STANDARD_SWITCH,
|
|
71
|
-
value
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (data.selected === '2' && !data.switch) {
|
|
76
|
-
stepHasError = wizard.setValidation(
|
|
77
|
-
1,
|
|
78
|
-
UI_E_ValidationFields.TARGET_DEVICE_SWITCH,
|
|
79
|
-
{
|
|
80
|
-
fieldMessage: localization.switchInvalidMessage,
|
|
81
|
-
alertMessage: localization.switchInvalidMessage,
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
} else if (wizard.hasMessage(1, UI_E_ValidationFields.TARGET_DEVICE_SWITCH)) {
|
|
85
|
-
value = wizard.removeValidation(
|
|
86
|
-
1,
|
|
87
|
-
UI_E_ValidationFields.TARGET_DEVICE_SWITCH,
|
|
88
|
-
value
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (data.selected === '3' && checkMtu(data.mtu || 0)) {
|
|
93
|
-
stepHasError = wizard.setValidation(
|
|
94
|
-
1,
|
|
95
|
-
UI_E_ValidationFields.TARGET_DEVICE_MTU,
|
|
96
|
-
{
|
|
97
|
-
fieldMessage: localization.mtuInvalidMessage,
|
|
98
|
-
alertMessage: localization.mtuInvalidMessage,
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
} else if (wizard.hasMessage(1, UI_E_ValidationFields.TARGET_DEVICE_MTU)) {
|
|
102
|
-
value = wizard.removeValidation(
|
|
103
|
-
1,
|
|
104
|
-
UI_E_ValidationFields.TARGET_DEVICE_MTU,
|
|
105
|
-
value
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return {
|
|
110
|
-
newValue: value,
|
|
111
|
-
stepHasError,
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
validateVlanIdConnectionSettingsLocal,
|
|
3
|
-
validateNetworkConnectionSettingsLocal,
|
|
4
|
-
checkConnectionSettingsSync,
|
|
5
|
-
} from '~/components/common/wizards/network/add/validations/connectionSettings'
|
|
6
|
-
import {
|
|
7
|
-
validateAddressIpFourSettingsLocal,
|
|
8
|
-
validateMaskIpFourSettingsLocal,
|
|
9
|
-
validateGatewayIpFourSettingsLocal,
|
|
10
|
-
removeIpFourSettingsValidationLocal,
|
|
11
|
-
checkIpFourSettingsSync,
|
|
12
|
-
} from '~/components/common/wizards/network/add/validations/ipFourSettings'
|
|
13
|
-
import {
|
|
14
|
-
validateNetworkPortPropertiesLocal,
|
|
15
|
-
validateVlanIdPortPropertiesLocal,
|
|
16
|
-
validateMtuPortPropertiesLocal,
|
|
17
|
-
checkPortPropertiesSync,
|
|
18
|
-
} from '~/components/common/wizards/network/add/validations/portProperties'
|
|
19
|
-
import {
|
|
20
|
-
validateMtuTargetDeviceLocal,
|
|
21
|
-
checkTargetDeviceSync,
|
|
22
|
-
} from '~/components/common/wizards/network/add/validations/targetDevice'
|
|
23
|
-
import { checkNetworkAsync } from '~/components/common/wizards/network/add/validations/networkValidation'
|
|
24
|
-
import { checkAdaptersSync } from '~/components/common/wizards/network/add/validations/createStandardSwitch'
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
validateVlanIdConnectionSettingsLocal,
|
|
28
|
-
validateNetworkConnectionSettingsLocal,
|
|
29
|
-
checkConnectionSettingsSync,
|
|
30
|
-
validateAddressIpFourSettingsLocal,
|
|
31
|
-
validateMaskIpFourSettingsLocal,
|
|
32
|
-
validateGatewayIpFourSettingsLocal,
|
|
33
|
-
removeIpFourSettingsValidationLocal,
|
|
34
|
-
checkIpFourSettingsSync,
|
|
35
|
-
validateNetworkPortPropertiesLocal,
|
|
36
|
-
validateVlanIdPortPropertiesLocal,
|
|
37
|
-
validateMtuPortPropertiesLocal,
|
|
38
|
-
checkPortPropertiesSync,
|
|
39
|
-
validateMtuTargetDeviceLocal,
|
|
40
|
-
checkTargetDeviceSync,
|
|
41
|
-
checkNetworkAsync,
|
|
42
|
-
checkAdaptersSync,
|
|
43
|
-
}
|
|
File without changes
|