bfg-common 1.1.105 → 1.1.106
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/components/atoms/table/info/models/interfaces.ts +3 -0
- package/components/common/monitor/advanced/Advanced.vue +2 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts +4 -4
- package/components/common/monitor/models/interfaces.ts +1 -0
- package/components/common/monitor/overview/Overview.vue +70 -29
- package/components/common/monitor/overview/filters/Filters.vue +0 -1
- package/components/common/monitor/overview/filters/config/filterOptions.ts +7 -5
- package/package.json +1 -1
|
@@ -103,6 +103,7 @@ const props = defineProps<{
|
|
|
103
103
|
type: UI_T_AdvancedType
|
|
104
104
|
advancedLoading: boolean
|
|
105
105
|
data: I_SeriesLine | null
|
|
106
|
+
cpuCoresDataData: I_SeriesLine | null
|
|
106
107
|
tableData: UI_I_PerformanceItem[] | []
|
|
107
108
|
language: string
|
|
108
109
|
darkMode: boolean
|
|
@@ -160,7 +161,7 @@ const localSelectedTimespanType = computed<string>({
|
|
|
160
161
|
const totalCores = ref<number>(0)
|
|
161
162
|
let isFirstUpdate = true
|
|
162
163
|
watch(
|
|
163
|
-
() => props.
|
|
164
|
+
() => props.cpuCoresDataData,
|
|
164
165
|
(newValue) => {
|
|
165
166
|
if (!newValue || !isFirstUpdate) return
|
|
166
167
|
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts
CHANGED
|
@@ -633,11 +633,11 @@ export const countersItemsFunc = (
|
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
export const getDefaultMetricName = (type: string, view: string): string => {
|
|
636
|
+
const someNames = ['memory', 'disk', 'network']
|
|
637
|
+
|
|
636
638
|
if (type === 'datacenter') return 'cpu'
|
|
637
|
-
else if (
|
|
638
|
-
|
|
639
|
-
return view
|
|
640
|
-
}
|
|
639
|
+
else if (view === 'cpuUsageInPercent') return 'cpu'
|
|
640
|
+
else if (someNames.includes(view)) return view
|
|
641
641
|
|
|
642
642
|
return ''
|
|
643
643
|
}
|
|
@@ -2,6 +2,7 @@ import { I_SeriesLine } from 'bfg-nuxt-3-graph/graph/models/interfaces'
|
|
|
2
2
|
import { UI_T_OverviewRequestType } from '~/components/common/monitor/overview/filters/models/types'
|
|
3
3
|
|
|
4
4
|
export interface UI_I_GraphDataSettingItem {
|
|
5
|
+
place: string
|
|
5
6
|
title: string
|
|
6
7
|
loader: boolean
|
|
7
8
|
data: I_SeriesLine | null
|
|
@@ -104,6 +104,7 @@ const props = defineProps<{
|
|
|
104
104
|
themeMode?: 'string'
|
|
105
105
|
formatDate?: 'string'
|
|
106
106
|
formatTime?: 'string'
|
|
107
|
+
graphType: 'string'
|
|
107
108
|
}>()
|
|
108
109
|
|
|
109
110
|
const { $formattedDatetime } = useNuxtApp()
|
|
@@ -129,11 +130,20 @@ const chartFour = ref<any>(null)
|
|
|
129
130
|
const currentChartName = ref<string>('')
|
|
130
131
|
|
|
131
132
|
const getCurrentChart = (chart: any): any => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
switch (currentChartName.value) {
|
|
134
|
+
case 'one':
|
|
135
|
+
chartOne.value = chart
|
|
136
|
+
break
|
|
137
|
+
case 'two':
|
|
138
|
+
chartTwo.value = chart
|
|
139
|
+
break
|
|
140
|
+
case 'three':
|
|
141
|
+
chartThree.value = chart
|
|
142
|
+
break
|
|
143
|
+
case 'four':
|
|
144
|
+
chartFour.value = chart
|
|
145
|
+
break
|
|
146
|
+
}
|
|
137
147
|
}
|
|
138
148
|
|
|
139
149
|
const oneSettingsLocal = ref<UI_I_GraphDataSettingItem | null>(null)
|
|
@@ -164,7 +174,7 @@ const setCurrentGraphData = (
|
|
|
164
174
|
false,
|
|
165
175
|
true,
|
|
166
176
|
true,
|
|
167
|
-
|
|
177
|
+
props.graphType,
|
|
168
178
|
'',
|
|
169
179
|
width,
|
|
170
180
|
getCurrentChart,
|
|
@@ -173,10 +183,21 @@ const setCurrentGraphData = (
|
|
|
173
183
|
props.formatDate,
|
|
174
184
|
props.formatTime
|
|
175
185
|
)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
|
|
187
|
+
switch (name) {
|
|
188
|
+
case 'one':
|
|
189
|
+
oneGraphData.value = graphData
|
|
190
|
+
break
|
|
191
|
+
case 'two':
|
|
192
|
+
twoGraphData.value = graphData
|
|
193
|
+
break
|
|
194
|
+
case 'three':
|
|
195
|
+
threeGraphData.value = graphData
|
|
196
|
+
break
|
|
197
|
+
case 'four':
|
|
198
|
+
fourGraphData.value = graphData
|
|
199
|
+
break
|
|
200
|
+
}
|
|
180
201
|
}
|
|
181
202
|
|
|
182
203
|
const outputSize = (): void => {
|
|
@@ -197,7 +218,7 @@ const outputSize = (): void => {
|
|
|
197
218
|
}, 1000)
|
|
198
219
|
}
|
|
199
220
|
const updateGraph = (
|
|
200
|
-
graphSetting: UI_I_GraphDataSettingItem,
|
|
221
|
+
graphSetting: UI_I_GraphDataSettingItem | null,
|
|
201
222
|
name: string
|
|
202
223
|
): void => {
|
|
203
224
|
outputSize()
|
|
@@ -205,10 +226,26 @@ const updateGraph = (
|
|
|
205
226
|
}
|
|
206
227
|
|
|
207
228
|
const updateGraphsData = (
|
|
208
|
-
data: UI_I_GraphDataSettingItem,
|
|
229
|
+
data: UI_I_GraphDataSettingItem | null,
|
|
209
230
|
name: string
|
|
210
231
|
): void => {
|
|
211
|
-
if (!data
|
|
232
|
+
if (!data?.data) {
|
|
233
|
+
switch (name) {
|
|
234
|
+
case 'one':
|
|
235
|
+
oneGraphData.value = null
|
|
236
|
+
break
|
|
237
|
+
case 'two':
|
|
238
|
+
twoGraphData.value = null
|
|
239
|
+
break
|
|
240
|
+
case 'three':
|
|
241
|
+
threeGraphData.value = null
|
|
242
|
+
break
|
|
243
|
+
case 'four':
|
|
244
|
+
fourGraphData.value = null
|
|
245
|
+
break
|
|
246
|
+
}
|
|
247
|
+
return
|
|
248
|
+
}
|
|
212
249
|
|
|
213
250
|
const themeMode = useLocalStorage('themeMode') || props.themeMode
|
|
214
251
|
const isDarkMode = themeMode === 'dark-theme'
|
|
@@ -233,11 +270,12 @@ const checkIsMountedError = (): void => {
|
|
|
233
270
|
|
|
234
271
|
watch(
|
|
235
272
|
() => props.oneChart,
|
|
236
|
-
(
|
|
237
|
-
if (
|
|
273
|
+
(newValue) => {
|
|
274
|
+
if (newValue === undefined) return
|
|
275
|
+
|
|
276
|
+
oneSettingsLocal.value = newValue
|
|
238
277
|
|
|
239
|
-
oneSettingsLocal.value
|
|
240
|
-
updateGraph(oneSettingsLocal.value, value.title)
|
|
278
|
+
if (newValue) updateGraph(oneSettingsLocal.value, newValue.place)
|
|
241
279
|
|
|
242
280
|
isMountedLoader.value && checkIsMountedError()
|
|
243
281
|
},
|
|
@@ -246,11 +284,12 @@ watch(
|
|
|
246
284
|
|
|
247
285
|
watch(
|
|
248
286
|
() => props.twoChart,
|
|
249
|
-
(
|
|
250
|
-
if (
|
|
287
|
+
(newValue) => {
|
|
288
|
+
if (newValue === undefined) return
|
|
289
|
+
|
|
290
|
+
twoSettingsLocal.value = newValue
|
|
251
291
|
|
|
252
|
-
twoSettingsLocal.value
|
|
253
|
-
updateGraph(twoSettingsLocal.value, value.title)
|
|
292
|
+
if (newValue) updateGraph(twoSettingsLocal.value, newValue.place)
|
|
254
293
|
|
|
255
294
|
isMountedLoader.value && checkIsMountedError()
|
|
256
295
|
},
|
|
@@ -259,11 +298,12 @@ watch(
|
|
|
259
298
|
|
|
260
299
|
watch(
|
|
261
300
|
() => props.threeChart,
|
|
262
|
-
(
|
|
263
|
-
if (
|
|
301
|
+
(newValue) => {
|
|
302
|
+
if (newValue === undefined) return
|
|
264
303
|
|
|
265
|
-
threeSettingsLocal.value =
|
|
266
|
-
|
|
304
|
+
threeSettingsLocal.value = newValue
|
|
305
|
+
|
|
306
|
+
if (newValue) updateGraph(threeSettingsLocal.value, newValue.place)
|
|
267
307
|
|
|
268
308
|
isMountedLoader.value && checkIsMountedError()
|
|
269
309
|
},
|
|
@@ -290,11 +330,12 @@ watch(chartThree, (newValue) => {
|
|
|
290
330
|
|
|
291
331
|
watch(
|
|
292
332
|
() => props.fourChart,
|
|
293
|
-
(
|
|
294
|
-
if (
|
|
333
|
+
(newValue) => {
|
|
334
|
+
if (newValue === undefined) return
|
|
335
|
+
|
|
336
|
+
fourSettingsLocal.value = newValue
|
|
295
337
|
|
|
296
|
-
fourSettingsLocal.value
|
|
297
|
-
updateGraph(fourSettingsLocal.value, value.title)
|
|
338
|
+
if (newValue) updateGraph(fourSettingsLocal.value, newValue.place)
|
|
298
339
|
|
|
299
340
|
isMountedLoader.value && checkIsMountedError()
|
|
300
341
|
},
|
|
@@ -53,15 +53,17 @@ export const viewFunc = (
|
|
|
53
53
|
],
|
|
54
54
|
host: [
|
|
55
55
|
{ text: localization.overview, value: 'overview' },
|
|
56
|
-
{ text: localization.
|
|
56
|
+
{ text: localization.memory, value: 'memory' },
|
|
57
|
+
// { text: localization.overview, value: 'overview' },
|
|
58
|
+
{ text: localization.network, value: 'network' },
|
|
57
59
|
{ text: localization.disks, value: 'disks' },
|
|
58
|
-
{ text: localization.virtual_machines, value: 'virtual_machines' },
|
|
60
|
+
// { text: localization.virtual_machines, value: 'virtual_machines' },
|
|
59
61
|
],
|
|
60
62
|
vm: [
|
|
61
63
|
{ text: localization.overview, value: 'overview' },
|
|
62
|
-
{ text: localization.space, value: 'space' },
|
|
63
|
-
{ text: localization.spaceUtilization, value: 'space_utilization' },
|
|
64
|
-
{ text: localization.
|
|
64
|
+
// { text: localization.space, value: 'space' },
|
|
65
|
+
// { text: localization.spaceUtilization, value: 'space_utilization' },
|
|
66
|
+
{ text: localization.network, value: 'network' },
|
|
65
67
|
{ text: localization.disks, value: 'disks' },
|
|
66
68
|
],
|
|
67
69
|
}
|