bfg-common 1.4.113 → 1.4.114
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/scss/common/icons/icons-5.scss +28 -4
- package/components/common/layout/theHeader/TheHeaderNew.vue +12 -2
- package/components/common/layout/theHeader/ThemeSwitch.vue +8 -1
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +8 -2
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +7 -1
- package/components/common/select/input/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +4 -3
- package/package.json +2 -2
- package/components/common/wizards/vmNew/common/computeResource/TreeView.vue +0 -61
- package/components/common/wizards/vmNew/common/tooltip/Tooltip.vue +0 -84
- package/components/common/wizards/vmNew/common/validation/compatibility/Compatibility.vue +0 -62
- package/components/common/wizards/vmNew/common/validation/lib/models/enums.ts +0 -5
- package/components/common/wizards/vmNew/migrate/Migrate.vue +0 -235
- package/components/common/wizards/vmNew/migrate/lib/config/constructDataReady.ts +0 -100
- package/components/common/wizards/vmNew/migrate/lib/config/steps.ts +0 -82
- package/components/common/wizards/vmNew/migrate/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/lib/models/interfaces.ts +0 -32
- package/components/common/wizards/vmNew/migrate/lib/utils.ts +0 -0
- package/components/common/wizards/vmNew/migrate/lib/validations.ts +0 -29
- package/components/common/wizards/vmNew/migrate/select/computeResource/ComputeResource.vue +0 -219
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/config/tabsPannel.ts +0 -28
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/interfaces.ts +0 -30
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/types.ts +0 -12
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/TableView.vue +0 -143
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/clusterTable.ts +0 -113
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/hostTable.ts +0 -124
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/resourcePoolTable.ts +0 -115
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/tableKeys.ts +0 -65
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/vappsTable.ts +0 -66
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/interfaces.ts +0 -50
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/types.ts +0 -60
- package/components/common/wizards/vmNew/migrate/select/network/Network.vue +0 -125
- package/components/common/wizards/vmNew/migrate/select/network/table/network/Network.vue +0 -114
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/advancedTable.ts +0 -78
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/basicTable.ts +0 -70
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/interfaces.ts +0 -12
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types.ts +0 -21
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/UseAt.vue +0 -54
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/tableKeys.ts +0 -7
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/useAtTable.ts +0 -47
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/types.ts +0 -5
- package/components/common/wizards/vmNew/migrate/select/priority/Priority.vue +0 -39
- package/components/common/wizards/vmNew/migrate/select/priority/lib/config/typeOptions.ts +0 -21
- package/components/common/wizards/vmNew/migrate/select/priority/lib/models/types.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/storage/Storage.vue +0 -206
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/Batch.vue +0 -58
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/config/virtualDiskFormat.ts +0 -30
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/Table.vue +0 -118
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/config/datastoreTable.ts +0 -177
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/models/types.ts +0 -15
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/Disk.vue +0 -68
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/Table.vue +0 -74
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/diskTable.ts +0 -135
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/tableKeys.ts +0 -15
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces.ts +0 -24
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/types.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/storage/lib/config/tabsPannel.ts +0 -20
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/interfaces.ts +0 -14
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/types.ts +0 -9
- package/components/common/wizards/vmNew/migrate/select/storage/policy/Policy.vue +0 -84
- package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +0 -88
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/config/tabsPannel.ts +0 -18
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/models/types.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/New.vue +0 -294
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/config/defaultForm.ts +0 -36
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/models/interfaces.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/targetServer/saved/Saved.vue +0 -27
- package/components/common/wizards/vmNew/migrate/select/targetServer/targetServer.vue +0 -41
- package/components/common/wizards/vmNew/migrate/select/type/Type.vue +0 -27
- package/components/common/wizards/vmNew/migrate/select/type/lib/config/typeOptions.ts +0 -41
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/interfaces.ts +0 -5
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/types.ts +0 -5
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_HeadItem,
|
|
3
|
-
UI_I_BodyItem,
|
|
4
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
5
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
6
|
-
import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
7
|
-
import type { UI_I_MigrateSelectNetworkBasicItem } from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/models/interfaces'
|
|
8
|
-
import { networkBasicsTableItemKeys } from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/config/tableKeys'
|
|
9
|
-
|
|
10
|
-
const getItems = (
|
|
11
|
-
localization: UI_I_Localization
|
|
12
|
-
): [string, boolean, string, string][] => {
|
|
13
|
-
return [
|
|
14
|
-
[localization.common.sourceNetwork, true, '33.3%', networkBasicsTableItemKeys[0]],
|
|
15
|
-
[localization.common.usedBy, true, '33.3%', networkBasicsTableItemKeys[1]],
|
|
16
|
-
[
|
|
17
|
-
localization.common.destinationNetwork,
|
|
18
|
-
true,
|
|
19
|
-
'33.3%',
|
|
20
|
-
networkBasicsTableItemKeys[2],
|
|
21
|
-
],
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
26
|
-
const result: UI_I_HeadItem[] = []
|
|
27
|
-
getItems(localization).forEach((item, i) => {
|
|
28
|
-
const col = i === 2 ? 'select' : `col${i}`
|
|
29
|
-
result.push(constructHeadItem(col, item[0], item[3], false, item[2]))
|
|
30
|
-
})
|
|
31
|
-
return result
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const bodyItems = (
|
|
35
|
-
data: UI_I_MigrateSelectNetworkBasicItem[]
|
|
36
|
-
): UI_I_BodyItem[][] => {
|
|
37
|
-
const bodyItems: UI_I_BodyItem[][] = []
|
|
38
|
-
|
|
39
|
-
data.forEach((network: UI_I_MigrateSelectNetworkBasicItem) => {
|
|
40
|
-
const data = {
|
|
41
|
-
id: `${network.source_network}-select`,
|
|
42
|
-
sourceNetwork: network.source_network,
|
|
43
|
-
disabled: false,
|
|
44
|
-
value: network.destination_network.find(
|
|
45
|
-
(item) => item === network.source_network
|
|
46
|
-
),
|
|
47
|
-
option: network.destination_network,
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
bodyItems.push([
|
|
51
|
-
{
|
|
52
|
-
key: 'col0',
|
|
53
|
-
text: network[networkBasicsTableItemKeys[0]],
|
|
54
|
-
id: network.source_network,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
key: 'col1',
|
|
58
|
-
text: network[networkBasicsTableItemKeys[1]],
|
|
59
|
-
id: network.source_network,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
key: 'select',
|
|
63
|
-
text: network[networkBasicsTableItemKeys[2]],
|
|
64
|
-
data,
|
|
65
|
-
id: network.source_network,
|
|
66
|
-
},
|
|
67
|
-
])
|
|
68
|
-
})
|
|
69
|
-
return bodyItems
|
|
70
|
-
}
|
package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_T_NetworkBasicsTableKeysTuple,
|
|
3
|
-
UI_T_NetworkAdvancedTableKeysTuple,
|
|
4
|
-
} from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/models/types'
|
|
5
|
-
|
|
6
|
-
export const networkBasicsTableItemKeys: UI_T_NetworkBasicsTableKeysTuple = [
|
|
7
|
-
'source_network',
|
|
8
|
-
'used_by',
|
|
9
|
-
'destination_network',
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
export const networkAdvancedTableItemKeys: UI_T_NetworkAdvancedTableKeysTuple =
|
|
13
|
-
['vm_name', 'network_adapter', 'source_network', 'destination_network']
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface UI_I_MigrateSelectNetworkBasicItem {
|
|
2
|
-
source_network: string
|
|
3
|
-
used_by: string
|
|
4
|
-
destination_network: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface UI_I_MigrateSelectNetworkAdvancedItem {
|
|
8
|
-
vm_name: string
|
|
9
|
-
network_adapter: string
|
|
10
|
-
source_network: string
|
|
11
|
-
destination_network: string
|
|
12
|
-
}
|
package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_MigrateSelectNetworkBasicItem,
|
|
3
|
-
UI_I_MigrateSelectNetworkAdvancedItem,
|
|
4
|
-
} from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/models/interfaces'
|
|
5
|
-
|
|
6
|
-
export type UI_T_NetworkAdvancedTableKeysTuple = [
|
|
7
|
-
'vm_name',
|
|
8
|
-
'network_adapter',
|
|
9
|
-
'source_network',
|
|
10
|
-
'destination_network'
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
export type UI_T_NetworkBasicsTableKeysTuple = [
|
|
14
|
-
'source_network',
|
|
15
|
-
'used_by',
|
|
16
|
-
'destination_network'
|
|
17
|
-
]
|
|
18
|
-
|
|
19
|
-
export type UI_T_MigrateSelectNetwork =
|
|
20
|
-
| UI_I_MigrateSelectNetworkBasicItem
|
|
21
|
-
| UI_I_MigrateSelectNetworkAdvancedItem
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="table-wrap">
|
|
3
|
-
<atoms-table-data-grid
|
|
4
|
-
:head-items="headItems"
|
|
5
|
-
:body-items="bodyItems"
|
|
6
|
-
:total-items="bodyItems.length"
|
|
7
|
-
:page-size="100"
|
|
8
|
-
:page="1"
|
|
9
|
-
:total-pages="1"
|
|
10
|
-
class="select-network"
|
|
11
|
-
test-id="use-at-table"
|
|
12
|
-
server-off
|
|
13
|
-
off-select-by-row
|
|
14
|
-
hide-footer
|
|
15
|
-
hide-page-size
|
|
16
|
-
>
|
|
17
|
-
</atoms-table-data-grid>
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script lang="ts" setup>
|
|
22
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
23
|
-
import type {
|
|
24
|
-
UI_I_HeadItem,
|
|
25
|
-
UI_I_BodyItem,
|
|
26
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
27
|
-
import * as table from '~/components/common/wizards/vm/migrate/select/network/table/useAt/lib/config/useAtTable'
|
|
28
|
-
|
|
29
|
-
const props = defineProps<{
|
|
30
|
-
networks: any[]
|
|
31
|
-
}>()
|
|
32
|
-
|
|
33
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
34
|
-
|
|
35
|
-
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
36
|
-
table.headItems(localization.value)
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
40
|
-
return table.bodyItems(props.networks)
|
|
41
|
-
})
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<style lang="scss" scoped>
|
|
45
|
-
.select-network {
|
|
46
|
-
:deep(.datagrid) {
|
|
47
|
-
margin-top: 0;
|
|
48
|
-
}
|
|
49
|
-
:deep(.datagrid-outer-wrapper) {
|
|
50
|
-
padding-top: 0;
|
|
51
|
-
//height: inherit;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
</style>
|
package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/useAtTable.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_HeadItem,
|
|
3
|
-
UI_I_BodyItem,
|
|
4
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
5
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
6
|
-
import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
|
|
7
|
-
import { useAtTableItemKeys } from '~/components/common/wizards/vm/migrate/select/network/table/useAt/lib/config/tableKeys'
|
|
8
|
-
|
|
9
|
-
const getItems = (
|
|
10
|
-
localization: UI_I_Localization
|
|
11
|
-
): [string, boolean, string, string][] => {
|
|
12
|
-
return [
|
|
13
|
-
[localization.common.vm, true, '33.3%', useAtTableItemKeys[0]],
|
|
14
|
-
[localization.common.networkAdapter, true, '33.3%', useAtTableItemKeys[1]],
|
|
15
|
-
[localization.common.network, true, '33.3%', useAtTableItemKeys[2]],
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
20
|
-
return defaultSettings.defaultHeadItems(getItems(localization))
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
24
|
-
const bodyItems: UI_I_BodyItem[][] = []
|
|
25
|
-
|
|
26
|
-
data.forEach((network: any, key: number) => {
|
|
27
|
-
bodyItems.push([
|
|
28
|
-
{
|
|
29
|
-
key: 'col0',
|
|
30
|
-
text: network[useAtTableItemKeys[0]],
|
|
31
|
-
id: key,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
key: 'col1',
|
|
35
|
-
text: network[useAtTableItemKeys[1]],
|
|
36
|
-
id: key,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
key: 'col2',
|
|
40
|
-
text: network[useAtTableItemKeys[2]],
|
|
41
|
-
data,
|
|
42
|
-
id: key,
|
|
43
|
-
},
|
|
44
|
-
])
|
|
45
|
-
})
|
|
46
|
-
return bodyItems
|
|
47
|
-
}
|
package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/interfaces.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="select-priority">
|
|
3
|
-
<common-select-radio-group
|
|
4
|
-
v-model="selectedPriorityType"
|
|
5
|
-
:options="vmMigrationPriorityTypes"
|
|
6
|
-
/>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script lang="ts" setup>
|
|
11
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
12
|
-
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
13
|
-
import type { UI_T_SelectVMotionPriority } from '~/components/common/wizards/vm/migrate/select/priority/lib/models/types'
|
|
14
|
-
import { vmMigrateSelectPriorityTypesFunc } from '~/components/common/wizards/vm/migrate/select/priority/lib/config/typeOptions'
|
|
15
|
-
|
|
16
|
-
const props = defineProps<{
|
|
17
|
-
modelValue: UI_T_SelectVMotionPriority
|
|
18
|
-
}>()
|
|
19
|
-
const emits = defineEmits<{
|
|
20
|
-
(event: 'update:model-value', value: UI_T_SelectVMotionPriority): void
|
|
21
|
-
}>()
|
|
22
|
-
|
|
23
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
24
|
-
|
|
25
|
-
const vmMigrationPriorityTypes = computed<UI_I_RadioOption[]>(() =>
|
|
26
|
-
vmMigrateSelectPriorityTypesFunc(localization.value)
|
|
27
|
-
)
|
|
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
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<style lang="scss" scoped></style>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const vmMigrateSelectPriorityTypesFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
6
|
-
): UI_I_RadioOption[] => {
|
|
7
|
-
return [
|
|
8
|
-
{
|
|
9
|
-
label: localization.common.scheduleVMotionWithHighPriority,
|
|
10
|
-
value: 'high',
|
|
11
|
-
disabled: false,
|
|
12
|
-
description: localization.common.scheduleVMotionWithHighPriorityDesc,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
label: localization.common.scheduleNormalVMotion,
|
|
16
|
-
value: 'normal',
|
|
17
|
-
disabled: false,
|
|
18
|
-
description: localization.common.scheduleNormalVMotionDesc,
|
|
19
|
-
},
|
|
20
|
-
]
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type UI_T_SelectVMotionPriority = 'high' | 'normal'
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="select-storage">
|
|
3
|
-
<atoms-alert
|
|
4
|
-
v-show="props.alertMessages?.length"
|
|
5
|
-
test-id="select-storage-alert"
|
|
6
|
-
status="alert-danger"
|
|
7
|
-
:items="props.alertMessages"
|
|
8
|
-
@remove="onHideAlert"
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<common-wizards-vm-migrate-select-storage-selected-per-disk
|
|
12
|
-
v-if="isShowSelectedPerDisks"
|
|
13
|
-
v-model="isShowSelectedPerDisks"
|
|
14
|
-
v-model:active-tab="activeTab"
|
|
15
|
-
v-model:connected-storage-id-local="connectedStorageIdLocal"
|
|
16
|
-
:data="selectedPerDisks"
|
|
17
|
-
/>
|
|
18
|
-
|
|
19
|
-
<atoms-tabs
|
|
20
|
-
v-else
|
|
21
|
-
v-model="activeTab"
|
|
22
|
-
test-id="migrate-select-storage-tabs"
|
|
23
|
-
:items="selectStorageTabs"
|
|
24
|
-
size="small"
|
|
25
|
-
class="select-storage__tabs"
|
|
26
|
-
@change="onChangeMigrateMode"
|
|
27
|
-
/>
|
|
28
|
-
|
|
29
|
-
<common-wizards-vm-new-migrate-select-storage-configure-batch
|
|
30
|
-
v-show="activeTab === 'batch-configure'"
|
|
31
|
-
v-model="model"
|
|
32
|
-
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
33
|
-
:datastore="props.datastore"
|
|
34
|
-
:connected-storage-id="connectedStorageId"
|
|
35
|
-
:is-hide-select-disk-format="isHideSelectDiskFormat"
|
|
36
|
-
>
|
|
37
|
-
<template v-if="isShowSelectedPerDisks" #buttonConfirm>
|
|
38
|
-
<button
|
|
39
|
-
class="btn btn-sm btn-primary"
|
|
40
|
-
data-id="apply-selected-per-disks-button"
|
|
41
|
-
@click="onApplyChanges"
|
|
42
|
-
>
|
|
43
|
-
{{ localization.common.confirm }}
|
|
44
|
-
</button>
|
|
45
|
-
</template>
|
|
46
|
-
</common-wizards-vm-new-migrate-select-storage-configure-batch>
|
|
47
|
-
|
|
48
|
-
<common-wizards-vm-new-migrate-select-storage-configure-disk
|
|
49
|
-
v-show="activeTab === 'configure-disk'"
|
|
50
|
-
v-model="isShowSelectedPerDisks"
|
|
51
|
-
v-model:selected-per-disk-keys="selectedPerDiskKeys"
|
|
52
|
-
v-model:active-tab="activeTab"
|
|
53
|
-
:configure-per-disks="configurePerDisksLocal"
|
|
54
|
-
@update-selected-per-disks="onChangePerDiskStorage"
|
|
55
|
-
/>
|
|
56
|
-
|
|
57
|
-
<common-wizards-vm-common-validation-compatibility
|
|
58
|
-
:loading="!model.storage"
|
|
59
|
-
:status="'Success'"
|
|
60
|
-
text="compatibilityChecksSucceeded"
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<script lang="ts" setup>
|
|
66
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
67
|
-
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
68
|
-
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
69
|
-
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
70
|
-
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
71
|
-
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
72
|
-
import type { UI_I_SelectStorageReadyData } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/interfaces'
|
|
73
|
-
import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
|
|
74
|
-
import { vmMigrateSelectStorageTabsFunc } from '~/components/common/wizards/vm/migrate/select/storage/lib/config/tabsPannel'
|
|
75
|
-
|
|
76
|
-
const props = defineProps<{
|
|
77
|
-
alertMessages: string[]
|
|
78
|
-
submit: number
|
|
79
|
-
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
80
|
-
datastore: UI_I_DatastoreTableItem[]
|
|
81
|
-
connectedStorageIdDefault: string | null
|
|
82
|
-
configurePerDisks: UI_I_StorageConfigurePerDiskItem[]
|
|
83
|
-
}>()
|
|
84
|
-
const model = defineModel<UI_I_MigrateFormLocal>({ required: true })
|
|
85
|
-
const emits = defineEmits<{
|
|
86
|
-
(event: 'hide-alert', value: number): void
|
|
87
|
-
(event: 'next-step', value: UI_I_SelectStorageReadyData): void
|
|
88
|
-
}>()
|
|
89
|
-
|
|
90
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
91
|
-
|
|
92
|
-
const activeTab = ref<UI_T_VmMigrateSelectStorageTab>('batch-configure')
|
|
93
|
-
const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
94
|
-
vmMigrateSelectStorageTabsFunc(localization.value)
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
const isShowSelectedPerDisks = ref<boolean>(false)
|
|
98
|
-
|
|
99
|
-
const selectedPerDiskKeys = ref<number[]>([])
|
|
100
|
-
const selectedPerDisks = ref<UI_I_StorageConfigurePerDiskItem[]>([])
|
|
101
|
-
|
|
102
|
-
const configurePerDisksLocal = ref<UI_I_StorageConfigurePerDiskItem[]>(
|
|
103
|
-
props.configurePerDisks
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
const connectedStorageIdLocal = ref<string>('')
|
|
107
|
-
const connectedStorageId = computed<string | null>(
|
|
108
|
-
() => connectedStorageIdLocal.value || props.connectedStorageIdDefault
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
const onChangeMigrateMode = (event: string): void => {
|
|
112
|
-
if (event === 'batch-configure') {
|
|
113
|
-
connectedStorageIdLocal.value = ''
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
const onChangePerDiskStorage = (
|
|
117
|
-
event: UI_I_StorageConfigurePerDiskItem[]
|
|
118
|
-
): void => {
|
|
119
|
-
connectedStorageIdLocal.value = event[0].extra.datastore_id
|
|
120
|
-
model.value.disk_format = event[0].disk_format
|
|
121
|
-
|
|
122
|
-
selectedPerDisks.value = event
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const onApplyChanges = (): void => {
|
|
126
|
-
/* TODO сделать рефакторинг потом */
|
|
127
|
-
configurePerDisksLocal.value.forEach((disk) => {
|
|
128
|
-
const selectedDisk = selectedPerDisks.value.find(
|
|
129
|
-
(selected) =>
|
|
130
|
-
selected.virtual_machine === disk.virtual_machine &&
|
|
131
|
-
selected.file === disk.file &&
|
|
132
|
-
selected.extra.datastore_id === disk.extra.datastore_id
|
|
133
|
-
)!
|
|
134
|
-
|
|
135
|
-
if (selectedDisk) {
|
|
136
|
-
const { storage, disk_format } = model.value
|
|
137
|
-
|
|
138
|
-
// ;({ name: disk.storage, id: disk.extra.datastore_id } = storage)
|
|
139
|
-
disk.storage = storage.name
|
|
140
|
-
disk.extra.datastore_id = storage.id
|
|
141
|
-
disk.disk_format = disk_format
|
|
142
|
-
}
|
|
143
|
-
})
|
|
144
|
-
|
|
145
|
-
isShowSelectedPerDisks.value = false
|
|
146
|
-
activeTab.value = 'configure-disk'
|
|
147
|
-
selectedPerDisks.value = []
|
|
148
|
-
selectedPerDiskKeys.value = []
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const isHideSelectDiskFormat = computed<boolean>(() => {
|
|
152
|
-
return (
|
|
153
|
-
isShowSelectedPerDisks &&
|
|
154
|
-
selectedPerDisks.value.length === 1 &&
|
|
155
|
-
selectedPerDisks.value[0].file === 'Configuration file'
|
|
156
|
-
)
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
-
const checkValidityBlock = (): boolean => {
|
|
160
|
-
if (!model.value.storage) {
|
|
161
|
-
return false
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
const isActivePerDiskTab = activeTab.value === 'configure-disk'
|
|
165
|
-
emits('next-step', {
|
|
166
|
-
...model.value,
|
|
167
|
-
tab: activeTab.value,
|
|
168
|
-
// ...(isActivePerDiskTab && { configureDisks: props.configurePerDisks }),
|
|
169
|
-
configureDisks: isActivePerDiskTab
|
|
170
|
-
? configurePerDisksLocal.value
|
|
171
|
-
: props.configurePerDisks,
|
|
172
|
-
})
|
|
173
|
-
return true
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
watch(
|
|
177
|
-
() => props.configurePerDisks,
|
|
178
|
-
(newValue: UI_I_StorageConfigurePerDiskItem) => {
|
|
179
|
-
configurePerDisksLocal.value = newValue
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
watch(
|
|
183
|
-
() => props.submit,
|
|
184
|
-
() => {
|
|
185
|
-
checkValidityBlock()
|
|
186
|
-
}
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
const onHideAlert = (): void => {
|
|
190
|
-
emits('hide-alert', 3)
|
|
191
|
-
}
|
|
192
|
-
</script>
|
|
193
|
-
|
|
194
|
-
<style lang="scss" scoped>
|
|
195
|
-
@import 'assets/scss/common/mixins.scss';
|
|
196
|
-
.select-storage {
|
|
197
|
-
@include flex($dir: column);
|
|
198
|
-
height: inherit;
|
|
199
|
-
&__tabs {
|
|
200
|
-
width: 100%;
|
|
201
|
-
:deep(.nav) {
|
|
202
|
-
margin-top: 0;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
</style>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="configure-batch-mode">
|
|
3
|
-
<common-select-input
|
|
4
|
-
v-if="!isHideSelectDiskFormat"
|
|
5
|
-
v-model="model.disk_format"
|
|
6
|
-
:data="virtualDiskFormatOptions"
|
|
7
|
-
:label="localization.common.selectVirtualDiskFormat"
|
|
8
|
-
class="configure-batch-mode__disk-format"
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<common-wizards-vm-new-migrate-select-storage-configure-batch-table
|
|
12
|
-
v-model="model.storage"
|
|
13
|
-
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
14
|
-
:datastore="props.datastore"
|
|
15
|
-
:connected-storage-id="props.connectedStorageId"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
<div
|
|
19
|
-
v-if="$slots.buttonConfirm"
|
|
20
|
-
class="clr-justify-content-end configure-batch-mode__button"
|
|
21
|
-
>
|
|
22
|
-
<slot name="buttonConfirm"></slot>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script lang="ts" setup>
|
|
28
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
29
|
-
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
30
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
31
|
-
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
32
|
-
import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
|
|
33
|
-
import { virtualDiskFormatOptionsFunc } from '~/components/common/wizards/vmNew/migrate/select/storage/configure/batch/config/virtualDiskFormat'
|
|
34
|
-
|
|
35
|
-
const props = defineProps<{
|
|
36
|
-
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
37
|
-
datastore: UI_I_DatastoreTableItem[]
|
|
38
|
-
connectedStorageId: string | null
|
|
39
|
-
isHideSelectDiskFormat: boolean
|
|
40
|
-
}>()
|
|
41
|
-
const model = defineModel<UI_I_MigrateFormLocal>({ required: true })
|
|
42
|
-
|
|
43
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
44
|
-
|
|
45
|
-
const virtualDiskFormatOptions = computed<UI_I_OptionItem[]>(() =>
|
|
46
|
-
virtualDiskFormatOptionsFunc()
|
|
47
|
-
)
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<style lang="scss" scoped>
|
|
51
|
-
.configure-batch-mode {
|
|
52
|
-
&__disk-format {
|
|
53
|
-
}
|
|
54
|
-
&__button {
|
|
55
|
-
display: flex;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
</style>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
2
|
-
|
|
3
|
-
export const virtualDiskFormatOptionsFunc = (): UI_I_SelectInputItem[] => {
|
|
4
|
-
return [
|
|
5
|
-
{
|
|
6
|
-
label: 'Same Format as source',
|
|
7
|
-
value: 0,
|
|
8
|
-
testId: 'migrate-disk-format-same-as-source',
|
|
9
|
-
// value: 'same-format-source',
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
label: 'Thick Provision Lazy Zeroed',
|
|
13
|
-
value: 2,
|
|
14
|
-
testId: 'migrate-disk-format-thick-provision-lazy-zeroed',
|
|
15
|
-
// value: 'thick-provision-lazy-zeroed',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
label: 'Thick Provision Eager Zeroed',
|
|
19
|
-
value: 3,
|
|
20
|
-
testId: 'migrate-disk-format-thick-provision-eager-zeroed',
|
|
21
|
-
// value: 'thick-provision-eager-zeroed',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
label: 'Thin Provision',
|
|
25
|
-
value: 1,
|
|
26
|
-
testId: 'migrate-disk-format-thin-provision',
|
|
27
|
-
// value: 'thin-provision',
|
|
28
|
-
},
|
|
29
|
-
]
|
|
30
|
-
}
|