bfg-common 1.4.142 → 1.4.143
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/lib/config/constructDataReady.ts +57 -1
- 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/package.json +1 -1
|
@@ -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,6 +116,31 @@ 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]
|
|
@@ -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',
|