bfg-common 1.5.60 → 1.5.62
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/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +5 -2
- package/assets/localization/local_en.json +5 -2
- package/assets/localization/local_hy.json +5 -2
- package/assets/localization/local_kk.json +5 -2
- package/assets/localization/local_ru.json +5 -2
- package/assets/localization/local_zh.json +5 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/lib/utils/optionsActions.ts +32 -28
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +1040 -1040
- package/components/common/monitor/advanced/tools/lib/config/advancedToolbar.ts +146 -130
- package/components/common/vm/actions/add/Add.vue +205 -194
- package/components/common/vm/actions/add/New.vue +429 -0
- package/components/common/vm/actions/add/Old.vue +371 -0
- package/components/common/vm/actions/add/lib/config/steps.ts +19 -3
- package/components/common/vm/actions/clone/toTemplate/ToTemplate.vue +29 -37
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +5 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +3 -3
- package/components/common/vm/actions/common/select/createType/CreateType.vue +15 -51
- package/components/common/vm/actions/common/select/createType/New.vue +84 -0
- package/components/common/vm/actions/common/select/createType/Old.vue +70 -0
- package/components/common/vm/actions/common/select/createType/lib/config/items.ts +24 -4
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -0
- package/components/common/vm/actions/common/select/name/Name.vue +24 -93
- package/components/common/vm/actions/common/select/name/New.vue +143 -0
- package/components/common/vm/actions/common/select/name/Old.vue +119 -0
- package/components/common/vm/actions/common/select/template/Template.vue +2 -3
- package/components/common/vm/actions/common/select/template/TemplateTreeView.vue +1 -1
- package/package.json +1 -1
|
@@ -1,130 +1,146 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
3
|
-
import type { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/lib/models/interfaces'
|
|
4
|
-
import type { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
|
|
5
|
-
import type { UI_I_OptionData } from '~/components/common/monitor/advanced/lib/models/interfaces'
|
|
6
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
7
|
-
|
|
8
|
-
export const periodFunc = (
|
|
9
|
-
localization: UI_I_Localization,
|
|
10
|
-
selectedTimespanType: string
|
|
11
|
-
): UI_I_OptionItem[] => {
|
|
12
|
-
const result = [
|
|
13
|
-
{
|
|
14
|
-
text: localization.inventoryMonitor.realTime,
|
|
15
|
-
value: 'real_time',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
text: localization.inventoryMonitor.lastDay,
|
|
19
|
-
value: 'last_day',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
text: localization.inventoryMonitor.lastWeek,
|
|
23
|
-
value: 'last_week',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
text: localization.inventoryMonitor.lastMonth,
|
|
27
|
-
value: 'last_month',
|
|
28
|
-
},
|
|
29
|
-
// {
|
|
30
|
-
// text: localization.inventoryMonitor.lastYear,
|
|
31
|
-
// value: 'last_year',
|
|
32
|
-
// },
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
if (selectedTimespanType === 'custom_interval') {
|
|
36
|
-
result.push({
|
|
37
|
-
text: localization.inventoryMonitor.customInterval,
|
|
38
|
-
value: 'custom_interval',
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return result
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const viewFunc = (
|
|
46
|
-
localization: UI_I_Localization,
|
|
47
|
-
type: UI_T_AdvancedType,
|
|
48
|
-
optionsNames?: string[]
|
|
49
|
-
): UI_I_OptionItem[] => {
|
|
50
|
-
const viewData: UI_I_OptionData = {
|
|
51
|
-
zone: [
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
],
|
|
57
|
-
|
|
58
|
-
{
|
|
59
|
-
text: localization.inventoryMonitor.
|
|
60
|
-
value: '
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{ text: localization.
|
|
80
|
-
// { text: localization.
|
|
81
|
-
// { text: localization.common.
|
|
82
|
-
// {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
3
|
+
import type { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/lib/models/interfaces'
|
|
4
|
+
import type { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
|
|
5
|
+
import type { UI_I_OptionData } from '~/components/common/monitor/advanced/lib/models/interfaces'
|
|
6
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
7
|
+
|
|
8
|
+
export const periodFunc = (
|
|
9
|
+
localization: UI_I_Localization,
|
|
10
|
+
selectedTimespanType: string
|
|
11
|
+
): UI_I_OptionItem[] => {
|
|
12
|
+
const result = [
|
|
13
|
+
{
|
|
14
|
+
text: localization.inventoryMonitor.realTime,
|
|
15
|
+
value: 'real_time',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
text: localization.inventoryMonitor.lastDay,
|
|
19
|
+
value: 'last_day',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
text: localization.inventoryMonitor.lastWeek,
|
|
23
|
+
value: 'last_week',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
text: localization.inventoryMonitor.lastMonth,
|
|
27
|
+
value: 'last_month',
|
|
28
|
+
},
|
|
29
|
+
// {
|
|
30
|
+
// text: localization.inventoryMonitor.lastYear,
|
|
31
|
+
// value: 'last_year',
|
|
32
|
+
// },
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
if (selectedTimespanType === 'custom_interval') {
|
|
36
|
+
result.push({
|
|
37
|
+
text: localization.inventoryMonitor.customInterval,
|
|
38
|
+
value: 'custom_interval',
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return result
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const viewFunc = (
|
|
46
|
+
localization: UI_I_Localization,
|
|
47
|
+
type: UI_T_AdvancedType,
|
|
48
|
+
optionsNames?: string[]
|
|
49
|
+
): UI_I_OptionItem[] => {
|
|
50
|
+
const viewData: UI_I_OptionData = {
|
|
51
|
+
zone: [
|
|
52
|
+
{
|
|
53
|
+
text: localization.inventoryMonitor.cpuUsageInPercent,
|
|
54
|
+
value: 'cpuUsageInPercent',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
cluster: [
|
|
58
|
+
{
|
|
59
|
+
text: localization.inventoryMonitor.cpuUsageInPercent,
|
|
60
|
+
value: 'cpuUsageInPercent',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
datacenter: [
|
|
64
|
+
{
|
|
65
|
+
text: localization.inventoryMonitor.virtualMachineOperations,
|
|
66
|
+
value: 'virtualMachineOperations',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
host: [
|
|
70
|
+
{
|
|
71
|
+
text: localization.inventoryMonitor.cpuUsageInPercent,
|
|
72
|
+
value: 'cpuUsageInPercent',
|
|
73
|
+
},
|
|
74
|
+
// { text: localization.common.datastore, value: 'datastore' },
|
|
75
|
+
{ text: localization.common.memory, value: 'memory' },
|
|
76
|
+
{ text: localization.common.disk, value: 'disk' },
|
|
77
|
+
{ text: localization.common.network, value: 'network' },
|
|
78
|
+
// { text: localization.common.power, value: 'power' },
|
|
79
|
+
// { text: localization.common.storageAdapters, value: 'storageAdapters' },
|
|
80
|
+
// { text: localization.common.storagePath, value: 'storagePath' },
|
|
81
|
+
// { text: localization.common.system, value: 'system' },
|
|
82
|
+
// {
|
|
83
|
+
// text: localization.common.procuratorReplication,
|
|
84
|
+
// value: 'procuratorReplication',
|
|
85
|
+
// },
|
|
86
|
+
],
|
|
87
|
+
vm: [
|
|
88
|
+
{
|
|
89
|
+
text: localization.inventoryMonitor.cpuUsageInPercent,
|
|
90
|
+
value: 'cpuUsageInPercent',
|
|
91
|
+
},
|
|
92
|
+
// { text: localization.inventoryMonitor.cpuUsageInMhz, value: 'cpuUsageInMhz' },
|
|
93
|
+
// { text: localization.common.cpuReady, value: 'cpuReady' },
|
|
94
|
+
// { text: localization.common.datastore, value: 'datastore' },
|
|
95
|
+
{ text: localization.common.memory, value: 'memory' },
|
|
96
|
+
{ text: localization.common.disk, value: 'disk' },
|
|
97
|
+
{ text: localization.common.network, value: 'network' },
|
|
98
|
+
// { text: localization.common.power, value: 'power' },
|
|
99
|
+
// { text: localization.common.virtualDisk, value: 'virtualDisk' },
|
|
100
|
+
],
|
|
101
|
+
}
|
|
102
|
+
const currentOptions = viewData[type]
|
|
103
|
+
|
|
104
|
+
if (optionsNames) {
|
|
105
|
+
optionsNames.forEach((item) => {
|
|
106
|
+
let currentText = item
|
|
107
|
+
if (item === 'custom') {
|
|
108
|
+
currentText = localization.common.custom
|
|
109
|
+
}
|
|
110
|
+
currentOptions.push({
|
|
111
|
+
text: currentText,
|
|
112
|
+
value: item,
|
|
113
|
+
})
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
return currentOptions
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const exportFunc = (
|
|
120
|
+
localization: UI_I_Localization
|
|
121
|
+
): UI_I_DropMenu<string>[] => [
|
|
122
|
+
{ text: localization.inventoryMonitor.toPng + '...', action: 'png' },
|
|
123
|
+
{ text: localization.inventoryMonitor.toJpeg + '...', action: 'jpeg' },
|
|
124
|
+
{ text: localization.inventoryMonitor.toSvg + '...', action: 'svg' },
|
|
125
|
+
{ text: localization.inventoryMonitor.toCsv + '...', action: 'csv' },
|
|
126
|
+
]
|
|
127
|
+
|
|
128
|
+
export const getCurrentOptionsStorageFunc = (
|
|
129
|
+
routeType: string,
|
|
130
|
+
project: UI_T_Project
|
|
131
|
+
): string[] => {
|
|
132
|
+
const prefix = project === 'sphere'
|
|
133
|
+
const optionsNames = []
|
|
134
|
+
for (const key of Object.entries(localStorage)) {
|
|
135
|
+
if (key[0].includes('ChartOptions')) {
|
|
136
|
+
const currentOptions = useLocalStorage(key[0], undefined, prefix)
|
|
137
|
+
if (
|
|
138
|
+
key[0].includes('ChartOptions') &&
|
|
139
|
+
currentOptions.routeType === routeType
|
|
140
|
+
) {
|
|
141
|
+
optionsNames.push(key[0].replace('ChartOptions', ''))
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return optionsNames
|
|
146
|
+
}
|