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,115 +0,0 @@
|
|
|
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 type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
-
import {
|
|
8
|
-
constructColumnKey,
|
|
9
|
-
constructHeadItem,
|
|
10
|
-
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
11
|
-
import { resourcePoolsTableItemKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/tableKeys'
|
|
12
|
-
|
|
13
|
-
const getItems = (
|
|
14
|
-
localization: UI_I_Localization
|
|
15
|
-
): [string, boolean, string, string][] => {
|
|
16
|
-
return [
|
|
17
|
-
[localization.common.name, true, '90px', resourcePoolsTableItemKeys[0]],
|
|
18
|
-
[
|
|
19
|
-
localization.common.cpuReservationMhz,
|
|
20
|
-
true,
|
|
21
|
-
'180px',
|
|
22
|
-
resourcePoolsTableItemKeys[0],
|
|
23
|
-
],
|
|
24
|
-
[localization.common.cpuLimitMhz, true, '180px', resourcePoolsTableItemKeys[0]],
|
|
25
|
-
[
|
|
26
|
-
localization.common.cpuAllocationType,
|
|
27
|
-
true,
|
|
28
|
-
'180px',
|
|
29
|
-
resourcePoolsTableItemKeys[0],
|
|
30
|
-
],
|
|
31
|
-
[localization.common.cpuShares, true, '180px', resourcePoolsTableItemKeys[1]],
|
|
32
|
-
[localization.common.cpuSharesValue, true, '180px', resourcePoolsTableItemKeys[2]],
|
|
33
|
-
[
|
|
34
|
-
localization.common.memoryReservationMb,
|
|
35
|
-
true,
|
|
36
|
-
'180px',
|
|
37
|
-
resourcePoolsTableItemKeys[2],
|
|
38
|
-
],
|
|
39
|
-
[localization.common.memoryLimitMb, true, '180px', resourcePoolsTableItemKeys[2]],
|
|
40
|
-
[
|
|
41
|
-
localization.common.memoryAllocationType,
|
|
42
|
-
true,
|
|
43
|
-
'180px',
|
|
44
|
-
resourcePoolsTableItemKeys[2],
|
|
45
|
-
],
|
|
46
|
-
[localization.common.memoryShares, true, '180px', resourcePoolsTableItemKeys[3]],
|
|
47
|
-
[
|
|
48
|
-
localization.common.memorySharesValue,
|
|
49
|
-
true,
|
|
50
|
-
'180px',
|
|
51
|
-
resourcePoolsTableItemKeys[4],
|
|
52
|
-
],
|
|
53
|
-
[localization.common.vc, true, '90px', resourcePoolsTableItemKeys[5]],
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const columnKeys = (
|
|
58
|
-
localization: UI_I_Localization
|
|
59
|
-
): UI_I_ColumnKey[] => {
|
|
60
|
-
const result: UI_I_ColumnKey[] = []
|
|
61
|
-
getItems(localization).forEach((item, i) => {
|
|
62
|
-
result.push(constructColumnKey(`col${i}`, item[0], item[1]))
|
|
63
|
-
})
|
|
64
|
-
return result
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
68
|
-
const result: UI_I_HeadItem[] = []
|
|
69
|
-
getItems(localization).forEach((item, i) => {
|
|
70
|
-
result.push(constructHeadItem(`col${i}`, item[0], item[3], false, item[2]))
|
|
71
|
-
})
|
|
72
|
-
return result
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
76
|
-
const { $binary } = useNuxtApp()
|
|
77
|
-
const bodyItems: UI_I_BodyItem[][] = []
|
|
78
|
-
data.forEach((vapp, key) => {
|
|
79
|
-
bodyItems.push([
|
|
80
|
-
{
|
|
81
|
-
key: 'col0',
|
|
82
|
-
text: vapp[resourcePoolsTableItemKeys[0]],
|
|
83
|
-
id: key,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
key: 'col1',
|
|
87
|
-
text: $binary.roundHz(vapp[resourcePoolsTableItemKeys[1]]),
|
|
88
|
-
id: key,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
key: 'col2',
|
|
92
|
-
text: $binary.roundHz(vapp[resourcePoolsTableItemKeys[2]]),
|
|
93
|
-
id: key,
|
|
94
|
-
},
|
|
95
|
-
{ key: 'col3', text: vapp[resourcePoolsTableItemKeys[3]], id: key },
|
|
96
|
-
{ key: 'col4', text: vapp[resourcePoolsTableItemKeys[4]], id: key },
|
|
97
|
-
{ key: 'col5', text: vapp[resourcePoolsTableItemKeys[5]], id: key },
|
|
98
|
-
{
|
|
99
|
-
key: 'col6',
|
|
100
|
-
text: $binary.round(vapp[resourcePoolsTableItemKeys[6]]),
|
|
101
|
-
id: key,
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
key: 'col7',
|
|
105
|
-
text: $binary.round(vapp[resourcePoolsTableItemKeys[7]]),
|
|
106
|
-
id: key,
|
|
107
|
-
},
|
|
108
|
-
{ key: 'col8', text: vapp[resourcePoolsTableItemKeys[8]], id: key },
|
|
109
|
-
{ key: 'col9', text: vapp[resourcePoolsTableItemKeys[9]], id: key },
|
|
110
|
-
{ key: 'col10', text: vapp[resourcePoolsTableItemKeys[10]], id: key },
|
|
111
|
-
{ key: 'col11', text: vapp[resourcePoolsTableItemKeys[11]], id: key },
|
|
112
|
-
])
|
|
113
|
-
})
|
|
114
|
-
return bodyItems
|
|
115
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
T_HostTableTuple,
|
|
3
|
-
T_ClusterTableTuple,
|
|
4
|
-
T_VAppsTableTuple,
|
|
5
|
-
T_ResourcePoolTableTuple,
|
|
6
|
-
} from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/models/types'
|
|
7
|
-
|
|
8
|
-
export const hostTableItemKeys: T_HostTableTuple = [
|
|
9
|
-
'name',
|
|
10
|
-
'state',
|
|
11
|
-
'cluster',
|
|
12
|
-
'fault_domain',
|
|
13
|
-
'consumed_cpu',
|
|
14
|
-
'consumed_mem',
|
|
15
|
-
'ha_state',
|
|
16
|
-
'uptime',
|
|
17
|
-
'cert_valid_to',
|
|
18
|
-
'mem_size',
|
|
19
|
-
'cpus',
|
|
20
|
-
'nics',
|
|
21
|
-
'version',
|
|
22
|
-
'alarm_action',
|
|
23
|
-
]
|
|
24
|
-
export const clusterTableItemKeys: T_ClusterTableTuple = [
|
|
25
|
-
'name',
|
|
26
|
-
'available_cpu',
|
|
27
|
-
'available_memory',
|
|
28
|
-
'available_storage',
|
|
29
|
-
'drs',
|
|
30
|
-
'ha',
|
|
31
|
-
'total_cpu',
|
|
32
|
-
'total_memory',
|
|
33
|
-
'total_storage',
|
|
34
|
-
'vms',
|
|
35
|
-
'hosts',
|
|
36
|
-
'cpus',
|
|
37
|
-
'datastores',
|
|
38
|
-
'vsan',
|
|
39
|
-
'vc',
|
|
40
|
-
'evc_cpu_mode',
|
|
41
|
-
'evc_graphics_mode',
|
|
42
|
-
]
|
|
43
|
-
export const vAppsTableItemKeys: T_VAppsTableTuple = [
|
|
44
|
-
'name',
|
|
45
|
-
'cpu_shares',
|
|
46
|
-
'cpu_shares_val',
|
|
47
|
-
'memory_shares',
|
|
48
|
-
'memory_shares_val',
|
|
49
|
-
'managed_by',
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
export const resourcePoolsTableItemKeys: T_ResourcePoolTableTuple = [
|
|
53
|
-
'name',
|
|
54
|
-
'cpu_reservation',
|
|
55
|
-
'cpu_limit',
|
|
56
|
-
'cpu_allocation_type',
|
|
57
|
-
'cpu_shares',
|
|
58
|
-
'cpu_shares_val',
|
|
59
|
-
'memory_reservation',
|
|
60
|
-
'memory_limit',
|
|
61
|
-
'memory_allocation_type',
|
|
62
|
-
'memory_shares',
|
|
63
|
-
'memory_shares_val',
|
|
64
|
-
'vc',
|
|
65
|
-
]
|
|
@@ -1,66 +0,0 @@
|
|
|
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 type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
-
// import {
|
|
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'
|
|
14
|
-
import { vAppsTableItemKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/tableKeys'
|
|
15
|
-
|
|
16
|
-
const getItems = (
|
|
17
|
-
localization: UI_I_Localization
|
|
18
|
-
): [string, boolean, string, string][] => {
|
|
19
|
-
return [
|
|
20
|
-
[localization.common.name, true, '180px', vAppsTableItemKeys[0]],
|
|
21
|
-
[localization.common.cpuShares, true, '180px', vAppsTableItemKeys[1]],
|
|
22
|
-
[localization.common.cpuSharesValue, true, '180px', vAppsTableItemKeys[2]],
|
|
23
|
-
[localization.common.memoryShares, true, '180px', vAppsTableItemKeys[3]],
|
|
24
|
-
[localization.common.memorySharesValue, true, '180px', vAppsTableItemKeys[4]],
|
|
25
|
-
[localization.common.managedBy, true, '180px', vAppsTableItemKeys[5]],
|
|
26
|
-
]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const columnKeys = (
|
|
30
|
-
localization: UI_I_Localization
|
|
31
|
-
): UI_I_ColumnKey[] => {
|
|
32
|
-
return getColumnKeys(getItems(localization))
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
36
|
-
return getHeadItems(getItems(localization))
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
40
|
-
const bodyItems: UI_I_BodyItem[][] = []
|
|
41
|
-
data.forEach((vapp, key) => {
|
|
42
|
-
const nameData: any = {
|
|
43
|
-
iconClassName: E_StatusEnum.vmtemplate_Normal,
|
|
44
|
-
name: vapp.name,
|
|
45
|
-
// @ts-ignore TODO id надо для перехода, пока что так оставить чтобы нигде не ломалось потом поправить для всех
|
|
46
|
-
id: vapp.id,
|
|
47
|
-
nav: 'v',
|
|
48
|
-
type: 'vmtemplate',
|
|
49
|
-
isLink: true,
|
|
50
|
-
}
|
|
51
|
-
bodyItems.push([
|
|
52
|
-
{
|
|
53
|
-
key: 'icon',
|
|
54
|
-
text: vapp[vAppsTableItemKeys[0]],
|
|
55
|
-
data: nameData,
|
|
56
|
-
id: key,
|
|
57
|
-
},
|
|
58
|
-
{ key: 'col2', text: vapp[vAppsTableItemKeys[1]], id: key },
|
|
59
|
-
{ key: 'col3', text: vapp[vAppsTableItemKeys[2]], id: key },
|
|
60
|
-
{ key: 'col4', text: vapp[vAppsTableItemKeys[3]], id: key },
|
|
61
|
-
{ key: 'col5', text: vapp[vAppsTableItemKeys[4]], id: key },
|
|
62
|
-
{ key: 'col6', text: vapp[vAppsTableItemKeys[5]], id: key },
|
|
63
|
-
])
|
|
64
|
-
})
|
|
65
|
-
return bodyItems
|
|
66
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export interface API_UI_I_HostTableItem {
|
|
2
|
-
alarm_action: string
|
|
3
|
-
auto_deploy_machine_identity: string
|
|
4
|
-
cert_valid_to: string
|
|
5
|
-
cluster: string
|
|
6
|
-
consumed_cpu: number
|
|
7
|
-
consumed_mem: number
|
|
8
|
-
cpus: number
|
|
9
|
-
fault_domain: string
|
|
10
|
-
ha_state: string
|
|
11
|
-
instant_clone_maintenance: string
|
|
12
|
-
mem_size: number
|
|
13
|
-
name: string
|
|
14
|
-
nics: number
|
|
15
|
-
state: number
|
|
16
|
-
uptime: number
|
|
17
|
-
version: string
|
|
18
|
-
}
|
|
19
|
-
export interface UI_I_HostTableItem extends API_UI_I_HostTableItem {}
|
|
20
|
-
|
|
21
|
-
export interface API_UI_I_ClusterTableItem {
|
|
22
|
-
available_cpu: number
|
|
23
|
-
available_memory: number
|
|
24
|
-
available_storage: number
|
|
25
|
-
cpus: number
|
|
26
|
-
datastores: number
|
|
27
|
-
drs: string
|
|
28
|
-
evc_cpu_mode: string
|
|
29
|
-
evc_graphics_mode: string
|
|
30
|
-
ha: string
|
|
31
|
-
hosts: number
|
|
32
|
-
id: number
|
|
33
|
-
name: string
|
|
34
|
-
state: number
|
|
35
|
-
status: number
|
|
36
|
-
total_cpu: number
|
|
37
|
-
total_memory: number
|
|
38
|
-
total_storage: number
|
|
39
|
-
vc: string
|
|
40
|
-
vms: number
|
|
41
|
-
vsan: string
|
|
42
|
-
}
|
|
43
|
-
export interface UI_I_ClusterTableItem extends API_UI_I_ClusterTableItem {}
|
|
44
|
-
|
|
45
|
-
export interface API_UI_I_ResourcePoolsTableItem {}
|
|
46
|
-
export interface UI_I_ResourcePoolsTableItem
|
|
47
|
-
extends API_UI_I_ResourcePoolsTableItem {}
|
|
48
|
-
|
|
49
|
-
export interface API_UI_I_VAppsTableItem {}
|
|
50
|
-
export interface UI_I_VAppsTableItem extends API_UI_I_VAppsTableItem {}
|
package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/types.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export type T_HostTableTuple = [
|
|
2
|
-
'name',
|
|
3
|
-
'state',
|
|
4
|
-
'cluster',
|
|
5
|
-
'fault_domain',
|
|
6
|
-
'consumed_cpu',
|
|
7
|
-
'consumed_mem',
|
|
8
|
-
'ha_state',
|
|
9
|
-
'uptime',
|
|
10
|
-
'cert_valid_to',
|
|
11
|
-
'mem_size',
|
|
12
|
-
'cpus',
|
|
13
|
-
'nics',
|
|
14
|
-
'version',
|
|
15
|
-
'alarm_action'
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
export type T_ClusterTableTuple = [
|
|
19
|
-
'name',
|
|
20
|
-
'available_cpu',
|
|
21
|
-
'available_memory',
|
|
22
|
-
'available_storage',
|
|
23
|
-
'drs',
|
|
24
|
-
'ha',
|
|
25
|
-
'total_cpu',
|
|
26
|
-
'total_memory',
|
|
27
|
-
'total_storage',
|
|
28
|
-
'vms',
|
|
29
|
-
'hosts',
|
|
30
|
-
'cpus',
|
|
31
|
-
'datastores',
|
|
32
|
-
'vsan',
|
|
33
|
-
'vc',
|
|
34
|
-
'evc_cpu_mode',
|
|
35
|
-
'evc_graphics_mode'
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
export type T_VAppsTableTuple = [
|
|
39
|
-
'name',
|
|
40
|
-
'cpu_shares',
|
|
41
|
-
'cpu_shares_val',
|
|
42
|
-
'memory_shares',
|
|
43
|
-
'memory_shares_val',
|
|
44
|
-
'managed_by'
|
|
45
|
-
]
|
|
46
|
-
|
|
47
|
-
export type T_ResourcePoolTableTuple = [
|
|
48
|
-
'name',
|
|
49
|
-
'cpu_reservation',
|
|
50
|
-
'cpu_limit',
|
|
51
|
-
'cpu_allocation_type',
|
|
52
|
-
'cpu_shares',
|
|
53
|
-
'cpu_shares_val',
|
|
54
|
-
'memory_reservation',
|
|
55
|
-
'memory_limit',
|
|
56
|
-
'memory_allocation_type',
|
|
57
|
-
'memory_shares',
|
|
58
|
-
'memory_shares_val',
|
|
59
|
-
'vc'
|
|
60
|
-
]
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="select-network">
|
|
3
|
-
<div class="select-network__text">
|
|
4
|
-
{{ selectNetworkHeadline }}
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<common-wizards-vm-migrate-select-network-table-network
|
|
8
|
-
v-model="selectedSourceNetwork"
|
|
9
|
-
:key="uniqueKey"
|
|
10
|
-
:networks="dataNetwork"
|
|
11
|
-
:type="tableType"
|
|
12
|
-
@select-network="onSelectNetwork"
|
|
13
|
-
/>
|
|
14
|
-
|
|
15
|
-
<div
|
|
16
|
-
v-if="isShowNetworkBasic && selectedSourceNetwork"
|
|
17
|
-
class="select-network__matcher-details"
|
|
18
|
-
>
|
|
19
|
-
<span> {{ networkDetailsHeadline }} </span>
|
|
20
|
-
|
|
21
|
-
<common-wizards-vm-migrate-select-network-table-use-at
|
|
22
|
-
:networks="useAtTableData"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div class="vm-migrate-advanced-view-button">
|
|
27
|
-
<button
|
|
28
|
-
class="btn btn-sm migrate-network-advanced-btn"
|
|
29
|
-
data-id="migrate-network-advanced-button"
|
|
30
|
-
@click="onClickSelectNetworkMode"
|
|
31
|
-
>
|
|
32
|
-
<span v-if="!isShowNetworkBasic"> ≪ </span>
|
|
33
|
-
{{ buttonText }}
|
|
34
|
-
<span v-if="isShowNetworkBasic"> ≫ </span>
|
|
35
|
-
</button>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<common-wizards-vm-common-validation-compatibility
|
|
39
|
-
:loading="false"
|
|
40
|
-
status="Success"
|
|
41
|
-
text="compatibilityChecksSucceeded"
|
|
42
|
-
/>
|
|
43
|
-
</div>
|
|
44
|
-
</template>
|
|
45
|
-
|
|
46
|
-
<script lang="ts" setup>
|
|
47
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
48
|
-
|
|
49
|
-
const isShowNetworkBasic = defineModel<boolean>('isBasicNetworkMode')
|
|
50
|
-
const networkData = defineModel<any>('networkData')
|
|
51
|
-
|
|
52
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
53
|
-
|
|
54
|
-
const selectedSourceNetwork = ref<string | null>(null)
|
|
55
|
-
const uniqueKey = ref<number>(0)
|
|
56
|
-
|
|
57
|
-
const buttonText = computed(
|
|
58
|
-
() => localization.value.common[isShowNetworkBasic.value ? 'advanced' : 'basic']
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
const tableType = computed<string>(() =>
|
|
62
|
-
isShowNetworkBasic.value ? 'basic' : 'advanced'
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
const selectNetworkHeadline = computed<string>(() => {
|
|
66
|
-
const { migrateNetworkingForAllAdapters, migrateNetworkingForEachAdapters } =
|
|
67
|
-
localization.value.common
|
|
68
|
-
|
|
69
|
-
return isShowNetworkBasic.value
|
|
70
|
-
? migrateNetworkingForAllAdapters
|
|
71
|
-
: migrateNetworkingForEachAdapters
|
|
72
|
-
})
|
|
73
|
-
const networkDetailsHeadline = computed<string>(() =>
|
|
74
|
-
localization.value.common.networkIsInUseAt.replace(
|
|
75
|
-
'{ network }',
|
|
76
|
-
selectedSourceNetwork.value + ''
|
|
77
|
-
)
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
const dataNetwork = computed(() => {
|
|
81
|
-
return [
|
|
82
|
-
{
|
|
83
|
-
vm_name: 'vm-horizon-1',
|
|
84
|
-
network_adapter: 'Network adapter 1',
|
|
85
|
-
source_network: 'VM-VLAN105',
|
|
86
|
-
used_by: '1 VMs / 1 Network adapters',
|
|
87
|
-
destination_network: ['VM Network 1', 'VM-VLAN105', 'VM Network 2'],
|
|
88
|
-
},
|
|
89
|
-
]
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
const useAtTableData = computed(() =>
|
|
93
|
-
dataNetwork.value.map((x) => {
|
|
94
|
-
return {
|
|
95
|
-
vm_name: x.vm_name,
|
|
96
|
-
network: x.source_network,
|
|
97
|
-
network_adapter: x.network_adapter,
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
const onClickSelectNetworkMode = (): void => {
|
|
103
|
-
uniqueKey.value++
|
|
104
|
-
isShowNetworkBasic.value = !isShowNetworkBasic.value
|
|
105
|
-
selectedSourceNetwork.value = ''
|
|
106
|
-
}
|
|
107
|
-
const onSelectNetwork = (data: any): void => {
|
|
108
|
-
networkData.value = data
|
|
109
|
-
}
|
|
110
|
-
</script>
|
|
111
|
-
|
|
112
|
-
<style lang="scss" scoped>
|
|
113
|
-
.select-network {
|
|
114
|
-
margin-top: 10px;
|
|
115
|
-
&__text {
|
|
116
|
-
font-size: 12px;
|
|
117
|
-
}
|
|
118
|
-
&__matcher-details {
|
|
119
|
-
margin-top: 10px;
|
|
120
|
-
}
|
|
121
|
-
.vm-migrate-advanced-view-button {
|
|
122
|
-
text-align: end;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
</style>
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="table-wrap">
|
|
3
|
-
<atoms-table-data-grid
|
|
4
|
-
v-model:selected-row="selectedNetworkLocal"
|
|
5
|
-
v-model:column-keys="columnKeys"
|
|
6
|
-
v-model:page-size="pagination.pageSize"
|
|
7
|
-
v-model:page="pagination.page"
|
|
8
|
-
:head-items="headItems"
|
|
9
|
-
:body-items="bodyItems"
|
|
10
|
-
:total-items="bodyItems.length"
|
|
11
|
-
:total-pages="1"
|
|
12
|
-
class="select-network"
|
|
13
|
-
test-id="network-table"
|
|
14
|
-
:off-select-by-row="props.type === 'advanced'"
|
|
15
|
-
server-off
|
|
16
|
-
hide-footer
|
|
17
|
-
hide-page-size
|
|
18
|
-
>
|
|
19
|
-
<template #select="{ item }">
|
|
20
|
-
<span class="select select-network__select">
|
|
21
|
-
<select
|
|
22
|
-
:id="item.data.id"
|
|
23
|
-
v-model="item.data.value"
|
|
24
|
-
data-id="network-select"
|
|
25
|
-
:disabled="item.data.disabled"
|
|
26
|
-
@change="onSelect(item.data)"
|
|
27
|
-
>
|
|
28
|
-
<option
|
|
29
|
-
v-for="option in item.data.option"
|
|
30
|
-
:key="option"
|
|
31
|
-
:value="option"
|
|
32
|
-
:label="option"
|
|
33
|
-
/>
|
|
34
|
-
</select>
|
|
35
|
-
</span>
|
|
36
|
-
</template>
|
|
37
|
-
</atoms-table-data-grid>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script lang="ts" setup>
|
|
42
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
43
|
-
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
44
|
-
import type {
|
|
45
|
-
UI_I_ColumnKey,
|
|
46
|
-
UI_I_HeadItem,
|
|
47
|
-
UI_I_BodyItem,
|
|
48
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
49
|
-
import type { UI_T_MigrateSelectNetwork } from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/models/types'
|
|
50
|
-
import * as basicTable from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/config/basicTable'
|
|
51
|
-
import * as advancedTable from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/config/advancedTable'
|
|
52
|
-
|
|
53
|
-
const props = defineProps<{
|
|
54
|
-
networks: UI_T_MigrateSelectNetwork[]
|
|
55
|
-
type: 'basic' | 'advanced'
|
|
56
|
-
}>()
|
|
57
|
-
const emits = defineEmits<{
|
|
58
|
-
(event: 'select-network', value: any): void
|
|
59
|
-
}>()
|
|
60
|
-
const selectedNetworkLocal = defineModel<string | null>()
|
|
61
|
-
|
|
62
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
63
|
-
|
|
64
|
-
const pagination = ref<UI_I_Pagination>({
|
|
65
|
-
page: 1,
|
|
66
|
-
pageSize: 100,
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
const table: any = {
|
|
70
|
-
basic: basicTable,
|
|
71
|
-
advanced: advancedTable,
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
75
|
-
table[props.type].headItems(localization.value)
|
|
76
|
-
)
|
|
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
|
-
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
85
|
-
return table[props.type].bodyItems(props.networks)
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
const onSelect = (data: any): void => {
|
|
89
|
-
emits('select-network', data)
|
|
90
|
-
}
|
|
91
|
-
watch(
|
|
92
|
-
() => props.type,
|
|
93
|
-
(newValue: 'basic' | 'advanced') => {
|
|
94
|
-
const tableData = bodyItems.value[0]
|
|
95
|
-
const itemKey = newValue === 'basic' ? 2 : 3
|
|
96
|
-
const data = tableData[itemKey].data
|
|
97
|
-
onSelect(data)
|
|
98
|
-
},
|
|
99
|
-
{ deep: true, immediate: true }
|
|
100
|
-
)
|
|
101
|
-
</script>
|
|
102
|
-
|
|
103
|
-
<style lang="scss" scoped>
|
|
104
|
-
.select-network {
|
|
105
|
-
&__select {
|
|
106
|
-
width: 100%;
|
|
107
|
-
height: 24px;
|
|
108
|
-
min-width: 107px;
|
|
109
|
-
& > select {
|
|
110
|
-
height: 100%;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
</style>
|
|
@@ -1,78 +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_MigrateSelectNetworkAdvancedItem } from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/models/interfaces'
|
|
8
|
-
import { networkAdvancedTableItemKeys } 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.vm, true, '25%', networkAdvancedTableItemKeys[0]],
|
|
15
|
-
[localization.common.networkAdapter, true, '25%', networkAdvancedTableItemKeys[1]],
|
|
16
|
-
[localization.common.sourceNetwork, true, '25%', networkAdvancedTableItemKeys[2]],
|
|
17
|
-
[
|
|
18
|
-
localization.common.destinationNetwork,
|
|
19
|
-
true,
|
|
20
|
-
'25%',
|
|
21
|
-
networkAdvancedTableItemKeys[3],
|
|
22
|
-
],
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
27
|
-
const result: UI_I_HeadItem[] = []
|
|
28
|
-
getItems(localization).forEach((item, i) => {
|
|
29
|
-
const col = i === 3 ? 'select' : `col${i}`
|
|
30
|
-
result.push(constructHeadItem(col, item[0], item[3], false, item[2]))
|
|
31
|
-
})
|
|
32
|
-
return result
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const bodyItems = (
|
|
36
|
-
data: UI_I_MigrateSelectNetworkAdvancedItem[]
|
|
37
|
-
): UI_I_BodyItem[][] => {
|
|
38
|
-
const bodyItems: UI_I_BodyItem[][] = []
|
|
39
|
-
|
|
40
|
-
data.forEach(
|
|
41
|
-
(network: UI_I_MigrateSelectNetworkAdvancedItem, key: number) => {
|
|
42
|
-
const data = {
|
|
43
|
-
id: `${network.vm_name}-select`,
|
|
44
|
-
sourceNetwork: network.source_network,
|
|
45
|
-
disabled: false,
|
|
46
|
-
value: network.destination_network.find(
|
|
47
|
-
(item: string) => item === network.source_network
|
|
48
|
-
),
|
|
49
|
-
option: network.destination_network,
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
bodyItems.push([
|
|
53
|
-
{
|
|
54
|
-
key: 'col0',
|
|
55
|
-
text: network[networkAdvancedTableItemKeys[0]],
|
|
56
|
-
id: key,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
key: 'col1',
|
|
60
|
-
text: network[networkAdvancedTableItemKeys[1]],
|
|
61
|
-
id: key,
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
key: 'col2',
|
|
65
|
-
text: network[networkAdvancedTableItemKeys[2]],
|
|
66
|
-
id: key,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
key: 'select',
|
|
70
|
-
text: network[networkAdvancedTableItemKeys[3]],
|
|
71
|
-
data,
|
|
72
|
-
id: key,
|
|
73
|
-
},
|
|
74
|
-
])
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
return bodyItems
|
|
78
|
-
}
|