bfg-common 1.4.93 → 1.4.94
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.
|
@@ -102,16 +102,25 @@ const busLocal = computed<string>({
|
|
|
102
102
|
})
|
|
103
103
|
const busOptions = ref<UI_I_OptionItem[]>([])
|
|
104
104
|
watch(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
() => props.guestMachineType,
|
|
106
|
+
() => {
|
|
107
|
+
if (props.guestMachineType) {
|
|
108
|
+
busOptions.value = capabilities.bus[props.guestMachineType.value]
|
|
109
|
+
// TODO временно так
|
|
110
|
+
if (props.shortOptions) {
|
|
111
|
+
busOptions.value = [
|
|
112
|
+
{ text: localization.value.common.ide, value: 'ide' },
|
|
113
|
+
{ text: localization.value.common.sata, value: 'sata' },
|
|
114
|
+
]
|
|
112
115
|
}
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
|
|
117
|
+
const hasSelected = busOptions.value.some(
|
|
118
|
+
(option) => option.value === busLocal.value
|
|
119
|
+
)
|
|
120
|
+
if (!hasSelected) busLocal.value = busOptions.value[0].value
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{ immediate: true, deep: true }
|
|
115
124
|
)
|
|
116
125
|
|
|
117
126
|
const busValidationType = computed<string>(
|
|
@@ -77,11 +77,14 @@ import {
|
|
|
77
77
|
|
|
78
78
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
79
79
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
80
|
-
import type {
|
|
80
|
+
import type {
|
|
81
|
+
UI_I_MigrateFormLocal,
|
|
82
|
+
UI_I_ChangeStepsSchemes,
|
|
83
|
+
} from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
|
|
84
|
+
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/types'
|
|
81
85
|
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
82
86
|
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
83
87
|
import type { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
|
|
84
|
-
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/lib/models/types'
|
|
85
88
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
86
89
|
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
87
90
|
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
@@ -153,6 +156,29 @@ const validationFunc = async (
|
|
|
153
156
|
const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
|
|
154
157
|
wizard.changeSteps(value, validationFunc)
|
|
155
158
|
|
|
159
|
+
// Choosing Scheme
|
|
160
|
+
watch(
|
|
161
|
+
form.migrate_type,
|
|
162
|
+
(newValue: UI_T_VmMigrateType) => {
|
|
163
|
+
const schemes: UI_I_ChangeStepsSchemes = {
|
|
164
|
+
procurator: {
|
|
165
|
+
storage: 0,
|
|
166
|
+
},
|
|
167
|
+
sphere: {
|
|
168
|
+
storage: 0,
|
|
169
|
+
resource: 1,
|
|
170
|
+
},
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const projectSchemes = schemes[props.project]
|
|
174
|
+
|
|
175
|
+
if (projectSchemes && projectSchemes[newValue] !== undefined) {
|
|
176
|
+
wizard.changeScheme(projectSchemes[newValue] as number)
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{ deep: true, immediate: true }
|
|
180
|
+
)
|
|
181
|
+
|
|
156
182
|
const loading = ref<boolean>(false)
|
|
157
183
|
|
|
158
184
|
const selectStorageSubmit = ref<number>(0)
|
|
@@ -9,6 +9,12 @@ export interface UI_I_MigrateFormLocal {
|
|
|
9
9
|
migrate_type: UI_T_VmMigrateType
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export interface UI_I_ChangeStepsSchemes {
|
|
13
|
+
[key: string]: {
|
|
14
|
+
[key in UI_T_VmMigrateType]?: number
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
12
18
|
export interface UI_I_MigrateReadyBlockData extends UI_I_TableInfoItem {
|
|
13
19
|
permissions: UI_T_VmMigrateSelectStorageTab[]
|
|
14
20
|
}
|