bfg-common 1.4.192 → 1.4.193

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 (41) hide show
  1. package/assets/img/icons/icons-sprite-dark-1.svg +407 -407
  2. package/assets/img/icons/icons-sprite-dark-2.svg +343 -343
  3. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-dark-4.svg +255 -255
  5. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  6. package/assets/img/icons/icons-sprite-dark-6.svg +83 -83
  7. package/assets/img/icons/icons-sprite-light-1.svg +407 -407
  8. package/assets/img/icons/icons-sprite-light-2.svg +343 -343
  9. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  10. package/assets/img/icons/icons-sprite-light-4.svg +255 -255
  11. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  12. package/assets/img/icons/icons-sprite-light-6.svg +83 -83
  13. package/assets/localization/local_be.json +16 -1
  14. package/assets/localization/local_en.json +16 -1
  15. package/assets/localization/local_hy.json +16 -1
  16. package/assets/localization/local_kk.json +16 -1
  17. package/assets/localization/local_ru.json +16 -1
  18. package/assets/localization/local_zh.json +16 -1
  19. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  20. package/components/atoms/stack/StackBlock.vue +185 -185
  21. package/components/common/browse/blocks/Title.vue +91 -91
  22. package/components/common/browse/blocks/info/Date.vue +21 -21
  23. package/components/common/context/lib/models/interfaces.ts +30 -30
  24. package/components/common/context/recursion/Recursion.vue +86 -86
  25. package/components/common/context/recursion/RecursionNew.vue +199 -199
  26. package/components/common/context/recursion/RecursionOld.vue +213 -213
  27. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +13 -1
  28. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +66 -9
  29. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +33 -7
  30. package/components/common/vm/actions/add/Add.vue +609 -609
  31. package/components/common/vm/actions/clone/Clone.vue +522 -522
  32. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
  33. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
  34. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
  35. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +201 -201
  36. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
  37. package/composables/productNameLocal.ts +30 -30
  38. package/package.json +1 -1
  39. package/plugins/recursion.ts +311 -311
  40. package/public/spice-console/lib/images/bitmap.js +203 -203
  41. package/store/tasks/mappers/recentTasks.ts +45 -45
@@ -1,213 +1,213 @@
1
- <template>
2
- <ul class="context-wrap">
3
- <span v-if="props.isLoading">
4
- <atoms-loader-pre-loader
5
- id="loader"
6
- class="absolute-center context-menu__loading"
7
- :show="true"
8
- />
9
- </span>
10
- <li
11
- v-for="(item, key) in props.items"
12
- :key="key"
13
- :class="[
14
- 'menu-item',
15
- { disabled: item.disabled || isLoading },
16
- { 'item-header': item.isHeader },
17
- { 'has-border-top': item.hasBorderTop },
18
- ]"
19
- @mouseenter="emits('toggle-items', [item, true, $event])"
20
- @mouseleave="emits('toggle-items', [item, false, $event])"
21
- >
22
- <span
23
- class="context-link"
24
- :style="item.style"
25
- :data-id="`${item.testId}-context-link`"
26
- @mousedown="emits('select-item', item)"
27
- >
28
- <span :class="['context-icon', item.iconClassName]" />
29
- <span class="menu-item-text">{{ item.name }}</span>
30
- <span v-if="item.items.length" class="arrow-icon" />
31
- <span v-if="item.shortcut" class="shortcut">{{ item.shortcut }}</span>
32
- </span>
33
-
34
- <div class="context-children">
35
- <common-context-recursion
36
- v-show="item.isShowItems"
37
- :action-loading="props.actionLoading"
38
- :class="[{ 'child-show': item.isShowItems }]"
39
- :items="item.items"
40
- @select-item="emits('select-item', $event)"
41
- />
42
- </div>
43
- </li>
44
- </ul>
45
- </template>
46
-
47
- <script setup lang="ts">
48
- import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
49
- import type { I_HTMLLiElement } from '~/components/common/context/recursion/lib/models/interfaces'
50
-
51
- const props = defineProps<{
52
- items: UI_I_ContextMenuItem[]
53
- actionLoading: string | null
54
- isLoading: boolean
55
- testId?: string
56
- }>()
57
-
58
- const emits = defineEmits<{
59
- (event: 'select-item', value: UI_I_ContextMenuItem): void
60
- (
61
- event: 'toggle-items',
62
- value: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
63
- ): void
64
- }>()
65
- </script>
66
-
67
- <style scoped lang="scss">
68
- .loader-wrapper {
69
- width: 100%;
70
- height: 100%;
71
- z-index: 100;
72
- }
73
-
74
- .context-menu__loading {
75
- :deep(.spinner) {
76
- width: 45px;
77
- height: 45px;
78
- min-width: 45px;
79
- min-height: 45px;
80
- z-index: 1000;
81
- }
82
- }
83
- .context-wrap {
84
- width: auto;
85
- max-width: 400px;
86
- background: var(--global-bg-color);
87
- border-radius: 0;
88
- color: #333;
89
- border: 1px solid var(--context-menu-border-color);
90
- user-select: none;
91
- list-style: none;
92
- max-height: 100vh;
93
- overflow-y: auto;
94
-
95
- .menu-item {
96
- position: relative;
97
- color: #565656;
98
- border-bottom: 1px solid transparent;
99
- cursor: pointer;
100
- padding: 5px 0 3px;
101
-
102
- &.has-border-top {
103
- border-top: 1px solid var(--context-menu-inset-border-color);
104
- }
105
-
106
- &.item-header {
107
- font-size: 11px;
108
- background-color: var(--context-menu-item-header-color);
109
- cursor: default;
110
- }
111
- &:not(.item-header):not(.disabled):hover {
112
- background-color: var(--context-menu-hover-bg-color);
113
- color: #454545;
114
- border-bottom: 1px solid var(--context-menu-hover-border-color);
115
- }
116
- &.disabled {
117
- opacity: 0.5;
118
- user-select: none;
119
- cursor: default;
120
- }
121
- &.left {
122
- :deep(.context-children) {
123
- left: 0;
124
- background: red;
125
-
126
- .context-wrap {
127
- transform: translateX(-100%);
128
- left: auto;
129
- }
130
- }
131
- }
132
-
133
- .context-link {
134
- position: relative;
135
- overflow: hidden;
136
- text-overflow: ellipsis;
137
- white-space: nowrap;
138
- display: flex;
139
- align-items: center;
140
- user-select: none;
141
- padding: 3px 20px 4px 10px;
142
-
143
- .menu-item-text {
144
- flex: 1 1 0;
145
- }
146
-
147
- .context-icon {
148
- display: inline-block;
149
- margin: -2px 4px 0 0;
150
- vertical-align: middle;
151
- width: 18px;
152
- height: 18px;
153
- }
154
-
155
- .arrow-icon {
156
- position: absolute;
157
- top: 50%;
158
- margin-top: -8px;
159
- right: 4px;
160
- background-image: url('assets/img/icons/sprite.png');
161
- display: inline-block;
162
- width: 16px;
163
- height: 16px;
164
- overflow: hidden;
165
- background-repeat: no-repeat;
166
- font-size: 0;
167
- line-height: 0;
168
- text-align: center;
169
- transform: rotate(90deg);
170
- }
171
-
172
- .shortcut {
173
- padding-left: 10px;
174
- }
175
- }
176
-
177
- .context-children {
178
- position: absolute;
179
- top: 0;
180
- left: 100%;
181
-
182
- .context-wrap {
183
- position: fixed;
184
- }
185
- }
186
- }
187
- }
188
- .context-menu__loading {
189
- :deep(.spinner) {
190
- width: 45px;
191
- height: 45px;
192
- min-width: 45px;
193
- min-height: 45px;
194
- z-index: 1000;
195
- }
196
- }
197
- </style>
198
- <style>
199
- :root {
200
- --context-menu-hover-bg-color: #e8e8e8;
201
- --context-menu-border-color: #949494;
202
- --context-menu-inset-border-color: #d4d5d6;
203
- --context-menu-item-header-color: #eceff2;
204
- --context-menu-hover-border-color: #666;
205
- }
206
- :root.dark-theme {
207
- --context-menu-hover-bg-color: #324f61;
208
- --context-menu-border-color: #495865;
209
- --context-menu-inset-border-color: #485764;
210
- --context-menu-item-header-color: #29414e;
211
- --context-menu-hover-border-color: #fff;
212
- }
213
- </style>
1
+ <template>
2
+ <ul class="context-wrap">
3
+ <span v-if="props.isLoading">
4
+ <atoms-loader-pre-loader
5
+ id="loader"
6
+ class="absolute-center context-menu__loading"
7
+ :show="true"
8
+ />
9
+ </span>
10
+ <li
11
+ v-for="(item, key) in props.items"
12
+ :key="key"
13
+ :class="[
14
+ 'menu-item',
15
+ { disabled: item.disabled || isLoading },
16
+ { 'item-header': item.isHeader },
17
+ { 'has-border-top': item.hasBorderTop },
18
+ ]"
19
+ @mouseenter="emits('toggle-items', [item, true, $event])"
20
+ @mouseleave="emits('toggle-items', [item, false, $event])"
21
+ >
22
+ <span
23
+ class="context-link"
24
+ :style="item.style"
25
+ :data-id="`${item.testId}-context-link`"
26
+ @mousedown="emits('select-item', item)"
27
+ >
28
+ <span :class="['context-icon', item.iconClassName]" />
29
+ <span class="menu-item-text">{{ item.name }}</span>
30
+ <span v-if="item.items.length" class="arrow-icon" />
31
+ <span v-if="item.shortcut" class="shortcut">{{ item.shortcut }}</span>
32
+ </span>
33
+
34
+ <div class="context-children">
35
+ <common-context-recursion
36
+ v-show="item.isShowItems"
37
+ :action-loading="props.actionLoading"
38
+ :class="[{ 'child-show': item.isShowItems }]"
39
+ :items="item.items"
40
+ @select-item="emits('select-item', $event)"
41
+ />
42
+ </div>
43
+ </li>
44
+ </ul>
45
+ </template>
46
+
47
+ <script setup lang="ts">
48
+ import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
49
+ import type { I_HTMLLiElement } from '~/components/common/context/recursion/lib/models/interfaces'
50
+
51
+ const props = defineProps<{
52
+ items: UI_I_ContextMenuItem[]
53
+ actionLoading: string | null
54
+ isLoading: boolean
55
+ testId?: string
56
+ }>()
57
+
58
+ const emits = defineEmits<{
59
+ (event: 'select-item', value: UI_I_ContextMenuItem): void
60
+ (
61
+ event: 'toggle-items',
62
+ value: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
63
+ ): void
64
+ }>()
65
+ </script>
66
+
67
+ <style scoped lang="scss">
68
+ .loader-wrapper {
69
+ width: 100%;
70
+ height: 100%;
71
+ z-index: 100;
72
+ }
73
+
74
+ .context-menu__loading {
75
+ :deep(.spinner) {
76
+ width: 45px;
77
+ height: 45px;
78
+ min-width: 45px;
79
+ min-height: 45px;
80
+ z-index: 1000;
81
+ }
82
+ }
83
+ .context-wrap {
84
+ width: auto;
85
+ max-width: 400px;
86
+ background: var(--global-bg-color);
87
+ border-radius: 0;
88
+ color: #333;
89
+ border: 1px solid var(--context-menu-border-color);
90
+ user-select: none;
91
+ list-style: none;
92
+ max-height: 100vh;
93
+ overflow-y: auto;
94
+
95
+ .menu-item {
96
+ position: relative;
97
+ color: #565656;
98
+ border-bottom: 1px solid transparent;
99
+ cursor: pointer;
100
+ padding: 5px 0 3px;
101
+
102
+ &.has-border-top {
103
+ border-top: 1px solid var(--context-menu-inset-border-color);
104
+ }
105
+
106
+ &.item-header {
107
+ font-size: 11px;
108
+ background-color: var(--context-menu-item-header-color);
109
+ cursor: default;
110
+ }
111
+ &:not(.item-header):not(.disabled):hover {
112
+ background-color: var(--context-menu-hover-bg-color);
113
+ color: #454545;
114
+ border-bottom: 1px solid var(--context-menu-hover-border-color);
115
+ }
116
+ &.disabled {
117
+ opacity: 0.5;
118
+ user-select: none;
119
+ cursor: default;
120
+ }
121
+ &.left {
122
+ :deep(.context-children) {
123
+ left: 0;
124
+ background: red;
125
+
126
+ .context-wrap {
127
+ transform: translateX(-100%);
128
+ left: auto;
129
+ }
130
+ }
131
+ }
132
+
133
+ .context-link {
134
+ position: relative;
135
+ overflow: hidden;
136
+ text-overflow: ellipsis;
137
+ white-space: nowrap;
138
+ display: flex;
139
+ align-items: center;
140
+ user-select: none;
141
+ padding: 3px 20px 4px 10px;
142
+
143
+ .menu-item-text {
144
+ flex: 1 1 0;
145
+ }
146
+
147
+ .context-icon {
148
+ display: inline-block;
149
+ margin: -2px 4px 0 0;
150
+ vertical-align: middle;
151
+ width: 18px;
152
+ height: 18px;
153
+ }
154
+
155
+ .arrow-icon {
156
+ position: absolute;
157
+ top: 50%;
158
+ margin-top: -8px;
159
+ right: 4px;
160
+ background-image: url('assets/img/icons/sprite.png');
161
+ display: inline-block;
162
+ width: 16px;
163
+ height: 16px;
164
+ overflow: hidden;
165
+ background-repeat: no-repeat;
166
+ font-size: 0;
167
+ line-height: 0;
168
+ text-align: center;
169
+ transform: rotate(90deg);
170
+ }
171
+
172
+ .shortcut {
173
+ padding-left: 10px;
174
+ }
175
+ }
176
+
177
+ .context-children {
178
+ position: absolute;
179
+ top: 0;
180
+ left: 100%;
181
+
182
+ .context-wrap {
183
+ position: fixed;
184
+ }
185
+ }
186
+ }
187
+ }
188
+ .context-menu__loading {
189
+ :deep(.spinner) {
190
+ width: 45px;
191
+ height: 45px;
192
+ min-width: 45px;
193
+ min-height: 45px;
194
+ z-index: 1000;
195
+ }
196
+ }
197
+ </style>
198
+ <style>
199
+ :root {
200
+ --context-menu-hover-bg-color: #e8e8e8;
201
+ --context-menu-border-color: #949494;
202
+ --context-menu-inset-border-color: #d4d5d6;
203
+ --context-menu-item-header-color: #eceff2;
204
+ --context-menu-hover-border-color: #666;
205
+ }
206
+ :root.dark-theme {
207
+ --context-menu-hover-bg-color: #324f61;
208
+ --context-menu-border-color: #495865;
209
+ --context-menu-inset-border-color: #485764;
210
+ --context-menu-item-header-color: #29414e;
211
+ --context-menu-hover-border-color: #fff;
212
+ }
213
+ </style>
@@ -272,9 +272,21 @@ const localSelectedObjects = ref<string>('')
272
272
 
273
273
  const currentFieldsByArray = (data: UI_I_AdvancedCounterItem[]): string => {
274
274
  const result: string[] = []
275
+
275
276
  data.forEach((item) => {
276
- result.push(item.nameEn)
277
+ if (props.type === 'vm' && selectedMetric.value === 'network') {
278
+ const currentFields = []
279
+ const objectArray = localSelectedObjects.value.split(', ')
280
+ if (objectArray.length) {
281
+ objectArray.forEach((item2) => {
282
+ currentFields.push(`${item.nameEn} ${item2}`)
283
+ })
284
+ } else currentFields.push(item.nameEn)
285
+
286
+ result.push(currentFields.join(', '))
287
+ } else result.push(item.nameEn)
277
288
  })
289
+
278
290
  return result.join(',')
279
291
  }
280
292
 
@@ -12,8 +12,7 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
12
12
 
13
13
  const hostItemsFunc = (
14
14
  chart: UI_T_ChartHost,
15
- localization: UI_I_Localization,
16
- totalCores: number
15
+ localization: UI_I_Localization
17
16
  ): UI_I_AdvancedCounterItem[] => {
18
17
  const cpu: UI_I_AdvancedCounterItem[] = [
19
18
  {
@@ -401,7 +400,8 @@ const hostItemsFunc = (
401
400
  {
402
401
  id: 8,
403
402
  name: localization.inventoryMonitor.writeRate,
404
- description: localization.inventoryMonitor.averageNumberKilobytesWrittenDisk,
403
+ description:
404
+ localization.inventoryMonitor.averageNumberKilobytesWrittenDisk,
405
405
  measurement: localization.common.write,
406
406
  units: localization.inventoryMonitor.kBps,
407
407
  nameEn: 'write rate',
@@ -428,7 +428,8 @@ const hostItemsFunc = (
428
428
  {
429
429
  id: 11,
430
430
  name: localization.inventoryMonitor.queueCommandLatency,
431
- description: localization.inventoryMonitor.averageAmountTimeSpentVMKernelQueue,
431
+ description:
432
+ localization.inventoryMonitor.averageAmountTimeSpentVMKernelQueue,
432
433
  measurement: localization.inventoryMonitor.queueLatency,
433
434
  units: localization.common.ms,
434
435
  nameEn: 'queue command latency',
@@ -529,8 +530,8 @@ const vmItemsFunc = (
529
530
  id: 0,
530
531
  name: localization.inventoryMonitor.packetsReceived,
531
532
  description: localization.inventoryMonitor.amountReceivedPackets,
532
- measurement: localization.inventoryMonitor.usageInKb,
533
- units: localization.common.kb,
533
+ measurement: localization.inventoryMonitor.measuresInPackets,
534
+ units: localization.inventoryMonitor.packets,
534
535
  nameEn: 'packets received',
535
536
  testId: 'counters-table-packets-received-item',
536
537
  },
@@ -538,11 +539,66 @@ const vmItemsFunc = (
538
539
  id: 1,
539
540
  name: localization.inventoryMonitor.packetsTransmitted,
540
541
  description: localization.inventoryMonitor.amountTransmittedPackets,
541
- measurement: localization.inventoryMonitor.usageInKb,
542
- units: localization.common.kb,
542
+ measurement: localization.inventoryMonitor.measuresInPackets,
543
+ units: localization.inventoryMonitor.packets,
543
544
  nameEn: 'packets transmitted',
544
545
  testId: 'counters-table-packets-transmitted-item',
545
546
  },
547
+ {
548
+ id: 2,
549
+ name: localization.inventoryMonitor.bytesReceived,
550
+ description: localization.inventoryMonitor.amountReceivedBytes,
551
+ measurement: localization.inventoryMonitor.measuresInKb,
552
+ units: localization.common.kb,
553
+ nameEn: 'bytes received',
554
+ testId: 'counters-table-bytes-received-item',
555
+ },
556
+ {
557
+ id: 3,
558
+ name: localization.inventoryMonitor.bytesTransmitted,
559
+ description: localization.inventoryMonitor.amountTransmittedBytes,
560
+ measurement: localization.inventoryMonitor.measuresInKb,
561
+ units: localization.common.kb,
562
+ nameEn: 'bytes transmitted',
563
+ testId: 'counters-table-bytes-transmitted-item',
564
+ },
565
+ {
566
+ id: 4,
567
+ name: localization.inventoryMonitor.receivedPacketsErrors,
568
+ description: localization.inventoryMonitor.amountReceivedPacketsError,
569
+ measurement: localization.inventoryMonitor.measuresInPackets,
570
+ units: localization.inventoryMonitor.packets,
571
+ nameEn: 'errors received',
572
+ testId: 'counters-table-errors-received-item',
573
+ },
574
+ {
575
+ id: 5,
576
+ name: localization.inventoryMonitor.transmittedPacketsErrors,
577
+ description: localization.inventoryMonitor.amountTransmittedPacketsError,
578
+ measurement: localization.inventoryMonitor.measuresInPackets,
579
+ units: localization.inventoryMonitor.packets,
580
+ nameEn: 'errors transmitted',
581
+ testId: 'counters-table-errors-transmitted-item',
582
+ },
583
+ {
584
+ id: 6,
585
+ name: localization.inventoryMonitor.receivedDroppedPackets,
586
+ description: localization.inventoryMonitor.amountReceivedDroppedPackets,
587
+ measurement: localization.inventoryMonitor.measuresInPackets,
588
+ units: localization.inventoryMonitor.packets,
589
+ nameEn: 'drop received',
590
+ testId: 'counters-table-drop-received-item',
591
+ },
592
+ {
593
+ id: 7,
594
+ name: localization.inventoryMonitor.transmittedDroppedPackets,
595
+ description:
596
+ localization.inventoryMonitor.amountTransmittedDroppedPackets,
597
+ measurement: localization.inventoryMonitor.measuresInPackets,
598
+ units: localization.inventoryMonitor.packets,
599
+ nameEn: 'drop transmitted',
600
+ testId: 'counters-table-drop-transmitted-item',
601
+ },
546
602
  ]
547
603
  const cpu: UI_I_AdvancedCounterItem[] = [
548
604
  {
@@ -696,7 +752,8 @@ const vmItemsFunc = (
696
752
  {
697
753
  id: 2,
698
754
  name: localization.inventoryMonitor.storageProvisionedSpaceMb,
699
- description: localization.inventoryMonitor.amountProvisionedStorageSpaceInMB,
755
+ description:
756
+ localization.inventoryMonitor.amountProvisionedStorageSpaceInMB,
700
757
  measurement: localization.inventoryMonitor.usageInMb,
701
758
  units: localization.common.mb,
702
759
  nameEn: 'storage provisioned space mb',
@@ -63,9 +63,15 @@ const emits = defineEmits<{
63
63
 
64
64
  const localization = computed<UI_I_Localization>(() => useLocal())
65
65
 
66
- const tableType = computed<UI_T_DataGridType>(() =>
67
- ['disk', 'network'].includes(props.chart) ? 'radio' : 'checkbox'
68
- )
66
+ const tableType = computed<UI_T_DataGridType>(() => {
67
+ let result = 'checkbox'
68
+
69
+ if (props.type === 'host') {
70
+ result = ['disk', 'network'].includes(props.chart) ? 'radio' : 'checkbox'
71
+ }
72
+
73
+ return result
74
+ })
69
75
 
70
76
  const selectedRow = ref<number[] | number>([])
71
77
  const pagination = ref<UI_I_Pagination>({
@@ -163,6 +169,8 @@ watch(
163
169
  newItems = [...newItems, ...props.currentItems]
164
170
 
165
171
  items = newItems
172
+ } else if (newValue[0] === 'vm' && newValue[1] === 'network') {
173
+ items = [...props.currentItems]
166
174
  }
167
175
 
168
176
  bodyItems.value = table.bodyItems(items)
@@ -175,18 +183,36 @@ watch(
175
183
  (newValue) => {
176
184
  const selectedItems: string[] = []
177
185
 
178
- if (['disk', 'network'].includes(props.chart)) {
186
+ if (props.type === 'host' && ['disk', 'network'].includes(props.chart)) {
179
187
  selectedItems.push(items[newValue]?.target_object)
188
+ } else if (props.type === 'vm' && ['network'].includes(props.chart)) {
189
+ newValue.forEach((key) => {
190
+ selectedItems.push(items[key].target_object)
191
+ })
180
192
  } else
181
193
  newValue.forEach((key) => {
182
194
  selectedItems.push(items[key].id)
183
195
  })
184
196
 
185
- const selectedNames =
197
+ let selectedNames = ''
198
+
199
+ if (
186
200
  items.length === newValue.length &&
187
201
  props.selectedMetricsKeys.length === props.totalMetricItems
188
- ? '*'
189
- : selectedItems.join(', ')
202
+ ) {
203
+ selectedNames = '*'
204
+
205
+ if (props.type === 'vm') selectedNames = 'total'
206
+ } else selectedNames = selectedItems.join(', ')
207
+
208
+ if (props.type === 'vm' && ['network'].includes(props.chart)) {
209
+ if (
210
+ selectedItems.includes('total') ||
211
+ (!selectedItems.includes('total') &&
212
+ items.length === newValue.length + 1)
213
+ )
214
+ selectedNames = 'total'
215
+ }
190
216
 
191
217
  emits('select-objects', selectedNames)
192
218
  },