bfg-common 1.4.142 → 1.4.144
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/vm/migrate/select/computeResource/lib/config/tabsPannel.ts +1 -1
- package/components/common/wizards/vmNew/migrate/Migrate.vue +0 -2
- package/components/common/wizards/vmNew/migrate/lib/config/constructDataReady.ts +108 -1
- package/components/common/wizards/vmNew/migrate/select/computeResource/ComputeResource.vue +7 -6
- package/components/common/wizards/vmNew/migrate/select/network/Network.vue +3 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/network/Network.vue +15 -8
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/advancedTable.ts +2 -2
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys.ts +1 -1
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types.ts +1 -1
- package/components/common/wizards/vmNew/migrate/select/storage/Storage.vue +0 -1
- package/package.json +1 -1
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
v-show="selectedStep.id === 3"
|
|
41
41
|
v-model="form"
|
|
42
42
|
:alert-messages="alertMessages[3]"
|
|
43
|
-
:submit="selectStorageSubmit"
|
|
44
43
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
45
44
|
:datastore="props.datastore"
|
|
46
45
|
:connected-storage-id-default="connectedStorageIdOnVm"
|
|
@@ -195,7 +194,6 @@ watch(
|
|
|
195
194
|
|
|
196
195
|
const loading = ref<boolean>(false)
|
|
197
196
|
|
|
198
|
-
const selectStorageSubmit = ref<number>(0)
|
|
199
197
|
const selectComputeResourceSubmit = ref<number>(0)
|
|
200
198
|
|
|
201
199
|
const connectedStorageIdOnVm = computed<string>(
|
|
@@ -63,12 +63,43 @@ const migrateOnlyStorageDataView = (
|
|
|
63
63
|
)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
const setSelectNetworkDataView = (
|
|
67
|
+
localization: UI_I_Localization,
|
|
68
|
+
from: UI_I_MigrateFormLocal
|
|
69
|
+
): string => {
|
|
70
|
+
const {
|
|
71
|
+
noNetworkReassignments,
|
|
72
|
+
networkAdapterReassignedNewDestination,
|
|
73
|
+
networkAdapterWillBeReassignedTo,
|
|
74
|
+
} = localization.common
|
|
75
|
+
|
|
76
|
+
const { isBasicNetworkMode, data } = from.network
|
|
77
|
+
const { sourceNetwork, value } = data
|
|
78
|
+
|
|
79
|
+
if (sourceNetwork === value) {
|
|
80
|
+
return noNetworkReassignments
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (isBasicNetworkMode) {
|
|
84
|
+
const replacements = {
|
|
85
|
+
lan: sourceNetwork,
|
|
86
|
+
network: value,
|
|
87
|
+
}
|
|
88
|
+
return networkAdapterWillBeReassignedTo.replace(
|
|
89
|
+
/{(\w+)}/g,
|
|
90
|
+
(_, key) => replacements[key]
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return networkAdapterReassignedNewDestination.replace('{number}', '1')
|
|
95
|
+
}
|
|
96
|
+
|
|
66
97
|
const storageDetailsFunc = (
|
|
67
98
|
localization: UI_I_Localization,
|
|
68
99
|
name: string,
|
|
69
100
|
form: UI_I_MigrateFormLocal
|
|
70
101
|
): UI_I_MigrateReadyBlockData[] => {
|
|
71
|
-
const { migrate_type } = form
|
|
102
|
+
const { migrate_type, vMotion_priority } = form
|
|
72
103
|
|
|
73
104
|
const migrationType = localization.common[UI_E_VmMigrationType[migrate_type]]
|
|
74
105
|
|
|
@@ -85,11 +116,87 @@ const storageDetailsFunc = (
|
|
|
85
116
|
},
|
|
86
117
|
]
|
|
87
118
|
|
|
119
|
+
if (migrate_type === 'resource') {
|
|
120
|
+
const resourceResult = [
|
|
121
|
+
{
|
|
122
|
+
label: localization.common.vMotionPriority,
|
|
123
|
+
value: localization.common[vMotion_priority],
|
|
124
|
+
permissions: [],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: localization.common.networks,
|
|
128
|
+
value: setSelectNetworkDataView(localization, form),
|
|
129
|
+
permissions: [],
|
|
130
|
+
},
|
|
131
|
+
]
|
|
132
|
+
// Object.entries(selectedComputeResource).forEach(([key, value]) => {
|
|
133
|
+
// if (value !== null) {
|
|
134
|
+
// storageResult.unshift({
|
|
135
|
+
// label: localization.common[key],
|
|
136
|
+
// value: value.name,
|
|
137
|
+
// permissions: [],
|
|
138
|
+
// })
|
|
139
|
+
// }
|
|
140
|
+
// })
|
|
141
|
+
result = [...result, ...resourceResult]
|
|
142
|
+
}
|
|
143
|
+
|
|
88
144
|
if (migrate_type === 'storage') {
|
|
89
145
|
const storageData = migrateOnlyStorageDataView(localization, form, name)
|
|
90
146
|
result = [...result, ...storageData]
|
|
91
147
|
}
|
|
92
148
|
|
|
149
|
+
if (migrate_type === 'resource-storage') {
|
|
150
|
+
const resourceStorageResult = [
|
|
151
|
+
{
|
|
152
|
+
label: localization.common.host,
|
|
153
|
+
value: '', //selectedComputeResource.selectedNode.name,
|
|
154
|
+
permissions: [],
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: localization.common.vMotionPriority,
|
|
158
|
+
value: localization.common[vMotion_priority],
|
|
159
|
+
permissions: [],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
label: localization.common.networks,
|
|
163
|
+
value: setSelectNetworkDataView(localization, form),
|
|
164
|
+
permissions: [],
|
|
165
|
+
},
|
|
166
|
+
]
|
|
167
|
+
const storageResult = migrateOnlyStorageDataView(localization, form, name)
|
|
168
|
+
|
|
169
|
+
result = [...result, ...resourceStorageResult, ...storageResult]
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (migrate_type === 'server') {
|
|
173
|
+
const serverResult = [
|
|
174
|
+
{
|
|
175
|
+
label: localization.common.vMotionPriority,
|
|
176
|
+
value: localization.common[vMotion_priority],
|
|
177
|
+
permissions: [],
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
label: localization.common.networks,
|
|
181
|
+
value: setSelectNetworkDataView(localization, form),
|
|
182
|
+
permissions: [],
|
|
183
|
+
},
|
|
184
|
+
]
|
|
185
|
+
// Object.entries(selectedComputeResource).forEach(([key, value]) => {
|
|
186
|
+
// if (value !== null) {
|
|
187
|
+
// serverResult.unshift({
|
|
188
|
+
// label: localization.common[key],
|
|
189
|
+
// value: value.name,
|
|
190
|
+
// permissions: [],
|
|
191
|
+
// })
|
|
192
|
+
// }
|
|
193
|
+
// })
|
|
194
|
+
|
|
195
|
+
const storageResult = migrateOnlyStorageDataView(localization, form, name)
|
|
196
|
+
|
|
197
|
+
result = [...result, ...serverResult, ...storageResult]
|
|
198
|
+
}
|
|
199
|
+
|
|
93
200
|
return result
|
|
94
201
|
}
|
|
95
202
|
export const constructDataReadyViewFunc = (
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
:total-items="props.computeResourceData?.total_items || 0"
|
|
37
37
|
:total-pages="props.computeResourceData?.total_pages || 1"
|
|
38
38
|
:type="activeTab"
|
|
39
|
-
/>
|
|
40
|
-
|
|
39
|
+
/> </template
|
|
40
|
+
>a
|
|
41
41
|
|
|
42
42
|
<common-wizards-vm-common-validation-compatibility
|
|
43
43
|
:loading="!computeResourceDataLocal.selectedNode"
|
|
@@ -54,9 +54,9 @@ import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models
|
|
|
54
54
|
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
55
55
|
import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
56
56
|
import type { UI_E_ComputeResourceTabKamelKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/enums'
|
|
57
|
-
import type { UI_T_VmMigrateType } from '~/components/common/wizards/
|
|
58
|
-
import type { UI_I_SelectedTableDataKeys } from '~/components/common/wizards/
|
|
59
|
-
import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/
|
|
57
|
+
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/types'
|
|
58
|
+
import type { UI_I_SelectedTableDataKeys } from '~/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/interfaces'
|
|
59
|
+
import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vmNew/migrate/select/computeResource/lib/config/tabsPannel'
|
|
60
60
|
|
|
61
61
|
const props = defineProps<{
|
|
62
62
|
submit: number
|
|
@@ -179,7 +179,8 @@ const checkValidityBlock = (): boolean => {
|
|
|
179
179
|
)
|
|
180
180
|
|
|
181
181
|
if (!hasSelectedData) {
|
|
182
|
-
const errorText =
|
|
182
|
+
const errorText =
|
|
183
|
+
localization.value.common.selectValidDestinationComputeResource
|
|
183
184
|
|
|
184
185
|
errorMessages.value = [errorText]
|
|
185
186
|
return false
|
|
@@ -112,7 +112,10 @@ const onSelectNetwork = (data: any): void => {
|
|
|
112
112
|
</script>
|
|
113
113
|
|
|
114
114
|
<style lang="scss" scoped>
|
|
115
|
+
@import 'assets/scss/common/mixins';
|
|
115
116
|
.select-network {
|
|
117
|
+
@include flex($dir: column);
|
|
118
|
+
height: inherit;
|
|
116
119
|
margin-top: 10px;
|
|
117
120
|
&__text {
|
|
118
121
|
font-size: 12px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="table-
|
|
2
|
+
<div class="table-view-container">
|
|
3
3
|
<atoms-table-data-grid
|
|
4
4
|
v-model:selected-row="selectedNetworkLocal"
|
|
5
5
|
v-model:page-size="pagination.pageSize"
|
|
@@ -93,14 +93,21 @@ watch(
|
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
95
|
<style lang="scss" scoped>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
@import 'assets/scss/common/mixins';
|
|
97
|
+
.table-view-container {
|
|
98
|
+
@include flex($dir: column);
|
|
99
|
+
height: inherit;
|
|
100
|
+
.select-network {
|
|
101
|
+
height: inherit;
|
|
102
|
+
&__select {
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 24px;
|
|
105
|
+
min-width: 107px;
|
|
106
|
+
& > select {
|
|
107
|
+
height: 100%;
|
|
108
|
+
}
|
|
103
109
|
}
|
|
104
110
|
}
|
|
105
111
|
}
|
|
112
|
+
|
|
106
113
|
</style>
|
|
@@ -4,8 +4,8 @@ import type {
|
|
|
4
4
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
5
5
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
6
6
|
import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
7
|
-
import type { UI_I_MigrateSelectNetworkAdvancedItem } from '~/components/common/wizards/
|
|
8
|
-
import { networkAdvancedTableItemKeys } from '~/components/common/wizards/
|
|
7
|
+
import type { UI_I_MigrateSelectNetworkAdvancedItem } from '~/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/interfaces'
|
|
8
|
+
import { networkAdvancedTableItemKeys } from '~/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys'
|
|
9
9
|
|
|
10
10
|
const getItems = (
|
|
11
11
|
localization: UI_I_Localization
|
package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
UI_T_NetworkBasicsTableKeysTuple,
|
|
3
3
|
UI_T_NetworkAdvancedTableKeysTuple,
|
|
4
|
-
} from '~/components/common/wizards/
|
|
4
|
+
} from '~/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types'
|
|
5
5
|
|
|
6
6
|
export const networkBasicsTableItemKeys: UI_T_NetworkBasicsTableKeysTuple = [
|
|
7
7
|
'source_network',
|
package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
UI_I_MigrateSelectNetworkBasicItem,
|
|
3
3
|
UI_I_MigrateSelectNetworkAdvancedItem,
|
|
4
|
-
} from '~/components/common/wizards/
|
|
4
|
+
} from '~/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/interfaces'
|
|
5
5
|
|
|
6
6
|
export type UI_T_NetworkAdvancedTableKeysTuple = [
|
|
7
7
|
'vm_name',
|
|
@@ -73,7 +73,6 @@ import { vmMigrateSelectStorageTabsFunc } from '~/components/common/wizards/vmNe
|
|
|
73
73
|
|
|
74
74
|
const props = defineProps<{
|
|
75
75
|
alertMessages: string[]
|
|
76
|
-
submit: number
|
|
77
76
|
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
78
77
|
datastore: UI_I_DatastoreTableItem[]
|
|
79
78
|
connectedStorageIdDefault: string | null
|