bfg-common 1.4.158 → 1.4.159
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/localization/local_be.json +0 -1
- package/assets/localization/local_en.json +0 -1
- package/assets/localization/local_hy.json +0 -1
- package/assets/localization/local_kk.json +0 -1
- package/assets/localization/local_ru.json +0 -1
- package/assets/localization/local_zh.json +0 -1
- package/components/common/layout/theHeader/TheHeaderNew.vue +1 -2
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +0 -14
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +0 -14
- package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +271 -307
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +1 -4
- package/components/common/select/input/lib/models/interfaces.ts +1 -0
- package/components/common/split/horizontal/HorizontalNew.vue +0 -1
- package/components/common/wizards/vm/common/computeResource/TreeView.vue +3 -6
- package/components/common/wizards/vm/common/tooltip/Tooltip.vue +5 -5
- package/components/common/wizards/vm/migrate/Migrate.vue +161 -188
- package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +166 -53
- package/components/common/wizards/vm/migrate/lib/config/steps.ts +93 -0
- package/components/common/wizards/vm/migrate/lib/models/interfaces.ts +26 -19
- package/components/common/wizards/vm/migrate/lib/utils.ts +0 -80
- package/components/common/wizards/vm/migrate/lib/validations.ts +57 -0
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +18 -52
- package/components/common/wizards/vm/migrate/select/computeResource/lib/config/tabsPannel.ts +1 -1
- package/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces.ts +2 -1
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/TableView.vue +9 -18
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/clusterTable.ts +1 -1
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/resourcePoolTable.ts +1 -1
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/vappsTable.ts +20 -18
- package/components/common/wizards/vm/migrate/select/network/Network.vue +16 -11
- package/components/common/wizards/vm/migrate/select/network/lib/models/interfaces.ts +4 -0
- package/components/common/wizards/vm/migrate/select/network/table/network/Network.vue +16 -17
- package/components/common/wizards/vm/migrate/select/priority/Priority.vue +2 -16
- package/components/common/wizards/vm/migrate/select/storage/Storage.vue +29 -61
- package/components/common/wizards/vm/migrate/select/storage/configure/batch/Batch.vue +28 -33
- package/components/common/wizards/vm/migrate/select/storage/configure/batch/config/virtualDiskFormat.ts +30 -0
- package/components/common/wizards/vm/migrate/select/storage/{table/datastore/Datastore.vue → configure/batch/table/Table.vue} +48 -34
- package/components/common/wizards/vm/migrate/select/storage/configure/batch/table/lib/config/datastoreTable.ts +177 -0
- package/components/common/wizards/vm/migrate/select/storage/{table/datastore → configure/batch/table}/lib/models/types.ts +2 -2
- package/components/common/wizards/vm/migrate/select/storage/configure/disk/Disk.vue +11 -30
- package/components/common/wizards/vm/migrate/select/storage/{table/disk/Disk.vue → configure/disk/table/Table.vue} +5 -17
- package/components/common/wizards/vm/migrate/select/storage/{table/disk/lib/config/config.ts → configure/disk/table/lib/config/diskTable.ts} +36 -23
- package/components/common/wizards/vm/migrate/select/storage/{table/disk → configure/disk/table}/lib/config/tableKeys.ts +1 -1
- package/components/common/wizards/vm/migrate/select/storage/{table/disk → configure/disk/table}/lib/models/interfaces.ts +5 -0
- package/components/common/wizards/vm/migrate/select/storage/lib/models/interfaces.ts +0 -14
- package/components/common/wizards/vm/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +14 -22
- package/components/common/wizards/vm/migrate/select/targetServer/new/New.vue +111 -144
- package/components/common/wizards/vm/migrate/select/targetServer/new/lib/models/interfaces.ts +8 -10
- package/components/common/wizards/vm/migrate/select/targetServer/targetServer.vue +11 -1
- package/components/common/wizards/vm/migrate/select/type/Type.vue +8 -19
- package/package.json +2 -2
- package/components/common/wizards/vm/migrate/contentHeading/ContentHeading.vue +0 -106
- package/components/common/wizards/vm/migrate/contentHeading/lib/models/interfaces.ts +0 -7
- package/components/common/wizards/vm/migrate/select/storage/diskFormat/DiskFormat.vue +0 -69
- package/components/common/wizards/vm/migrate/select/storage/diskFormat/lib/config/formatOptions.ts +0 -26
- package/components/common/wizards/vm/migrate/select/storage/table/datastore/lib/config/config.ts +0 -179
- package/components/common/wizards/vm/migrate/select/targetServer/new/lib/config/defaultForm.ts +0 -36
- /package/components/common/wizards/vm/migrate/select/storage/{table/disk → configure/disk/table}/lib/models/types.ts +0 -0
- /package/components/common/wizards/vm/migrate/{lib → select/type/lib}/models/types.ts +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="compute-resource">
|
|
3
3
|
<atoms-alert
|
|
4
|
-
v-
|
|
4
|
+
v-show="props.alertMessages?.length"
|
|
5
5
|
test-id="compute-resource-alert"
|
|
6
6
|
status="alert-danger"
|
|
7
|
-
:items="
|
|
8
|
-
@remove="
|
|
7
|
+
:items="props.alertMessages"
|
|
8
|
+
@remove="onHideAlert"
|
|
9
9
|
/>
|
|
10
10
|
|
|
11
11
|
<div
|
|
12
|
-
v-if="
|
|
12
|
+
v-if="model.migrate_type === 'resource-storage'"
|
|
13
13
|
class="tree-view-wrap mt-1"
|
|
14
14
|
>
|
|
15
15
|
<common-wizards-vm-common-compute-resource-tree-view
|
|
16
|
-
v-model="
|
|
16
|
+
v-model="model.resource.selectedNode"
|
|
17
17
|
:compute-resource-tree="nodes"
|
|
18
18
|
@show-compute-resource-tree="onShowComputeResourceTree"
|
|
19
19
|
@select-compute-resource-tree="onSelectComputeResourceTree"
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
/>
|
|
31
31
|
|
|
32
32
|
<common-wizards-vm-migrate-select-compute-resource-table-view
|
|
33
|
-
v-model
|
|
34
|
-
:
|
|
33
|
+
v-model="selectedTableDataKeys[activeTab]"
|
|
34
|
+
:type="activeTab"
|
|
35
35
|
:data-table="props.computeResourceData?.items || []"
|
|
36
36
|
:total-items="props.computeResourceData?.total_items || 0"
|
|
37
37
|
:total-pages="props.computeResourceData?.total_pages || 1"
|
|
38
|
-
:
|
|
38
|
+
:get-compute-resource-data="props.getComputeResourceData"
|
|
39
39
|
/>
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<common-wizards-vm-common-validation-compatibility
|
|
43
|
-
:loading="!
|
|
43
|
+
:loading="!model.resource.selectedNode"
|
|
44
44
|
:status="compatibilityText[0]"
|
|
45
45
|
:text="compatibilityText[1]"
|
|
46
46
|
/>
|
|
@@ -54,37 +54,30 @@ 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 {
|
|
57
|
+
import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
|
|
58
58
|
import type { UI_I_SelectedTableDataKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces'
|
|
59
59
|
import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/config/tabsPannel'
|
|
60
60
|
|
|
61
61
|
const props = defineProps<{
|
|
62
|
-
|
|
62
|
+
alertMessages: string[]
|
|
63
63
|
getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
|
|
64
|
-
migrateType: UI_T_VmMigrateType
|
|
65
64
|
computeResourceData: any
|
|
66
65
|
computeResourceTree: UI_I_TreeNode
|
|
67
66
|
}>()
|
|
67
|
+
const model = defineModel<UI_I_MigrateFormLocal>({ required: true })
|
|
68
68
|
const emits = defineEmits<{
|
|
69
|
+
(event: 'hide-alert', value: number): void
|
|
69
70
|
(event: 'next-step', value: any): void
|
|
70
71
|
}>()
|
|
71
72
|
|
|
72
73
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
73
|
-
const { $recursion } = useNuxtApp()
|
|
74
|
+
const { $recursion }: any = useNuxtApp()
|
|
74
75
|
|
|
75
76
|
const activeTab = ref<UI_T_SelectComputeResourceTabType>('host')
|
|
76
77
|
const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
77
78
|
vmMigrateComputeResourceTabsFunc(localization.value)
|
|
78
79
|
)
|
|
79
80
|
|
|
80
|
-
const computeResourceDataLocal = ref<any>({
|
|
81
|
-
selectedNode: null,
|
|
82
|
-
host: null,
|
|
83
|
-
cluster: null,
|
|
84
|
-
resourcePool: null,
|
|
85
|
-
vApps: null,
|
|
86
|
-
})
|
|
87
|
-
|
|
88
81
|
const selectedTableDataKeys = ref<UI_I_SelectedTableDataKeys>({
|
|
89
82
|
host: null,
|
|
90
83
|
cluster: null,
|
|
@@ -101,7 +94,7 @@ watch(
|
|
|
101
94
|
)
|
|
102
95
|
if (data) {
|
|
103
96
|
const dataKeys = UI_E_ComputeResourceTabKamelKeys[activeTab.value]
|
|
104
|
-
|
|
97
|
+
model.value.resource[dataKeys] = data
|
|
105
98
|
}
|
|
106
99
|
},
|
|
107
100
|
{ immediate: true, deep: true }
|
|
@@ -142,7 +135,7 @@ const onSelectComputeResourceTree = (node: UI_I_TreeNode): void => {
|
|
|
142
135
|
)
|
|
143
136
|
}
|
|
144
137
|
const compatibilityText = computed<[string, string]>(() => {
|
|
145
|
-
const { selectedNode } =
|
|
138
|
+
const { selectedNode } = model.value.resource
|
|
146
139
|
|
|
147
140
|
if (!selectedNode) return ['Success', '']
|
|
148
141
|
|
|
@@ -167,36 +160,9 @@ const compatibilityText = computed<[string, string]>(() => {
|
|
|
167
160
|
|
|
168
161
|
return res
|
|
169
162
|
})
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const onHideErrorMessageAlert = (): void => {
|
|
173
|
-
errorMessages.value = []
|
|
163
|
+
const onHideAlert = (): void => {
|
|
164
|
+
emits('hide-alert', 2)
|
|
174
165
|
}
|
|
175
|
-
|
|
176
|
-
const checkValidityBlock = (): boolean => {
|
|
177
|
-
const hasSelectedData = Object.values(computeResourceDataLocal.value).some(
|
|
178
|
-
(value) => value !== null
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
if (!hasSelectedData) {
|
|
182
|
-
const errorText = localization.value.common.selectValidDestinationComputeResource
|
|
183
|
-
|
|
184
|
-
errorMessages.value = [errorText]
|
|
185
|
-
return false
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
onHideErrorMessageAlert()
|
|
189
|
-
emits('next-step', {
|
|
190
|
-
...computeResourceDataLocal.value,
|
|
191
|
-
})
|
|
192
|
-
return true
|
|
193
|
-
}
|
|
194
|
-
watch(
|
|
195
|
-
() => props.submit,
|
|
196
|
-
() => {
|
|
197
|
-
checkValidityBlock()
|
|
198
|
-
}
|
|
199
|
-
)
|
|
200
166
|
</script>
|
|
201
167
|
|
|
202
168
|
<style lang="scss" scoped>
|
package/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces.ts
CHANGED
|
@@ -15,7 +15,8 @@ export interface UI_I_SelectedTableDataKeys {
|
|
|
15
15
|
'v-apps': UI_I_VAppsTableItem | null
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
export interface UI_I_ComputeResourceFormLocal {
|
|
19
20
|
selectedNode: UI_I_TreeNode | null
|
|
20
21
|
host: UI_I_HostTableItem | null
|
|
21
22
|
cluster: UI_I_ClusterTableItem | null
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="data-table-view">
|
|
3
3
|
<atoms-table-data-grid
|
|
4
|
-
v-model:selected-row="
|
|
4
|
+
v-model:selected-row="selectedDataLocal"
|
|
5
5
|
v-model:column-keys="columnKeys"
|
|
6
6
|
v-model:page-size="pagination.pageSize"
|
|
7
7
|
v-model:page="pagination.page"
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
<div class="progress flex-1">
|
|
29
29
|
<progress class="progress-block" :max="100" :value="item.data" />
|
|
30
30
|
</div>
|
|
31
|
-
<span class="text-ellipsis ml-1" :title="item.text">
|
|
32
|
-
item.text
|
|
33
|
-
|
|
31
|
+
<span class="text-ellipsis ml-1" :title="item.text">
|
|
32
|
+
{{ item.text }}
|
|
33
|
+
</span>
|
|
34
34
|
</div>
|
|
35
35
|
</template>
|
|
36
36
|
</atoms-table-data-grid>
|
|
@@ -45,7 +45,10 @@ import type {
|
|
|
45
45
|
UI_I_BodyItem,
|
|
46
46
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
47
47
|
import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
48
|
-
import type {
|
|
48
|
+
import type {
|
|
49
|
+
UI_I_TablePayload,
|
|
50
|
+
UI_I_Pagination,
|
|
51
|
+
} from '~/lib/models/table/interfaces'
|
|
49
52
|
import type { UI_T_ComputeResourceTableItem } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/types'
|
|
50
53
|
import * as hostTable from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/hostTable'
|
|
51
54
|
import * as clusterTable from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/clusterTable'
|
|
@@ -54,15 +57,12 @@ import * as vAppsTable from '~/components/common/wizards/vm/migrate/select/compu
|
|
|
54
57
|
|
|
55
58
|
const props = defineProps<{
|
|
56
59
|
getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
|
|
57
|
-
selectedData: number
|
|
58
60
|
dataTable: UI_T_ComputeResourceTableItem[]
|
|
59
61
|
totalItems: number
|
|
60
62
|
totalPages: number
|
|
61
63
|
type: UI_T_SelectComputeResourceTabType
|
|
62
64
|
}>()
|
|
63
|
-
const
|
|
64
|
-
(event: 'update:selected-data', value: number): void
|
|
65
|
-
}>()
|
|
65
|
+
const selectedDataLocal = defineModel<number>({ required: true })
|
|
66
66
|
|
|
67
67
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
68
68
|
|
|
@@ -112,15 +112,6 @@ watch(localization, () => {
|
|
|
112
112
|
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
113
113
|
return table[props.type].bodyItems(props.dataTable, localization.value)
|
|
114
114
|
})
|
|
115
|
-
|
|
116
|
-
const selectedRow = computed<number>({
|
|
117
|
-
get() {
|
|
118
|
-
return props.selectedData
|
|
119
|
-
},
|
|
120
|
-
set(newValue: number) {
|
|
121
|
-
emits('update:selected-data', newValue)
|
|
122
|
-
},
|
|
123
|
-
})
|
|
124
115
|
</script>
|
|
125
116
|
|
|
126
117
|
<style lang="scss" scoped>
|
|
@@ -56,7 +56,7 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
export const bodyItems = (data: UI_I_ClusterTableItem[]): UI_I_BodyItem[][] => {
|
|
59
|
-
const { $binary } = useNuxtApp()
|
|
59
|
+
const { $binary }: any = useNuxtApp()
|
|
60
60
|
|
|
61
61
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
62
62
|
data.forEach((cluster, key) => {
|
|
@@ -73,7 +73,7 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
76
|
-
const { $binary } = useNuxtApp()
|
|
76
|
+
const { $binary }: any = useNuxtApp()
|
|
77
77
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
78
78
|
data.forEach((vapp, key) => {
|
|
79
79
|
bodyItems.push([
|
|
@@ -4,13 +4,7 @@ import type {
|
|
|
4
4
|
UI_I_BodyItem,
|
|
5
5
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
6
6
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
-
|
|
8
|
-
// I_TableIconColumnData,
|
|
9
|
-
// I_Vapps,
|
|
10
|
-
// } from '~/components/templates/inventory/mainBlock/tablesView/lib/models/interfaces'
|
|
11
|
-
import { E_StatusEnum } from '~/components/templates/inventory/treeView/lib/models/enums'
|
|
12
|
-
import { columnKeys as getColumnKeys } from '~/components/templates/inventory/mainBlock/tablesView/lib/config/columnKeys'
|
|
13
|
-
import { headItems as getHeadItems } from '~/components/templates/inventory/mainBlock/tablesView/lib/config/headItems'
|
|
7
|
+
import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
|
|
14
8
|
import { vAppsTableItemKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/tableKeys'
|
|
15
9
|
|
|
16
10
|
const getItems = (
|
|
@@ -21,7 +15,12 @@ const getItems = (
|
|
|
21
15
|
[localization.common.cpuShares, true, '180px', vAppsTableItemKeys[1]],
|
|
22
16
|
[localization.common.cpuSharesValue, true, '180px', vAppsTableItemKeys[2]],
|
|
23
17
|
[localization.common.memoryShares, true, '180px', vAppsTableItemKeys[3]],
|
|
24
|
-
[
|
|
18
|
+
[
|
|
19
|
+
localization.common.memorySharesValue,
|
|
20
|
+
true,
|
|
21
|
+
'180px',
|
|
22
|
+
vAppsTableItemKeys[4],
|
|
23
|
+
],
|
|
25
24
|
[localization.common.managedBy, true, '180px', vAppsTableItemKeys[5]],
|
|
26
25
|
]
|
|
27
26
|
}
|
|
@@ -29,20 +28,23 @@ const getItems = (
|
|
|
29
28
|
export const columnKeys = (
|
|
30
29
|
localization: UI_I_Localization
|
|
31
30
|
): UI_I_ColumnKey[] => {
|
|
32
|
-
return
|
|
31
|
+
return defaultSettings.defaultColumnKeys(getItems(localization), {
|
|
32
|
+
icon: [0],
|
|
33
|
+
})
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
36
|
-
return
|
|
37
|
+
return defaultSettings.defaultHeadItems(getItems(localization), {
|
|
38
|
+
icon: [0],
|
|
39
|
+
})
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
40
43
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
41
44
|
data.forEach((vapp, key) => {
|
|
42
|
-
const nameData
|
|
43
|
-
iconClassName:
|
|
45
|
+
const nameData = {
|
|
46
|
+
iconClassName: 'vsphere-icon-vm-template',
|
|
44
47
|
name: vapp.name,
|
|
45
|
-
// @ts-ignore TODO id надо для перехода, пока что так оставить чтобы нигде не ломалось потом поправить для всех
|
|
46
48
|
id: vapp.id,
|
|
47
49
|
nav: 'v',
|
|
48
50
|
type: 'vmtemplate',
|
|
@@ -55,11 +57,11 @@ export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
|
55
57
|
data: nameData,
|
|
56
58
|
id: key,
|
|
57
59
|
},
|
|
58
|
-
{ key: '
|
|
59
|
-
{ key: '
|
|
60
|
-
{ key: '
|
|
61
|
-
{ key: '
|
|
62
|
-
{ key: '
|
|
60
|
+
{ key: 'col1', text: vapp[vAppsTableItemKeys[1]], id: key },
|
|
61
|
+
{ key: 'col2', text: vapp[vAppsTableItemKeys[2]], id: key },
|
|
62
|
+
{ key: 'col3', text: vapp[vAppsTableItemKeys[3]], id: key },
|
|
63
|
+
{ key: 'col4', text: vapp[vAppsTableItemKeys[4]], id: key },
|
|
64
|
+
{ key: 'col5', text: vapp[vAppsTableItemKeys[5]], id: key },
|
|
63
65
|
])
|
|
64
66
|
})
|
|
65
67
|
return bodyItems
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
/>
|
|
14
14
|
|
|
15
15
|
<div
|
|
16
|
-
v-if="
|
|
16
|
+
v-if="model.isBasicNetworkMode && selectedSourceNetwork"
|
|
17
17
|
class="select-network__matcher-details"
|
|
18
18
|
>
|
|
19
19
|
<span> {{ networkDetailsHeadline }} </span>
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
data-id="migrate-network-advanced-button"
|
|
30
30
|
@click="onClickSelectNetworkMode"
|
|
31
31
|
>
|
|
32
|
-
<span v-if="!
|
|
32
|
+
<span v-if="!model.isBasicNetworkMode"> ≪ </span>
|
|
33
33
|
{{ buttonText }}
|
|
34
|
-
<span v-if="
|
|
34
|
+
<span v-if="model.isBasicNetworkMode"> ≫ </span>
|
|
35
35
|
</button>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
@@ -45,28 +45,30 @@
|
|
|
45
45
|
|
|
46
46
|
<script lang="ts" setup>
|
|
47
47
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
48
|
+
import type { UI_I_SelectNetworksFormLocal } from '~/components/common/wizards/vm/migrate/select/network/lib/models/interfaces'
|
|
48
49
|
|
|
49
|
-
const
|
|
50
|
-
const networkData = defineModel<any>('networkData')
|
|
51
|
-
|
|
50
|
+
const model = defineModel<UI_I_SelectNetworksFormLocal>({ required: true })
|
|
52
51
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
53
52
|
|
|
54
53
|
const selectedSourceNetwork = ref<string | null>(null)
|
|
55
54
|
const uniqueKey = ref<number>(0)
|
|
56
55
|
|
|
57
56
|
const buttonText = computed(
|
|
58
|
-
() =>
|
|
57
|
+
() =>
|
|
58
|
+
localization.value.common[
|
|
59
|
+
model.value.isBasicNetworkMode ? 'advanced' : 'basic'
|
|
60
|
+
]
|
|
59
61
|
)
|
|
60
62
|
|
|
61
63
|
const tableType = computed<string>(() =>
|
|
62
|
-
|
|
64
|
+
model.value.isBasicNetworkMode ? 'basic' : 'advanced'
|
|
63
65
|
)
|
|
64
66
|
|
|
65
67
|
const selectNetworkHeadline = computed<string>(() => {
|
|
66
68
|
const { migrateNetworkingForAllAdapters, migrateNetworkingForEachAdapters } =
|
|
67
69
|
localization.value.common
|
|
68
70
|
|
|
69
|
-
return
|
|
71
|
+
return model.value.isBasicNetworkMode
|
|
70
72
|
? migrateNetworkingForAllAdapters
|
|
71
73
|
: migrateNetworkingForEachAdapters
|
|
72
74
|
})
|
|
@@ -101,16 +103,19 @@ const useAtTableData = computed(() =>
|
|
|
101
103
|
|
|
102
104
|
const onClickSelectNetworkMode = (): void => {
|
|
103
105
|
uniqueKey.value++
|
|
104
|
-
|
|
106
|
+
model.value.isBasicNetworkMode = !model.value.isBasicNetworkMode
|
|
105
107
|
selectedSourceNetwork.value = ''
|
|
106
108
|
}
|
|
107
109
|
const onSelectNetwork = (data: any): void => {
|
|
108
|
-
|
|
110
|
+
model.value.data = data
|
|
109
111
|
}
|
|
110
112
|
</script>
|
|
111
113
|
|
|
112
114
|
<style lang="scss" scoped>
|
|
115
|
+
@import 'assets/scss/common/mixins';
|
|
113
116
|
.select-network {
|
|
117
|
+
@include flex($dir: column);
|
|
118
|
+
height: inherit;
|
|
114
119
|
margin-top: 10px;
|
|
115
120
|
&__text {
|
|
116
121
|
font-size: 12px;
|
|
@@ -1,8 +1,7 @@
|
|
|
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
|
-
v-model:column-keys="columnKeys"
|
|
6
5
|
v-model:page-size="pagination.pageSize"
|
|
7
6
|
v-model:page="pagination.page"
|
|
8
7
|
:head-items="headItems"
|
|
@@ -24,6 +23,7 @@
|
|
|
24
23
|
data-id="network-select"
|
|
25
24
|
:disabled="item.data.disabled"
|
|
26
25
|
@change="onSelect(item.data)"
|
|
26
|
+
@click.stop
|
|
27
27
|
>
|
|
28
28
|
<option
|
|
29
29
|
v-for="option in item.data.option"
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
43
43
|
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
44
44
|
import type {
|
|
45
|
-
UI_I_ColumnKey,
|
|
46
45
|
UI_I_HeadItem,
|
|
47
46
|
UI_I_BodyItem,
|
|
48
47
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
@@ -74,13 +73,6 @@ const table: any = {
|
|
|
74
73
|
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
75
74
|
table[props.type].headItems(localization.value)
|
|
76
75
|
)
|
|
77
|
-
const columnKeys = computed<UI_I_ColumnKey[]>(() =>
|
|
78
|
-
table[props.type].columnKeys(localization.value)
|
|
79
|
-
)
|
|
80
|
-
watch(localization, () => {
|
|
81
|
-
columnKeys.value = table[props.type].columnKeys(localization.value)
|
|
82
|
-
})
|
|
83
|
-
|
|
84
76
|
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
85
77
|
return table[props.type].bodyItems(props.networks)
|
|
86
78
|
})
|
|
@@ -101,14 +93,21 @@ watch(
|
|
|
101
93
|
</script>
|
|
102
94
|
|
|
103
95
|
<style lang="scss" scoped>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
+
}
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
111
|
}
|
|
112
|
+
|
|
114
113
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="select-priority">
|
|
3
3
|
<common-select-radio-group
|
|
4
|
-
v-model="
|
|
4
|
+
v-model="selectedPriorityTypeLocal"
|
|
5
5
|
:options="vmMigrationPriorityTypes"
|
|
6
6
|
/>
|
|
7
7
|
</div>
|
|
@@ -13,27 +13,13 @@ import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/mode
|
|
|
13
13
|
import type { UI_T_SelectVMotionPriority } from '~/components/common/wizards/vm/migrate/select/priority/lib/models/types'
|
|
14
14
|
import { vmMigrateSelectPriorityTypesFunc } from '~/components/common/wizards/vm/migrate/select/priority/lib/config/typeOptions'
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
modelValue: UI_T_SelectVMotionPriority
|
|
18
|
-
}>()
|
|
19
|
-
const emits = defineEmits<{
|
|
20
|
-
(event: 'update:model-value', value: UI_T_SelectVMotionPriority): void
|
|
21
|
-
}>()
|
|
16
|
+
const selectedPriorityTypeLocal = defineModel<UI_T_SelectVMotionPriority>()
|
|
22
17
|
|
|
23
18
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
24
19
|
|
|
25
20
|
const vmMigrationPriorityTypes = computed<UI_I_RadioOption[]>(() =>
|
|
26
21
|
vmMigrateSelectPriorityTypesFunc(localization.value)
|
|
27
22
|
)
|
|
28
|
-
|
|
29
|
-
const selectedPriorityType = computed<UI_T_SelectVMotionPriority>({
|
|
30
|
-
get() {
|
|
31
|
-
return props.modelValue
|
|
32
|
-
},
|
|
33
|
-
set(newValue: UI_T_SelectVMotionPriority) {
|
|
34
|
-
emits('update:model-value', newValue)
|
|
35
|
-
},
|
|
36
|
-
})
|
|
37
23
|
</script>
|
|
38
24
|
|
|
39
25
|
<style lang="scss" scoped></style>
|