bfg-common 1.5.90 → 1.5.91
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/components/atoms/table/info/Info.vue +11 -5
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +36 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/maxCpu/MaxCpuNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/SharesNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/TooltipNew.vue +15 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/LimitNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +38 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIopsNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetworkNew.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/ReservationNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +1 -1
- package/components/common/wizards/datastore/add/steps/readyComplete/ReadyCompleteNew.vue +2 -71
- package/components/common/wizards/datastore/add/steps/readyComplete/ReadyCompleteOld.vue +79 -2
- package/components/common/wizards/vm/migrate/Migrate.vue +11 -10
- package/components/common/wizards/vm/migrate/lib/config/steps.ts +62 -16
- package/components/common/wizards/vm/migrate/lib/validations.ts +20 -9
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- TODO refactoring-->
|
|
3
|
-
<table class="table table-vertical">
|
|
2
|
+
<!-- TODO refactoring-->
|
|
3
|
+
<table :data-id="props.testId" class="table table-vertical">
|
|
4
4
|
<tbody>
|
|
5
5
|
<tr v-for="item in list" :key="item.id">
|
|
6
6
|
<th
|
|
@@ -22,9 +22,15 @@
|
|
|
22
22
|
<script lang="ts" setup>
|
|
23
23
|
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
24
24
|
|
|
25
|
-
const props =
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
const props = withDefaults(
|
|
26
|
+
defineProps<{
|
|
27
|
+
items: UI_I_TableInfoItem[]
|
|
28
|
+
testId?: string
|
|
29
|
+
}>(),
|
|
30
|
+
{
|
|
31
|
+
testId: '',
|
|
32
|
+
}
|
|
33
|
+
)
|
|
28
34
|
|
|
29
35
|
const list = computed<UI_I_TableInfoItem[]>(() => {
|
|
30
36
|
return props.items.map((item) => {
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="virtual-hardware">
|
|
3
|
-
<div class="action-wrap
|
|
3
|
+
<div class="action-wrap py-3 px-8">
|
|
4
4
|
<span class="device-count">{{ deviceCountText }}</span>
|
|
5
5
|
|
|
6
6
|
<div class="add-device-dropdown-wrap">
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
|
-
<div class="overflow-auto px-
|
|
34
|
+
<div class="overflow-auto px-8">
|
|
35
35
|
<div class="stack-view">
|
|
36
36
|
<common-vm-actions-common-customize-hardware-virtual-hardware-cpu
|
|
37
37
|
:max-cpus="props.maxCpus"
|
|
@@ -17,10 +17,29 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
</template>
|
|
19
19
|
<template #stackBlockContent>
|
|
20
|
-
<div class="cd-dvd-drive-content flex-align-center">
|
|
20
|
+
<div :class="['cd-dvd-drive-content flex-align-center', props.type]">
|
|
21
21
|
<template v-if="props.type === 'removed'">
|
|
22
|
-
<
|
|
23
|
-
|
|
22
|
+
<ui-tooltip
|
|
23
|
+
id="device-will-removed-text"
|
|
24
|
+
test-id="device-will-removed-text"
|
|
25
|
+
size="md"
|
|
26
|
+
position="bottom"
|
|
27
|
+
position-by-tooltip="center"
|
|
28
|
+
:margin-between-trigger="8"
|
|
29
|
+
class="text-ellipsis"
|
|
30
|
+
>
|
|
31
|
+
<template #target>
|
|
32
|
+
<span
|
|
33
|
+
id="device-will-removed-text"
|
|
34
|
+
class="device-will-removed-text text-ellipsis"
|
|
35
|
+
>{{ localization.common.deviceWillRemoved }}</span
|
|
36
|
+
>
|
|
37
|
+
</template>
|
|
38
|
+
<template #content>
|
|
39
|
+
{{ localization.common.deviceWillRemoved }}
|
|
40
|
+
</template>
|
|
41
|
+
</ui-tooltip>
|
|
42
|
+
<div class="flex-align-center checkbox-wrap" @click.stop>
|
|
24
43
|
<ui-checkbox
|
|
25
44
|
:id="`cd-dvd-delete-files-from-datastore-${props.index}`"
|
|
26
45
|
v-model="deleteFilesFromDatastore"
|
|
@@ -150,6 +169,20 @@ const onChangeCdDvdDrive = (data: string): void => {
|
|
|
150
169
|
<style lang="scss" scoped>
|
|
151
170
|
.cd-dvd-drive-content {
|
|
152
171
|
gap: 8px;
|
|
172
|
+
&.removed {
|
|
173
|
+
gap: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.device-will-removed-text {
|
|
177
|
+
font-size: 13px;
|
|
178
|
+
color: #9da6ad;
|
|
179
|
+
}
|
|
180
|
+
.checkbox-wrap {
|
|
181
|
+
padding: 0 12px;
|
|
182
|
+
margin: 0 12px;
|
|
183
|
+
border-right: 1px solid #e9ebeda3;
|
|
184
|
+
border-left: 1px solid #e9ebeda3;
|
|
185
|
+
}
|
|
153
186
|
}
|
|
154
187
|
|
|
155
188
|
:deep(.cd-dvd-drive-select .ui-main-select-toggle) {
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
:error-text="props.vcpusLocalAndApiErrorsTexts"
|
|
27
27
|
test-id="vm-wizard-cpu-combobox"
|
|
28
28
|
size="sm"
|
|
29
|
+
width="auto"
|
|
29
30
|
@click.stop
|
|
30
31
|
/>
|
|
31
32
|
|
|
@@ -170,7 +171,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
170
171
|
|
|
171
172
|
<style scoped lang="scss">
|
|
172
173
|
.title {
|
|
173
|
-
margin-right:
|
|
174
|
+
margin-right: 8px;
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
:deep(.ui-main-select-toggle) {
|
|
@@ -5,16 +5,18 @@
|
|
|
5
5
|
height="20"
|
|
6
6
|
name="info"
|
|
7
7
|
data-id="show-cpu-help-icon"
|
|
8
|
+
:class="['cpu-help-icon', { active: isShowCpuHelp }]"
|
|
8
9
|
@click.stop="isShowCpuHelp = !isShowCpuHelp"
|
|
9
10
|
/>
|
|
10
11
|
<Teleport to="body">
|
|
11
12
|
<ui-dropdown
|
|
12
13
|
:show="isShowCpuHelp"
|
|
13
14
|
elem-id="cpu-help-icon"
|
|
14
|
-
test-id=""
|
|
15
|
+
test-id="cpu-help"
|
|
15
16
|
:items="[]"
|
|
16
|
-
width="
|
|
17
|
-
|
|
17
|
+
width="480px"
|
|
18
|
+
max-height="unset"
|
|
19
|
+
left
|
|
18
20
|
@hide="isShowCpuHelp = false"
|
|
19
21
|
>
|
|
20
22
|
<template #content>
|
|
@@ -74,6 +76,16 @@ const isShowCpuHelp = ref<boolean>(false)
|
|
|
74
76
|
</script>
|
|
75
77
|
|
|
76
78
|
<style lang="scss" scoped>
|
|
79
|
+
.cpu-help-icon {
|
|
80
|
+
color: #9da6ad;
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
color: #4d5d69;
|
|
84
|
+
}
|
|
85
|
+
&.active {
|
|
86
|
+
color: #008fd6;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
77
89
|
.cpu-help-content {
|
|
78
90
|
padding: 16px;
|
|
79
91
|
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
:error-text="props.errorText"
|
|
25
25
|
test-id="vm-wizard-memory-field"
|
|
26
26
|
size="sm"
|
|
27
|
+
width="auto"
|
|
27
28
|
@change="emits('select-memory', $event)"
|
|
28
29
|
@click.stop
|
|
29
30
|
/>
|
|
@@ -134,7 +135,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
134
135
|
|
|
135
136
|
<style scoped lang="scss">
|
|
136
137
|
.title {
|
|
137
|
-
margin-right:
|
|
138
|
+
margin-right: 8px;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
.memory-content {
|
|
@@ -23,11 +23,30 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
25
25
|
<template #stackBlockContent>
|
|
26
|
-
|
|
27
|
-
<div class="new-hard-disk-content flex-align-center">
|
|
26
|
+
<div :class="['new-hard-disk-content flex-align-center', props.type]">
|
|
28
27
|
<template v-if="props.type === 'removed'">
|
|
29
|
-
<
|
|
30
|
-
|
|
28
|
+
<ui-tooltip
|
|
29
|
+
id="device-will-removed-text"
|
|
30
|
+
test-id="device-will-removed-text"
|
|
31
|
+
size="md"
|
|
32
|
+
position="bottom"
|
|
33
|
+
position-by-tooltip="center"
|
|
34
|
+
:margin-between-trigger="8"
|
|
35
|
+
class="text-ellipsis"
|
|
36
|
+
>
|
|
37
|
+
<template #target>
|
|
38
|
+
<span
|
|
39
|
+
id="device-will-removed-text"
|
|
40
|
+
class="device-will-removed-text text-ellipsis"
|
|
41
|
+
>{{ localization.common.deviceWillRemoved }}</span
|
|
42
|
+
>
|
|
43
|
+
</template>
|
|
44
|
+
<template #content>
|
|
45
|
+
{{ localization.common.deviceWillRemoved }}
|
|
46
|
+
</template>
|
|
47
|
+
</ui-tooltip>
|
|
48
|
+
|
|
49
|
+
<div class="flex-align-center checkbox-wrap" @click.stop>
|
|
31
50
|
<ui-checkbox
|
|
32
51
|
v-model="deleteFilesFromDatastore"
|
|
33
52
|
:test-id="`hard-disk-delete-files-from-datastore-${props.index}`"
|
|
@@ -206,11 +225,25 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
206
225
|
|
|
207
226
|
<style scoped lang="scss">
|
|
208
227
|
.title {
|
|
209
|
-
margin-right:
|
|
228
|
+
margin-right: 8px;
|
|
210
229
|
}
|
|
211
230
|
|
|
212
231
|
.new-hard-disk-content {
|
|
213
232
|
gap: 8px;
|
|
233
|
+
&.removed {
|
|
234
|
+
gap: 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.device-will-removed-text {
|
|
238
|
+
font-size: 13px;
|
|
239
|
+
color: #9da6ad;
|
|
240
|
+
}
|
|
241
|
+
.checkbox-wrap {
|
|
242
|
+
padding: 0 12px;
|
|
243
|
+
margin: 0 12px;
|
|
244
|
+
border-right: 1px solid #e9ebeda3;
|
|
245
|
+
border-left: 1px solid #e9ebeda3;
|
|
246
|
+
}
|
|
214
247
|
}
|
|
215
248
|
|
|
216
249
|
:deep(.ui-main-select-toggle) {
|
|
@@ -1,54 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ready-complete">
|
|
3
|
-
|
|
4
|
-
<template #default="{ item }">
|
|
5
|
-
<common-details-item
|
|
6
|
-
:has-children="true"
|
|
7
|
-
open-by-default
|
|
8
|
-
:test-id="item.testId"
|
|
9
|
-
>
|
|
10
|
-
<template #stackBlockKey>
|
|
11
|
-
<span class="list__labels">
|
|
12
|
-
{{ item.label }}
|
|
13
|
-
</span>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<template #stackChildren>
|
|
17
|
-
<template
|
|
18
|
-
v-for="(item2, key2) in item.items"
|
|
19
|
-
:key="`${item2}_${key2}`"
|
|
20
|
-
>
|
|
21
|
-
<common-details-item
|
|
22
|
-
:has-children="false"
|
|
23
|
-
:test-id="item2.testId"
|
|
24
|
-
class="list__default-style"
|
|
25
|
-
>
|
|
26
|
-
<template #stackBlockKey>
|
|
27
|
-
<div>
|
|
28
|
-
{{ item2.label }}
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
<template #stackBlockContent>
|
|
32
|
-
<div v-if="item2.data">
|
|
33
|
-
<div
|
|
34
|
-
v-for="item3 in item2.data"
|
|
35
|
-
:key="item3"
|
|
36
|
-
class="flex-align-center"
|
|
37
|
-
>
|
|
38
|
-
<div class="vsphere-icon-host"></div>
|
|
39
|
-
<span>{{ item3 }}</span>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
<span v-else>
|
|
43
|
-
{{ item2.value }}
|
|
44
|
-
</span>
|
|
45
|
-
</template>
|
|
46
|
-
</common-details-item>
|
|
47
|
-
</template>
|
|
48
|
-
</template>
|
|
49
|
-
</common-details-item>
|
|
50
|
-
</template>
|
|
51
|
-
</common-details-list>
|
|
3
|
+
{{ props.dataReadyView }}
|
|
52
4
|
</div>
|
|
53
5
|
</template>
|
|
54
6
|
|
|
@@ -61,32 +13,11 @@ const props = defineProps<{
|
|
|
61
13
|
}>()
|
|
62
14
|
|
|
63
15
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
64
|
-
|
|
65
16
|
const properties = computed<UI_I_DetailsItem[]>(() => props.dataReadyView)
|
|
17
|
+
console.log(localization, properties)
|
|
66
18
|
</script>
|
|
67
19
|
|
|
68
20
|
<style lang="scss" scoped>
|
|
69
|
-
@import '~/assets/scss/common/mixins.scss';
|
|
70
21
|
.ready-complete {
|
|
71
|
-
&__list {
|
|
72
|
-
@include flex($dir: column);
|
|
73
|
-
padding: 12px 0;
|
|
74
|
-
row-gap: 15px;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
.list {
|
|
78
|
-
&__labels {
|
|
79
|
-
@include text($fs: 13px, $fw: 700);
|
|
80
|
-
}
|
|
81
|
-
:deep(.list__default-style) {
|
|
82
|
-
.stack-block {
|
|
83
|
-
&__label {
|
|
84
|
-
align-items: flex-start;
|
|
85
|
-
}
|
|
86
|
-
&-content {
|
|
87
|
-
white-space: pre-line;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
22
|
}
|
|
92
23
|
</style>
|
|
@@ -1,15 +1,92 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ready-complete">
|
|
3
|
-
|
|
3
|
+
<common-details-list :items="properties" class="ready-complete__list list">
|
|
4
|
+
<template #default="{ item }">
|
|
5
|
+
<common-details-item
|
|
6
|
+
:has-children="true"
|
|
7
|
+
open-by-default
|
|
8
|
+
:test-id="item.testId"
|
|
9
|
+
>
|
|
10
|
+
<template #stackBlockKey>
|
|
11
|
+
<span class="list__labels">
|
|
12
|
+
{{ item.label }}
|
|
13
|
+
</span>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<template #stackChildren>
|
|
17
|
+
<template
|
|
18
|
+
v-for="(item2, key2) in item.items"
|
|
19
|
+
:key="`${item2}_${key2}`"
|
|
20
|
+
>
|
|
21
|
+
<common-details-item
|
|
22
|
+
:has-children="false"
|
|
23
|
+
:test-id="item2.testId"
|
|
24
|
+
class="list__default-style"
|
|
25
|
+
>
|
|
26
|
+
<template #stackBlockKey>
|
|
27
|
+
<div>
|
|
28
|
+
{{ item2.label }}
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
<template #stackBlockContent>
|
|
32
|
+
<div v-if="item2.data">
|
|
33
|
+
<div
|
|
34
|
+
v-for="item3 in item2.data"
|
|
35
|
+
:key="item3"
|
|
36
|
+
class="flex-align-center"
|
|
37
|
+
>
|
|
38
|
+
<div class="vsphere-icon-host"></div>
|
|
39
|
+
<span>{{ item3 }}</span>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<span v-else>
|
|
43
|
+
{{ item2.value }}
|
|
44
|
+
</span>
|
|
45
|
+
</template>
|
|
46
|
+
</common-details-item>
|
|
47
|
+
</template>
|
|
48
|
+
</template>
|
|
49
|
+
</common-details-item>
|
|
50
|
+
</template>
|
|
51
|
+
</common-details-list>
|
|
4
52
|
</div>
|
|
5
53
|
</template>
|
|
6
54
|
|
|
7
55
|
<script lang="ts" setup>
|
|
8
56
|
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
57
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
9
58
|
|
|
10
59
|
const props = defineProps<{
|
|
11
60
|
dataReadyView: UI_I_DetailsItem[]
|
|
12
61
|
}>()
|
|
62
|
+
|
|
63
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
64
|
+
|
|
65
|
+
const properties = computed<UI_I_DetailsItem[]>(() => props.dataReadyView)
|
|
13
66
|
</script>
|
|
14
67
|
|
|
15
|
-
<style lang="scss" scoped
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
@import 'assets/scss/common/mixins.scss';
|
|
70
|
+
.ready-complete {
|
|
71
|
+
&__list {
|
|
72
|
+
@include flex($dir: column);
|
|
73
|
+
padding: 12px 0;
|
|
74
|
+
row-gap: 15px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
.list {
|
|
78
|
+
&__labels {
|
|
79
|
+
@include text($fs: 13px, $fw: 700);
|
|
80
|
+
}
|
|
81
|
+
:deep(.list__default-style) {
|
|
82
|
+
.stack-block {
|
|
83
|
+
&__label {
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
}
|
|
86
|
+
&-content {
|
|
87
|
+
white-space: pre-line;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -14,26 +14,26 @@
|
|
|
14
14
|
>
|
|
15
15
|
<template #modalBody="{ selectedStep }">
|
|
16
16
|
<common-pages-scheduled-tasks-modals-common-new-task-form
|
|
17
|
-
v-if="selectedStep.id ===
|
|
17
|
+
v-if="selectedStep.id === dynamicSteps.schedulingOptions"
|
|
18
18
|
v-model="modelSchedulerTask"
|
|
19
19
|
:target="selectedVirtualMachine"
|
|
20
20
|
/>
|
|
21
21
|
|
|
22
22
|
<common-wizards-vm-migrate-select-type
|
|
23
|
-
v-if="selectedStep.id ===
|
|
23
|
+
v-if="selectedStep.id === dynamicSteps.selectMigrationType"
|
|
24
24
|
v-model="form.migrate_type"
|
|
25
25
|
:project="props.project"
|
|
26
26
|
/>
|
|
27
27
|
|
|
28
28
|
<common-wizards-vm-migrate-select-target-server
|
|
29
|
-
v-if="selectedStep.id ===
|
|
29
|
+
v-if="selectedStep.id === dynamicSteps.selectTargetVCenterSer"
|
|
30
30
|
v-model="form.target_server"
|
|
31
31
|
v-model:connect-server="isConnectSourceServer"
|
|
32
32
|
:wizard="wizard"
|
|
33
33
|
/>
|
|
34
34
|
|
|
35
35
|
<common-wizards-vm-migrate-select-compute-resource
|
|
36
|
-
v-show="selectedStep.id ===
|
|
36
|
+
v-show="selectedStep.id === dynamicSteps.selectComputeResource"
|
|
37
37
|
v-model="form"
|
|
38
38
|
:alert-messages="alertMessages[3]"
|
|
39
39
|
:get-compute-resource-data="props.getComputeResourceData"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<common-wizards-vm-migrate-select-storage
|
|
46
|
-
v-show="selectedStep.id ===
|
|
46
|
+
v-show="selectedStep.id === dynamicSteps.selectStorage"
|
|
47
47
|
v-model="form"
|
|
48
48
|
:alert-messages="alertMessages[4]"
|
|
49
49
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
@@ -54,20 +54,20 @@
|
|
|
54
54
|
/>
|
|
55
55
|
|
|
56
56
|
<common-wizards-vm-migrate-select-network
|
|
57
|
-
v-show="selectedStep.id ===
|
|
57
|
+
v-show="selectedStep.id === dynamicSteps.selectNetworks"
|
|
58
58
|
v-model="form.network"
|
|
59
59
|
:vm-info="props.vmInfo"
|
|
60
60
|
:networks="props.networks"
|
|
61
61
|
/>
|
|
62
62
|
|
|
63
63
|
<common-wizards-vm-migrate-select-priority
|
|
64
|
-
v-if="selectedStep.id ===
|
|
64
|
+
v-if="selectedStep.id === dynamicSteps.migrationStrategy"
|
|
65
65
|
v-model="form.vMotion_priority"
|
|
66
66
|
:vm-state="props.vmState"
|
|
67
67
|
/>
|
|
68
68
|
|
|
69
69
|
<common-ready-to-complete
|
|
70
|
-
v-if="selectedStep.id ===
|
|
70
|
+
v-if="selectedStep.id === dynamicSteps.readyComplete"
|
|
71
71
|
:data="dataReadyView"
|
|
72
72
|
/>
|
|
73
73
|
</template>
|
|
@@ -82,6 +82,7 @@ import type {
|
|
|
82
82
|
} from '~/components/atoms/wizard/lib/models/interfaces'
|
|
83
83
|
import Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
84
84
|
import {
|
|
85
|
+
dynamicSteps,
|
|
85
86
|
stepsFunc,
|
|
86
87
|
stepsSchemeInitial,
|
|
87
88
|
} from '~/components/common/wizards/vm/migrate/lib/config/steps'
|
|
@@ -193,7 +194,7 @@ const validationFunc = async (
|
|
|
193
194
|
): Promise<UI_I_ValidationReturn> => {
|
|
194
195
|
let stepHasError = false
|
|
195
196
|
|
|
196
|
-
if (wizard.isValidateForStep(
|
|
197
|
+
if (wizard.isValidateForStep(dynamicSteps.selectComputeResource, currentStep.id, nextStep.id)) {
|
|
197
198
|
const nameValidation = await validation.checkSelectedResourceSync(
|
|
198
199
|
localization.value,
|
|
199
200
|
form.value.resource,
|
|
@@ -206,7 +207,7 @@ const validationFunc = async (
|
|
|
206
207
|
stepHasError = nameValidation.stepHasError
|
|
207
208
|
}
|
|
208
209
|
|
|
209
|
-
if (wizard.isValidateForStep(
|
|
210
|
+
if (wizard.isValidateForStep(dynamicSteps.selectStorage, currentStep.id, nextStep.id)) {
|
|
210
211
|
const nameValidation = await validation.checkSelectedDatastoreSync(
|
|
211
212
|
localization.value,
|
|
212
213
|
form.value.storage,
|
|
@@ -2,13 +2,23 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
|
2
2
|
import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
3
3
|
import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
|
|
4
4
|
|
|
5
|
+
export const dynamicSteps = {
|
|
6
|
+
schedulingOptions: 0,
|
|
7
|
+
selectMigrationType: 1,
|
|
8
|
+
selectTargetVCenterSer: 2,
|
|
9
|
+
selectComputeResource: 3,
|
|
10
|
+
selectStorage: 4,
|
|
11
|
+
selectNetworks: 5,
|
|
12
|
+
migrationStrategy: 6,
|
|
13
|
+
readyComplete: 7,
|
|
14
|
+
}
|
|
5
15
|
export const stepsFunc = (
|
|
6
16
|
localization: UI_I_Localization,
|
|
7
17
|
isScheduledTasks: boolean
|
|
8
18
|
): UI_I_WizardStep[] => {
|
|
9
|
-
|
|
19
|
+
return [
|
|
10
20
|
{
|
|
11
|
-
id:
|
|
21
|
+
id: dynamicSteps.schedulingOptions,
|
|
12
22
|
stepName: '',
|
|
13
23
|
title: localization.common.schedulingOptions,
|
|
14
24
|
subTitle: '',
|
|
@@ -18,7 +28,7 @@ export const stepsFunc = (
|
|
|
18
28
|
testId: 'migrate-vm-scheduling-options',
|
|
19
29
|
},
|
|
20
30
|
{
|
|
21
|
-
id:
|
|
31
|
+
id: dynamicSteps.selectMigrationType,
|
|
22
32
|
title: localization.common.selectMigrationType,
|
|
23
33
|
subTitle: localization.common.selectMigrationTypeDesc,
|
|
24
34
|
status: UI_E_WIZARD_STATUS[!isScheduledTasks ? 'SELECTED' : 'INACTIVE'],
|
|
@@ -27,7 +37,7 @@ export const stepsFunc = (
|
|
|
27
37
|
testId: 'migrate-vm-select-type',
|
|
28
38
|
},
|
|
29
39
|
{
|
|
30
|
-
id:
|
|
40
|
+
id: dynamicSteps.selectTargetVCenterSer,
|
|
31
41
|
title: localization.common.selectTargetVCenterSer,
|
|
32
42
|
subTitle: localization.common.selectComputeResourceDesc,
|
|
33
43
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
@@ -41,7 +51,7 @@ export const stepsFunc = (
|
|
|
41
51
|
testId: 'migrate-vm-select-target-server',
|
|
42
52
|
},
|
|
43
53
|
{
|
|
44
|
-
id:
|
|
54
|
+
id: dynamicSteps.selectComputeResource,
|
|
45
55
|
title: localization.common.selectComputeResource,
|
|
46
56
|
subTitle: localization.common.selectComputeResourceDesc,
|
|
47
57
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
@@ -55,7 +65,7 @@ export const stepsFunc = (
|
|
|
55
65
|
testId: 'migrate-vm-select-compute-resource',
|
|
56
66
|
},
|
|
57
67
|
{
|
|
58
|
-
id:
|
|
68
|
+
id: dynamicSteps.selectStorage,
|
|
59
69
|
title: localization.common.selectStorage,
|
|
60
70
|
subTitle: localization.common.selectStorageDesc,
|
|
61
71
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
@@ -69,7 +79,7 @@ export const stepsFunc = (
|
|
|
69
79
|
testId: 'migrate-vm-select-storage',
|
|
70
80
|
},
|
|
71
81
|
{
|
|
72
|
-
id:
|
|
82
|
+
id: dynamicSteps.selectNetworks,
|
|
73
83
|
title: localization.common.selectNetworks,
|
|
74
84
|
subTitle: localization.common.selectNetworksDesc,
|
|
75
85
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
@@ -78,7 +88,7 @@ export const stepsFunc = (
|
|
|
78
88
|
testId: 'migrate-vm-select-networks',
|
|
79
89
|
},
|
|
80
90
|
{
|
|
81
|
-
id:
|
|
91
|
+
id: dynamicSteps.migrationStrategy,
|
|
82
92
|
title: localization.migrateVm.migrationStrategy,
|
|
83
93
|
subTitle: localization.common.selectVMotionPriorityDesc,
|
|
84
94
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
@@ -87,7 +97,7 @@ export const stepsFunc = (
|
|
|
87
97
|
testId: 'migrate-vm-select-vMotion-priority',
|
|
88
98
|
},
|
|
89
99
|
{
|
|
90
|
-
id:
|
|
100
|
+
id: dynamicSteps.readyComplete,
|
|
91
101
|
title: localization.common.readyComplete,
|
|
92
102
|
subTitle: '',
|
|
93
103
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
@@ -96,16 +106,52 @@ export const stepsFunc = (
|
|
|
96
106
|
testId: 'migrate-vm-ready-complete',
|
|
97
107
|
},
|
|
98
108
|
]
|
|
99
|
-
return result
|
|
100
109
|
}
|
|
101
110
|
|
|
102
111
|
export const stepsSchemeInitial: number[][] = [
|
|
103
|
-
[
|
|
104
|
-
|
|
112
|
+
[
|
|
113
|
+
dynamicSteps.selectMigrationType,
|
|
114
|
+
dynamicSteps.selectStorage,
|
|
115
|
+
dynamicSteps.readyComplete,
|
|
116
|
+
], // Procurator and Sphere Scheme for "Change storage only" type
|
|
117
|
+
[
|
|
118
|
+
dynamicSteps.schedulingOptions,
|
|
119
|
+
dynamicSteps.selectMigrationType,
|
|
120
|
+
dynamicSteps.selectStorage,
|
|
121
|
+
dynamicSteps.readyComplete,
|
|
122
|
+
], // Procurator and Sphere Scheme for "Change storage only" type (from Scheduled tasks)
|
|
105
123
|
|
|
106
|
-
[
|
|
107
|
-
|
|
124
|
+
[
|
|
125
|
+
dynamicSteps.selectMigrationType,
|
|
126
|
+
dynamicSteps.selectComputeResource,
|
|
127
|
+
// dynamicSteps.selectNetworks, // пока что скрываем
|
|
128
|
+
dynamicSteps.migrationStrategy,
|
|
129
|
+
dynamicSteps.readyComplete,
|
|
130
|
+
], // Sphere Scheme for "Change compute resource only" type
|
|
131
|
+
[
|
|
132
|
+
dynamicSteps.schedulingOptions,
|
|
133
|
+
dynamicSteps.selectMigrationType,
|
|
134
|
+
dynamicSteps.selectComputeResource,
|
|
135
|
+
// dynamicSteps.selectNetworks, // пока что скрываем
|
|
136
|
+
dynamicSteps.migrationStrategy,
|
|
137
|
+
dynamicSteps.readyComplete,
|
|
138
|
+
], // Sphere Scheme for "Change compute resource only" type (from Scheduled tasks)
|
|
108
139
|
|
|
109
|
-
[
|
|
110
|
-
|
|
140
|
+
[
|
|
141
|
+
dynamicSteps.selectMigrationType,
|
|
142
|
+
dynamicSteps.selectComputeResource,
|
|
143
|
+
dynamicSteps.selectStorage,
|
|
144
|
+
// dynamicSteps.selectNetworks, // пока что скрываем
|
|
145
|
+
dynamicSteps.migrationStrategy,
|
|
146
|
+
dynamicSteps.readyComplete,
|
|
147
|
+
], // Sphere Scheme for "Change both compute resource and storage" type
|
|
148
|
+
[
|
|
149
|
+
dynamicSteps.selectMigrationType,
|
|
150
|
+
dynamicSteps.selectTargetVCenterSer,
|
|
151
|
+
dynamicSteps.selectComputeResource,
|
|
152
|
+
dynamicSteps.selectStorage,
|
|
153
|
+
// dynamicSteps.selectNetworks, // пока что скрываем
|
|
154
|
+
dynamicSteps.migrationStrategy,
|
|
155
|
+
dynamicSteps.readyComplete,
|
|
156
|
+
], // Sphere Scheme for "Cross Sphere Zone export" type
|
|
111
157
|
]
|
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
} from '~/components/atoms/wizard/lib/models/interfaces'
|
|
6
6
|
import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
7
7
|
import type { UI_I_ComputeResourceFormLocal } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces'
|
|
8
|
+
import { dynamicSteps } from '~/components/common/wizards/vm/migrate/lib/config/steps'
|
|
8
9
|
|
|
9
10
|
export const checkSelectedDatastoreSync = (
|
|
10
11
|
localization: UI_I_Localization,
|
|
@@ -15,12 +16,12 @@ export const checkSelectedDatastoreSync = (
|
|
|
15
16
|
let stepHasError = false
|
|
16
17
|
|
|
17
18
|
if (!name) {
|
|
18
|
-
stepHasError = wizard.setValidation(
|
|
19
|
+
stepHasError = wizard.setValidation(dynamicSteps.selectStorage, 'name', {
|
|
19
20
|
fieldMessage: '',
|
|
20
21
|
alertMessage: localization.common.selectValidDestinationStorage,
|
|
21
22
|
})
|
|
22
|
-
} else if (wizard.hasMessage(
|
|
23
|
-
value = wizard.removeValidation(
|
|
23
|
+
} else if (wizard.hasMessage(dynamicSteps.selectStorage, 'name')) {
|
|
24
|
+
value = wizard.removeValidation(dynamicSteps.selectStorage, 'name', value)
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
return {
|
|
@@ -42,12 +43,22 @@ export const checkSelectedResourceSync = (
|
|
|
42
43
|
)
|
|
43
44
|
|
|
44
45
|
if (!hasSelectedData) {
|
|
45
|
-
stepHasError = wizard.setValidation(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
stepHasError = wizard.setValidation(
|
|
47
|
+
dynamicSteps.selectComputeResource,
|
|
48
|
+
'resource',
|
|
49
|
+
{
|
|
50
|
+
fieldMessage: '',
|
|
51
|
+
alertMessage: localization.common.selectValidDestinationComputeResource,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
} else if (
|
|
55
|
+
wizard.hasMessage(dynamicSteps.selectComputeResource, 'resource')
|
|
56
|
+
) {
|
|
57
|
+
value = wizard.removeValidation(
|
|
58
|
+
dynamicSteps.selectComputeResource,
|
|
59
|
+
'resource',
|
|
60
|
+
value
|
|
61
|
+
)
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
return {
|