bfg-common 1.4.114 → 1.4.115
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/select/input/lib/models/interfaces.ts +1 -0
- package/components/common/wizards/vmNew/common/computeResource/TreeView.vue +61 -0
- package/components/common/wizards/vmNew/common/tooltip/Tooltip.vue +84 -0
- package/components/common/wizards/vmNew/common/validation/compatibility/Compatibility.vue +62 -0
- package/components/common/wizards/vmNew/common/validation/lib/models/enums.ts +5 -0
- package/components/common/wizards/vmNew/migrate/Migrate.vue +231 -0
- package/components/common/wizards/vmNew/migrate/lib/config/constructDataReady.ts +83 -0
- package/components/common/wizards/vmNew/migrate/lib/config/steps.ts +82 -0
- package/components/common/wizards/vmNew/migrate/lib/models/enums.ts +6 -0
- package/components/common/wizards/vmNew/migrate/lib/models/interfaces.ts +38 -0
- package/components/common/wizards/vmNew/migrate/lib/utils.ts +0 -0
- package/components/common/wizards/vmNew/migrate/lib/validations.ts +29 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/ComputeResource.vue +219 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/config/tabsPannel.ts +28 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/enums.ts +6 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/interfaces.ts +30 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/types.ts +12 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/TableView.vue +143 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/clusterTable.ts +113 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/hostTable.ts +124 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/resourcePoolTable.ts +115 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/tableKeys.ts +65 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/vappsTable.ts +66 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/interfaces.ts +50 -0
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/types.ts +60 -0
- package/components/common/wizards/vmNew/migrate/select/network/Network.vue +125 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/network/Network.vue +114 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/advancedTable.ts +78 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/basicTable.ts +70 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys.ts +13 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/interfaces.ts +12 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types.ts +21 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/UseAt.vue +54 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/tableKeys.ts +7 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/useAtTable.ts +47 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/interfaces.ts +1 -0
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/types.ts +5 -0
- package/components/common/wizards/vmNew/migrate/select/priority/Priority.vue +39 -0
- package/components/common/wizards/vmNew/migrate/select/priority/lib/config/typeOptions.ts +21 -0
- package/components/common/wizards/vmNew/migrate/select/priority/lib/models/types.ts +1 -0
- package/components/common/wizards/vmNew/migrate/select/storage/Storage.vue +201 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/Batch.vue +58 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/config/virtualDiskFormat.ts +30 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/Table.vue +118 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/config/datastoreTable.ts +177 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/models/types.ts +15 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/Disk.vue +68 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/Table.vue +74 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/diskTable.ts +135 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/tableKeys.ts +15 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces.ts +24 -0
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/types.ts +13 -0
- package/components/common/wizards/vmNew/migrate/select/storage/lib/config/tabsPannel.ts +20 -0
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/enums.ts +6 -0
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/interfaces.ts +14 -0
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/types.ts +9 -0
- package/components/common/wizards/vmNew/migrate/select/storage/policy/Policy.vue +84 -0
- package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +80 -0
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/config/tabsPannel.ts +18 -0
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/models/types.ts +1 -0
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/New.vue +294 -0
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/config/defaultForm.ts +36 -0
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/models/interfaces.ts +13 -0
- package/components/common/wizards/vmNew/migrate/select/targetServer/saved/Saved.vue +27 -0
- package/components/common/wizards/vmNew/migrate/select/targetServer/targetServer.vue +41 -0
- package/components/common/wizards/vmNew/migrate/select/type/Type.vue +27 -0
- package/components/common/wizards/vmNew/migrate/select/type/lib/config/typeOptions.ts +41 -0
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/interfaces.ts +5 -0
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/types.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="data-table-view">
|
|
3
|
+
<atoms-table-data-grid
|
|
4
|
+
v-model:selected-row="selectedPerDiskKeysLocal"
|
|
5
|
+
v-model:column-keys="columnKeys"
|
|
6
|
+
v-model:page-size="pagination.pageSize"
|
|
7
|
+
v-model:page="pagination.page"
|
|
8
|
+
type="checkbox"
|
|
9
|
+
class="data-table"
|
|
10
|
+
test-id="disk-table"
|
|
11
|
+
:head-items="headItems"
|
|
12
|
+
:body-items="bodyItems"
|
|
13
|
+
:total-items="bodyItems.length"
|
|
14
|
+
:total-pages="1"
|
|
15
|
+
server-off
|
|
16
|
+
hide-page-size
|
|
17
|
+
@sorting="sorting"
|
|
18
|
+
>
|
|
19
|
+
</atoms-table-data-grid>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import type {
|
|
25
|
+
UI_I_ColumnKey,
|
|
26
|
+
UI_I_HeadItem,
|
|
27
|
+
UI_I_BodyItem,
|
|
28
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
29
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
30
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
31
|
+
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
32
|
+
import * as table from '~/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/diskTable'
|
|
33
|
+
|
|
34
|
+
const props = defineProps<{
|
|
35
|
+
configurePerDisks: UI_I_StorageConfigurePerDiskItem[]
|
|
36
|
+
}>()
|
|
37
|
+
const selectedPerDiskKeysLocal = defineModel<number[]>()
|
|
38
|
+
|
|
39
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
40
|
+
|
|
41
|
+
const headItems = ref<UI_I_HeadItem[]>(table.headItems(localization.value))
|
|
42
|
+
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
43
|
+
watch(localization, () => {
|
|
44
|
+
columnKeys.value = table.columnKeys(localization.value)
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
48
|
+
return table.bodyItems(props.configurePerDisks)
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const sort = ref<string | null>(null)
|
|
52
|
+
const pagination = ref<UI_I_Pagination>({
|
|
53
|
+
page: 1,
|
|
54
|
+
pageSize: 100,
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const sorting = (data: [string, boolean]): void => {
|
|
58
|
+
const [column, status] = data
|
|
59
|
+
const direction = status ? 'asc' : 'desc'
|
|
60
|
+
sort.value = `${column}.${direction}`
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style lang="scss" scoped>
|
|
65
|
+
.data-table-view {
|
|
66
|
+
height: inherit;
|
|
67
|
+
.data-table {
|
|
68
|
+
height: inherit;
|
|
69
|
+
:deep(.datagrid-outer-wrapper) {
|
|
70
|
+
height: inherit;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_ColumnKey,
|
|
3
|
+
UI_I_HeadItem,
|
|
4
|
+
UI_I_BodyItem,
|
|
5
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
6
|
+
import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
|
|
7
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
8
|
+
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces'
|
|
9
|
+
import { UI_E_SelectStorageDiskFormat } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/enums'
|
|
10
|
+
import { vmMigrateDiskTableItemKeys } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/config/tableKeys'
|
|
11
|
+
const getItems = (
|
|
12
|
+
localization: UI_I_Localization
|
|
13
|
+
): [string, boolean, string, string][] => {
|
|
14
|
+
return [
|
|
15
|
+
[
|
|
16
|
+
localization.common.virtualMachine,
|
|
17
|
+
true,
|
|
18
|
+
'200px',
|
|
19
|
+
vmMigrateDiskTableItemKeys[0],
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
localization.common.diskGroup,
|
|
23
|
+
false,
|
|
24
|
+
'138px',
|
|
25
|
+
vmMigrateDiskTableItemKeys[1],
|
|
26
|
+
],
|
|
27
|
+
[localization.common.file, true, '180px', vmMigrateDiskTableItemKeys[2]],
|
|
28
|
+
[localization.common.storage, true, '120px', vmMigrateDiskTableItemKeys[3]],
|
|
29
|
+
[
|
|
30
|
+
localization.common.diskFormat,
|
|
31
|
+
true,
|
|
32
|
+
'180px',
|
|
33
|
+
vmMigrateDiskTableItemKeys[4],
|
|
34
|
+
],
|
|
35
|
+
[localization.common.sharing, true, '120px', vmMigrateDiskTableItemKeys[5]],
|
|
36
|
+
[localization.common.target, true, '120px', vmMigrateDiskTableItemKeys[6]],
|
|
37
|
+
[localization.common.cache, true, '120px', vmMigrateDiskTableItemKeys[7]],
|
|
38
|
+
[
|
|
39
|
+
localization.common.ioControl,
|
|
40
|
+
true,
|
|
41
|
+
'120px',
|
|
42
|
+
vmMigrateDiskTableItemKeys[8],
|
|
43
|
+
],
|
|
44
|
+
[localization.common.discard, true, '120px', vmMigrateDiskTableItemKeys[9]],
|
|
45
|
+
[
|
|
46
|
+
localization.common.diskMode,
|
|
47
|
+
true,
|
|
48
|
+
'180px',
|
|
49
|
+
vmMigrateDiskTableItemKeys[10],
|
|
50
|
+
],
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const columnKeys = (
|
|
55
|
+
localization: UI_I_Localization
|
|
56
|
+
): UI_I_ColumnKey[] => {
|
|
57
|
+
return defaultSettings.defaultColumnKeys(getItems(localization))
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
61
|
+
return defaultSettings.defaultHeadItems(getItems(localization))
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const bodyItems = (
|
|
65
|
+
data: UI_I_StorageConfigurePerDiskItem[]
|
|
66
|
+
): UI_I_BodyItem[][] => {
|
|
67
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
|
68
|
+
|
|
69
|
+
data.forEach((storage: UI_I_StorageConfigurePerDiskItem, key: number) => {
|
|
70
|
+
const diskFormat =
|
|
71
|
+
key === 0
|
|
72
|
+
? 'N/A'
|
|
73
|
+
: UI_E_SelectStorageDiskFormat[storage[vmMigrateDiskTableItemKeys[4]]]
|
|
74
|
+
|
|
75
|
+
bodyItems.push([
|
|
76
|
+
{
|
|
77
|
+
key: 'col0',
|
|
78
|
+
text: storage[vmMigrateDiskTableItemKeys[0]],
|
|
79
|
+
id: key,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
key: 'col1',
|
|
83
|
+
text: storage[vmMigrateDiskTableItemKeys[1]],
|
|
84
|
+
id: key,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: 'col2',
|
|
88
|
+
text: storage[vmMigrateDiskTableItemKeys[2]],
|
|
89
|
+
id: key,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
key: 'col3',
|
|
93
|
+
text: storage[vmMigrateDiskTableItemKeys[3]],
|
|
94
|
+
id: key,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
key: 'col4',
|
|
98
|
+
text: diskFormat,
|
|
99
|
+
id: key,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: 'col5',
|
|
103
|
+
text: storage.extra[vmMigrateDiskTableItemKeys[5]],
|
|
104
|
+
id: key,
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
{
|
|
108
|
+
key: 'col6',
|
|
109
|
+
text: storage.extra[vmMigrateDiskTableItemKeys[6]],
|
|
110
|
+
id: key,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
key: 'col7',
|
|
114
|
+
text: storage.extra[vmMigrateDiskTableItemKeys[7]],
|
|
115
|
+
id: key,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
key: 'col8',
|
|
119
|
+
text: storage.extra[vmMigrateDiskTableItemKeys[8]],
|
|
120
|
+
id: key,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
key: 'col9',
|
|
124
|
+
text: storage.extra[vmMigrateDiskTableItemKeys[9]],
|
|
125
|
+
id: key,
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
key: 'col10',
|
|
129
|
+
text: storage.extra[vmMigrateDiskTableItemKeys[10]],
|
|
130
|
+
id: key,
|
|
131
|
+
},
|
|
132
|
+
])
|
|
133
|
+
})
|
|
134
|
+
return bodyItems
|
|
135
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UI_T_VmMigrateDiskTableTuple } from '~/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/types'
|
|
2
|
+
|
|
3
|
+
export const vmMigrateDiskTableItemKeys: UI_T_VmMigrateDiskTableTuple = [
|
|
4
|
+
'virtual_machine',
|
|
5
|
+
'disk_group',
|
|
6
|
+
'file',
|
|
7
|
+
'storage',
|
|
8
|
+
'disk_format',
|
|
9
|
+
'sharing',
|
|
10
|
+
'target',
|
|
11
|
+
'cache',
|
|
12
|
+
'io_control',
|
|
13
|
+
'discard',
|
|
14
|
+
'disk_mode',
|
|
15
|
+
]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface API_UI_I_ExtraValuePerDiskItem {
|
|
2
|
+
cache: string
|
|
3
|
+
datastore_id: string
|
|
4
|
+
discard: string
|
|
5
|
+
disk_mode: string
|
|
6
|
+
disk_size: number
|
|
7
|
+
disk_source: string
|
|
8
|
+
io_control: string
|
|
9
|
+
read_only: string
|
|
10
|
+
sharing: string
|
|
11
|
+
target: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface API_UI_I_StorageConfigurePerDiskItem {
|
|
15
|
+
disk_format: 0 | 1 | 2 | 3
|
|
16
|
+
disk_group: string
|
|
17
|
+
file: string
|
|
18
|
+
storage: string
|
|
19
|
+
virtual_machine: string
|
|
20
|
+
extra: API_UI_I_ExtraValuePerDiskItem
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface UI_I_StorageConfigurePerDiskItem
|
|
24
|
+
extends API_UI_I_StorageConfigurePerDiskItem {}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
3
|
+
export const vmMigrateSelectStorageTabsFunc = (
|
|
4
|
+
localization: UI_I_Localization
|
|
5
|
+
): UI_I_CollapseNavItem[] => {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
text: localization.common.batchConfigure,
|
|
9
|
+
value: 'batch-configure',
|
|
10
|
+
disabled: false,
|
|
11
|
+
testId: 'batch-configure'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
text: localization.common.configurePerDisk,
|
|
15
|
+
value: 'configure-disk',
|
|
16
|
+
disabled: false,
|
|
17
|
+
testId: 'configure-disk'
|
|
18
|
+
},
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
2
|
+
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
3
|
+
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
4
|
+
|
|
5
|
+
export interface UI_I_SelectStorageDataLocal {
|
|
6
|
+
vmDiskFormat: 0 | 1 | 2 | 3
|
|
7
|
+
storage: UI_I_DatastoreTableItem | null
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface UI_I_SelectStorageReadyData
|
|
11
|
+
extends UI_I_SelectStorageDataLocal {
|
|
12
|
+
tab: UI_T_VmMigrateSelectStorageTab
|
|
13
|
+
configureDisks: UI_I_StorageConfigurePerDiskItem[]
|
|
14
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="storage-policy clr-flex-row">
|
|
3
|
+
<label
|
|
4
|
+
for="storage-locator-disk-policy-label"
|
|
5
|
+
class="clr-col-3 clr-control-label"
|
|
6
|
+
>
|
|
7
|
+
{{ localization.common.vmStoragePolicy }}
|
|
8
|
+
</label>
|
|
9
|
+
<div
|
|
10
|
+
class="mt-0 clr-form-control btn btn-outline-primary dropdown-toggle storage-policy__select-wrapper"
|
|
11
|
+
>
|
|
12
|
+
<select
|
|
13
|
+
id="storage-locator-disk-policy-label"
|
|
14
|
+
v-model="selectedVmStoragePolicy"
|
|
15
|
+
data-id="storage-locator-disk-policy-select"
|
|
16
|
+
class="storage-locator-disk-format-label"
|
|
17
|
+
>
|
|
18
|
+
<option
|
|
19
|
+
v-for="option in configuredSpeedOptions"
|
|
20
|
+
:key="option.value"
|
|
21
|
+
:value="option.value"
|
|
22
|
+
>
|
|
23
|
+
{{ option.text }}
|
|
24
|
+
</option>
|
|
25
|
+
</select>
|
|
26
|
+
</div>
|
|
27
|
+
</section>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts" setup>
|
|
31
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
32
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
33
|
+
|
|
34
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
35
|
+
|
|
36
|
+
const selectedVmStoragePolicy = ref<string>('keep-existing-storage-policies')
|
|
37
|
+
|
|
38
|
+
const configuredSpeedOptions = computed<UI_I_OptionItem[]>(() => {
|
|
39
|
+
return [
|
|
40
|
+
{
|
|
41
|
+
text: 'Keep existing VM storage policies',
|
|
42
|
+
value: 'keep-existing-storage-policies',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
text: 'Datastore Default',
|
|
46
|
+
value: 'datastore-default',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
text: 'Management Storage Policy - Large',
|
|
50
|
+
value: 'management-storage-policy-large',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
text: 'Management Storage Policy - Regular',
|
|
54
|
+
value: 'management-storage-policy-regular',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
text: 'vSAN Default Storage Policy',
|
|
58
|
+
value: 'vsan-default-storage-policy',
|
|
59
|
+
},
|
|
60
|
+
]
|
|
61
|
+
})
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style lang="scss" scoped>
|
|
65
|
+
@import 'assets/scss/common/mixins.scss';
|
|
66
|
+
.storage-policy {
|
|
67
|
+
@include flex($align: center);
|
|
68
|
+
margin-top: 2px;
|
|
69
|
+
&__select-wrapper {
|
|
70
|
+
margin-left: 25px;
|
|
71
|
+
height: 24px;
|
|
72
|
+
min-width: 420px;
|
|
73
|
+
& > select {
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 100%;
|
|
76
|
+
text-align: center;
|
|
77
|
+
border: none;
|
|
78
|
+
&:focus-visible {
|
|
79
|
+
outline: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
</style>
|
package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="selected-per-disk">
|
|
3
|
+
<atoms-the-icon
|
|
4
|
+
data-id="go-back-icon"
|
|
5
|
+
class="icon-arrow"
|
|
6
|
+
name="arrow"
|
|
7
|
+
@click="onGoBack"
|
|
8
|
+
></atoms-the-icon>
|
|
9
|
+
|
|
10
|
+
<div>
|
|
11
|
+
<span class="icon vsphere-icon-vm"></span>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<span v-if="normalizedData.length === 1">{{ normalizedData[0] }}</span>
|
|
15
|
+
|
|
16
|
+
<div v-else class="selected-per-disk__all-objects">
|
|
17
|
+
<span>
|
|
18
|
+
{{ localization.common.allSelectedObjects }}
|
|
19
|
+
</span>
|
|
20
|
+
<common-wizards-vm-common-tooltip>
|
|
21
|
+
<template #content>
|
|
22
|
+
<div v-for="(item, key) in normalizedData" :key="key">
|
|
23
|
+
{{ item }}
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
</common-wizards-vm-common-tooltip>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script lang="ts" setup>
|
|
32
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
33
|
+
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vmNew/migrate/select/storage/lib/models/types'
|
|
34
|
+
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces'
|
|
35
|
+
|
|
36
|
+
const props = defineProps<{
|
|
37
|
+
data: UI_I_StorageConfigurePerDiskItem[]
|
|
38
|
+
}>()
|
|
39
|
+
const modelShowSelectedPerDisks = defineModel<boolean>()
|
|
40
|
+
const modelConnectedStorageIdLocal = defineModel<string>(
|
|
41
|
+
'connectedStorageIdLocal'
|
|
42
|
+
)
|
|
43
|
+
const modelActiveTab = defineModel<UI_T_VmMigrateSelectStorageTab>('activeTab')
|
|
44
|
+
|
|
45
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
46
|
+
|
|
47
|
+
const normalizedData = computed<string[]>(() =>
|
|
48
|
+
props.data.map(
|
|
49
|
+
(disk: UI_I_StorageConfigurePerDiskItem) =>
|
|
50
|
+
`${disk.virtual_machine} | ${disk.file}`
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
const onGoBack = (): void => {
|
|
55
|
+
modelShowSelectedPerDisks.value = false
|
|
56
|
+
modelConnectedStorageIdLocal.value = ''
|
|
57
|
+
modelActiveTab.value = 'configure-disk'
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style lang="scss" scoped>
|
|
62
|
+
@import 'assets/scss/common/mixins.scss';
|
|
63
|
+
.selected-per-disk {
|
|
64
|
+
@include flex($align: center);
|
|
65
|
+
.icon {
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
.icon-arrow {
|
|
69
|
+
width: 16px;
|
|
70
|
+
height: 16px;
|
|
71
|
+
margin: 0 20px 0 15px;
|
|
72
|
+
transform: rotate(270deg);
|
|
73
|
+
fill: #0079b8;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
&__all-objects {
|
|
77
|
+
@include flex($align: center);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
3
|
+
export const vmMigrateSelectTargetServerTabsFunc = (
|
|
4
|
+
localization: UI_I_Localization
|
|
5
|
+
): UI_I_CollapseNavItem[] => {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
text: localization.common.savedVCenterServers,
|
|
9
|
+
value: 'saved-servers',
|
|
10
|
+
disabled: false,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
text: localization.common.newVCenterServer,
|
|
14
|
+
value: 'new-server',
|
|
15
|
+
disabled: false,
|
|
16
|
+
},
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type T_SelectTargetServerTab = 'new-server' | 'saved-servers'
|