bfg-common 1.5.201 → 1.5.203

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 (24) 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 +12 -3
  6. package/assets/localization/local_en.json +12 -3
  7. package/assets/localization/local_hy.json +12 -3
  8. package/assets/localization/local_kk.json +12 -3
  9. package/assets/localization/local_ru.json +14 -5
  10. package/assets/localization/local_zh.json +12 -3
  11. package/components/common/graph/GraphOld.vue +50 -50
  12. package/components/common/graph/graphNew/GraphNew.vue +194 -194
  13. package/components/common/lib/config/states.ts +1 -1
  14. package/components/common/monitor/advanced/graphView/GraphView.vue +178 -145
  15. package/components/common/monitor/advanced/graphView/GraphViewOld.vue +56 -56
  16. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/CountersOld.vue +4 -0
  17. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +1040 -1040
  18. package/components/common/pages/scheduledTasks/modals/common/frequency/lib/config/frequencyOptions.ts +1 -1
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +17 -2
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +18 -2
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +11 -4
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +4 -0
  23. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +25 -15
  24. package/package.json +2 -2
@@ -1,194 +1,194 @@
1
- <template>
2
- <div
3
- ref="chartContainer"
4
- :class="[
5
- 'graph-content',
6
- { 'header-in-block': props.isHeaderInBlock },
7
- { 'full-screen': isFullscreen },
8
- ]"
9
- >
10
- <template v-if="props.chartOptions">
11
- <client-only>
12
- <div class="metric-header">
13
- <span class="chart-title">{{ props.chartOptions.title.text }}</span>
14
- <div class="chart-export-dropdown-container">
15
- <ui-button
16
- :test-id="`button-metric-${uniqueId}`"
17
- :class="['metric-export-button', { active: isShowDropdown }]"
18
- is-without-sizes
19
- is-without-height
20
- variant="text"
21
- @click="isShowDropdown = !isShowDropdown"
22
- >
23
- <ui-icon name="burger" width="20" height="20" />
24
- </ui-button>
25
- <ui-dropdown
26
- :test-id="`metric-${uniqueId}-dropdown`"
27
- :show="isShowDropdown"
28
- :items="dropdownItems"
29
- :elem-id="`button-metric-${uniqueId}`"
30
- left
31
- width="max-content"
32
- @select="onSelect($event)"
33
- @hide="isShowDropdown = false"
34
- />
35
- </div>
36
- </div>
37
- <highchart
38
- :options="props.chartOptions"
39
- :modules="['exporting', 'export-data', 'offline-exporting']"
40
- class="graph-block"
41
- />
42
- </client-only>
43
- </template>
44
- </div>
45
- </template>
46
-
47
- <script setup lang="ts">
48
- import { useFullscreen } from '@vueuse/core'
49
- import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
50
- import type { UI_I_Localization } from '~/lib/models/interfaces'
51
- import { E_ChartExportIconByKey } from '~/components/common/graph/graphNew/lib/models/enums'
52
-
53
- const props = withDefaults(
54
- defineProps<{
55
- chartOptions: any
56
- isHeaderInBlock?: boolean
57
- }>(),
58
- {
59
- isHeaderInBlock: true,
60
- }
61
- )
62
- const emits = defineEmits<{
63
- (event: 'select-item', value: string): void
64
- }>()
65
-
66
- const localization = computed<UI_I_Localization>(() => useLocal())
67
-
68
- const uniqueId = ref<number>(useUniqueId())
69
-
70
- const chartContainer = ref<any>(null)
71
- const { isFullscreen, toggle } = useFullscreen(chartContainer)
72
-
73
- const isShowDropdown = ref<boolean>(false)
74
- const dropdownItems = computed<UI_I_Dropdown[]>(() => {
75
- const result = []
76
-
77
- const exportItems = props.chartOptions?.exporting?.menuItemDefinitions
78
- for (const key in exportItems) {
79
- if (!exportItems[key].isHide)
80
- result.push({
81
- text: exportItems[key].text,
82
- value: key,
83
- iconName: E_ChartExportIconByKey[key],
84
- divider: key === 'printChart',
85
- })
86
- }
87
-
88
- if (isFullscreen.value) {
89
- result.map((item) => {
90
- if (item.value === 'viewFullscreen') {
91
- item.text = localization.value.common.exitFullscreen
92
- item.iconName = 'exit-full-screen'
93
- }
94
-
95
- return item
96
- })
97
- }
98
-
99
- return result
100
- })
101
-
102
- const onSelect = (value: string): void => {
103
- switch (value) {
104
- case 'viewFullscreen':
105
- toggle()
106
- break
107
- default:
108
- emits('select-item', value)
109
- }
110
- }
111
- </script>
112
-
113
- <style>
114
- :root {
115
- --chart-block-title-color: #4d5d69;
116
- --chart-block-header-bg-color: #ffffff;
117
- --chart-block-export-button-color: #4d5d69;
118
- --chart-block-export-button-hover-color: #213444;
119
- --chart-block-export-button-active-color: #008fd6;
120
- }
121
- :root.dark-theme {
122
- --chart-block-title-color: #e9eaec;
123
- --chart-block-header-bg-color: #334453;
124
- --chart-block-export-button-color: #e9eaec;
125
- --chart-block-export-button-hover-color: #ffffff;
126
- --chart-block-export-button-active-color: #2ba2de;
127
- }
128
- </style>
129
- <style scoped lang="scss">
130
- .graph-content {
131
- display: flex;
132
- flex-direction: column;
133
- width: 100%;
134
- height: 100%;
135
- box-shadow: 0 1px 4px 0 #00000014;
136
- border-radius: 8px;
137
-
138
- &.full-screen {
139
- .metric-header {
140
- border-radius: 0;
141
-
142
- .chart-title {
143
- font-size: 22px;
144
- }
145
- .metric-export-button {
146
- svg {
147
- width: 24px;
148
- height: 24px;
149
- }
150
- }
151
- }
152
- .graph-block {
153
- border-radius: 0;
154
- }
155
- }
156
- .metric-header {
157
- display: grid;
158
- align-items: center;
159
- grid-template-columns: max-content max-content;
160
- justify-content: space-between;
161
- padding: 16px;
162
- background-color: var(--chart-block-header-bg-color);
163
- border-radius: 8px 8px 0px 0px;
164
-
165
- .chart-title {
166
- color: var(--chart-block-title-color);
167
- font-family: 'Inter', sans-serif;
168
- font-size: 16px;
169
- font-weight: 500;
170
- }
171
- .chart-export-dropdown-container {
172
- position: relative;
173
-
174
- .metric-export-button {
175
- color: var(--chart-block-export-button-color);
176
-
177
- &:hover {
178
- color: var(--chart-block-export-button-hover-color);
179
- }
180
- &.active {
181
- color: var(--chart-block-export-button-active-color);
182
- }
183
- }
184
- }
185
- }
186
-
187
- .graph-block {
188
- height: 100%;
189
- overflow: hidden;
190
- border-radius: 0px 0px 8px 8px;
191
- background-color: var(--chart-block-header-bg-color);
192
- }
193
- }
194
- </style>
1
+ <template>
2
+ <div
3
+ ref="chartContainer"
4
+ :class="[
5
+ 'graph-content',
6
+ { 'header-in-block': props.isHeaderInBlock },
7
+ { 'full-screen': isFullscreen },
8
+ ]"
9
+ >
10
+ <template v-if="props.chartOptions">
11
+ <client-only>
12
+ <div class="metric-header">
13
+ <span class="chart-title">{{ props.chartOptions.title.text }}</span>
14
+ <div class="chart-export-dropdown-container">
15
+ <ui-button
16
+ :test-id="`button-metric-${uniqueId}`"
17
+ :class="['metric-export-button', { active: isShowDropdown }]"
18
+ is-without-sizes
19
+ is-without-height
20
+ variant="text"
21
+ @click="isShowDropdown = !isShowDropdown"
22
+ >
23
+ <ui-icon name="burger" width="20" height="20" />
24
+ </ui-button>
25
+ <ui-dropdown
26
+ :test-id="`metric-${uniqueId}-dropdown`"
27
+ :show="isShowDropdown"
28
+ :items="dropdownItems"
29
+ :elem-id="`button-metric-${uniqueId}`"
30
+ left
31
+ width="max-content"
32
+ @select="onSelect($event)"
33
+ @hide="isShowDropdown = false"
34
+ />
35
+ </div>
36
+ </div>
37
+ <highchart
38
+ :options="props.chartOptions"
39
+ :modules="['exporting', 'export-data']"
40
+ class="graph-block"
41
+ />
42
+ </client-only>
43
+ </template>
44
+ </div>
45
+ </template>
46
+
47
+ <script setup lang="ts">
48
+ import { useFullscreen } from '@vueuse/core'
49
+ import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
50
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
51
+ import { E_ChartExportIconByKey } from '~/components/common/graph/graphNew/lib/models/enums'
52
+
53
+ const props = withDefaults(
54
+ defineProps<{
55
+ chartOptions: any
56
+ isHeaderInBlock?: boolean
57
+ }>(),
58
+ {
59
+ isHeaderInBlock: true,
60
+ }
61
+ )
62
+ const emits = defineEmits<{
63
+ (event: 'select-item', value: string): void
64
+ }>()
65
+
66
+ const localization = computed<UI_I_Localization>(() => useLocal())
67
+
68
+ const uniqueId = ref<number>(useUniqueId())
69
+
70
+ const chartContainer = ref<any>(null)
71
+ const { isFullscreen, toggle } = useFullscreen(chartContainer)
72
+
73
+ const isShowDropdown = ref<boolean>(false)
74
+ const dropdownItems = computed<UI_I_Dropdown[]>(() => {
75
+ const result = []
76
+
77
+ const exportItems = props.chartOptions?.exporting?.menuItemDefinitions
78
+ for (const key in exportItems) {
79
+ if (!exportItems[key].isHide)
80
+ result.push({
81
+ text: exportItems[key].text,
82
+ value: key,
83
+ iconName: E_ChartExportIconByKey[key],
84
+ divider: key === 'printChart',
85
+ })
86
+ }
87
+
88
+ if (isFullscreen.value) {
89
+ result.map((item) => {
90
+ if (item.value === 'viewFullscreen') {
91
+ item.text = localization.value.common.exitFullscreen
92
+ item.iconName = 'exit-full-screen'
93
+ }
94
+
95
+ return item
96
+ })
97
+ }
98
+
99
+ return result
100
+ })
101
+
102
+ const onSelect = (value: string): void => {
103
+ switch (value) {
104
+ case 'viewFullscreen':
105
+ toggle()
106
+ break
107
+ default:
108
+ emits('select-item', value)
109
+ }
110
+ }
111
+ </script>
112
+
113
+ <style>
114
+ :root {
115
+ --chart-block-title-color: #4d5d69;
116
+ --chart-block-header-bg-color: #ffffff;
117
+ --chart-block-export-button-color: #4d5d69;
118
+ --chart-block-export-button-hover-color: #213444;
119
+ --chart-block-export-button-active-color: #008fd6;
120
+ }
121
+ :root.dark-theme {
122
+ --chart-block-title-color: #e9eaec;
123
+ --chart-block-header-bg-color: #334453;
124
+ --chart-block-export-button-color: #e9eaec;
125
+ --chart-block-export-button-hover-color: #ffffff;
126
+ --chart-block-export-button-active-color: #2ba2de;
127
+ }
128
+ </style>
129
+ <style scoped lang="scss">
130
+ .graph-content {
131
+ display: flex;
132
+ flex-direction: column;
133
+ width: 100%;
134
+ height: 100%;
135
+ box-shadow: 0 1px 4px 0 #00000014;
136
+ border-radius: 8px;
137
+
138
+ &.full-screen {
139
+ .metric-header {
140
+ border-radius: 0;
141
+
142
+ .chart-title {
143
+ font-size: 22px;
144
+ }
145
+ .metric-export-button {
146
+ svg {
147
+ width: 24px;
148
+ height: 24px;
149
+ }
150
+ }
151
+ }
152
+ .graph-block {
153
+ border-radius: 0;
154
+ }
155
+ }
156
+ .metric-header {
157
+ display: grid;
158
+ align-items: center;
159
+ grid-template-columns: max-content max-content;
160
+ justify-content: space-between;
161
+ padding: 16px;
162
+ background-color: var(--chart-block-header-bg-color);
163
+ border-radius: 8px 8px 0px 0px;
164
+
165
+ .chart-title {
166
+ color: var(--chart-block-title-color);
167
+ font-family: 'Inter', sans-serif;
168
+ font-size: 16px;
169
+ font-weight: 500;
170
+ }
171
+ .chart-export-dropdown-container {
172
+ position: relative;
173
+
174
+ .metric-export-button {
175
+ color: var(--chart-block-export-button-color);
176
+
177
+ &:hover {
178
+ color: var(--chart-block-export-button-hover-color);
179
+ }
180
+ &.active {
181
+ color: var(--chart-block-export-button-active-color);
182
+ }
183
+ }
184
+ }
185
+ }
186
+
187
+ .graph-block {
188
+ height: 100%;
189
+ overflow: hidden;
190
+ border-radius: 0px 0px 8px 8px;
191
+ background-color: var(--chart-block-header-bg-color);
192
+ }
193
+ }
194
+ </style>
@@ -35,7 +35,7 @@ export const hostIconByState = [
35
35
 
36
36
  export const vmLocalizationByState = [
37
37
  'unknown',
38
- 'powerOff',
38
+ 'powerOff2',
39
39
  'poweredOn',
40
40
  'suspended',
41
41
  'error',