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
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
UI_I_BodyItems,
|
|
8
8
|
UI_I_ReadyCompleteFields,
|
|
9
9
|
UI_I_TableHead,
|
|
10
|
-
} from '~/components/common/
|
|
10
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
11
11
|
|
|
12
12
|
export const vmKernelAdapterViewSettingsFunc = (
|
|
13
13
|
localization: UI_I_Localization
|
|
@@ -69,7 +69,7 @@ export const vmKernelAdapterTableBodyMapperFunc = (
|
|
|
69
69
|
{
|
|
70
70
|
editable: false,
|
|
71
71
|
text: vmkernelAdapterData.name,
|
|
72
|
-
id: vmkernelAdapterData.
|
|
72
|
+
id: vmkernelAdapterData.id,
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
editable: false,
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
} from '~/components/common/diagramMain/models/interfaces'
|
|
91
91
|
import { UI_T_PropertiesFieldName } from '~/components/common/diagramMain/models/types'
|
|
92
92
|
import { validationMessagesArrayFunc } from '~/components/common/diagramMain/modals/utils'
|
|
93
|
-
import { vlanIdSelectData } from '~/components/common/
|
|
93
|
+
import { vlanIdSelectData } from '~/components/common/addNetworking/config'
|
|
94
94
|
|
|
95
95
|
// Props from up
|
|
96
96
|
const props = withDefaults(
|
|
@@ -176,7 +176,7 @@ import {
|
|
|
176
176
|
UI_I_IpvFourSettingsFields,
|
|
177
177
|
UI_I_ModalsInitialData,
|
|
178
178
|
} from '~/components/common/diagramMain/models/interfaces'
|
|
179
|
-
import { UI_T_IpFourSettingsFieldName } from '~/components/common/
|
|
179
|
+
import { UI_T_IpFourSettingsFieldName } from '~/components/common/addNetworking/models/types'
|
|
180
180
|
import { validationMessagesArrayFunc } from '~/components/common/diagramMain/modals/utils'
|
|
181
181
|
|
|
182
182
|
const props = withDefaults(
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wizard-content-container add-networking-step">
|
|
3
|
+
<common-diagram-main-modals-steps-header
|
|
4
|
+
:title="props.title"
|
|
5
|
+
:text="props.text"
|
|
6
|
+
/>
|
|
7
|
+
<div class="wizard-content wizard-content-port">
|
|
8
|
+
<atoms-alert
|
|
9
|
+
v-if="isShowErrorMessage"
|
|
10
|
+
status="alert-danger"
|
|
11
|
+
:items="props.errorMessages"
|
|
12
|
+
@remove="onHideErrorMessageAlert"
|
|
13
|
+
/>
|
|
14
|
+
<form id-connection-settings-form>
|
|
15
|
+
<div class="horizontal-flex-container">
|
|
16
|
+
<label class="property-label-group" for="network-label">
|
|
17
|
+
{{ localization.networkLabel }}
|
|
18
|
+
</label>
|
|
19
|
+
<div class="margin-left-property-value-group">
|
|
20
|
+
<div class="property-value-group">
|
|
21
|
+
<fieldset>
|
|
22
|
+
<atoms-tooltip-error
|
|
23
|
+
:has-error="!!fieldsErrorMessages.networkLabel"
|
|
24
|
+
>
|
|
25
|
+
<template #elem>
|
|
26
|
+
<input
|
|
27
|
+
id="network-label"
|
|
28
|
+
v-model="fields.networkLabel"
|
|
29
|
+
name="network-label"
|
|
30
|
+
type="text"
|
|
31
|
+
:class="[
|
|
32
|
+
'tooltip-field port-properties-network-label',
|
|
33
|
+
{
|
|
34
|
+
'danger-not-valid': fieldsErrorMessages.networkLabel,
|
|
35
|
+
},
|
|
36
|
+
]"
|
|
37
|
+
@click.stop
|
|
38
|
+
/>
|
|
39
|
+
</template>
|
|
40
|
+
<template #content>
|
|
41
|
+
{{ fieldsErrorMessages.networkLabel }}
|
|
42
|
+
</template>
|
|
43
|
+
</atoms-tooltip-error>
|
|
44
|
+
</fieldset>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="horizontal-flex-container port-properties-padding">
|
|
50
|
+
<label class="property-label-group" for="">
|
|
51
|
+
{{ localization.vlanId }}
|
|
52
|
+
</label>
|
|
53
|
+
<div class="margin-left-property-value-group">
|
|
54
|
+
<div class="property-value-group">
|
|
55
|
+
<fieldset>
|
|
56
|
+
<div class="flex-align-center">
|
|
57
|
+
<atoms-combobox
|
|
58
|
+
v-model.trim="fields.vlanId"
|
|
59
|
+
:items="vlanIdSelectData"
|
|
60
|
+
@click.stop
|
|
61
|
+
/>
|
|
62
|
+
<div
|
|
63
|
+
v-show="fieldsErrorMessages.vlanId"
|
|
64
|
+
class="flex-align-center"
|
|
65
|
+
>
|
|
66
|
+
<div class="tooltip">
|
|
67
|
+
<atoms-the-icon
|
|
68
|
+
width="24px"
|
|
69
|
+
height="24px"
|
|
70
|
+
class="is-error tooltip-trigger"
|
|
71
|
+
name="info"
|
|
72
|
+
/>
|
|
73
|
+
<div class="tooltip-top-left tooltip-content error">
|
|
74
|
+
{{ fieldsErrorMessages.vlanId }}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</fieldset>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</form>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<script setup lang="ts">
|
|
89
|
+
import { UI_I_ArbitraryObject, UI_I_Localization } from '~/models/interfaces'
|
|
90
|
+
import {
|
|
91
|
+
UI_I_ConnectionSettings,
|
|
92
|
+
UI_I_ConnectionSettingsFieldsErrorMessages,
|
|
93
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
94
|
+
import { UI_T_ConnectionSettingsFieldName } from '~/components/common/addNetworking/models/types'
|
|
95
|
+
import {
|
|
96
|
+
connectionSettingsFieldsErrorMessages,
|
|
97
|
+
vlanIdSelectData,
|
|
98
|
+
} from '~/components/common/addNetworking/config'
|
|
99
|
+
|
|
100
|
+
// Props from up
|
|
101
|
+
const props = defineProps<{
|
|
102
|
+
title: string
|
|
103
|
+
text: string
|
|
104
|
+
stepId: number
|
|
105
|
+
connectionSettings: UI_I_ConnectionSettings
|
|
106
|
+
isShowErrorMessageAlert: boolean
|
|
107
|
+
errorMessages: string[]
|
|
108
|
+
}>()
|
|
109
|
+
|
|
110
|
+
// UI_I_Localization
|
|
111
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
112
|
+
|
|
113
|
+
// Define emits for changing data and validation messages
|
|
114
|
+
const emits = defineEmits<{
|
|
115
|
+
(
|
|
116
|
+
event: 'change-connection-settings',
|
|
117
|
+
connectionSettings: UI_I_ConnectionSettings
|
|
118
|
+
): void
|
|
119
|
+
(
|
|
120
|
+
event: 'change-error-messages',
|
|
121
|
+
errorMessages: string[],
|
|
122
|
+
stepIndex: number
|
|
123
|
+
): void
|
|
124
|
+
(event: 'hide-error-message-alert'): void
|
|
125
|
+
}>()
|
|
126
|
+
|
|
127
|
+
// Component binding data
|
|
128
|
+
const fields = ref<UI_I_ConnectionSettings>({ ...props.connectionSettings })
|
|
129
|
+
|
|
130
|
+
// Validation error check for this step
|
|
131
|
+
const isShowErrorMessage = computed<boolean>(
|
|
132
|
+
() => props.isShowErrorMessageAlert && !!props.errorMessages.length
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
// Validation
|
|
136
|
+
const fieldsErrorMessages = ref<UI_I_ConnectionSettingsFieldsErrorMessages>(
|
|
137
|
+
connectionSettingsFieldsErrorMessages
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
const messageTexts = (
|
|
141
|
+
local: UI_I_Localization
|
|
142
|
+
): UI_I_ArbitraryObject<string> => ({
|
|
143
|
+
networkLabel: local.vlanIdInvalidMessage,
|
|
144
|
+
vlanId: local.networkLabelInvalidMessage,
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
const isNumberInRange = (
|
|
148
|
+
value: number | string,
|
|
149
|
+
down: number,
|
|
150
|
+
up: number
|
|
151
|
+
): boolean => isNaN(Number(value)) || Number(value) < down || Number(value) > up
|
|
152
|
+
|
|
153
|
+
const setMessageOnChangedField = (
|
|
154
|
+
values: string | number,
|
|
155
|
+
name: UI_T_ConnectionSettingsFieldName,
|
|
156
|
+
text: string
|
|
157
|
+
): void => {
|
|
158
|
+
if (name === 'networkLabel' && !values) {
|
|
159
|
+
fieldsErrorMessages.value[name] = text
|
|
160
|
+
return
|
|
161
|
+
}
|
|
162
|
+
if (
|
|
163
|
+
name === 'vlanId' &&
|
|
164
|
+
values !== 'None (0)' &&
|
|
165
|
+
values !== 'All (4095)' &&
|
|
166
|
+
(isNumberInRange(values, 0, 4095) || values === '')
|
|
167
|
+
) {
|
|
168
|
+
fieldsErrorMessages.value[name] = text
|
|
169
|
+
return
|
|
170
|
+
}
|
|
171
|
+
fieldsErrorMessages.value[name] = ''
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Changing data and validate they
|
|
175
|
+
watch(
|
|
176
|
+
fields,
|
|
177
|
+
(newFields: UI_I_ConnectionSettings) => {
|
|
178
|
+
setMessageOnChangedField(
|
|
179
|
+
newFields.vlanId,
|
|
180
|
+
'vlanId',
|
|
181
|
+
messageTexts(localization.value).vlanId
|
|
182
|
+
)
|
|
183
|
+
setMessageOnChangedField(
|
|
184
|
+
newFields.networkLabel,
|
|
185
|
+
'networkLabel',
|
|
186
|
+
messageTexts(localization.value).networkLabel
|
|
187
|
+
)
|
|
188
|
+
const fieldsErrorMessagesFiltered = Object.values(
|
|
189
|
+
fieldsErrorMessages.value
|
|
190
|
+
).filter((v) => v !== '')
|
|
191
|
+
fieldsErrorMessagesFiltered.length === 0 &&
|
|
192
|
+
emits('hide-error-message-alert')
|
|
193
|
+
emits('change-error-messages', fieldsErrorMessagesFiltered, props.stepId)
|
|
194
|
+
emits('change-connection-settings', newFields)
|
|
195
|
+
},
|
|
196
|
+
{ deep: true, immediate: true }
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
// Validation message show and hide
|
|
200
|
+
const onHideErrorMessageAlert = (): void => {
|
|
201
|
+
emits('hide-error-message-alert')
|
|
202
|
+
}
|
|
203
|
+
onUnmounted(() => {
|
|
204
|
+
emits('hide-error-message-alert')
|
|
205
|
+
})
|
|
206
|
+
</script>
|
|
207
|
+
|
|
208
|
+
<style scoped lang="scss">
|
|
209
|
+
.wizard-content-container {
|
|
210
|
+
display: flex;
|
|
211
|
+
flex-direction: column;
|
|
212
|
+
align-items: stretch;
|
|
213
|
+
flex: 1 1 100%;
|
|
214
|
+
box-sizing: border-box;
|
|
215
|
+
padding: 16px 15px 10px 10px;
|
|
216
|
+
overflow-y: auto;
|
|
217
|
+
color: #333;
|
|
218
|
+
order: 2;
|
|
219
|
+
width: 100%;
|
|
220
|
+
}
|
|
221
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wizard-content-header-area">
|
|
3
|
+
<div>
|
|
4
|
+
<div class="title">
|
|
5
|
+
{{ props.title }}
|
|
6
|
+
</div>
|
|
7
|
+
<div class="description">
|
|
8
|
+
{{ props.text }}
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
// Props from up
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
title: string
|
|
19
|
+
text: string
|
|
20
|
+
}>()
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped lang="scss">
|
|
24
|
+
.wizard-content-header-area {
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
width: inherit;
|
|
27
|
+
height: auto;
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
padding-bottom: 3px;
|
|
30
|
+
border-bottom: 1px solid #a6a6a6;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.wizard-content-header-area {
|
|
34
|
+
display: flex;
|
|
35
|
+
//padding-top: 12px;
|
|
36
|
+
|
|
37
|
+
.description {
|
|
38
|
+
color: #333333;
|
|
39
|
+
font-size: 13px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.title {
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
font-size: 13px;
|
|
45
|
+
margin: 0;
|
|
46
|
+
color: #333;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.description,
|
|
50
|
+
.select {
|
|
51
|
+
flex: 1 1 100%;
|
|
52
|
+
margin-right: 5px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:deep(select) {
|
|
56
|
+
background-color: transparent;
|
|
57
|
+
border-color: var(--type-list-border-color);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="wizard-content-container">
|
|
3
|
+
<common-diagram-main-modals-steps-header
|
|
4
|
+
:title="props.title"
|
|
5
|
+
:text="props.text"
|
|
6
|
+
/>
|
|
3
7
|
<div class="wizard-content wizard-content-port">
|
|
4
8
|
<atoms-alert
|
|
5
|
-
v-if="
|
|
9
|
+
v-if="isShowErrorMessage"
|
|
6
10
|
status="alert-danger"
|
|
7
|
-
:items="props.
|
|
8
|
-
@remove="
|
|
11
|
+
:items="props.errorMessages"
|
|
12
|
+
@remove="onHideErrorMessageAlert"
|
|
9
13
|
/>
|
|
10
14
|
<div class="table-top-margin-container">
|
|
11
15
|
<atoms-table-simple-table
|
|
12
16
|
:head-items="tableHeadItems"
|
|
13
17
|
:body-items="tableBodyItems"
|
|
14
|
-
:selected-row-key="selectedRowKey"
|
|
15
18
|
editable
|
|
16
19
|
@select="onSelectRow"
|
|
17
20
|
/>
|
|
18
21
|
</div>
|
|
19
22
|
<common-diagram-main-modals-view-settings-info
|
|
20
|
-
:show="
|
|
23
|
+
:show="selectedRowData.length"
|
|
21
24
|
:modal-tabs="modalTabs"
|
|
22
25
|
:view-settings-fields="viewSettingsFields"
|
|
23
26
|
:with-collapse="false"
|
|
@@ -39,10 +42,11 @@ import {
|
|
|
39
42
|
UI_I_ReadyCompleteFields,
|
|
40
43
|
UI_I_SelectVmkernelAdapter,
|
|
41
44
|
UI_I_TableHead,
|
|
42
|
-
} from '~/components/common/
|
|
45
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
43
46
|
import {
|
|
44
47
|
UI_I_ModalTabs,
|
|
45
48
|
UI_I_SelectedVmkernelAdapterTableRaw,
|
|
49
|
+
UI_I_SelectVmKernelAdapterFieldsErrorMessages,
|
|
46
50
|
UI_I_VmkernelAdapterTableData,
|
|
47
51
|
} from '~/components/common/diagramMain/models/interfaces'
|
|
48
52
|
import {
|
|
@@ -50,78 +54,136 @@ import {
|
|
|
50
54
|
vmKernelAdapterViewSettingsTableHeadFunc,
|
|
51
55
|
vmKernelAdapterTableBodyMapperFunc,
|
|
52
56
|
vmKernelAdapterViewSettingsFunc,
|
|
57
|
+
selectVmKernelAdapterFieldsErrorMessages,
|
|
53
58
|
} from '~/components/common/diagramMain/modals/config'
|
|
59
|
+
import { UI_T_VmKernelAdapterFieldName } from '~/components/common/diagramMain/models/types'
|
|
54
60
|
|
|
61
|
+
// Props from up
|
|
55
62
|
const props = defineProps<{
|
|
63
|
+
title: string
|
|
64
|
+
text: string
|
|
65
|
+
stepId: number
|
|
56
66
|
tableData: UI_I_VmkernelAdapterTableData[]
|
|
57
67
|
vmkernelAdapter: UI_I_SelectVmkernelAdapter
|
|
58
|
-
|
|
68
|
+
isShowErrorMessageAlert: boolean
|
|
69
|
+
errorMessages: string[]
|
|
59
70
|
}>()
|
|
60
71
|
|
|
72
|
+
// UI_I_Localization
|
|
61
73
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
62
74
|
|
|
75
|
+
// View settings modal tabs data
|
|
63
76
|
const modalTabs = computed<UI_I_ModalTabs[]>(() =>
|
|
64
77
|
vmKernelAdapterViewSettingsModalTabsFunc(localization.value)
|
|
65
78
|
)
|
|
66
79
|
|
|
80
|
+
// View settings modal data
|
|
67
81
|
const viewSettingsFields = computed<UI_I_ReadyCompleteFields[]>(() =>
|
|
68
82
|
vmKernelAdapterViewSettingsFunc(localization.value)
|
|
69
83
|
)
|
|
70
84
|
|
|
85
|
+
// Table head data
|
|
71
86
|
const tableHeadItems = computed<UI_I_TableHead[]>(() =>
|
|
72
87
|
vmKernelAdapterViewSettingsTableHeadFunc(localization.value)
|
|
73
88
|
)
|
|
74
89
|
|
|
90
|
+
// Table body data
|
|
75
91
|
const tableBodyItems = computed<UI_I_BodyItems[][]>(() =>
|
|
76
92
|
props.tableData.map(vmKernelAdapterTableBodyMapperFunc)
|
|
77
93
|
)
|
|
78
94
|
|
|
95
|
+
// Select the row
|
|
79
96
|
const selectedRowData = ref<UI_I_SelectedVmkernelAdapterTableRaw[]>(
|
|
80
97
|
tableBodyItems.value.find(
|
|
81
|
-
(item) => item[0].
|
|
98
|
+
(item) => item[0].id === props.vmkernelAdapter.vm
|
|
82
99
|
) || []
|
|
83
100
|
)
|
|
84
101
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
(item) => item[0].text === props.vmkernelAdapter.vm
|
|
88
|
-
)
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
const fields = ref<UI_I_SelectVmkernelAdapter>(
|
|
92
|
-
useDeepCopy(props.vmkernelAdapter)
|
|
93
|
-
)
|
|
102
|
+
// Component binding data
|
|
103
|
+
const fields = ref<UI_I_SelectVmkernelAdapter>({ ...props.vmkernelAdapter })
|
|
94
104
|
|
|
105
|
+
// Select row handler
|
|
95
106
|
const onSelectRow = (index: number): void => {
|
|
96
107
|
selectedRowData.value = tableBodyItems.value[index]
|
|
97
108
|
|
|
98
109
|
const selectedVmkernelAdapter =
|
|
99
110
|
selectedRowData.value &&
|
|
100
111
|
selectedRowData.value[0] &&
|
|
101
|
-
selectedRowData.value[0].
|
|
112
|
+
selectedRowData.value[0].id
|
|
102
113
|
|
|
103
114
|
selectedVmkernelAdapter && (fields.value.vm = selectedVmkernelAdapter)
|
|
104
115
|
}
|
|
105
116
|
|
|
117
|
+
// Validation error check for this step
|
|
118
|
+
const isShowErrorMessage = computed<boolean>(
|
|
119
|
+
() => props.isShowErrorMessageAlert && !!props.errorMessages.length
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
// Validation
|
|
106
123
|
const emits = defineEmits<{
|
|
107
124
|
(
|
|
108
125
|
event: 'change-vmkernel-adapter',
|
|
109
126
|
vmkernelAdapter: UI_I_SelectVmkernelAdapter
|
|
110
127
|
): void
|
|
111
|
-
(
|
|
128
|
+
(
|
|
129
|
+
event: 'change-error-messages',
|
|
130
|
+
errorMessages: string[],
|
|
131
|
+
stepIndex: number
|
|
132
|
+
): void
|
|
133
|
+
(event: 'hide-error-message-alert'): void
|
|
112
134
|
}>()
|
|
113
135
|
|
|
136
|
+
const fieldsErrorMessages = ref<UI_I_SelectVmKernelAdapterFieldsErrorMessages>(
|
|
137
|
+
selectVmKernelAdapterFieldsErrorMessages
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
const messageTexts = (
|
|
141
|
+
local: UI_I_Localization
|
|
142
|
+
): UI_I_ArbitraryObject<string> => ({
|
|
143
|
+
vm: local.noVmKernelNetworkAdapterSelectedForMigration,
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
const setMessageOnChangedField = (
|
|
147
|
+
values: string,
|
|
148
|
+
name: UI_T_VmKernelAdapterFieldName,
|
|
149
|
+
text: string
|
|
150
|
+
): void => {
|
|
151
|
+
if (name === 'vm') {
|
|
152
|
+
if (values) {
|
|
153
|
+
fieldsErrorMessages.value[name] = ''
|
|
154
|
+
} else {
|
|
155
|
+
fieldsErrorMessages.value[name] = text
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
114
160
|
watch(
|
|
115
161
|
fields,
|
|
116
162
|
(newFields: UI_I_SelectVmkernelAdapter) => {
|
|
163
|
+
setMessageOnChangedField(
|
|
164
|
+
newFields.vm,
|
|
165
|
+
'vm',
|
|
166
|
+
messageTexts(localization.value).vm
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
const fieldsErrorMessagesFiltered = Object.values(
|
|
170
|
+
fieldsErrorMessages.value
|
|
171
|
+
).filter((errorMessage: string) => errorMessage !== '')
|
|
172
|
+
fieldsErrorMessagesFiltered.length === 0 &&
|
|
173
|
+
emits('hide-error-message-alert')
|
|
174
|
+
emits('change-error-messages', fieldsErrorMessagesFiltered, props.stepId)
|
|
117
175
|
emits('change-vmkernel-adapter', newFields)
|
|
118
176
|
},
|
|
119
177
|
{ deep: true, immediate: true }
|
|
120
178
|
)
|
|
121
179
|
|
|
122
|
-
const
|
|
123
|
-
emits('hide-alert'
|
|
180
|
+
const onHideErrorMessageAlert = (): void => {
|
|
181
|
+
emits('hide-error-message-alert')
|
|
124
182
|
}
|
|
183
|
+
onUnmounted(() => {
|
|
184
|
+
selectedRowData.value = []
|
|
185
|
+
emits('hide-error-message-alert')
|
|
186
|
+
})
|
|
125
187
|
</script>
|
|
126
188
|
|
|
127
189
|
<style scoped lang="scss">
|
|
@@ -131,7 +193,7 @@ const onHideAlert = (): void => {
|
|
|
131
193
|
align-items: stretch;
|
|
132
194
|
flex: 1 1 100%;
|
|
133
195
|
box-sizing: border-box;
|
|
134
|
-
padding:
|
|
196
|
+
padding: 16px 15px 10px 10px;
|
|
135
197
|
overflow-y: auto;
|
|
136
198
|
color: #333;
|
|
137
199
|
order: 2;
|
|
@@ -142,8 +204,8 @@ const onHideAlert = (): void => {
|
|
|
142
204
|
}
|
|
143
205
|
|
|
144
206
|
:deep(.table-fixed-height) {
|
|
145
|
-
max-height:
|
|
146
|
-
min-height:
|
|
207
|
+
max-height: 160px;
|
|
208
|
+
min-height: 160px;
|
|
147
209
|
}
|
|
148
210
|
.no-item-info {
|
|
149
211
|
span {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="wizard-content-container">
|
|
3
|
+
<common-diagram-main-modals-steps-header
|
|
4
|
+
:title="props.title"
|
|
5
|
+
:text="props.text"
|
|
6
|
+
/>
|
|
3
7
|
<div class="ready-complete-container">
|
|
4
8
|
<template
|
|
5
9
|
v-for="viewSettingsField in viewSettingsFields"
|
|
@@ -15,21 +19,21 @@
|
|
|
15
19
|
|
|
16
20
|
<script setup lang="ts">
|
|
17
21
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
18
|
-
import {
|
|
19
|
-
import { createMigrateVmkernelAdapterSchemeReadyCompleteFunc } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/config/steps'
|
|
22
|
+
import { createMigrateVmkernelAdapterSchemeReadyCompleteFunc } from '~/components/common/diagramMain/modals/config'
|
|
20
23
|
|
|
21
24
|
// Props from up
|
|
22
25
|
const props = defineProps<{
|
|
23
|
-
|
|
26
|
+
title: string
|
|
27
|
+
text: string
|
|
28
|
+
stepId: number
|
|
24
29
|
}>()
|
|
25
30
|
|
|
31
|
+
// UI_I_Localization
|
|
26
32
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
27
33
|
|
|
34
|
+
// View settings fields data
|
|
28
35
|
const viewSettingsFields = computed(() =>
|
|
29
|
-
createMigrateVmkernelAdapterSchemeReadyCompleteFunc(
|
|
30
|
-
localization.value,
|
|
31
|
-
props.data
|
|
32
|
-
)
|
|
36
|
+
createMigrateVmkernelAdapterSchemeReadyCompleteFunc(localization.value)
|
|
33
37
|
)
|
|
34
38
|
</script>
|
|
35
39
|
|
|
@@ -18,9 +18,10 @@ export const enum UI_E_PositionsY {
|
|
|
18
18
|
SPACE_FROM_RECT_BOTTOM = 2.5,
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export enum
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
export const enum UI_E_StepStatus {
|
|
22
|
+
Disabled,
|
|
23
|
+
Selected,
|
|
24
|
+
Active,
|
|
25
|
+
Complete,
|
|
26
|
+
ActiveSelected
|
|
27
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UI_E_NetworkType } from './enums'
|
|
1
|
+
import { UI_E_NetworkType, UI_E_StepStatus } from './enums'
|
|
2
2
|
import { UI_T_Adapters } from '~/components/common/diagramMain/models/types'
|
|
3
3
|
|
|
4
4
|
export interface UI_I_Port {
|
|
@@ -117,6 +117,7 @@ export interface UI_I_NetworkInfo {
|
|
|
117
117
|
shapingPolicy: UI_I_NetworkSummaryPortletListItem[]
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
|
|
120
121
|
export interface UI_I_NetworkFull extends UI_I_Network, UI_I_NetworkInfo {}
|
|
121
122
|
|
|
122
123
|
export interface UI_I_SwitchInfo extends UI_I_NetworkInfo {
|
|
@@ -163,7 +164,7 @@ export interface UI_I_AdaptersWithPositions {
|
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
export interface UI_I_NetworksWithPositions
|
|
166
|
-
|
|
167
|
+
extends Omit<UI_I_Network, 'ports'> {
|
|
167
168
|
ports: (UI_I_Port & { portPosition: number })[]
|
|
168
169
|
portsCount: number
|
|
169
170
|
portsHeight: number
|
|
@@ -208,6 +209,11 @@ export interface UI_I_ToggleDiagramAdaptersPayload {
|
|
|
208
209
|
paths: string[]
|
|
209
210
|
}
|
|
210
211
|
|
|
212
|
+
export interface UI_I_PropertiesErrorFields {
|
|
213
|
+
networkLabel: string
|
|
214
|
+
vlanId: string
|
|
215
|
+
}
|
|
216
|
+
|
|
211
217
|
export interface UI_I_SecurityFields {
|
|
212
218
|
promiscuousMode: {
|
|
213
219
|
checked: boolean
|
|
@@ -245,7 +251,7 @@ export interface UI_I_TeamingFailoverFields {
|
|
|
245
251
|
}
|
|
246
252
|
}
|
|
247
253
|
export interface UI_I_TeamingFailoverWithAdaptersFields
|
|
248
|
-
|
|
254
|
+
extends UI_I_TeamingFailoverFields {
|
|
249
255
|
adapters: UI_I_AdapterStatus
|
|
250
256
|
}
|
|
251
257
|
|
|
@@ -297,6 +303,23 @@ export interface UI_I_AdapterStatus {
|
|
|
297
303
|
unused: string[]
|
|
298
304
|
}
|
|
299
305
|
|
|
306
|
+
export interface UI_I_Step {
|
|
307
|
+
id: number
|
|
308
|
+
name: string
|
|
309
|
+
status: UI_E_StepStatus
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface UI_I_PropertiesFieldsErrorMessages {
|
|
313
|
+
mtu: string
|
|
314
|
+
}
|
|
315
|
+
export interface UI_I_IpFourSettingsFieldsErrorMessages {
|
|
316
|
+
ipFourAddress: string
|
|
317
|
+
subnetMask: string
|
|
318
|
+
defaultGateway: string
|
|
319
|
+
}
|
|
320
|
+
export interface UI_I_SelectVmKernelAdapterFieldsErrorMessages {
|
|
321
|
+
vm: string
|
|
322
|
+
}
|
|
300
323
|
export interface UI_I_SwitchPropertiesFields {
|
|
301
324
|
mtu: number
|
|
302
325
|
num_ports: string
|
|
@@ -433,9 +456,9 @@ export interface UI_I_PropertiesFields {
|
|
|
433
456
|
|
|
434
457
|
export interface UI_I_EditFieldsData {
|
|
435
458
|
properties?:
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
459
|
+
| UI_I_PropertiesFields
|
|
460
|
+
| UI_I_SwitchPropertiesFields
|
|
461
|
+
| UI_I_PortPropertiesFields
|
|
439
462
|
security?: UI_I_SecurityFields
|
|
440
463
|
trafficShaping?: UI_I_TrafficShapingFields
|
|
441
464
|
teamingFailover?: UI_I_TeamingFailoverWithAdaptersFields
|
|
@@ -540,25 +563,3 @@ export interface UI_I_NetworkEditSendData {
|
|
|
540
563
|
nics: UI_I_AdapterStatus
|
|
541
564
|
override_nics: string | number | boolean
|
|
542
565
|
}
|
|
543
|
-
|
|
544
|
-
export interface UI_I_MigrateVmkernelAdapterEmits {
|
|
545
|
-
(
|
|
546
|
-
event: 'check-network-label',
|
|
547
|
-
networkLabel: string,
|
|
548
|
-
cb: (error_message: string) => void
|
|
549
|
-
): void
|
|
550
|
-
(event: 'hide'): void
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
export interface UI_I_MigrationVmkernelAdapterReadyComplete {
|
|
554
|
-
vm: string
|
|
555
|
-
currentSettings: {
|
|
556
|
-
switch: string
|
|
557
|
-
network: string
|
|
558
|
-
}
|
|
559
|
-
newSettings: {
|
|
560
|
-
switch: string
|
|
561
|
-
network: string
|
|
562
|
-
}
|
|
563
|
-
vlanId: string
|
|
564
|
-
}
|