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
package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="wizard-content-container add-networking-step">
|
|
3
|
-
<div class="wizard-content wizard-content-port">
|
|
4
|
-
<atoms-alert
|
|
5
|
-
v-if="props.alertMessages.length"
|
|
6
|
-
status="alert-danger"
|
|
7
|
-
:items="props.alertMessages"
|
|
8
|
-
@remove="onHideAlert"
|
|
9
|
-
/>
|
|
10
|
-
<form>
|
|
11
|
-
<div class="horizontal-flex-container">
|
|
12
|
-
<label class="property-label-group" for="network-label">
|
|
13
|
-
{{ localization.networkLabel }}
|
|
14
|
-
</label>
|
|
15
|
-
<div class="margin-left-property-value-group">
|
|
16
|
-
<div class="property-value-group">
|
|
17
|
-
<fieldset>
|
|
18
|
-
<atoms-tooltip-error
|
|
19
|
-
:has-error="!!props.messagesFields.name.field"
|
|
20
|
-
>
|
|
21
|
-
<template #elem>
|
|
22
|
-
<input
|
|
23
|
-
id="network-label"
|
|
24
|
-
v-model="fields.networkLabel"
|
|
25
|
-
name="network-label"
|
|
26
|
-
type="text"
|
|
27
|
-
:class="[
|
|
28
|
-
'tooltip-field port-properties-network-label',
|
|
29
|
-
{
|
|
30
|
-
'danger-not-valid': props.messagesFields.name.field,
|
|
31
|
-
},
|
|
32
|
-
]"
|
|
33
|
-
@click.stop
|
|
34
|
-
/>
|
|
35
|
-
</template>
|
|
36
|
-
<template #content>
|
|
37
|
-
{{ props.messagesFields.name.field }}
|
|
38
|
-
</template>
|
|
39
|
-
</atoms-tooltip-error>
|
|
40
|
-
</fieldset>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<div class="horizontal-flex-container port-properties-padding">
|
|
46
|
-
<label class="property-label-group">
|
|
47
|
-
{{ localization.vlanId }}
|
|
48
|
-
</label>
|
|
49
|
-
<div class="margin-left-property-value-group">
|
|
50
|
-
<div class="property-value-group">
|
|
51
|
-
<fieldset>
|
|
52
|
-
<div class="flex-align-center">
|
|
53
|
-
<atoms-combobox
|
|
54
|
-
v-model.trim="fields.vlanId"
|
|
55
|
-
:items="vlanIdSelectData"
|
|
56
|
-
:class="{
|
|
57
|
-
'danger-not-valid': props.messagesFields.vlan.field,
|
|
58
|
-
}"
|
|
59
|
-
@click.stop
|
|
60
|
-
/>
|
|
61
|
-
<div
|
|
62
|
-
v-show="props.messagesFields.vlan.field"
|
|
63
|
-
class="flex-align-center"
|
|
64
|
-
>
|
|
65
|
-
<div class="tooltip">
|
|
66
|
-
<atoms-the-icon
|
|
67
|
-
width="24px"
|
|
68
|
-
height="24px"
|
|
69
|
-
class="is-error tooltip-trigger"
|
|
70
|
-
name="info"
|
|
71
|
-
/>
|
|
72
|
-
<div class="tooltip-top-left tooltip-content error">
|
|
73
|
-
{{ props.messagesFields.vlan.field }}
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</fieldset>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</form>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
|
|
87
|
-
<script setup lang="ts">
|
|
88
|
-
import { UI_I_ArbitraryObject, UI_I_Localization } from '~/models/interfaces'
|
|
89
|
-
import { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/models/interfaces'
|
|
90
|
-
import { vlanIdSelectData } from '~/components/common/wizards/network/add/config'
|
|
91
|
-
import { UI_I_ErrorFields } from '~/components/atoms/wizard/models/interfaces'
|
|
92
|
-
import type Wizard from '~/components/atoms/wizard/utils/utils';
|
|
93
|
-
import {
|
|
94
|
-
validateNetworkConnectionSettingsLocal,
|
|
95
|
-
validateVlanIdConnectionSettingsLocal,
|
|
96
|
-
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations'
|
|
97
|
-
|
|
98
|
-
const props = defineProps<{
|
|
99
|
-
connectionSettings: UI_I_ConnectionSettings
|
|
100
|
-
alertMessages: string[]
|
|
101
|
-
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
102
|
-
wizard: Wizard
|
|
103
|
-
}>()
|
|
104
|
-
|
|
105
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
106
|
-
|
|
107
|
-
const emits = defineEmits<{
|
|
108
|
-
(
|
|
109
|
-
event: 'change-connection-settings',
|
|
110
|
-
connectionSettings: UI_I_ConnectionSettings
|
|
111
|
-
): void
|
|
112
|
-
(event: 'hide-alert', stepId: 1): void
|
|
113
|
-
}>()
|
|
114
|
-
|
|
115
|
-
const fields = ref<UI_I_ConnectionSettings>(useDeepCopy(props.connectionSettings))
|
|
116
|
-
|
|
117
|
-
let oldFields = useDeepCopy(fields.value)
|
|
118
|
-
|
|
119
|
-
watch(
|
|
120
|
-
fields,
|
|
121
|
-
(newFields: UI_I_ConnectionSettings) => {
|
|
122
|
-
oldFields.vlanId !== newFields.vlanId &&
|
|
123
|
-
validateVlanIdConnectionSettingsLocal(
|
|
124
|
-
localization.value,
|
|
125
|
-
newFields,
|
|
126
|
-
props.wizard
|
|
127
|
-
)
|
|
128
|
-
|
|
129
|
-
oldFields.networkLabel !== newFields.networkLabel &&
|
|
130
|
-
validateNetworkConnectionSettingsLocal(
|
|
131
|
-
localization.value,
|
|
132
|
-
newFields,
|
|
133
|
-
props.wizard
|
|
134
|
-
)
|
|
135
|
-
|
|
136
|
-
oldFields = useDeepCopy(fields.value)
|
|
137
|
-
|
|
138
|
-
emits('change-connection-settings', newFields)
|
|
139
|
-
},
|
|
140
|
-
{ deep: true, immediate: true }
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
const onHideAlert = (): void => {
|
|
144
|
-
emits('hide-alert', 1)
|
|
145
|
-
}
|
|
146
|
-
</script>
|
|
147
|
-
|
|
148
|
-
<style scoped lang="scss">
|
|
149
|
-
.wizard-content-container {
|
|
150
|
-
display: flex;
|
|
151
|
-
flex-direction: column;
|
|
152
|
-
align-items: stretch;
|
|
153
|
-
flex: 1 1 100%;
|
|
154
|
-
box-sizing: border-box;
|
|
155
|
-
padding: 16px 15px 10px 10px;
|
|
156
|
-
overflow-y: auto;
|
|
157
|
-
color: #333;
|
|
158
|
-
order: 2;
|
|
159
|
-
width: 100%;
|
|
160
|
-
}
|
|
161
|
-
</style>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type Wizard from '~/components/atoms/wizard/utils/utils'
|
|
2
|
-
|
|
3
|
-
export const isIntegerNumberInRange = (
|
|
4
|
-
value: number | string | undefined,
|
|
5
|
-
down: number,
|
|
6
|
-
up: number
|
|
7
|
-
): boolean =>
|
|
8
|
-
isNaN(Number(value)) ||
|
|
9
|
-
Number(value) < down ||
|
|
10
|
-
Number(value) > up ||
|
|
11
|
-
Number(value) !== Math.round(Number(value))
|
|
12
|
-
|
|
13
|
-
export const checkVlanId = (vlanId: string): boolean =>
|
|
14
|
-
vlanId !== 'None (0)' &&
|
|
15
|
-
vlanId !== 'All (4095)' &&
|
|
16
|
-
(isIntegerNumberInRange(vlanId, 0, 4095) || vlanId === '')
|
|
17
|
-
|
|
18
|
-
export const validateFieldLocal = (
|
|
19
|
-
wizard: Wizard,
|
|
20
|
-
stepId: number,
|
|
21
|
-
field: string,
|
|
22
|
-
rule: boolean | boolean[],
|
|
23
|
-
fieldMessage: string | string[],
|
|
24
|
-
alertMessage: string | string[]
|
|
25
|
-
): void => {
|
|
26
|
-
if (typeof rule === 'boolean') {
|
|
27
|
-
if (rule) {
|
|
28
|
-
wizard.setValidation(stepId, field, {
|
|
29
|
-
fieldMessage: fieldMessage as string,
|
|
30
|
-
alertMessage: alertMessage as string,
|
|
31
|
-
})
|
|
32
|
-
} else if (wizard.hasMessage(stepId, field)) {
|
|
33
|
-
wizard.removeValidationLocal(stepId, field)
|
|
34
|
-
}
|
|
35
|
-
} else {
|
|
36
|
-
const ruleIndex = rule.indexOf(true)
|
|
37
|
-
|
|
38
|
-
if (ruleIndex !== -1) {
|
|
39
|
-
wizard.setValidation(stepId, field, {
|
|
40
|
-
fieldMessage: fieldMessage[ruleIndex],
|
|
41
|
-
alertMessage: alertMessage[ruleIndex],
|
|
42
|
-
})
|
|
43
|
-
} else if (wizard.hasMessage(stepId, field)) {
|
|
44
|
-
wizard.removeValidationLocal(stepId, field)
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/models/interfaces'
|
|
2
|
-
import { UI_I_MigrateVmkernelAdapterEmits } from '~/components/common/diagramMain/models/interfaces'
|
|
3
|
-
import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/models/enums'
|
|
4
|
-
import { UI_I_Localization } from '~/models/interfaces'
|
|
5
|
-
import type Wizard from '~/components/atoms/wizard/utils/utils'
|
|
6
|
-
import {
|
|
7
|
-
UI_I_AsyncCheckReturn,
|
|
8
|
-
UI_I_ValidationReturn,
|
|
9
|
-
UI_I_WizardStep,
|
|
10
|
-
} from '~/components/atoms/wizard/models/interfaces'
|
|
11
|
-
import {
|
|
12
|
-
validateFieldLocal,
|
|
13
|
-
checkVlanId,
|
|
14
|
-
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common'
|
|
15
|
-
|
|
16
|
-
export const validateVlanIdConnectionSettingsLocal = (
|
|
17
|
-
localization: UI_I_Localization,
|
|
18
|
-
data: UI_I_ConnectionSettings,
|
|
19
|
-
wizard: Wizard
|
|
20
|
-
): void => {
|
|
21
|
-
validateFieldLocal(
|
|
22
|
-
wizard,
|
|
23
|
-
1,
|
|
24
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
25
|
-
checkVlanId(data.vlanId),
|
|
26
|
-
localization.vlanIdInvalidMessage,
|
|
27
|
-
localization.vlanIdInvalidMessage
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const validateNetworkConnectionSettingsLocal = (
|
|
32
|
-
localization: UI_I_Localization,
|
|
33
|
-
data: UI_I_ConnectionSettings,
|
|
34
|
-
wizard: Wizard
|
|
35
|
-
): void => {
|
|
36
|
-
validateFieldLocal(
|
|
37
|
-
wizard,
|
|
38
|
-
1,
|
|
39
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_NETWORK,
|
|
40
|
-
data.networkLabel === '',
|
|
41
|
-
localization.networkLabelInvalidMessage,
|
|
42
|
-
localization.networkLabelInvalidMessage
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export const checkConnectionSettingsSync = (
|
|
47
|
-
localization: UI_I_Localization,
|
|
48
|
-
data: UI_I_ConnectionSettings,
|
|
49
|
-
wizard: Wizard,
|
|
50
|
-
value: UI_I_WizardStep[]
|
|
51
|
-
): UI_I_ValidationReturn => {
|
|
52
|
-
let stepHasError = false
|
|
53
|
-
|
|
54
|
-
if (checkVlanId(data.vlanId)) {
|
|
55
|
-
stepHasError = wizard.setValidation(
|
|
56
|
-
1,
|
|
57
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
58
|
-
{
|
|
59
|
-
fieldMessage: localization.vlanIdInvalidMessage,
|
|
60
|
-
alertMessage: localization.vlanIdInvalidMessage,
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
} else if (
|
|
64
|
-
wizard.hasMessage(
|
|
65
|
-
1,
|
|
66
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN
|
|
67
|
-
)
|
|
68
|
-
) {
|
|
69
|
-
value = wizard.removeValidation(
|
|
70
|
-
1,
|
|
71
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
72
|
-
value
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
newValue: value,
|
|
78
|
-
stepHasError,
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const checkNetwork = async (
|
|
83
|
-
networkLabel: string,
|
|
84
|
-
localization: UI_I_Localization,
|
|
85
|
-
emits: UI_I_MigrateVmkernelAdapterEmits
|
|
86
|
-
): Promise<UI_I_AsyncCheckReturn> => {
|
|
87
|
-
if (networkLabel) {
|
|
88
|
-
return new Promise((resolve, _reject) =>
|
|
89
|
-
emits('check-network-label', networkLabel, (error_message: string) => {
|
|
90
|
-
if (error_message === '') {
|
|
91
|
-
resolve({
|
|
92
|
-
isValid: true,
|
|
93
|
-
message: '',
|
|
94
|
-
})
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (error_message !== '') {
|
|
98
|
-
resolve({
|
|
99
|
-
isValid: false,
|
|
100
|
-
message: error_message,
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
})
|
|
104
|
-
)
|
|
105
|
-
} else {
|
|
106
|
-
return {
|
|
107
|
-
isValid: false,
|
|
108
|
-
message: localization.networkLabelInvalidMessage,
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export const checkNetworkAsync = async (
|
|
114
|
-
value: UI_I_WizardStep[],
|
|
115
|
-
networkLabel: string,
|
|
116
|
-
stepId: number,
|
|
117
|
-
fieldName: string,
|
|
118
|
-
emits: UI_I_MigrateVmkernelAdapterEmits,
|
|
119
|
-
localization: UI_I_Localization,
|
|
120
|
-
wizard: Wizard
|
|
121
|
-
): Promise<UI_I_ValidationReturn> => {
|
|
122
|
-
let stepHasError = false
|
|
123
|
-
|
|
124
|
-
wizard.setLoader(true)
|
|
125
|
-
|
|
126
|
-
const labelValidation: {
|
|
127
|
-
isValid: boolean
|
|
128
|
-
message: string
|
|
129
|
-
} = await checkNetwork(networkLabel, localization, emits)
|
|
130
|
-
|
|
131
|
-
wizard.setLoader(false)
|
|
132
|
-
|
|
133
|
-
if (!labelValidation.isValid) {
|
|
134
|
-
stepHasError = wizard.setValidation(stepId, fieldName, {
|
|
135
|
-
fieldMessage: labelValidation.message,
|
|
136
|
-
alertMessage: labelValidation.message,
|
|
137
|
-
})
|
|
138
|
-
} else if (wizard.hasMessage(stepId, fieldName)) {
|
|
139
|
-
value = wizard.removeValidation(stepId, fieldName, value)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return {
|
|
143
|
-
newValue: value,
|
|
144
|
-
stepHasError,
|
|
145
|
-
}
|
|
146
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { UI_I_SelectVmkernelAdapter } from '~/components/common/wizards/network/add/models/interfaces'
|
|
2
|
-
import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/models/enums'
|
|
3
|
-
import { UI_I_Localization } from '~/models/interfaces'
|
|
4
|
-
import type Wizard from '~/components/atoms/wizard/utils/utils'
|
|
5
|
-
import { UI_I_WizardStep, UI_I_ValidationReturn } from '~/components/atoms/wizard/models/interfaces'
|
|
6
|
-
import { validateFieldLocal } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common'
|
|
7
|
-
|
|
8
|
-
export const validateSelectedVmLocal = (
|
|
9
|
-
localization: UI_I_Localization,
|
|
10
|
-
data: UI_I_SelectVmkernelAdapter,
|
|
11
|
-
wizard: Wizard
|
|
12
|
-
): void => {
|
|
13
|
-
validateFieldLocal(
|
|
14
|
-
wizard,
|
|
15
|
-
0,
|
|
16
|
-
'vm',
|
|
17
|
-
data.vm === '',
|
|
18
|
-
'',
|
|
19
|
-
localization.noVmKernelNetworkAdapterSelectedForMigration
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const checkSelectedVmSync = (
|
|
24
|
-
localization: UI_I_Localization,
|
|
25
|
-
data: UI_I_SelectVmkernelAdapter,
|
|
26
|
-
wizard: Wizard,
|
|
27
|
-
value: UI_I_WizardStep[]
|
|
28
|
-
): UI_I_ValidationReturn => {
|
|
29
|
-
let stepHasError = false
|
|
30
|
-
|
|
31
|
-
if (data.vm === '') {
|
|
32
|
-
stepHasError = wizard.setValidation(
|
|
33
|
-
0,
|
|
34
|
-
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
35
|
-
{
|
|
36
|
-
fieldMessage: '',
|
|
37
|
-
alertMessage: localization.noVmKernelNetworkAdapterSelectedForMigration,
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
} else if (
|
|
41
|
-
wizard.hasMessage(0, UI_E_MigrationValidationFields.SELECT_ADAPTER_VM)
|
|
42
|
-
) {
|
|
43
|
-
value = wizard.removeValidation(
|
|
44
|
-
0,
|
|
45
|
-
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
46
|
-
value
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
newValue: value,
|
|
52
|
-
stepHasError,
|
|
53
|
-
}
|
|
54
|
-
}
|
package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
}
|