bfg-common 1.4.91 → 1.4.93
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/common/wizards/vmNew/migrate/Migrate.vue +11 -5
- package/components/common/wizards/vmNew/migrate/lib/config/steps.ts +1 -3
- package/components/common/wizards/vmNew/migrate/lib/models/interfaces.ts +5 -0
- package/components/common/wizards/vmNew/migrate/select/type/Type.vue +10 -21
- package/package.json +1 -1
- /package/components/common/wizards/vmNew/migrate/{lib → select/type/lib}/models/types.ts +0 -0
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
@submit="onFinish"
|
|
14
14
|
>
|
|
15
15
|
<template #modalBody="{ selectedStep }">
|
|
16
|
-
<common-wizards-vm-migrate-select-type
|
|
17
|
-
v-
|
|
18
|
-
v-model="
|
|
16
|
+
<common-wizards-vm-new-migrate-select-type
|
|
17
|
+
v-if="selectedStep.id === 0"
|
|
18
|
+
v-model="form.migrate_type"
|
|
19
19
|
:project="props.project"
|
|
20
20
|
/>
|
|
21
21
|
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<common-wizards-vm-migrate-select-compute-resource
|
|
27
27
|
v-show="currentBlockId === 'select-compute-resource'"
|
|
28
|
+
v-model="form"
|
|
28
29
|
:submit="selectComputeResourceSubmit"
|
|
29
30
|
:get-compute-resource-data="props.getComputeResourceData"
|
|
30
31
|
:migrate-type="vmMigrateType"
|
|
@@ -32,8 +33,8 @@
|
|
|
32
33
|
:compute-resource-tree="props.computeResourceTree"
|
|
33
34
|
/>
|
|
34
35
|
|
|
35
|
-
<common-wizards-vm-migrate-select-storage
|
|
36
|
-
v-show="
|
|
36
|
+
<common-wizards-vm-new-migrate-select-storage
|
|
37
|
+
v-show="selectedStep.id === 3"
|
|
37
38
|
:submit="selectStorageSubmit"
|
|
38
39
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
39
40
|
:datastore="props.datastore"
|
|
@@ -76,6 +77,7 @@ import {
|
|
|
76
77
|
|
|
77
78
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
78
79
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
80
|
+
import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
|
|
79
81
|
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
80
82
|
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
81
83
|
import type { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
|
|
@@ -114,6 +116,10 @@ const wizard: Wizard = new Wizard(
|
|
|
114
116
|
const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
|
|
115
117
|
const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
|
|
116
118
|
|
|
119
|
+
const form = ref<UI_I_MigrateFormLocal>({
|
|
120
|
+
migrate_type: props.project === 'procurator' ? 'storage' : 'resource',
|
|
121
|
+
})
|
|
122
|
+
|
|
117
123
|
const validationFunc = async (
|
|
118
124
|
value: UI_I_WizardStep[],
|
|
119
125
|
currentStep: UI_I_WizardStep,
|
|
@@ -76,9 +76,7 @@ export const stepsFunc = (
|
|
|
76
76
|
]
|
|
77
77
|
|
|
78
78
|
export const stepsSchemeInitial: number[][] = [
|
|
79
|
-
[0,
|
|
80
|
-
[0, 1, 3, 4, 5, 6], // Procurator Scheme for "shared-storm" type
|
|
81
|
-
[0, 1, 3, 4, 5, 6], // Procurator Scheme for "nfs" type
|
|
79
|
+
[0, 3, 6], // Procurator Scheme for "Change storage only" type
|
|
82
80
|
[0, 1, 3, 4, 5, 6], // Sphere Scheme for "shared-storm" type
|
|
83
81
|
[0, 1, 3, 4, 5, 6], // Sphere Scheme for "nfs" type
|
|
84
82
|
]
|
|
@@ -3,6 +3,11 @@ import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards
|
|
|
3
3
|
import type { UI_I_SelectStorageReadyData } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/interfaces'
|
|
4
4
|
import type { UI_T_SelectVMotionPriority } from '~/components/common/wizards/vm/migrate/select/priority/lib/models/types'
|
|
5
5
|
import type { UI_I_ComputeResourceDataLocal } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces'
|
|
6
|
+
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/types'
|
|
7
|
+
|
|
8
|
+
export interface UI_I_MigrateFormLocal {
|
|
9
|
+
migrate_type: UI_T_VmMigrateType
|
|
10
|
+
}
|
|
6
11
|
|
|
7
12
|
export interface UI_I_MigrateReadyBlockData extends UI_I_TableInfoItem {
|
|
8
13
|
permissions: UI_T_VmMigrateSelectStorageTab[]
|
|
@@ -1,38 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/>
|
|
7
|
-
</div>
|
|
2
|
+
<common-select-radio-group
|
|
3
|
+
v-model="selectedMigrateTypeLocal"
|
|
4
|
+
:options="vmMigrationTypes"
|
|
5
|
+
/>
|
|
8
6
|
</template>
|
|
9
7
|
|
|
10
8
|
<script lang="ts" setup>
|
|
11
9
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
12
|
-
import type { UI_I_VmMigrateTypeOption } from '~/components/common/wizards/
|
|
13
|
-
import {
|
|
10
|
+
import type { UI_I_VmMigrateTypeOption } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/interfaces'
|
|
11
|
+
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/types'
|
|
12
|
+
import { vmMigrateTypesFunc } from '~/components/common/wizards/vmNew/migrate/select/type/lib/config/typeOptions'
|
|
14
13
|
|
|
15
14
|
const props = defineProps<{
|
|
16
|
-
modelValue: string
|
|
17
15
|
project: UI_T_Project
|
|
18
16
|
}>()
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
}
|
|
17
|
+
const selectedMigrateTypeLocal = defineModel<UI_T_VmMigrateType>({
|
|
18
|
+
required: true,
|
|
19
|
+
})
|
|
22
20
|
const localization = computed<any>(() => useLocal())
|
|
23
21
|
|
|
24
22
|
const vmMigrationTypes = ref<UI_I_VmMigrateTypeOption[]>(
|
|
25
23
|
vmMigrateTypesFunc(localization.value, props.project)
|
|
26
24
|
)
|
|
27
|
-
|
|
28
|
-
const selectedType = computed<string>({
|
|
29
|
-
get() {
|
|
30
|
-
return props.modelValue
|
|
31
|
-
},
|
|
32
|
-
set(newValue) {
|
|
33
|
-
emits('update:model-value', newValue)
|
|
34
|
-
},
|
|
35
|
-
})
|
|
36
25
|
</script>
|
|
37
26
|
|
|
38
27
|
<style lang="scss" scoped></style>
|
package/package.json
CHANGED
|
File without changes
|