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
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="props.show" class="modal clr-wizard wizard-xl">
|
|
3
|
+
<div class="modal-dialog modal-xl relative">
|
|
4
|
+
<div class="modal-content-wrapper">
|
|
5
|
+
<nav class="modal-nav clr-wizard-stepnav-wrapper">
|
|
6
|
+
<h1 class="clr-wizard-title">
|
|
7
|
+
{{ props.title }}
|
|
8
|
+
</h1>
|
|
9
|
+
<div :class="['clr-wizard-stepnav']">
|
|
10
|
+
<div class="clr-wizard-stepnav-list">
|
|
11
|
+
<div
|
|
12
|
+
v-for="currentStep in props.stepsWithStatus"
|
|
13
|
+
:key="currentStep.id"
|
|
14
|
+
:class="[
|
|
15
|
+
'clr-wizard clr-wizard-stepnav-item clr-nav-link nav-item',
|
|
16
|
+
{ disabled: currentStep.status === UI_E_StepStatus.Disabled },
|
|
17
|
+
{
|
|
18
|
+
active:
|
|
19
|
+
currentStep.status === UI_E_StepStatus.Selected ||
|
|
20
|
+
currentStep.status === UI_E_StepStatus.CompleteSelected,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
complete:
|
|
24
|
+
currentStep.status === UI_E_StepStatus.Complete ||
|
|
25
|
+
currentStep.status === UI_E_StepStatus.CompleteSelected,
|
|
26
|
+
},
|
|
27
|
+
]"
|
|
28
|
+
>
|
|
29
|
+
<atoms-the-icon
|
|
30
|
+
v-if="false"
|
|
31
|
+
:style="{
|
|
32
|
+
opacity:
|
|
33
|
+
currentStep.status === UI_E_StepStatus.Complete ||
|
|
34
|
+
currentStep.status === UI_E_StepStatus.CompleteSelected
|
|
35
|
+
? 1
|
|
36
|
+
: 0,
|
|
37
|
+
}"
|
|
38
|
+
width="14px"
|
|
39
|
+
fill="#3aab24"
|
|
40
|
+
name="check"
|
|
41
|
+
/>
|
|
42
|
+
<button
|
|
43
|
+
class="btn btn-link clr-wizard-stepnav-link wizard-ml-8"
|
|
44
|
+
:disabled="currentStep.status === UI_E_StepStatus.Disabled"
|
|
45
|
+
@click="onSelectStep(currentStep.id)"
|
|
46
|
+
>
|
|
47
|
+
<span class="clr-wizard-stepnav-link-title">
|
|
48
|
+
{{ currentStep.name }}
|
|
49
|
+
</span>
|
|
50
|
+
</button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</nav>
|
|
55
|
+
<div class="modal-content">
|
|
56
|
+
<div class="modal-header--accessible">
|
|
57
|
+
<div class="modal-title-wrapper">
|
|
58
|
+
<h2 class="modal-title">
|
|
59
|
+
<span class="modal-title-text">{{ props.secondTitle }}</span>
|
|
60
|
+
</h2>
|
|
61
|
+
</div>
|
|
62
|
+
<button class="close" @click="onHideModal">
|
|
63
|
+
<atoms-the-icon class="close-icon" name="close" />
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="modal-body">
|
|
67
|
+
<slot name="modalBody" />
|
|
68
|
+
</div>
|
|
69
|
+
<div class="modal-footer">
|
|
70
|
+
<slot name="modalFooter">
|
|
71
|
+
<button class="btn btn-link" @click="onHideModal">
|
|
72
|
+
{{ localization.cancel }}
|
|
73
|
+
</button>
|
|
74
|
+
<button
|
|
75
|
+
v-show="!props.wizard.isSelectedStep(0)"
|
|
76
|
+
class="btn btn-outline"
|
|
77
|
+
@click="onBackStep"
|
|
78
|
+
>
|
|
79
|
+
{{ localization.back }}
|
|
80
|
+
</button>
|
|
81
|
+
<button
|
|
82
|
+
v-if="props.wizard.isSelectedStep(7)"
|
|
83
|
+
class="btn btn-success"
|
|
84
|
+
@click="onFinish"
|
|
85
|
+
>
|
|
86
|
+
{{ localization.finish }}
|
|
87
|
+
</button>
|
|
88
|
+
<button v-else class="btn btn-primary" @click="onNextStep">
|
|
89
|
+
{{ localization.next }}
|
|
90
|
+
</button>
|
|
91
|
+
</slot>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div v-show="props.isShowLoader" class="loader">
|
|
97
|
+
<i class="fa clr-tree-node-caret-icon spinner spinner" />
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="modal-backdrop" />
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
103
|
+
|
|
104
|
+
<script setup lang="ts">
|
|
105
|
+
import { UI_I_Step } from '~/components/common/addNetworking/models/interfaces'
|
|
106
|
+
import { Wizard } from '~/components/common/addNetworking/utils'
|
|
107
|
+
import { UI_I_Localization } from '~/models/interfaces'
|
|
108
|
+
import { UI_E_StepStatus } from '~/components/common/addNetworking/models/enums'
|
|
109
|
+
|
|
110
|
+
const props = defineProps<{
|
|
111
|
+
wizard: Wizard
|
|
112
|
+
stepsWithStatus: UI_I_Step[]
|
|
113
|
+
width: string
|
|
114
|
+
height: string
|
|
115
|
+
show: boolean
|
|
116
|
+
title: string
|
|
117
|
+
isShowLoader: boolean
|
|
118
|
+
secondTitle: string
|
|
119
|
+
}>()
|
|
120
|
+
|
|
121
|
+
const emits = defineEmits<{
|
|
122
|
+
(event: 'select-step', id: number): void
|
|
123
|
+
(event: 'hide'): void
|
|
124
|
+
(event: 'next-step'): void
|
|
125
|
+
(event: 'finish'): void
|
|
126
|
+
}>()
|
|
127
|
+
|
|
128
|
+
// UI_I_Localization
|
|
129
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
130
|
+
|
|
131
|
+
const onHideModal = (): void => emits('hide')
|
|
132
|
+
const onSelectStep = (id: number): void => emits('select-step', id)
|
|
133
|
+
const onNextStep = (): void => emits('next-step')
|
|
134
|
+
const onBackStep = (): void => props.wizard.goToBackStep()
|
|
135
|
+
const onFinish = (): void => emits('finish')
|
|
136
|
+
</script>
|
|
137
|
+
|
|
138
|
+
<style scoped lang="scss">
|
|
139
|
+
.modal {
|
|
140
|
+
position: fixed;
|
|
141
|
+
top: 0;
|
|
142
|
+
bottom: 0;
|
|
143
|
+
right: 0;
|
|
144
|
+
left: 0;
|
|
145
|
+
z-index: 1050;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
align-items: center;
|
|
150
|
+
padding: 48px;
|
|
151
|
+
overflow-y: auto;
|
|
152
|
+
|
|
153
|
+
.modal-nav {
|
|
154
|
+
background-color: var(--block-view-bg-color4);
|
|
155
|
+
.clr-wizard-title {
|
|
156
|
+
color: var(--main-color-mode);
|
|
157
|
+
font-size: 22px;
|
|
158
|
+
padding: 24px 12px 24px 24px;
|
|
159
|
+
//line-height: 1.2rem;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.modal-content-wrapper {
|
|
164
|
+
position: relative;
|
|
165
|
+
-webkit-animation-name: animateTop;
|
|
166
|
+
-webkit-animation-duration: 0.4s;
|
|
167
|
+
animation-name: animateTop;
|
|
168
|
+
animation-duration: 0.4s;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.modal-content {
|
|
172
|
+
background-color: var(--modal-bg-color);
|
|
173
|
+
|
|
174
|
+
.modal-header--accessible {
|
|
175
|
+
display: flex;
|
|
176
|
+
justify-content: space-between;
|
|
177
|
+
align-items: flex-start;
|
|
178
|
+
width: 100%;
|
|
179
|
+
padding: 24px 19px 6px 24px;
|
|
180
|
+
|
|
181
|
+
.modal-title-text {
|
|
182
|
+
color: var(--main-color-mode);
|
|
183
|
+
font-size: 22px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.close-icon {
|
|
187
|
+
fill: var(--close-icon);
|
|
188
|
+
width: 24px;
|
|
189
|
+
height: 24px;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.modal-body {
|
|
194
|
+
padding: 0 3px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.modal-footer {
|
|
198
|
+
display: flex;
|
|
199
|
+
justify-content: flex-end;
|
|
200
|
+
padding: 24px;
|
|
201
|
+
flex: unset;
|
|
202
|
+
min-height: 0;
|
|
203
|
+
height: auto;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.loader {
|
|
208
|
+
position: absolute;
|
|
209
|
+
z-index: 1000;
|
|
210
|
+
left: 0;
|
|
211
|
+
right: 0;
|
|
212
|
+
bottom: 0;
|
|
213
|
+
top: 0;
|
|
214
|
+
display: flex;
|
|
215
|
+
align-items: center;
|
|
216
|
+
justify-content: center;
|
|
217
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
218
|
+
|
|
219
|
+
.spinner {
|
|
220
|
+
left: unset;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.modal-backdrop {
|
|
225
|
+
opacity: 1;
|
|
226
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
h1,
|
|
230
|
+
h2 {
|
|
231
|
+
// просмотреть если нигде не ломается переместит глобально
|
|
232
|
+
line-height: inherit;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.clr-wizard-stepnav {
|
|
236
|
+
&.check {
|
|
237
|
+
.clr-wizard-stepnav-item {
|
|
238
|
+
box-shadow: none;
|
|
239
|
+
display: flex;
|
|
240
|
+
align-items: center;
|
|
241
|
+
|
|
242
|
+
button {
|
|
243
|
+
height: auto;
|
|
244
|
+
font-size: 13px;
|
|
245
|
+
border-radius: 3px;
|
|
246
|
+
//margin-left: 4px;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
.clr-wizard-stepnav-item {
|
|
251
|
+
padding: 0.3rem 0 0.4rem;
|
|
252
|
+
|
|
253
|
+
.wizard-ml-8 {
|
|
254
|
+
margin-left: 8px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&.active {
|
|
258
|
+
button:hover,
|
|
259
|
+
button {
|
|
260
|
+
color: var(--vertical-steps-active-color);
|
|
261
|
+
background-color: var(--vertical-steps-active-bg-color);
|
|
262
|
+
cursor: default;
|
|
263
|
+
span {
|
|
264
|
+
color: var(--checkbox-mark-color);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
&.complete:not(&.active) {
|
|
269
|
+
button {
|
|
270
|
+
background: var(--block-view-bg-color3);
|
|
271
|
+
}
|
|
272
|
+
button:hover {
|
|
273
|
+
color: var(--vertical-steps-complete-color);
|
|
274
|
+
background-color: var(--vertical-steps-complete-bg-color);
|
|
275
|
+
border-bottom: 1px solid var(--vertical-steps-hover-border-color);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
button {
|
|
279
|
+
color: var(--add-vm-context-title);
|
|
280
|
+
.clr-wizard-stepnav-link-title {
|
|
281
|
+
font-size: 14px;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
</style>
|
|
@@ -5,143 +5,96 @@ import {
|
|
|
5
5
|
UI_I_PortProperties,
|
|
6
6
|
UI_I_ReadyCompleteData,
|
|
7
7
|
UI_I_ReadyCompleteFirstColumn,
|
|
8
|
+
UI_I_Step,
|
|
8
9
|
UI_I_TargetDevice,
|
|
9
|
-
} from '~/components/common/
|
|
10
|
-
import { UI_E_ValidationFields } from '~/components/common/wizards/network/add/models/enums'
|
|
11
|
-
import { UI_I_WizardStep } from '~/components/atoms/wizard/models/interfaces'
|
|
12
|
-
import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/models/enums'
|
|
10
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
13
11
|
|
|
14
|
-
export const stepsFunc = (
|
|
15
|
-
localization: UI_I_Localization
|
|
16
|
-
): UI_I_WizardStep[] => [
|
|
12
|
+
export const stepsFunc = (localization: UI_I_Localization): UI_I_Step[] => [
|
|
17
13
|
{
|
|
18
14
|
id: 0,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
status: UI_E_WIZARD_STATUS.SELECTED,
|
|
22
|
-
fields: {},
|
|
23
|
-
isValid: true,
|
|
15
|
+
name: localization.selectConnectionType,
|
|
16
|
+
status: 0,
|
|
24
17
|
},
|
|
25
18
|
{
|
|
26
19
|
id: 1,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
30
|
-
fields: {
|
|
31
|
-
[UI_E_ValidationFields.TARGET_DEVICE_STANDARD_SWITCH]: {
|
|
32
|
-
alert: '',
|
|
33
|
-
field: '',
|
|
34
|
-
},
|
|
35
|
-
[UI_E_ValidationFields.TARGET_DEVICE_NETWORK]: {
|
|
36
|
-
alert: '',
|
|
37
|
-
field: '',
|
|
38
|
-
},
|
|
39
|
-
[UI_E_ValidationFields.TARGET_DEVICE_SWITCH]: {
|
|
40
|
-
alert: '',
|
|
41
|
-
field: '',
|
|
42
|
-
},
|
|
43
|
-
[UI_E_ValidationFields.TARGET_DEVICE_MTU]: {
|
|
44
|
-
alert: '',
|
|
45
|
-
field: '',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
isValid: true,
|
|
20
|
+
name: localization.selectTargetDevice,
|
|
21
|
+
status: 0,
|
|
49
22
|
},
|
|
50
23
|
{
|
|
51
24
|
id: 2,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
55
|
-
fields: {},
|
|
56
|
-
isValid: true,
|
|
25
|
+
name: localization.createStandardSwitch,
|
|
26
|
+
status: 0,
|
|
57
27
|
},
|
|
58
28
|
{
|
|
59
29
|
id: 3,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
63
|
-
fields: {
|
|
64
|
-
[UI_E_ValidationFields.PORT_PROPERTIES_NETWORK]: {
|
|
65
|
-
field: '',
|
|
66
|
-
alert: '',
|
|
67
|
-
},
|
|
68
|
-
[UI_E_ValidationFields.PORT_PROPERTIES_VLAN]: {
|
|
69
|
-
field: '',
|
|
70
|
-
alert: '',
|
|
71
|
-
},
|
|
72
|
-
[UI_E_ValidationFields.PORT_PROPERTIES_MTU]: {
|
|
73
|
-
field: '',
|
|
74
|
-
alert: '',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
isValid: true,
|
|
30
|
+
name: localization.portProperties,
|
|
31
|
+
status: 0,
|
|
78
32
|
},
|
|
79
33
|
{
|
|
80
34
|
id: 4,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
84
|
-
fields: {
|
|
85
|
-
[UI_E_ValidationFields.IPV_SETTINGS_IPV]: {
|
|
86
|
-
field: '',
|
|
87
|
-
alert: '',
|
|
88
|
-
},
|
|
89
|
-
[UI_E_ValidationFields.IPV_SETTINGS_MASK]: {
|
|
90
|
-
field: '',
|
|
91
|
-
alert: '',
|
|
92
|
-
},
|
|
93
|
-
[UI_E_ValidationFields.IPV_SETTINGS_GATEWAY]: {
|
|
94
|
-
field: '',
|
|
95
|
-
alert: '',
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
isValid: true,
|
|
35
|
+
name: localization.ipV4Settings,
|
|
36
|
+
status: 0,
|
|
99
37
|
},
|
|
100
38
|
{
|
|
101
39
|
id: 5,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
localization.useNetworkLabelsToIdentifyMigrationCompatibleTwoHosts,
|
|
105
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
106
|
-
fields: {
|
|
107
|
-
[UI_E_ValidationFields.CONNECTION_SETTINGS_NETWORK]: {
|
|
108
|
-
field: '',
|
|
109
|
-
alert: '',
|
|
110
|
-
},
|
|
111
|
-
[UI_E_ValidationFields.CONNECTION_SETTINGS_VLAN]: {
|
|
112
|
-
field: '',
|
|
113
|
-
alert: '',
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
isValid: true,
|
|
40
|
+
name: localization.connectionSettings,
|
|
41
|
+
status: 0,
|
|
117
42
|
},
|
|
118
43
|
{
|
|
119
44
|
id: 6,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
123
|
-
fields: {},
|
|
124
|
-
isValid: true,
|
|
45
|
+
name: localization.addPhysicalNetworkAdapter,
|
|
46
|
+
status: 0,
|
|
125
47
|
},
|
|
126
48
|
{
|
|
127
49
|
id: 7,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
131
|
-
fields: {},
|
|
132
|
-
isValid: true,
|
|
50
|
+
name: localization.readyComplete,
|
|
51
|
+
status: 0,
|
|
133
52
|
},
|
|
134
53
|
]
|
|
135
54
|
|
|
136
|
-
export const
|
|
137
|
-
[0, 1, 3, 4, 7], // Validation done, except for ipv4 (backend problems)
|
|
138
|
-
[0, 1, 2, 3, 4, 7], // Validation done, except for ipv4 (backend problems)
|
|
139
|
-
[0, 1, 5, 7], // Validation done,
|
|
140
|
-
[0, 1, 2, 5, 7], // Disabled
|
|
141
|
-
[0, 1, 6, 7], // Disabled
|
|
142
|
-
[0, 1, 2, 7], // Disabled
|
|
55
|
+
export const stepsSchemeFunc = (step: UI_I_Step[]): UI_I_Step[][] => [
|
|
56
|
+
[step[0], step[1], step[3], step[4], step[7]], // Validation done, except for ipv4 (backend problems)
|
|
57
|
+
[step[0], step[1], step[2], step[3], step[4], step[7]], // Validation done, except for ipv4 (backend problems)
|
|
58
|
+
[step[0], step[1], step[5], step[7]], // Validation done,
|
|
59
|
+
[step[0], step[1], step[2], step[5], step[7]], // Disabled
|
|
60
|
+
[step[0], step[1], step[6], step[7]], // Disabled
|
|
61
|
+
[step[0], step[1], step[2], step[7]], // Disabled
|
|
143
62
|
]
|
|
144
63
|
|
|
64
|
+
export const secondTitleFunc = (
|
|
65
|
+
selectedStep: number,
|
|
66
|
+
localization: UI_I_Localization
|
|
67
|
+
): string => {
|
|
68
|
+
let text = ''
|
|
69
|
+
switch (selectedStep) {
|
|
70
|
+
case 0:
|
|
71
|
+
text = localization.selectConnectionType
|
|
72
|
+
break
|
|
73
|
+
case 1:
|
|
74
|
+
text = localization.selectTargetDevice
|
|
75
|
+
break
|
|
76
|
+
case 2:
|
|
77
|
+
text = localization.createStandardSwitch
|
|
78
|
+
break
|
|
79
|
+
case 3:
|
|
80
|
+
text = localization.portProperties
|
|
81
|
+
break
|
|
82
|
+
case 4:
|
|
83
|
+
text = localization.ipV4Settings
|
|
84
|
+
break
|
|
85
|
+
case 5:
|
|
86
|
+
text = localization.connectionSettings
|
|
87
|
+
break
|
|
88
|
+
case 6:
|
|
89
|
+
text = localization.addPhysicalNetworkAdapter
|
|
90
|
+
break
|
|
91
|
+
case 7:
|
|
92
|
+
text = localization.readyComplete
|
|
93
|
+
break
|
|
94
|
+
}
|
|
95
|
+
return text
|
|
96
|
+
}
|
|
97
|
+
|
|
145
98
|
export const createSecondSchemeReadyCompleteFunc = (
|
|
146
99
|
connectionSettingsValues: UI_I_ConnectionSettings,
|
|
147
100
|
targetDeviceValues: UI_I_TargetDevice,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import * as addNetworkingStepsConfig from './
|
|
1
|
+
import * as addNetworkingStepsConfig from './addNetworkingSteps'
|
|
2
2
|
import * as initialData from './initialData'
|
|
3
|
+
import * as temporaryData from './temporaryData'
|
|
4
|
+
import * as validationData from './validation'
|
|
3
5
|
import * as portProperties from './portPropertiesStep'
|
|
4
6
|
import * as selectSwitches from './selectSwitch'
|
|
5
7
|
import * as sendData from './sendData'
|
|
6
8
|
|
|
7
9
|
export const {
|
|
8
10
|
stepsFunc,
|
|
9
|
-
|
|
11
|
+
stepsSchemeFunc,
|
|
12
|
+
secondTitleFunc,
|
|
10
13
|
createSecondSchemeReadyCompleteFunc,
|
|
11
14
|
createZeroSchemeReadyCompleteFunc,
|
|
12
15
|
createFirstSchemeReadyCompleteFunc,
|
|
@@ -19,7 +22,18 @@ export const {
|
|
|
19
22
|
portPropertiesInitial,
|
|
20
23
|
ipFourSettingsInitial,
|
|
21
24
|
connectionSettingsInitial,
|
|
25
|
+
errorMessagesInitialFunc,
|
|
26
|
+
isNetworkInvalidInitial,
|
|
27
|
+
isValidNetwork,
|
|
28
|
+
isInvalidNetwork,
|
|
22
29
|
} = initialData
|
|
30
|
+
export const { temporarySwitches, temporaryNetworks } = temporaryData
|
|
31
|
+
export const {
|
|
32
|
+
connectionSettingsFieldsErrorMessages,
|
|
33
|
+
ipFourSettingsFieldsErrorMessages,
|
|
34
|
+
portPropertiesFieldsErrorMessages,
|
|
35
|
+
targetDeviceFieldsErrorMessages,
|
|
36
|
+
} = validationData
|
|
23
37
|
export const { portPropertiesEnabledServicesFunc } = portProperties
|
|
24
38
|
export const {
|
|
25
39
|
selectStandardSwitchTableHeadFunc,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UI_I_ConnectionSettings,
|
|
3
|
-
UI_I_IpFourSettings,
|
|
4
|
-
UI_I_NetworkValidation,
|
|
3
|
+
UI_I_IpFourSettings, UI_I_NetworkValidation,
|
|
5
4
|
UI_I_PortProperties,
|
|
6
5
|
UI_I_Services,
|
|
7
6
|
UI_I_TargetDevice,
|
|
8
7
|
UI_I_VlanIdData,
|
|
9
|
-
} from '~/components/common/
|
|
8
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
10
9
|
|
|
11
10
|
export const servicesInitial: UI_I_Services = {
|
|
12
11
|
vMotion: false,
|
|
@@ -57,7 +56,23 @@ export const connectionSettingsInitial: UI_I_ConnectionSettings = {
|
|
|
57
56
|
vlanId: 'None (0)',
|
|
58
57
|
}
|
|
59
58
|
|
|
59
|
+
export const errorMessagesInitialFunc = (qty: number): string[][] =>
|
|
60
|
+
new Array(qty).fill([])
|
|
61
|
+
|
|
60
62
|
export const vlanIdSelectData: UI_I_VlanIdData[] = [
|
|
61
63
|
{ text: 'None (0)', value: 'None (0)' },
|
|
62
64
|
{ text: 'All (4095)', value: 'All (4095)' },
|
|
63
|
-
]
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
export const isNetworkInvalidInitial: UI_I_NetworkValidation = {
|
|
68
|
+
valid: false,
|
|
69
|
+
checked: false,
|
|
70
|
+
}
|
|
71
|
+
export const isValidNetwork: UI_I_NetworkValidation = {
|
|
72
|
+
valid: true,
|
|
73
|
+
checked: true,
|
|
74
|
+
}
|
|
75
|
+
export const isInvalidNetwork: UI_I_NetworkValidation = {
|
|
76
|
+
valid: false,
|
|
77
|
+
checked: true,
|
|
78
|
+
}
|
package/components/common/{wizards/network/add → addNetworking}/config/portPropertiesStep.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
2
|
-
import { UI_I_PortPropertiesEnabledService } from '~/components/common/
|
|
2
|
+
import { UI_I_PortPropertiesEnabledService } from '~/components/common/addNetworking/models/interfaces'
|
|
3
3
|
|
|
4
4
|
export const portPropertiesEnabledServicesFunc = (
|
|
5
5
|
localization: UI_I_Localization,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
2
|
-
import { UI_I_TableHead } from '~/components/common/
|
|
2
|
+
import { UI_I_TableHead } from '~/components/common/addNetworking/models/interfaces'
|
|
3
3
|
|
|
4
4
|
export const selectNetworkTableHeadFunc = (
|
|
5
5
|
localization: UI_I_Localization
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
UI_I_PortProperties,
|
|
6
6
|
UI_I_TargetDevice,
|
|
7
7
|
UI_I_AddNetworkingSecondOrThirdSchemeDataSend,
|
|
8
|
-
} from '~/components/common/
|
|
8
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
9
9
|
import { UI_I_AdapterStatus } from '~/components/common/diagramMain/models/interfaces'
|
|
10
10
|
|
|
11
11
|
export const addNetworkingSecondOrThirdSchemeDataFunc = (
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const connectionSettingsFieldsErrorMessages = {
|
|
2
|
+
networkLabel: '',
|
|
3
|
+
vlanId: '',
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const ipFourSettingsFieldsErrorMessages = {
|
|
7
|
+
ipFourAddress: '',
|
|
8
|
+
subnetMask: '',
|
|
9
|
+
defaultGateway: '',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const portPropertiesFieldsErrorMessages = {
|
|
13
|
+
networkLabel: '',
|
|
14
|
+
vlanId: '',
|
|
15
|
+
mtu: '',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const targetDeviceFieldsErrorMessages = {
|
|
19
|
+
network: '',
|
|
20
|
+
switch: '',
|
|
21
|
+
standardSwitch: '',
|
|
22
|
+
mtu: '',
|
|
23
|
+
}
|
|
@@ -47,8 +47,8 @@ import {
|
|
|
47
47
|
UI_I_BodyItems,
|
|
48
48
|
UI_I_Network,
|
|
49
49
|
UI_I_SelectedNetwork,
|
|
50
|
-
} from '~/components/common/
|
|
51
|
-
import { selectStandardSwitchTableHeadFunc } from '~/components/common/
|
|
50
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
51
|
+
import { selectStandardSwitchTableHeadFunc } from '~/components/common/addNetworking/config'
|
|
52
52
|
|
|
53
53
|
interface I_SelectNetworkModalProps {
|
|
54
54
|
show: boolean
|
package/components/common/{wizards/network/add → addNetworking}/modals/SelectStandardSwitch.vue
RENAMED
|
@@ -36,10 +36,10 @@ import { UI_I_Localization } from '~/models/interfaces'
|
|
|
36
36
|
import {
|
|
37
37
|
UI_I_Switch,
|
|
38
38
|
UI_I_SelectedSwitch, UI_I_BodyItems,
|
|
39
|
-
} from '~/components/common/
|
|
39
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
40
40
|
import {
|
|
41
41
|
selectStandardSwitchTableHeadFunc
|
|
42
|
-
} from '~/components/common/
|
|
42
|
+
} from '~/components/common/addNetworking/config'
|
|
43
43
|
|
|
44
44
|
interface I_SelectSwitchModalProps {
|
|
45
45
|
show: boolean
|
|
@@ -37,8 +37,8 @@ import {
|
|
|
37
37
|
UI_I_Switch,
|
|
38
38
|
UI_I_SelectedSwitch,
|
|
39
39
|
UI_I_BodyItems,
|
|
40
|
-
} from '~/components/common/
|
|
41
|
-
import { selectSwitchTableHeadFunc } from '~/components/common/
|
|
40
|
+
} from '~/components/common/addNetworking/models/interfaces'
|
|
41
|
+
import { selectSwitchTableHeadFunc } from '~/components/common/addNetworking/config'
|
|
42
42
|
|
|
43
43
|
interface I_SelectSwitchModalProps {
|
|
44
44
|
show: boolean
|