bfg-common 1.5.154 → 1.5.155
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/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +205 -205
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
- package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +1 -2
- package/components/common/wizards/vm/migrate/Migrate.vue +344 -343
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +190 -188
- package/components/common/wizards/vm/migrate/select/computeResource/lib/config/tabsPannel.ts +39 -29
- package/package.json +1 -1
|
@@ -1,188 +1,190 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="compute-resource">
|
|
3
|
-
<atoms-alert
|
|
4
|
-
v-show="props.alertMessages?.length"
|
|
5
|
-
:items="props.alertMessages"
|
|
6
|
-
test-id="compute-resource-alert"
|
|
7
|
-
status="alert-danger"
|
|
8
|
-
@remove="onHideAlert"
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
v-if="model.migrate_type === 'resource-storage'"
|
|
13
|
-
class="tree-view-wrap mt-1"
|
|
14
|
-
>
|
|
15
|
-
<common-wizards-vm-common-compute-resource-tree-view
|
|
16
|
-
v-model="model.resource.selectedNode"
|
|
17
|
-
:compute-resource-tree="nodes"
|
|
18
|
-
@show-compute-resource-tree="onShowComputeResourceTree"
|
|
19
|
-
@select-compute-resource-tree="onSelectComputeResourceTree"
|
|
20
|
-
/>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<template v-else>
|
|
24
|
-
<atoms-tabs
|
|
25
|
-
v-model="activeTab"
|
|
26
|
-
test-id="migrate-select-storage-tabs"
|
|
27
|
-
:items="selectStorageTabs"
|
|
28
|
-
size="small"
|
|
29
|
-
class="compute-resource__tabs"
|
|
30
|
-
/>
|
|
31
|
-
|
|
32
|
-
<common-wizards-vm-migrate-select-compute-resource-table-view
|
|
33
|
-
v-model="selectedTableDataKeys[activeTab]"
|
|
34
|
-
:type="activeTab"
|
|
35
|
-
:data-table="props.computeResourceData?.items || []"
|
|
36
|
-
:total-items="props.computeResourceData?.total_items || 0"
|
|
37
|
-
:total-pages="props.computeResourceData?.total_pages || 1"
|
|
38
|
-
:get-compute-resource-data="props.getComputeResourceData"
|
|
39
|
-
/>
|
|
40
|
-
</template>
|
|
41
|
-
|
|
42
|
-
<common-wizards-vm-common-validation-compatibility
|
|
43
|
-
:loading="!model.resource.selectedNode"
|
|
44
|
-
:status="compatibilityText[0]"
|
|
45
|
-
:text="compatibilityText[1]"
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script lang="ts" setup>
|
|
51
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
52
|
-
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
53
|
-
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
54
|
-
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
55
|
-
import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
56
|
-
import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
|
|
57
|
-
import type { UI_I_SelectedTableDataKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces'
|
|
58
|
-
import { UI_E_ComputeResourceTabKamelKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/enums'
|
|
59
|
-
import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/config/tabsPannel'
|
|
60
|
-
|
|
61
|
-
const props = defineProps<{
|
|
62
|
-
alertMessages: string[]
|
|
63
|
-
getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
|
|
64
|
-
computeResourceData: any
|
|
65
|
-
computeResourceTree: UI_I_TreeNode | null
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
(event: '
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
'
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
nodes.value
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="compute-resource">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="props.alertMessages?.length"
|
|
5
|
+
:items="props.alertMessages"
|
|
6
|
+
test-id="compute-resource-alert"
|
|
7
|
+
status="alert-danger"
|
|
8
|
+
@remove="onHideAlert"
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<div
|
|
12
|
+
v-if="model.migrate_type === 'resource-storage'"
|
|
13
|
+
class="tree-view-wrap mt-1"
|
|
14
|
+
>
|
|
15
|
+
<common-wizards-vm-common-compute-resource-tree-view
|
|
16
|
+
v-model="model.resource.selectedNode"
|
|
17
|
+
:compute-resource-tree="nodes"
|
|
18
|
+
@show-compute-resource-tree="onShowComputeResourceTree"
|
|
19
|
+
@select-compute-resource-tree="onSelectComputeResourceTree"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<template v-else>
|
|
24
|
+
<atoms-tabs
|
|
25
|
+
v-model="activeTab"
|
|
26
|
+
test-id="migrate-select-storage-tabs"
|
|
27
|
+
:items="selectStorageTabs"
|
|
28
|
+
size="small"
|
|
29
|
+
class="compute-resource__tabs"
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
<common-wizards-vm-migrate-select-compute-resource-table-view
|
|
33
|
+
v-model="selectedTableDataKeys[activeTab]"
|
|
34
|
+
:type="activeTab"
|
|
35
|
+
:data-table="props.computeResourceData?.items || []"
|
|
36
|
+
:total-items="props.computeResourceData?.total_items || 0"
|
|
37
|
+
:total-pages="props.computeResourceData?.total_pages || 1"
|
|
38
|
+
:get-compute-resource-data="props.getComputeResourceData"
|
|
39
|
+
/>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<common-wizards-vm-common-validation-compatibility
|
|
43
|
+
:loading="!model.resource.selectedNode"
|
|
44
|
+
:status="compatibilityText[0]"
|
|
45
|
+
:text="compatibilityText[1]"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script lang="ts" setup>
|
|
51
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
52
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
53
|
+
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
54
|
+
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
55
|
+
import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
56
|
+
import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
|
|
57
|
+
import type { UI_I_SelectedTableDataKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces'
|
|
58
|
+
import { UI_E_ComputeResourceTabKamelKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/enums'
|
|
59
|
+
import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/config/tabsPannel'
|
|
60
|
+
|
|
61
|
+
const props = defineProps<{
|
|
62
|
+
alertMessages: string[]
|
|
63
|
+
getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
|
|
64
|
+
computeResourceData: any
|
|
65
|
+
computeResourceTree: UI_I_TreeNode | null
|
|
66
|
+
vmState?: number
|
|
67
|
+
}>()
|
|
68
|
+
const model = defineModel<UI_I_MigrateFormLocal>({ required: true })
|
|
69
|
+
const emits = defineEmits<{
|
|
70
|
+
(event: 'hide-alert', value: number): void
|
|
71
|
+
(event: 'next-step', value: any): void
|
|
72
|
+
}>()
|
|
73
|
+
|
|
74
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
75
|
+
const { $recursion }: any = useNuxtApp()
|
|
76
|
+
|
|
77
|
+
const activeTab = ref<UI_T_SelectComputeResourceTabType>('host')
|
|
78
|
+
const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
79
|
+
vmMigrateComputeResourceTabsFunc(localization.value, props.vmState || 0)
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
const selectedTableDataKeys = ref<UI_I_SelectedTableDataKeys>({
|
|
83
|
+
host: null,
|
|
84
|
+
cluster: null,
|
|
85
|
+
'resource-pool': null,
|
|
86
|
+
'v-apps': null,
|
|
87
|
+
})
|
|
88
|
+
watch(
|
|
89
|
+
selectedTableDataKeys,
|
|
90
|
+
(newValue) => {
|
|
91
|
+
if (!props.computeResourceData?.items.length) return
|
|
92
|
+
|
|
93
|
+
const data = props.computeResourceData.items.find(
|
|
94
|
+
(_: never, key: number) => newValue[activeTab.value] === key
|
|
95
|
+
)
|
|
96
|
+
if (data) {
|
|
97
|
+
const dataKeys = UI_E_ComputeResourceTabKamelKeys[activeTab.value]
|
|
98
|
+
model.value.resource[dataKeys] = data
|
|
99
|
+
model.value.resource.selectedNode = data
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{ immediate: true, deep: true }
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
const nodes = ref<UI_I_TreeNode[]>([])
|
|
106
|
+
watch(
|
|
107
|
+
props.computeResourceTree,
|
|
108
|
+
(newValue) => {
|
|
109
|
+
if (nodes.value.length) return
|
|
110
|
+
|
|
111
|
+
nodes.value = useDeepCopy([newValue])
|
|
112
|
+
},
|
|
113
|
+
{ immediate: true, deep: true }
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
const onShowComputeResourceTree = ({
|
|
117
|
+
node,
|
|
118
|
+
cb,
|
|
119
|
+
}: {
|
|
120
|
+
node: UI_I_TreeNode
|
|
121
|
+
cb: () => void
|
|
122
|
+
}): void => {
|
|
123
|
+
$recursion.findAndShow(
|
|
124
|
+
nodes.value,
|
|
125
|
+
[node.id, node.type],
|
|
126
|
+
['id', 'type'],
|
|
127
|
+
'nodes'
|
|
128
|
+
)
|
|
129
|
+
cb()
|
|
130
|
+
}
|
|
131
|
+
const onSelectComputeResourceTree = (node: UI_I_TreeNode): void => {
|
|
132
|
+
$recursion.findAndActivate(
|
|
133
|
+
nodes.value,
|
|
134
|
+
[node.type, node.id],
|
|
135
|
+
['type', 'id'],
|
|
136
|
+
'nodes'
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
const compatibilityText = computed<[string, string]>(() => {
|
|
140
|
+
const { selectedNode } = model.value.resource
|
|
141
|
+
|
|
142
|
+
if (!selectedNode) return ['Success', '']
|
|
143
|
+
|
|
144
|
+
let res: [string, string] = ['Success', 'compatibilityChecksSucceeded']
|
|
145
|
+
|
|
146
|
+
if (selectedNode.type === 'datacenter' || selectedNode.type === 'folder') {
|
|
147
|
+
res = ['Error', 'selectValidClusterOrHostDestination']
|
|
148
|
+
}
|
|
149
|
+
if (selectedNode.type === 'cluster') {
|
|
150
|
+
const hasHost = !!selectedNode.nodes.length
|
|
151
|
+
if (!hasHost) {
|
|
152
|
+
res = ['Error', 'clusterNotContainAnyHosts']
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (selectedNode.type === 'host') {
|
|
157
|
+
if (selectedNode.state === 'Error') {
|
|
158
|
+
// TODO check Maintenance Mode
|
|
159
|
+
res = ['Error', 'selectedHostDisconnectedMaintenanceMode']
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return res
|
|
164
|
+
})
|
|
165
|
+
const onHideAlert = (): void => {
|
|
166
|
+
emits('hide-alert', 3)
|
|
167
|
+
}
|
|
168
|
+
</script>
|
|
169
|
+
|
|
170
|
+
<style lang="scss" scoped>
|
|
171
|
+
@import 'assets/scss/common/mixins';
|
|
172
|
+
.compute-resource {
|
|
173
|
+
@include flex($dir: column);
|
|
174
|
+
height: inherit;
|
|
175
|
+
.tree-view-wrap {
|
|
176
|
+
max-height: 250px;
|
|
177
|
+
min-height: 200px;
|
|
178
|
+
position: relative;
|
|
179
|
+
border: 1px solid #000;
|
|
180
|
+
padding: 5px 0 0 5px;
|
|
181
|
+
overflow: auto;
|
|
182
|
+
}
|
|
183
|
+
&__tabs {
|
|
184
|
+
width: 100%;
|
|
185
|
+
:deep(.nav) {
|
|
186
|
+
margin-top: 0;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
</style>
|
package/components/common/wizards/vm/migrate/select/computeResource/lib/config/tabsPannel.ts
CHANGED
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const vmMigrateComputeResourceTabsFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
export const vmMigrateComputeResourceTabsFunc = (
|
|
5
|
+
localization: UI_I_Localization,
|
|
6
|
+
vmState: number
|
|
7
|
+
): UI_I_CollapseNavItem[] => {
|
|
8
|
+
const tabs: UI_I_CollapseNavItem[] = [
|
|
9
|
+
{
|
|
10
|
+
text: localization.common.hosts,
|
|
11
|
+
value: 'host',
|
|
12
|
+
disabled: false,
|
|
13
|
+
testId: 'host-tab',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
text: localization.common.clusters,
|
|
17
|
+
value: 'cluster',
|
|
18
|
+
disabled: true,
|
|
19
|
+
testId: 'cluster-tab',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
text: localization.inventoryTabs.resourcePools,
|
|
23
|
+
value: 'resource-pool',
|
|
24
|
+
disabled: true,
|
|
25
|
+
testId: 'resource-pool-tab',
|
|
26
|
+
},
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
if (vmState !== 2) {
|
|
30
|
+
tabs.push({
|
|
31
|
+
text: localization.common.vApps,
|
|
32
|
+
value: 'v-apps',
|
|
33
|
+
disabled: true,
|
|
34
|
+
testId: 'v-apps-tab',
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return tabs
|
|
39
|
+
}
|