bfg-common 1.2.122 → 1.2.124
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.
|
@@ -63,6 +63,13 @@ export interface UI_I_CreateVmDataNewDiskDevice {
|
|
|
63
63
|
provision_type: string
|
|
64
64
|
disk_mode: string
|
|
65
65
|
boot_order: number
|
|
66
|
+
// новое
|
|
67
|
+
device_type: string
|
|
68
|
+
sharing: boolean
|
|
69
|
+
shares: number
|
|
70
|
+
cache: string
|
|
71
|
+
io: string
|
|
72
|
+
limit_iops: number
|
|
66
73
|
}
|
|
67
74
|
export interface UI_I_EditVmDataDiskDevice {
|
|
68
75
|
size: number
|
|
@@ -94,6 +101,12 @@ export interface UI_I_CreateVmDataExistDiskDevice {
|
|
|
94
101
|
provision_type: string
|
|
95
102
|
disk_mode: string
|
|
96
103
|
boot_order: number
|
|
104
|
+
// новое
|
|
105
|
+
sharing: boolean
|
|
106
|
+
shares: number
|
|
107
|
+
cache: string
|
|
108
|
+
io: string
|
|
109
|
+
limit_iops: number
|
|
97
110
|
}
|
|
98
111
|
export interface UI_I_CreateVmDataCdDvdDevice {
|
|
99
112
|
create: false
|
|
@@ -2,9 +2,12 @@ import type { UI_I_VerticalStepItem } from '~/components/atoms/models/interfaces
|
|
|
2
2
|
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/models/interfaces'
|
|
3
3
|
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/models/types'
|
|
4
4
|
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/models/types'
|
|
5
|
+
import type { UI_T_Project } from '~/models/types'
|
|
5
6
|
|
|
6
7
|
export interface UI_I_MigrateVerticalStepItem extends UI_I_VerticalStepItem {
|
|
7
8
|
id: string
|
|
9
|
+
project: UI_T_Project[]
|
|
10
|
+
|
|
8
11
|
permissions?: UI_T_VmMigrateType[]
|
|
9
12
|
}
|
|
10
13
|
|
|
@@ -7,87 +7,6 @@ export const stepItemsFunc = (
|
|
|
7
7
|
localization: UI_I_Localization,
|
|
8
8
|
type: UI_T_VmMigrateType,
|
|
9
9
|
project: UI_T_Project
|
|
10
|
-
): UI_I_MigrateVerticalStepItem[] => {
|
|
11
|
-
const stepsType = {
|
|
12
|
-
sphere: stepForSphere,
|
|
13
|
-
procurator: stepForProcurator,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return stepsType[project](localization, type)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const stepForSphere = (
|
|
20
|
-
localization: UI_I_Localization,
|
|
21
|
-
type: UI_T_VmMigrateType
|
|
22
|
-
): UI_I_MigrateVerticalStepItem[] => {
|
|
23
|
-
const stepItems: UI_I_MigrateVerticalStepItem[] = [
|
|
24
|
-
{
|
|
25
|
-
text: localization.selectMigrationType,
|
|
26
|
-
disabled: false,
|
|
27
|
-
complete: false,
|
|
28
|
-
description: localization.selectMigrationTypeDesc,
|
|
29
|
-
id: 'select-migration-type',
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
text: localization.selectTargetVCenterSer,
|
|
34
|
-
disabled: true,
|
|
35
|
-
complete: false,
|
|
36
|
-
description: localization.selectComputeResourceDesc,
|
|
37
|
-
permissions: ['server'],
|
|
38
|
-
id: 'select-target-center',
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
text: localization.selectComputeResource,
|
|
43
|
-
disabled: true,
|
|
44
|
-
complete: false,
|
|
45
|
-
description: localization.selectComputeResourceDesc,
|
|
46
|
-
permissions: ['resource', 'resource-storage', 'server'],
|
|
47
|
-
id: 'select-compute-resource',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
text: localization.selectStorage,
|
|
51
|
-
disabled: true,
|
|
52
|
-
complete: false,
|
|
53
|
-
description: localization.selectStorageDesc,
|
|
54
|
-
permissions: ['storage', 'resource-storage', 'server'],
|
|
55
|
-
id: 'select-storage',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
text: localization.selectNetworks,
|
|
59
|
-
disabled: true,
|
|
60
|
-
complete: false,
|
|
61
|
-
description: localization.selectNetworksDesc,
|
|
62
|
-
permissions: ['resource', 'resource-storage', 'server'],
|
|
63
|
-
id: 'select-networks',
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
text: localization.selectVMotionPriority,
|
|
68
|
-
disabled: true,
|
|
69
|
-
complete: false,
|
|
70
|
-
description: localization.selectVMotionPriorityDesc,
|
|
71
|
-
permissions: ['resource', 'resource-storage', 'server'],
|
|
72
|
-
id: 'select-motion-priority',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
text: localization.readyComplete,
|
|
76
|
-
disabled: true,
|
|
77
|
-
complete: false,
|
|
78
|
-
id: 'ready-complete',
|
|
79
|
-
},
|
|
80
|
-
]
|
|
81
|
-
|
|
82
|
-
return stepItems.filter((item) => {
|
|
83
|
-
// Если свойства permissions нет, возвращаем элемент
|
|
84
|
-
return !item.permissions || item.permissions.includes(type)
|
|
85
|
-
})
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const stepForProcurator = (
|
|
89
|
-
localization: UI_I_Localization,
|
|
90
|
-
type: UI_T_VmMigrateType
|
|
91
10
|
): UI_I_MigrateVerticalStepItem[] => {
|
|
92
11
|
const stepItems: UI_I_MigrateVerticalStepItem[] = [
|
|
93
12
|
{
|
|
@@ -95,6 +14,7 @@ const stepForProcurator = (
|
|
|
95
14
|
disabled: false,
|
|
96
15
|
complete: false,
|
|
97
16
|
description: localization.selectMigrationTypeDesc,
|
|
17
|
+
project: ['sphere', 'procurator'],
|
|
98
18
|
id: 'select-migration-type',
|
|
99
19
|
},
|
|
100
20
|
{
|
|
@@ -102,6 +22,7 @@ const stepForProcurator = (
|
|
|
102
22
|
disabled: true,
|
|
103
23
|
complete: false,
|
|
104
24
|
description: localization.selectComputeResourceDesc,
|
|
25
|
+
project: ['sphere'],
|
|
105
26
|
permissions: ['server'],
|
|
106
27
|
id: 'select-target-center',
|
|
107
28
|
},
|
|
@@ -110,6 +31,7 @@ const stepForProcurator = (
|
|
|
110
31
|
disabled: true,
|
|
111
32
|
complete: false,
|
|
112
33
|
description: localization.selectComputeResourceDesc,
|
|
34
|
+
project: ['sphere'],
|
|
113
35
|
permissions: ['resource', 'resource-storage', 'server'],
|
|
114
36
|
id: 'select-compute-resource',
|
|
115
37
|
},
|
|
@@ -118,6 +40,7 @@ const stepForProcurator = (
|
|
|
118
40
|
disabled: true,
|
|
119
41
|
complete: false,
|
|
120
42
|
description: localization.selectStorageDesc,
|
|
43
|
+
project: ['sphere', 'procurator'],
|
|
121
44
|
permissions: ['storage', 'resource-storage', 'server'],
|
|
122
45
|
id: 'select-storage',
|
|
123
46
|
},
|
|
@@ -126,6 +49,7 @@ const stepForProcurator = (
|
|
|
126
49
|
disabled: true,
|
|
127
50
|
complete: false,
|
|
128
51
|
description: localization.selectNetworksDesc,
|
|
52
|
+
project: ['sphere'],
|
|
129
53
|
permissions: ['resource', 'resource-storage', 'server'],
|
|
130
54
|
id: 'select-networks',
|
|
131
55
|
},
|
|
@@ -134,6 +58,7 @@ const stepForProcurator = (
|
|
|
134
58
|
disabled: true,
|
|
135
59
|
complete: false,
|
|
136
60
|
description: localization.selectVMotionPriorityDesc,
|
|
61
|
+
project: ['sphere'],
|
|
137
62
|
permissions: ['resource', 'resource-storage', 'server'],
|
|
138
63
|
id: 'select-motion-priority',
|
|
139
64
|
},
|
|
@@ -141,12 +66,15 @@ const stepForProcurator = (
|
|
|
141
66
|
text: localization.readyComplete,
|
|
142
67
|
disabled: true,
|
|
143
68
|
complete: false,
|
|
69
|
+
project: ['sphere', 'procurator'],
|
|
144
70
|
id: 'ready-complete',
|
|
145
71
|
},
|
|
146
72
|
]
|
|
147
73
|
|
|
148
|
-
return stepItems
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
74
|
+
return stepItems
|
|
75
|
+
.filter((item) => item.project.includes(project)) // фильтрация по значению project
|
|
76
|
+
.filter((item) => {
|
|
77
|
+
// Если свойства permissions нет, возвращаем элемент
|
|
78
|
+
return !item.permissions || item.permissions.includes(type)
|
|
79
|
+
})
|
|
152
80
|
}
|