bfg-common 1.4.113 → 1.4.114
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/scss/common/icons/icons-5.scss +28 -4
- package/components/common/layout/theHeader/TheHeaderNew.vue +12 -2
- package/components/common/layout/theHeader/ThemeSwitch.vue +8 -1
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +8 -2
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +7 -1
- package/components/common/select/input/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +4 -3
- package/package.json +2 -2
- package/components/common/wizards/vmNew/common/computeResource/TreeView.vue +0 -61
- package/components/common/wizards/vmNew/common/tooltip/Tooltip.vue +0 -84
- package/components/common/wizards/vmNew/common/validation/compatibility/Compatibility.vue +0 -62
- package/components/common/wizards/vmNew/common/validation/lib/models/enums.ts +0 -5
- package/components/common/wizards/vmNew/migrate/Migrate.vue +0 -235
- package/components/common/wizards/vmNew/migrate/lib/config/constructDataReady.ts +0 -100
- package/components/common/wizards/vmNew/migrate/lib/config/steps.ts +0 -82
- package/components/common/wizards/vmNew/migrate/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/lib/models/interfaces.ts +0 -32
- package/components/common/wizards/vmNew/migrate/lib/utils.ts +0 -0
- package/components/common/wizards/vmNew/migrate/lib/validations.ts +0 -29
- package/components/common/wizards/vmNew/migrate/select/computeResource/ComputeResource.vue +0 -219
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/config/tabsPannel.ts +0 -28
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/interfaces.ts +0 -30
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/types.ts +0 -12
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/TableView.vue +0 -143
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/clusterTable.ts +0 -113
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/hostTable.ts +0 -124
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/resourcePoolTable.ts +0 -115
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/tableKeys.ts +0 -65
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/vappsTable.ts +0 -66
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/interfaces.ts +0 -50
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/types.ts +0 -60
- package/components/common/wizards/vmNew/migrate/select/network/Network.vue +0 -125
- package/components/common/wizards/vmNew/migrate/select/network/table/network/Network.vue +0 -114
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/advancedTable.ts +0 -78
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/basicTable.ts +0 -70
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/interfaces.ts +0 -12
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types.ts +0 -21
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/UseAt.vue +0 -54
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/tableKeys.ts +0 -7
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/useAtTable.ts +0 -47
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/types.ts +0 -5
- package/components/common/wizards/vmNew/migrate/select/priority/Priority.vue +0 -39
- package/components/common/wizards/vmNew/migrate/select/priority/lib/config/typeOptions.ts +0 -21
- package/components/common/wizards/vmNew/migrate/select/priority/lib/models/types.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/storage/Storage.vue +0 -206
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/Batch.vue +0 -58
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/config/virtualDiskFormat.ts +0 -30
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/Table.vue +0 -118
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/config/datastoreTable.ts +0 -177
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/models/types.ts +0 -15
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/Disk.vue +0 -68
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/Table.vue +0 -74
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/diskTable.ts +0 -135
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/tableKeys.ts +0 -15
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces.ts +0 -24
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/types.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/storage/lib/config/tabsPannel.ts +0 -20
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/interfaces.ts +0 -14
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/types.ts +0 -9
- package/components/common/wizards/vmNew/migrate/select/storage/policy/Policy.vue +0 -84
- package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +0 -88
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/config/tabsPannel.ts +0 -18
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/models/types.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/New.vue +0 -294
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/config/defaultForm.ts +0 -36
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/models/interfaces.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/targetServer/saved/Saved.vue +0 -27
- package/components/common/wizards/vmNew/migrate/select/targetServer/targetServer.vue +0 -41
- package/components/common/wizards/vmNew/migrate/select/type/Type.vue +0 -27
- package/components/common/wizards/vmNew/migrate/select/type/lib/config/typeOptions.ts +0 -41
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/interfaces.ts +0 -5
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/types.ts +0 -5
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="migrate-vm">
|
|
3
|
-
<atoms-wizard
|
|
4
|
-
show
|
|
5
|
-
:wizard="wizard"
|
|
6
|
-
:selected-scheme="selectedScheme"
|
|
7
|
-
:title="localization.migrate"
|
|
8
|
-
:localization="localization"
|
|
9
|
-
class="migrate-vm-wizard"
|
|
10
|
-
test-id="migrate-vm-wizard"
|
|
11
|
-
@change-steps="onChangeSteps"
|
|
12
|
-
@hide="onHideModal"
|
|
13
|
-
@submit="onFinish"
|
|
14
|
-
>
|
|
15
|
-
<template #modalBody="{ selectedStep }">
|
|
16
|
-
<common-wizards-vm-new-migrate-select-type
|
|
17
|
-
v-if="selectedStep.id === 0"
|
|
18
|
-
v-model="form.migrate_type"
|
|
19
|
-
:project="props.project"
|
|
20
|
-
/>
|
|
21
|
-
|
|
22
|
-
<common-wizards-vm-migrate-select-target-server v-if="false" />
|
|
23
|
-
|
|
24
|
-
<common-wizards-vm-migrate-select-compute-resource
|
|
25
|
-
v-if="false"
|
|
26
|
-
v-model="form"
|
|
27
|
-
:submit="selectComputeResourceSubmit"
|
|
28
|
-
:get-compute-resource-data="props.getComputeResourceData"
|
|
29
|
-
:migrate-type="vmMigrateType"
|
|
30
|
-
:compute-resource-data="props.computeResourceTableData"
|
|
31
|
-
:compute-resource-tree="props.computeResourceTree"
|
|
32
|
-
/>
|
|
33
|
-
|
|
34
|
-
<common-wizards-vm-new-migrate-select-storage
|
|
35
|
-
v-show="selectedStep.id === 3"
|
|
36
|
-
v-model="form"
|
|
37
|
-
:alert-messages="alertMessages[3]"
|
|
38
|
-
:submit="selectStorageSubmit"
|
|
39
|
-
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
40
|
-
:datastore="props.datastore"
|
|
41
|
-
:connected-storage-id-default="connectedStorageIdOnVm"
|
|
42
|
-
:configure-per-disks="props.configurePerDisks"
|
|
43
|
-
@hide-alert="onHideAlert"
|
|
44
|
-
/>
|
|
45
|
-
|
|
46
|
-
<common-wizards-vm-migrate-select-network
|
|
47
|
-
v-if="false"
|
|
48
|
-
v-model:is-basic-network-mode="
|
|
49
|
-
dataFormLocal.selectNetwork.isShowNetworkBasic
|
|
50
|
-
"
|
|
51
|
-
v-model:network-data="dataFormLocal.selectNetwork.data"
|
|
52
|
-
/>
|
|
53
|
-
|
|
54
|
-
<common-wizards-vm-migrate-select-priority
|
|
55
|
-
v-if="false"
|
|
56
|
-
v-model="selectedVMotionPriority"
|
|
57
|
-
/>
|
|
58
|
-
|
|
59
|
-
<common-ready-to-complete
|
|
60
|
-
v-if="selectedStep.id === 6"
|
|
61
|
-
:data="dataReadyView"
|
|
62
|
-
/>
|
|
63
|
-
</template>
|
|
64
|
-
</atoms-wizard>
|
|
65
|
-
</div>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<script setup lang="ts">
|
|
69
|
-
import type {
|
|
70
|
-
UI_I_WizardStep,
|
|
71
|
-
UI_I_ValidationReturn,
|
|
72
|
-
} from '~/components/atoms/wizard/lib/models/interfaces'
|
|
73
|
-
import Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
74
|
-
import {
|
|
75
|
-
stepsFunc,
|
|
76
|
-
stepsSchemeInitial,
|
|
77
|
-
} from '~/components/common/wizards/vmNew/migrate/lib/config/steps'
|
|
78
|
-
|
|
79
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
80
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
81
|
-
import type {
|
|
82
|
-
UI_I_MigrateFormLocal,
|
|
83
|
-
UI_I_ChangeStepsSchemes,
|
|
84
|
-
} from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
|
|
85
|
-
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/types'
|
|
86
|
-
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
87
|
-
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
88
|
-
import type { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
|
|
89
|
-
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
90
|
-
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
91
|
-
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
92
|
-
import type { UI_T_SelectVMotionPriority } from '~/components/common/wizards/vm/migrate/select/priority/lib/models/types'
|
|
93
|
-
import type { UI_I_CollectedDataFormLocal } from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
|
|
94
|
-
import { constructDataReadyViewFunc } from '~/components/common/wizards/vmNew/migrate/lib/config/constructDataReady'
|
|
95
|
-
import * as validation from '~/components/common/wizards/vmNew/migrate/lib/validations'
|
|
96
|
-
|
|
97
|
-
const props = defineProps<{
|
|
98
|
-
project: UI_T_Project
|
|
99
|
-
vmSettings: UI_I_VmSettings | null
|
|
100
|
-
vmName: string
|
|
101
|
-
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
102
|
-
getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
|
|
103
|
-
datastore: UI_I_DatastoreTableItem[]
|
|
104
|
-
configurePerDisks: UI_I_StorageConfigurePerDiskItem[]
|
|
105
|
-
computeResourceTableData?: any
|
|
106
|
-
computeResourceTree?: UI_I_TreeNode
|
|
107
|
-
}>()
|
|
108
|
-
const emits = defineEmits<{
|
|
109
|
-
(event: 'hide'): void
|
|
110
|
-
(event: 'finish'): void
|
|
111
|
-
}>()
|
|
112
|
-
|
|
113
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
114
|
-
|
|
115
|
-
const wizard: Wizard = new Wizard(
|
|
116
|
-
stepsFunc(localization.value),
|
|
117
|
-
stepsSchemeInitial
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
|
|
121
|
-
const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
|
|
122
|
-
|
|
123
|
-
const form = ref<UI_I_MigrateFormLocal>({
|
|
124
|
-
migrate_type: props.project === 'procurator' ? 'storage' : 'resource',
|
|
125
|
-
disk_format: 0,
|
|
126
|
-
storage: null,
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
const validationFunc = async (
|
|
130
|
-
value: UI_I_WizardStep[],
|
|
131
|
-
currentStep: UI_I_WizardStep,
|
|
132
|
-
nextStep: UI_I_WizardStep
|
|
133
|
-
): Promise<UI_I_ValidationReturn> => {
|
|
134
|
-
let stepHasError = false
|
|
135
|
-
|
|
136
|
-
if (wizard.isValidateForStep(3, currentStep.id, nextStep.id)) {
|
|
137
|
-
const nameValidation = await validation.checkSelectedDatastoreSync(
|
|
138
|
-
localization.value,
|
|
139
|
-
form.value.storage,
|
|
140
|
-
wizard,
|
|
141
|
-
value
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
value = nameValidation.newValue
|
|
145
|
-
|
|
146
|
-
stepHasError = nameValidation.stepHasError
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return {
|
|
150
|
-
newValue: value,
|
|
151
|
-
stepHasError,
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
|
|
155
|
-
wizard.changeSteps(value, validationFunc)
|
|
156
|
-
|
|
157
|
-
// Choosing Scheme
|
|
158
|
-
watch(
|
|
159
|
-
form.migrate_type,
|
|
160
|
-
(newValue: UI_T_VmMigrateType) => {
|
|
161
|
-
const schemes: UI_I_ChangeStepsSchemes = {
|
|
162
|
-
procurator: {
|
|
163
|
-
storage: 0,
|
|
164
|
-
},
|
|
165
|
-
sphere: {
|
|
166
|
-
storage: 0,
|
|
167
|
-
resource: 1,
|
|
168
|
-
},
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const projectSchemes = schemes[props.project]
|
|
172
|
-
|
|
173
|
-
if (projectSchemes && projectSchemes[newValue] !== undefined) {
|
|
174
|
-
wizard.changeScheme(projectSchemes[newValue] as number)
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
{ deep: true, immediate: true }
|
|
178
|
-
)
|
|
179
|
-
|
|
180
|
-
const loading = ref<boolean>(false)
|
|
181
|
-
|
|
182
|
-
const selectStorageSubmit = ref<number>(0)
|
|
183
|
-
const selectComputeResourceSubmit = ref<number>(0)
|
|
184
|
-
|
|
185
|
-
const selectedVMotionPriority = ref<UI_T_SelectVMotionPriority>('high')
|
|
186
|
-
|
|
187
|
-
const vmMigrateType = ref<UI_T_VmMigrateType>(
|
|
188
|
-
props.project === 'procurator' ? 'storage' : 'resource'
|
|
189
|
-
)
|
|
190
|
-
const connectedStorageIdOnVm = computed<string>(
|
|
191
|
-
() => props.vmSettings?.storage.id || ''
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
const dataReadyView = computed<UI_I_TableInfoItem>(() =>
|
|
195
|
-
constructDataReadyViewFunc(
|
|
196
|
-
vmMigrateType.value,
|
|
197
|
-
props.vmName,
|
|
198
|
-
dataFormLocal.value
|
|
199
|
-
)
|
|
200
|
-
)
|
|
201
|
-
|
|
202
|
-
const dataFormLocal = ref<UI_I_CollectedDataFormLocal>({
|
|
203
|
-
selectedComputeResource: null,
|
|
204
|
-
selectStorage: null,
|
|
205
|
-
selectNetwork: {
|
|
206
|
-
isShowNetworkBasic: true,
|
|
207
|
-
data: null,
|
|
208
|
-
},
|
|
209
|
-
selectedVMotionPriority: 'high',
|
|
210
|
-
})
|
|
211
|
-
const onFinish = (): void => {
|
|
212
|
-
loading.value = true
|
|
213
|
-
emits('finish')
|
|
214
|
-
loading.value = false
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const onHideModal = (): void => {
|
|
218
|
-
emits('hide')
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
const onHideAlert = (stepId: number): void => {
|
|
222
|
-
wizard.hideAlertMessagesByStepId(stepId)
|
|
223
|
-
}
|
|
224
|
-
</script>
|
|
225
|
-
|
|
226
|
-
<style scoped lang="scss">
|
|
227
|
-
@import 'assets/scss/common/mixins.scss';
|
|
228
|
-
.migrate-vm {
|
|
229
|
-
&__wrapper {
|
|
230
|
-
@include flex($dir: column);
|
|
231
|
-
//height: 100%;
|
|
232
|
-
padding-left: 10px;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
</style>
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/lib/models/types'
|
|
3
|
-
import { UI_E_VmMigrationType } from '~/components/common/wizards/vm/migrate/lib/models/enums'
|
|
4
|
-
import type {
|
|
5
|
-
UI_I_CollectedDataFormLocal,
|
|
6
|
-
UI_I_MigrateReadyBlockData,
|
|
7
|
-
} from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
|
|
8
|
-
import { UI_E_SelectStorageDiskFormat } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/enums'
|
|
9
|
-
// import type { UI_I_SelectStorageReadyData } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/interfaces'
|
|
10
|
-
import { vmDiskFormatOptions } from '~/components/common/wizards/vm/migrate/select/storage/diskFormat/lib/config/formatOptions'
|
|
11
|
-
|
|
12
|
-
const storageDetailsFunc = (
|
|
13
|
-
localization: UI_I_Localization,
|
|
14
|
-
migrationType: string,
|
|
15
|
-
name: string,
|
|
16
|
-
event: UI_I_CollectedDataFormLocal
|
|
17
|
-
): UI_I_MigrateReadyBlockData[] => {
|
|
18
|
-
const { selectStorage } = event
|
|
19
|
-
|
|
20
|
-
const isActivePerDiskTab: boolean = selectStorage.tab === 'configure-disk'
|
|
21
|
-
|
|
22
|
-
const diskFormat = vmDiskFormatOptions().find(
|
|
23
|
-
(file) => file.value === selectStorage.vmDiskFormat
|
|
24
|
-
)!
|
|
25
|
-
|
|
26
|
-
let result: UI_I_MigrateReadyBlockData[] = [
|
|
27
|
-
{
|
|
28
|
-
label: localization.common.migrationType,
|
|
29
|
-
value: migrationType,
|
|
30
|
-
permissions: ['batch-configure', 'configure-disk'],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: localization.common.virtualMachine,
|
|
34
|
-
value: name,
|
|
35
|
-
permissions: ['batch-configure', 'configure-disk'],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
label: localization.common.storage,
|
|
39
|
-
value: selectStorage.storage?.name,
|
|
40
|
-
permissions: ['batch-configure'],
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
label: localization.common.diskFormat,
|
|
44
|
-
value: diskFormat.text,
|
|
45
|
-
permissions: ['batch-configure'],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
label: name,
|
|
49
|
-
value: '',
|
|
50
|
-
permissions: ['configure-disk'],
|
|
51
|
-
},
|
|
52
|
-
]
|
|
53
|
-
|
|
54
|
-
if (isActivePerDiskTab && selectStorage.configureDisks) {
|
|
55
|
-
const perDiskItems: UI_I_MigrateReadyBlockData[] =
|
|
56
|
-
selectStorage.configureDisks.map((disk) => {
|
|
57
|
-
const isConfigurationFile = disk.file === 'Configuration file'
|
|
58
|
-
const diskFormat = UI_E_SelectStorageDiskFormat[disk.disk_format]
|
|
59
|
-
|
|
60
|
-
const text = isConfigurationFile
|
|
61
|
-
? disk.storage
|
|
62
|
-
: `${disk.storage} (${diskFormat})`
|
|
63
|
-
|
|
64
|
-
return {
|
|
65
|
-
label: disk.file,
|
|
66
|
-
value: text,
|
|
67
|
-
permissions: ['configure-disk'],
|
|
68
|
-
isProperty: true,
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
result = result.concat(perDiskItems)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return result.filter((option) =>
|
|
75
|
-
option.permissions.includes(selectStorage.tab)
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
export const constructDataReadyViewFunc = (
|
|
79
|
-
type: UI_T_VmMigrateType,
|
|
80
|
-
name: string,
|
|
81
|
-
data: UI_I_CollectedDataFormLocal
|
|
82
|
-
): UI_I_MigrateReadyBlockData[] => {
|
|
83
|
-
const localization: UI_I_Localization = useLocal()
|
|
84
|
-
|
|
85
|
-
// const details = {
|
|
86
|
-
// storage: storageDetailsFunc,
|
|
87
|
-
// 'resource-storage': storageDetailsFunc, // временно чтобы не было ошибка при исползоване сфере
|
|
88
|
-
// }
|
|
89
|
-
|
|
90
|
-
const migrationType = localization.common[UI_E_VmMigrationType[type]]
|
|
91
|
-
|
|
92
|
-
return storageDetailsFunc(localization, migrationType, name, data)
|
|
93
|
-
|
|
94
|
-
// return details[type as keyof typeof details](
|
|
95
|
-
// localization,
|
|
96
|
-
// migrationType,
|
|
97
|
-
// name,
|
|
98
|
-
// data
|
|
99
|
-
// )
|
|
100
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
3
|
-
import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
|
|
4
|
-
|
|
5
|
-
export const stepsFunc = (
|
|
6
|
-
localization: UI_I_Localization
|
|
7
|
-
): UI_I_WizardStep[] => [
|
|
8
|
-
{
|
|
9
|
-
id: 0,
|
|
10
|
-
title: localization.common.selectMigrationType,
|
|
11
|
-
subTitle: localization.common.selectMigrationTypeDesc,
|
|
12
|
-
status: UI_E_WIZARD_STATUS.SELECTED,
|
|
13
|
-
fields: {},
|
|
14
|
-
isValid: true,
|
|
15
|
-
testId: 'migrate-vm-select-type',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
id: 1,
|
|
19
|
-
title: localization.common.selectTargetVCenterSer,
|
|
20
|
-
subTitle: localization.common.selectComputeResourceDesc,
|
|
21
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
22
|
-
fields: {},
|
|
23
|
-
isValid: true,
|
|
24
|
-
testId: 'migrate-vm-select-target-server',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 2,
|
|
28
|
-
title: localization.common.selectComputeResource,
|
|
29
|
-
subTitle: localization.common.selectComputeResourceDesc,
|
|
30
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
31
|
-
fields: {},
|
|
32
|
-
isValid: true,
|
|
33
|
-
testId: 'migrate-vm-select-compute-resource',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: 3,
|
|
37
|
-
title: localization.common.selectStorage,
|
|
38
|
-
subTitle: localization.common.selectStorageDesc,
|
|
39
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
40
|
-
fields: {
|
|
41
|
-
name: {
|
|
42
|
-
alert: '',
|
|
43
|
-
field: '',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
isValid: true,
|
|
47
|
-
testId: 'migrate-vm-select-storage',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: 4,
|
|
51
|
-
title: localization.common.selectNetworks,
|
|
52
|
-
subTitle: localization.common.selectNetworksDesc,
|
|
53
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
54
|
-
fields: {},
|
|
55
|
-
isValid: true,
|
|
56
|
-
testId: 'migrate-vm-select-networks',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: 5,
|
|
60
|
-
title: localization.common.selectVMotionPriority,
|
|
61
|
-
subTitle: localization.common.selectVMotionPriorityDesc,
|
|
62
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
63
|
-
fields: {},
|
|
64
|
-
isValid: true,
|
|
65
|
-
testId: 'migrate-vm-select-vMotion-priority',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
id: 6,
|
|
69
|
-
title: localization.common.readyComplete,
|
|
70
|
-
subTitle: '',
|
|
71
|
-
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
72
|
-
fields: {},
|
|
73
|
-
isValid: true,
|
|
74
|
-
testId: 'migrate-vm-ready-complete',
|
|
75
|
-
},
|
|
76
|
-
]
|
|
77
|
-
|
|
78
|
-
export const stepsSchemeInitial: number[][] = [
|
|
79
|
-
[0, 3, 6], // Procurator Scheme for "Change storage only" type
|
|
80
|
-
[0, 1, 3, 4, 5, 6], // Sphere Scheme for "shared-storm" type
|
|
81
|
-
[0, 1, 3, 4, 5, 6], // Sphere Scheme for "nfs" type
|
|
82
|
-
]
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
2
|
-
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
3
|
-
import type { UI_I_SelectStorageReadyData } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/interfaces'
|
|
4
|
-
import type { UI_T_SelectVMotionPriority } from '~/components/common/wizards/vm/migrate/select/priority/lib/models/types'
|
|
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
|
-
disk_format: number
|
|
11
|
-
storage: any
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface UI_I_ChangeStepsSchemes {
|
|
15
|
-
[key: string]: {
|
|
16
|
-
[key in UI_T_VmMigrateType]?: number
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface UI_I_MigrateReadyBlockData extends UI_I_TableInfoItem {
|
|
21
|
-
permissions: UI_T_VmMigrateSelectStorageTab[]
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface UI_I_CollectedDataFormLocal {
|
|
25
|
-
selectedComputeResource: UI_I_ComputeResourceDataLocal
|
|
26
|
-
selectStorage: UI_I_SelectStorageReadyData
|
|
27
|
-
selectNetwork: {
|
|
28
|
-
isShowNetworkBasic: boolean
|
|
29
|
-
data: any // добавить интерфае потом
|
|
30
|
-
}
|
|
31
|
-
selectedVMotionPriority: UI_T_SelectVMotionPriority
|
|
32
|
-
}
|
|
File without changes
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type {
|
|
3
|
-
UI_I_ValidationReturn,
|
|
4
|
-
UI_I_WizardStep,
|
|
5
|
-
} from '~/components/atoms/wizard/lib/models/interfaces'
|
|
6
|
-
import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
7
|
-
|
|
8
|
-
export const checkSelectedDatastoreSync = (
|
|
9
|
-
localization: UI_I_Localization,
|
|
10
|
-
name: string,
|
|
11
|
-
wizard: Wizard,
|
|
12
|
-
value: UI_I_WizardStep[]
|
|
13
|
-
): UI_I_ValidationReturn => {
|
|
14
|
-
let stepHasError = false
|
|
15
|
-
|
|
16
|
-
if (!name) {
|
|
17
|
-
stepHasError = wizard.setValidation(3, 'name', {
|
|
18
|
-
fieldMessage: '',
|
|
19
|
-
alertMessage: localization.common.selectValidDestinationStorage,
|
|
20
|
-
})
|
|
21
|
-
} else if (wizard.hasMessage(3, 'name')) {
|
|
22
|
-
value = wizard.removeValidation(3, 'name', value)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
newValue: value,
|
|
27
|
-
stepHasError,
|
|
28
|
-
}
|
|
29
|
-
}
|