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.
Files changed (31) hide show
  1. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  2. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  3. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  5. package/assets/localization/local_be.json +5 -2
  6. package/assets/localization/local_en.json +5 -2
  7. package/assets/localization/local_hy.json +5 -2
  8. package/assets/localization/local_kk.json +5 -2
  9. package/assets/localization/local_ru.json +5 -2
  10. package/assets/localization/local_zh.json +5 -2
  11. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/lib/utils/optionsActions.ts +32 -28
  12. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +1040 -1040
  13. package/components/common/monitor/advanced/tools/lib/config/advancedToolbar.ts +146 -130
  14. package/components/common/vm/actions/add/Add.vue +205 -194
  15. package/components/common/vm/actions/add/New.vue +429 -0
  16. package/components/common/vm/actions/add/Old.vue +371 -0
  17. package/components/common/vm/actions/add/lib/config/steps.ts +19 -3
  18. package/components/common/vm/actions/clone/toTemplate/ToTemplate.vue +29 -37
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +5 -5
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +3 -3
  21. package/components/common/vm/actions/common/select/createType/CreateType.vue +15 -51
  22. package/components/common/vm/actions/common/select/createType/New.vue +84 -0
  23. package/components/common/vm/actions/common/select/createType/Old.vue +70 -0
  24. package/components/common/vm/actions/common/select/createType/lib/config/items.ts +24 -4
  25. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -0
  26. package/components/common/vm/actions/common/select/name/Name.vue +24 -93
  27. package/components/common/vm/actions/common/select/name/New.vue +143 -0
  28. package/components/common/vm/actions/common/select/name/Old.vue +119 -0
  29. package/components/common/vm/actions/common/select/template/Template.vue +2 -3
  30. package/components/common/vm/actions/common/select/template/TemplateTreeView.vue +1 -1
  31. 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
- { text: localization.inventoryMonitor.cpuUsageInPercent, value: 'cpuUsageInPercent' },
53
- ],
54
- cluster: [
55
- { text: localization.inventoryMonitor.cpuUsageInPercent, value: 'cpuUsageInPercent' },
56
- ],
57
- datacenter: [
58
- {
59
- text: localization.inventoryMonitor.virtualMachineOperations,
60
- value: 'virtualMachineOperations',
61
- },
62
- ],
63
- host: [
64
- { text: localization.inventoryMonitor.cpuUsageInPercent, value: 'cpuUsageInPercent' },
65
- // { text: localization.common.datastore, value: 'datastore' },
66
- { text: localization.common.memory, value: 'memory' },
67
- { text: localization.common.disk, value: 'disk' },
68
- { text: localization.common.network, value: 'network' },
69
- // { text: localization.common.power, value: 'power' },
70
- // { text: localization.common.storageAdapters, value: 'storageAdapters' },
71
- // { text: localization.common.storagePath, value: 'storagePath' },
72
- // { text: localization.common.system, value: 'system' },
73
- // {
74
- // text: localization.common.procuratorReplication,
75
- // value: 'procuratorReplication',
76
- // },
77
- ],
78
- vm: [
79
- { text: localization.inventoryMonitor.cpuUsageInPercent, value: 'cpuUsageInPercent' },
80
- // { text: localization.inventoryMonitor.cpuUsageInMhz, value: 'cpuUsageInMhz' },
81
- // { text: localization.common.cpuReady, value: 'cpuReady' },
82
- // { text: localization.common.datastore, value: 'datastore' },
83
- { text: localization.common.memory, value: 'memory' },
84
- { text: localization.common.disk, value: 'disk' },
85
- { text: localization.common.network, value: 'network' },
86
- // { text: localization.common.power, value: 'power' },
87
- // { text: localization.common.virtualDisk, value: 'virtualDisk' },
88
- ],
89
- }
90
- const currentOptions = viewData[type]
91
-
92
- if (optionsNames) {
93
- optionsNames.forEach((item) => {
94
- currentOptions.push({
95
- text: item,
96
- value: item,
97
- })
98
- })
99
- }
100
- return currentOptions
101
- }
102
-
103
- export const exportFunc = (
104
- localization: UI_I_Localization
105
- ): UI_I_DropMenu<string>[] => [
106
- { text: localization.inventoryMonitor.toPng + '...', action: 'png' },
107
- { text: localization.inventoryMonitor.toJpeg + '...', action: 'jpeg' },
108
- { text: localization.inventoryMonitor.toSvg + '...', action: 'svg' },
109
- { text: localization.inventoryMonitor.toCsv + '...', action: 'csv' },
110
- ]
111
-
112
- export const getCurrentOptionsStorageFunc = (
113
- routeType: string,
114
- project: UI_T_Project
115
- ): string[] => {
116
- const prefix = project === 'sphere'
117
- const optionsNames = []
118
- for (const key of Object.entries(localStorage)) {
119
- if (key[0].includes('ChartOptions')) {
120
- const currentOptions = useLocalStorage(key[0], undefined, prefix)
121
- if (
122
- key[0].includes('ChartOptions') &&
123
- currentOptions.routeType === routeType
124
- ) {
125
- optionsNames.push(key[0].replace('ChartOptions', ''))
126
- }
127
- }
128
- }
129
- return optionsNames
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
+ }