bfg-common 1.5.454 → 1.5.456
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/atoms/window/Window.vue +1 -1
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/clusterTable.ts +67 -10
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/hostTable.ts +54 -8
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/resourcePoolTable.ts +47 -7
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/vappsTable.ts +30 -5
- package/components/common/wizards/vm/migrate/select/priority/lib/config/typeOptions.ts +3 -0
- package/components/common/wizards/vm/migrate/select/type/lib/config/typeOptions.ts +49 -45
- package/components/common/wizards/vm/migrate/vmOrigin/VmOrigin.vue +1 -0
- package/package.json +2 -2
@@ -66,47 +66,104 @@ export const bodyItems = (data: UI_I_ClusterTableItem[]): UI_I_BodyItem[][] => {
|
|
66
66
|
text: cluster[clusterTableItemKeys[0]],
|
67
67
|
data: { iconClassName: 'vsphere-icon-cluster' },
|
68
68
|
id: key,
|
69
|
+
testId: `migrate-cluster-table-item-${key}`,
|
69
70
|
},
|
70
71
|
{
|
71
72
|
key: 'col1',
|
72
73
|
text: $binary.roundHz(cluster[clusterTableItemKeys[1]]),
|
73
74
|
id: key,
|
75
|
+
testId: `migrate-cluster-table-item-${key}`,
|
74
76
|
},
|
75
77
|
{
|
76
78
|
key: 'col2',
|
77
79
|
text: $binary.round(cluster[clusterTableItemKeys[2]]),
|
78
80
|
id: key,
|
81
|
+
testId: `migrate-cluster-table-item-${key}`,
|
79
82
|
},
|
80
83
|
{
|
81
84
|
key: 'col3',
|
82
85
|
text: $binary.round(cluster[clusterTableItemKeys[3]]),
|
83
86
|
id: key,
|
87
|
+
testId: `migrate-cluster-table-item-${key}`,
|
88
|
+
},
|
89
|
+
{
|
90
|
+
key: 'col4',
|
91
|
+
text: cluster[clusterTableItemKeys[4]],
|
92
|
+
id: key,
|
93
|
+
testId: `migrate-cluster-table-item-${key}`,
|
94
|
+
},
|
95
|
+
{
|
96
|
+
key: 'col5',
|
97
|
+
text: cluster[clusterTableItemKeys[5]],
|
98
|
+
id: key,
|
99
|
+
testId: `migrate-cluster-table-item-${key}`,
|
84
100
|
},
|
85
|
-
{ key: 'col4', text: cluster[clusterTableItemKeys[4]], id: key },
|
86
|
-
{ key: 'col5', text: cluster[clusterTableItemKeys[5]], id: key },
|
87
101
|
{
|
88
102
|
key: 'col6',
|
89
103
|
text: $binary.roundHz(cluster[clusterTableItemKeys[6]]),
|
90
104
|
id: key,
|
105
|
+
testId: `migrate-cluster-table-item-${key}`,
|
91
106
|
},
|
92
107
|
{
|
93
108
|
key: 'col7',
|
94
109
|
text: $binary.round(cluster[clusterTableItemKeys[7]]),
|
95
110
|
id: key,
|
111
|
+
testId: `migrate-cluster-table-item-${key}`,
|
96
112
|
},
|
97
113
|
{
|
98
114
|
key: 'col8',
|
99
115
|
text: $binary.round(cluster[clusterTableItemKeys[8]]),
|
100
116
|
id: key,
|
117
|
+
testId: `migrate-cluster-table-item-${key}`,
|
118
|
+
},
|
119
|
+
{
|
120
|
+
key: 'col9',
|
121
|
+
text: cluster[clusterTableItemKeys[9]],
|
122
|
+
id: key,
|
123
|
+
testId: `migrate-cluster-table-item-${key}`,
|
124
|
+
},
|
125
|
+
{
|
126
|
+
key: 'col10',
|
127
|
+
text: cluster[clusterTableItemKeys[10]],
|
128
|
+
id: key,
|
129
|
+
testId: `migrate-cluster-table-item-${key}`,
|
130
|
+
},
|
131
|
+
{
|
132
|
+
key: 'col11',
|
133
|
+
text: cluster[clusterTableItemKeys[11]],
|
134
|
+
id: key,
|
135
|
+
testId: `migrate-cluster-table-item-${key}`,
|
136
|
+
},
|
137
|
+
{
|
138
|
+
key: 'col12',
|
139
|
+
text: cluster[clusterTableItemKeys[12]],
|
140
|
+
id: key,
|
141
|
+
testId: `migrate-cluster-table-item-${key}`,
|
142
|
+
},
|
143
|
+
{
|
144
|
+
key: 'col13',
|
145
|
+
text: cluster[clusterTableItemKeys[13]],
|
146
|
+
id: key,
|
147
|
+
testId: `migrate-cluster-table-item-${key}`,
|
148
|
+
},
|
149
|
+
{
|
150
|
+
key: 'col14',
|
151
|
+
text: cluster[clusterTableItemKeys[14]],
|
152
|
+
id: key,
|
153
|
+
testId: `migrate-cluster-table-item-${key}`,
|
154
|
+
},
|
155
|
+
{
|
156
|
+
key: 'col15',
|
157
|
+
text: cluster[clusterTableItemKeys[15]],
|
158
|
+
id: key,
|
159
|
+
testId: `migrate-cluster-table-item-${key}`,
|
160
|
+
},
|
161
|
+
{
|
162
|
+
key: 'col16',
|
163
|
+
text: cluster[clusterTableItemKeys[16]],
|
164
|
+
id: key,
|
165
|
+
testId: `migrate-cluster-table-item-${key}`,
|
101
166
|
},
|
102
|
-
{ key: 'col9', text: cluster[clusterTableItemKeys[9]], id: key },
|
103
|
-
{ key: 'col10', text: cluster[clusterTableItemKeys[10]], id: key },
|
104
|
-
{ key: 'col11', text: cluster[clusterTableItemKeys[11]], id: key },
|
105
|
-
{ key: 'col12', text: cluster[clusterTableItemKeys[12]], id: key },
|
106
|
-
{ key: 'col13', text: cluster[clusterTableItemKeys[13]], id: key },
|
107
|
-
{ key: 'col14', text: cluster[clusterTableItemKeys[14]], id: key },
|
108
|
-
{ key: 'col15', text: cluster[clusterTableItemKeys[15]], id: key },
|
109
|
-
{ key: 'col16', text: cluster[clusterTableItemKeys[16]], id: key },
|
110
167
|
])
|
111
168
|
})
|
112
169
|
return bodyItems
|
@@ -80,44 +80,90 @@ export const bodyItems = (
|
|
80
80
|
text: host[hostTableItemKeys[0]],
|
81
81
|
data: hostData,
|
82
82
|
id: key,
|
83
|
+
testId: `migrate-host-table-item-${key}`
|
83
84
|
},
|
84
85
|
{
|
85
86
|
key: 'col1',
|
86
87
|
text: localization.common[hostLocalizationByState[host[hostTableItemKeys[1]]]],
|
87
88
|
id: key,
|
89
|
+
testId: `migrate-host-table-item-${key}`
|
88
90
|
},
|
89
91
|
{
|
90
92
|
key: 'col2',
|
91
93
|
text: host[hostTableItemKeys[2]],
|
92
94
|
id: key,
|
95
|
+
testId: `migrate-host-table-item-${key}`
|
96
|
+
},
|
97
|
+
{
|
98
|
+
key: 'col3',
|
99
|
+
text: host[hostTableItemKeys[3]],
|
100
|
+
id: key,
|
101
|
+
testId: `migrate-host-table-item-${key}`
|
93
102
|
},
|
94
|
-
{ key: 'col3', text: host[hostTableItemKeys[3]], id: key },
|
95
103
|
{
|
96
104
|
key: 'progress',
|
97
105
|
text: `${host[hostTableItemKeys[4]].toFixed(2)}%`,
|
98
106
|
data: host[hostTableItemKeys[4]],
|
99
107
|
id: key,
|
108
|
+
testId: `migrate-host-table-item-${key}`
|
100
109
|
},
|
101
110
|
{
|
102
111
|
key: 'progress',
|
103
112
|
text: `${host[hostTableItemKeys[5]].toFixed(2)}%`,
|
104
113
|
data: host[hostTableItemKeys[5]],
|
105
114
|
id: key,
|
115
|
+
testId: `migrate-host-table-item-${key}`
|
116
|
+
},
|
117
|
+
{
|
118
|
+
key: 'col6',
|
119
|
+
text: host[hostTableItemKeys[6]],
|
120
|
+
id: key,
|
121
|
+
testId: `migrate-host-table-item-${key}`
|
122
|
+
},
|
123
|
+
{
|
124
|
+
key: 'col7',
|
125
|
+
text: host[hostTableItemKeys[7]],
|
126
|
+
id: key,
|
127
|
+
testId: `migrate-host-table-item-${key}`
|
128
|
+
},
|
129
|
+
{
|
130
|
+
key: 'col8',
|
131
|
+
text: host[hostTableItemKeys[8]],
|
132
|
+
id: key,
|
133
|
+
testId: `migrate-host-table-item-${key}`
|
106
134
|
},
|
107
|
-
{ key: 'col6', text: host[hostTableItemKeys[6]], id: key },
|
108
|
-
{ key: 'col7', text: host[hostTableItemKeys[7]], id: key },
|
109
|
-
{ key: 'col8', text: host[hostTableItemKeys[8]], id: key },
|
110
135
|
{
|
111
136
|
key: 'col9',
|
112
137
|
text: `${$number.format(host[hostTableItemKeys[9]], 'en')} ${
|
113
138
|
localization.common.mb
|
114
139
|
}`,
|
115
140
|
id: key,
|
141
|
+
testId: `migrate-host-table-item-${key}`
|
142
|
+
},
|
143
|
+
{
|
144
|
+
key: 'col10',
|
145
|
+
text: host[hostTableItemKeys[10]],
|
146
|
+
id: key,
|
147
|
+
testId: `migrate-host-table-item-${key}`
|
148
|
+
},
|
149
|
+
{
|
150
|
+
key: 'col11',
|
151
|
+
text: host[hostTableItemKeys[11]],
|
152
|
+
id: key,
|
153
|
+
testId: `migrate-host-table-item-${key}`
|
154
|
+
},
|
155
|
+
{
|
156
|
+
key: 'col12',
|
157
|
+
text: host[hostTableItemKeys[12]],
|
158
|
+
id: key,
|
159
|
+
testId: `migrate-host-table-item-${key}`
|
160
|
+
},
|
161
|
+
{
|
162
|
+
key: 'col14',
|
163
|
+
text: host[hostTableItemKeys[13]],
|
164
|
+
id: key,
|
165
|
+
testId: `migrate-host-table-item-${key}`
|
116
166
|
},
|
117
|
-
{ key: 'col10', text: host[hostTableItemKeys[10]], id: key },
|
118
|
-
{ key: 'col11', text: host[hostTableItemKeys[11]], id: key },
|
119
|
-
{ key: 'col12', text: host[hostTableItemKeys[12]], id: key },
|
120
|
-
{ key: 'col14', text: host[hostTableItemKeys[13]], id: key },
|
121
167
|
])
|
122
168
|
})
|
123
169
|
return bodyItems
|
@@ -81,34 +81,74 @@ export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
81
81
|
key: 'col0',
|
82
82
|
text: vapp[resourcePoolsTableItemKeys[0]],
|
83
83
|
id: key,
|
84
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
84
85
|
},
|
85
86
|
{
|
86
87
|
key: 'col1',
|
87
88
|
text: $binary.roundHz(vapp[resourcePoolsTableItemKeys[1]]),
|
88
89
|
id: key,
|
90
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
89
91
|
},
|
90
92
|
{
|
91
93
|
key: 'col2',
|
92
94
|
text: $binary.roundHz(vapp[resourcePoolsTableItemKeys[2]]),
|
93
95
|
id: key,
|
96
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
97
|
+
},
|
98
|
+
{
|
99
|
+
key: 'col3',
|
100
|
+
text: vapp[resourcePoolsTableItemKeys[3]],
|
101
|
+
id: key,
|
102
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
103
|
+
},
|
104
|
+
{
|
105
|
+
key: 'col4',
|
106
|
+
text: vapp[resourcePoolsTableItemKeys[4]],
|
107
|
+
id: key,
|
108
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
109
|
+
},
|
110
|
+
{
|
111
|
+
key: 'col5',
|
112
|
+
text: vapp[resourcePoolsTableItemKeys[5]],
|
113
|
+
id: key,
|
114
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
94
115
|
},
|
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
116
|
{
|
99
117
|
key: 'col6',
|
100
118
|
text: $binary.round(vapp[resourcePoolsTableItemKeys[6]]),
|
101
119
|
id: key,
|
120
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
102
121
|
},
|
103
122
|
{
|
104
123
|
key: 'col7',
|
105
124
|
text: $binary.round(vapp[resourcePoolsTableItemKeys[7]]),
|
106
125
|
id: key,
|
126
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
127
|
+
},
|
128
|
+
{
|
129
|
+
key: 'col8',
|
130
|
+
text: vapp[resourcePoolsTableItemKeys[8]],
|
131
|
+
id: key,
|
132
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
133
|
+
},
|
134
|
+
{
|
135
|
+
key: 'col9',
|
136
|
+
text: vapp[resourcePoolsTableItemKeys[9]],
|
137
|
+
id: key,
|
138
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
139
|
+
},
|
140
|
+
{
|
141
|
+
key: 'col10',
|
142
|
+
text: vapp[resourcePoolsTableItemKeys[10]],
|
143
|
+
id: key,
|
144
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
145
|
+
},
|
146
|
+
{
|
147
|
+
key: 'col11',
|
148
|
+
text: vapp[resourcePoolsTableItemKeys[11]],
|
149
|
+
id: key,
|
150
|
+
testId: `migrate-resource-pool-table-item-${key}`,
|
107
151
|
},
|
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
152
|
])
|
113
153
|
})
|
114
154
|
return bodyItems
|
@@ -56,12 +56,37 @@ export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
56
56
|
text: vapp[vAppsTableItemKeys[0]],
|
57
57
|
data: nameData,
|
58
58
|
id: key,
|
59
|
+
testId: `migrate-vapp-table-item-${key}`,
|
60
|
+
},
|
61
|
+
{
|
62
|
+
key: 'col1',
|
63
|
+
text: vapp[vAppsTableItemKeys[1]],
|
64
|
+
id: key,
|
65
|
+
testId: `migrate-vapp-table-item-${key}`,
|
66
|
+
},
|
67
|
+
{
|
68
|
+
key: 'col2',
|
69
|
+
text: vapp[vAppsTableItemKeys[2]],
|
70
|
+
id: key,
|
71
|
+
testId: `migrate-vapp-table-item-${key}`,
|
72
|
+
},
|
73
|
+
{
|
74
|
+
key: 'col3',
|
75
|
+
text: vapp[vAppsTableItemKeys[3]],
|
76
|
+
id: key,
|
77
|
+
testId: `migrate-vapp-table-item-${key}`,
|
78
|
+
},
|
79
|
+
{
|
80
|
+
key: 'col4',
|
81
|
+
text: vapp[vAppsTableItemKeys[4]],
|
82
|
+
id: key,
|
83
|
+
testId: `migrate-vapp-table-item-${key}`,
|
84
|
+
},
|
85
|
+
{ key: 'col5',
|
86
|
+
text: vapp[vAppsTableItemKeys[5]],
|
87
|
+
id: key,
|
88
|
+
testId: `migrate-vapp-table-item-${key}`,
|
59
89
|
},
|
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 },
|
65
90
|
])
|
66
91
|
})
|
67
92
|
return bodyItems
|
@@ -11,18 +11,21 @@ export const vmMigrateSelectPriorityTypesFunc = (
|
|
11
11
|
value: 'live',
|
12
12
|
disabled: vmState !== 2,
|
13
13
|
description: localization.migrateVm.liveMigrationDesc,
|
14
|
+
testId: 'live-migration-option',
|
14
15
|
},
|
15
16
|
// {
|
16
17
|
// label: localization.migrateVm.ramSuspendMigration,
|
17
18
|
// value: 'ram-suspend',
|
18
19
|
// disabled: vmState !== 2,
|
19
20
|
// description: localization.migrateVm.ramSuspendMigrationDesc,
|
21
|
+
// testId: 'ram-suspend-migration-option',
|
20
22
|
// },
|
21
23
|
{
|
22
24
|
label: localization.migrateVm.offlineMigration,
|
23
25
|
value: 'offline',
|
24
26
|
disabled: vmState !== 1,
|
25
27
|
description: localization.migrateVm.offlineMigrationDesc,
|
28
|
+
testId: 'offline-migration-option',
|
26
29
|
},
|
27
30
|
]
|
28
31
|
}
|
@@ -1,45 +1,49 @@
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
2
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
3
|
-
import type { UI_I_VmMigrateTypeOption } from '~/components/common/wizards/vm/migrate/select/type/lib/models/interfaces'
|
4
|
-
|
5
|
-
export const vmMigrateTypesFunc = (
|
6
|
-
localization: UI_I_Localization,
|
7
|
-
project: UI_T_Project
|
8
|
-
): UI_I_VmMigrateTypeOption[] => {
|
9
|
-
const options: UI_I_VmMigrateTypeOption[] = [
|
10
|
-
{
|
11
|
-
label: localization.common.changeComputeResourceOnly,
|
12
|
-
value: 'resource',
|
13
|
-
disabled: false,
|
14
|
-
description: localization.common.changeComputeResourceOnlyDesc,
|
15
|
-
permissions: ['sphere'],
|
16
|
-
permission: 'VirtualMachines.MigrateHost',
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
//
|
29
|
-
//
|
30
|
-
//
|
31
|
-
//
|
32
|
-
//
|
33
|
-
//
|
34
|
-
//
|
35
|
-
//
|
36
|
-
//
|
37
|
-
//
|
38
|
-
//
|
39
|
-
//
|
40
|
-
//
|
41
|
-
//
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
}
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
2
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
3
|
+
import type { UI_I_VmMigrateTypeOption } from '~/components/common/wizards/vm/migrate/select/type/lib/models/interfaces'
|
4
|
+
|
5
|
+
export const vmMigrateTypesFunc = (
|
6
|
+
localization: UI_I_Localization,
|
7
|
+
project: UI_T_Project
|
8
|
+
): UI_I_VmMigrateTypeOption[] => {
|
9
|
+
const options: UI_I_VmMigrateTypeOption[] = [
|
10
|
+
{
|
11
|
+
label: localization.common.changeComputeResourceOnly,
|
12
|
+
value: 'resource',
|
13
|
+
disabled: false,
|
14
|
+
description: localization.common.changeComputeResourceOnlyDesc,
|
15
|
+
permissions: ['sphere'],
|
16
|
+
permission: 'VirtualMachines.MigrateHost',
|
17
|
+
testId: 'change-compute-resource-option',
|
18
|
+
},
|
19
|
+
{
|
20
|
+
label: localization.common.changeStorageOnly,
|
21
|
+
value: 'storage',
|
22
|
+
disabled: false,
|
23
|
+
description: localization.common.changeStorageOnlyDesc,
|
24
|
+
permissions: ['sphere', 'procurator'],
|
25
|
+
permission: 'VirtualMachines.MigrateDatastore',
|
26
|
+
testId: 'change-storage-option',
|
27
|
+
},
|
28
|
+
// TODO 700
|
29
|
+
// {
|
30
|
+
// label: localization.common.changeBothComputeResourceStorage,
|
31
|
+
// value: 'resource-storage',
|
32
|
+
// disabled: true,
|
33
|
+
// description: localization.common.changeBothComputeResourceStorageDesc,
|
34
|
+
// permissions: ['sphere'],
|
35
|
+
// testId: 'change-both-compute-resource-storage-option',
|
36
|
+
// },
|
37
|
+
// TODO 700
|
38
|
+
// {
|
39
|
+
// label: localization.common.crossVCenterServerExport,
|
40
|
+
// value: 'server',
|
41
|
+
// disabled: true,
|
42
|
+
// description: localization.common.crossVCenterServerExportDesc,
|
43
|
+
// permissions: ['sphere'],
|
44
|
+
// testId: 'cross-vcenter-server-export-option',
|
45
|
+
// },
|
46
|
+
]
|
47
|
+
|
48
|
+
return options.filter((option) => option.permissions.includes(project))
|
49
|
+
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "bfg-common",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.5.
|
4
|
+
"version": "1.5.456",
|
5
5
|
"scripts": {
|
6
6
|
"build": "nuxt build",
|
7
7
|
"dev": "nuxt dev --port=3002",
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"@vueuse/components": "^10.1.2",
|
36
36
|
"date-fns": "^2.29.3",
|
37
37
|
"bfg-nuxt-3-graph": "1.0.26",
|
38
|
-
"bfg-uikit": "1.0.
|
38
|
+
"bfg-uikit": "1.0.510",
|
39
39
|
"html2canvas": "^1.4.1",
|
40
40
|
"prettier-eslint": "^15.0.1"
|
41
41
|
}
|