bfg-common 1.0.29 → 1.0.31
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/localization/local_be.json +160 -1
- package/assets/localization/local_en.json +161 -1
- package/assets/localization/local_hy.json +160 -1
- package/assets/localization/local_kk.json +160 -1
- package/assets/localization/local_ru.json +161 -1
- package/assets/localization/local_zh.json +160 -1
- package/components/common/monitor/advanced/Advanced.vue +33 -18
- package/components/common/monitor/advanced/GraphView.vue +78 -146
- package/components/common/monitor/advanced/tools/Tools.vue +41 -20
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +35 -19
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +22 -21
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +44 -35
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/tableConfig.ts +13 -15
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts +634 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +19 -6
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/types.ts +3 -5
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +4 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +8 -15
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +18 -8
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics.ts +52 -58
- package/components/common/monitor/advanced/tools/chartOptionsModal/models/types.ts +3 -0
- package/components/common/monitor/models/interfaces.ts +2 -0
- package/package.json +1 -1
- package/public/spice-console/application/application.js +1 -1
- package/public/spice-console/network/spicechannel.js +346 -287
- package/public/spice-console-minify/application/application.min.js +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
}}</span>
|
|
6
6
|
|
|
7
7
|
<atoms-table-data-grid
|
|
8
|
-
v-model:selected-row="
|
|
8
|
+
v-model:selected-row="selectedCounters"
|
|
9
9
|
v-model:column-keys="columnItems"
|
|
10
10
|
v-model:page-size="pagination.pageSize"
|
|
11
11
|
v-model:page="pagination.page"
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
:body-items="bodyItems"
|
|
16
16
|
:total-items="totalItems"
|
|
17
17
|
:total-pages="totalPages"
|
|
18
|
-
:loading="props.loading"
|
|
19
18
|
hide-footer
|
|
20
19
|
server-off
|
|
21
20
|
@change="onChangeRow"
|
|
22
|
-
|
|
23
|
-
</atoms-table-data-grid>
|
|
21
|
+
/>
|
|
24
22
|
</div>
|
|
25
23
|
</template>
|
|
26
24
|
|
|
@@ -32,33 +30,47 @@ import {
|
|
|
32
30
|
} from '~/components/atoms/table/dataGrid/models/interfaces'
|
|
33
31
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
34
32
|
import * as table from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/tableConfig'
|
|
35
|
-
import {
|
|
33
|
+
import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
34
|
+
import {
|
|
35
|
+
T_ChartHost,
|
|
36
|
+
T_ChartVm,
|
|
37
|
+
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
38
|
+
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
39
|
+
import { countersItemsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils'
|
|
36
40
|
|
|
37
41
|
const props = defineProps<{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
chart: T_ChartHost | T_ChartVm
|
|
43
|
+
type: UI_T_AdvancedType
|
|
44
|
+
selectedKeys: number[]
|
|
41
45
|
}>()
|
|
42
46
|
|
|
43
47
|
const emits = defineEmits<{
|
|
44
|
-
(event: '
|
|
45
|
-
(event: 'update:selected-counters', value: number[]): void
|
|
48
|
+
(event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
|
|
46
49
|
}>()
|
|
47
50
|
|
|
48
51
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
49
52
|
|
|
50
|
-
const
|
|
51
|
-
|
|
53
|
+
const counters = computed<UI_I_AdvancedCounterItem[]>(() =>
|
|
54
|
+
countersItemsFunc(props.type, props.chart, localization.value)
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
const totalItems = computed<number>(() => counters.value.length)
|
|
58
|
+
const totalPages = computed<number>(() => 1)
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
set(newValue) {
|
|
59
|
-
emits('update:selected-counters', newValue)
|
|
60
|
+
const selectedCounters = ref<number[]>([])
|
|
61
|
+
watch(
|
|
62
|
+
() => props.selectedKeys,
|
|
63
|
+
(newValue) => {
|
|
64
|
+
selectedCounters.value = newValue
|
|
60
65
|
},
|
|
61
|
-
}
|
|
66
|
+
{ immediate: true, deep: true }
|
|
67
|
+
)
|
|
68
|
+
watch(
|
|
69
|
+
() => props.chart,
|
|
70
|
+
() => {
|
|
71
|
+
selectedCounters.value = []
|
|
72
|
+
}
|
|
73
|
+
)
|
|
62
74
|
const pagination = ref<any>({
|
|
63
75
|
page: 1,
|
|
64
76
|
pageSize: 35,
|
|
@@ -73,26 +85,23 @@ const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
|
73
85
|
const bodyItems = ref<UI_I_BodyItem[][]>([])
|
|
74
86
|
|
|
75
87
|
watch(
|
|
76
|
-
|
|
77
|
-
(
|
|
78
|
-
if (!
|
|
88
|
+
counters,
|
|
89
|
+
(newValue) => {
|
|
90
|
+
if (!newValue.length) return
|
|
79
91
|
|
|
80
|
-
bodyItems.value = table.bodyItems(
|
|
92
|
+
bodyItems.value = table.bodyItems(newValue)
|
|
81
93
|
},
|
|
82
|
-
{ deep: true }
|
|
94
|
+
{ deep: true, immediate: true }
|
|
83
95
|
)
|
|
84
96
|
|
|
85
97
|
const onChangeRow = (val: number[]): void => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
val.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
})
|
|
94
|
-
}
|
|
95
|
-
emits('change', sendData)
|
|
98
|
+
const result: UI_I_AdvancedCounterItem[] = []
|
|
99
|
+
|
|
100
|
+
counters.value.forEach((item) => {
|
|
101
|
+
if (val.includes(item.id)) result.push(item)
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
emits('select-row', result)
|
|
96
105
|
}
|
|
97
106
|
</script>
|
|
98
107
|
|
|
@@ -12,28 +12,26 @@ import { UI_T_AdvancedCountersColumnKey } from '~/components/common/monitor/adva
|
|
|
12
12
|
import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
13
13
|
|
|
14
14
|
export const countersTableKey: UI_T_AdvancedCountersColumnKey[] = [
|
|
15
|
-
'
|
|
16
|
-
'rollups',
|
|
17
|
-
'units',
|
|
18
|
-
'internal_name',
|
|
19
|
-
'stat_type',
|
|
15
|
+
'name',
|
|
20
16
|
'description',
|
|
17
|
+
'measurement',
|
|
18
|
+
'units',
|
|
21
19
|
]
|
|
22
20
|
|
|
23
21
|
const getItems = (
|
|
24
22
|
localization: UI_I_Localization
|
|
25
23
|
): [string, boolean, string, string][] => {
|
|
26
24
|
return [
|
|
27
|
-
[localization.
|
|
28
|
-
[localization.
|
|
29
|
-
[localization.
|
|
30
|
-
[localization.
|
|
31
|
-
[localization.statType, true, '140px', countersTableKey[4]],
|
|
32
|
-
[localization.description, true, '140px', countersTableKey[5]],
|
|
25
|
+
[localization.name, true, '140px', countersTableKey[0]],
|
|
26
|
+
[localization.description, true, '140px', countersTableKey[1]],
|
|
27
|
+
[localization.measurement, true, '140px', countersTableKey[2]],
|
|
28
|
+
[localization.units, true, '140px', countersTableKey[3]],
|
|
33
29
|
]
|
|
34
30
|
}
|
|
35
31
|
|
|
36
|
-
export const columnKeys = (
|
|
32
|
+
export const columnKeys = (
|
|
33
|
+
localization: UI_I_Localization
|
|
34
|
+
): UI_I_ColumnKey[] => {
|
|
37
35
|
const result: UI_I_ColumnKey[] = []
|
|
38
36
|
getItems(localization).forEach((item, i) => {
|
|
39
37
|
const col = `col${i + 1}`
|
|
@@ -52,7 +50,9 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
|
52
50
|
return result
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
export const bodyItems = (
|
|
53
|
+
export const bodyItems = (
|
|
54
|
+
counter: UI_I_AdvancedCounterItem[]
|
|
55
|
+
): UI_I_BodyItem[][] => {
|
|
56
56
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
57
57
|
|
|
58
58
|
counter.forEach((counters: UI_I_AdvancedCounterItem, key: number) => {
|
|
@@ -65,8 +65,6 @@ export const bodyItems = (counter: UI_I_AdvancedCounterItem[]): UI_I_BodyItem[][
|
|
|
65
65
|
{ key: 'col2', text: counters[countersTableKey[1]], id: key },
|
|
66
66
|
{ key: 'col3', text: counters[countersTableKey[2]], id: key },
|
|
67
67
|
{ key: 'col4', text: counters[countersTableKey[3]], id: key },
|
|
68
|
-
{ key: 'col5', text: counters[countersTableKey[4]], id: key },
|
|
69
|
-
{ key: 'col6', text: counters[countersTableKey[5]], id: key },
|
|
70
68
|
])
|
|
71
69
|
})
|
|
72
70
|
return bodyItems
|