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
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue
CHANGED
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
<div class="section-datepicker">
|
|
119
119
|
<atoms-datepicker
|
|
120
120
|
v-model="dateFrom"
|
|
121
|
-
:lang="
|
|
121
|
+
:lang="props.language"
|
|
122
122
|
class="calendar-from calendar-popup btn-show-hide-calendar"
|
|
123
123
|
@update="onUpdateDateFrom"
|
|
124
124
|
/>
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
<div class="section-datepicker">
|
|
153
153
|
<atoms-datepicker
|
|
154
154
|
v-model="dateTo"
|
|
155
|
-
:lang="
|
|
155
|
+
:lang="props.language"
|
|
156
156
|
class="calendar-from calendar-popup btn-show-hide-calendar"
|
|
157
157
|
@update="onUpdateDateTo"
|
|
158
158
|
/>
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
{ active: timespanRadioSelect === 'from' },
|
|
175
175
|
]"
|
|
176
176
|
>
|
|
177
|
-
<span> (
|
|
177
|
+
<span> ({{ localization.isoTimeFormat }}) </span>
|
|
178
178
|
</td>
|
|
179
179
|
</tr>
|
|
180
180
|
</tbody>
|
|
@@ -214,8 +214,11 @@ import {
|
|
|
214
214
|
chartTypeFunc,
|
|
215
215
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/config/dateForm'
|
|
216
216
|
|
|
217
|
-
const
|
|
218
|
-
|
|
217
|
+
const props = defineProps<{
|
|
218
|
+
language: string
|
|
219
|
+
}>()
|
|
220
|
+
|
|
221
|
+
const { $formattedDate, $isDate, $getTimeFormat, $getUnixByDate } = useNuxtApp()
|
|
219
222
|
|
|
220
223
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
221
224
|
|
|
@@ -242,16 +245,6 @@ const yesterday = new Date().setDate(new Date().getDate() - 1)
|
|
|
242
245
|
const dateFrom = ref<number>(yesterday)
|
|
243
246
|
const dateTo = ref<number>(new Date().getTime())
|
|
244
247
|
|
|
245
|
-
const currentLang = ref<string>(useLocalStorage('lang') ?? 'ru_RU')
|
|
246
|
-
|
|
247
|
-
const timeFormatUpdater = computed<number>(
|
|
248
|
-
() => $store.getters['main/getTimeFormatUpdater']
|
|
249
|
-
)
|
|
250
|
-
watch(timeFormatUpdater, () => {
|
|
251
|
-
currentLang.value = useLocalStorage('lang') ?? 'ru_RU'
|
|
252
|
-
getCurrentTime()
|
|
253
|
-
})
|
|
254
|
-
|
|
255
248
|
const currentDateFrom = ref<string>('')
|
|
256
249
|
const currentDateTo = ref<string>('')
|
|
257
250
|
const currentTimeFrom = ref<string>('')
|
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="chart-option-groups-container">
|
|
3
3
|
<span>{{ localization.chartMetrics }}</span>
|
|
4
|
-
<atoms-tabs-vertical-tabs
|
|
4
|
+
<atoms-tabs-vertical-tabs
|
|
5
|
+
v-model="selectedMetricLocal"
|
|
6
|
+
:items="props.metricsItems"
|
|
7
|
+
/>
|
|
5
8
|
</div>
|
|
6
9
|
</template>
|
|
7
10
|
|
|
8
11
|
<script setup lang="ts">
|
|
9
12
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
10
13
|
import { UI_I_VerticalTabs } from '~/components/atoms/tabs/models/interfaces'
|
|
11
|
-
import { metricsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics'
|
|
12
|
-
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
13
14
|
|
|
14
15
|
const props = defineProps<{
|
|
15
|
-
|
|
16
|
+
metricsItems: UI_I_VerticalTabs[]
|
|
17
|
+
selectedMetric: string
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const emits = defineEmits<{
|
|
21
|
+
(event: 'update:selected-metric', value: string): void
|
|
16
22
|
}>()
|
|
17
23
|
|
|
18
24
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
19
25
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
const selectedMetricLocal = computed<string>({
|
|
27
|
+
get() {
|
|
28
|
+
return props.selectedMetric
|
|
29
|
+
},
|
|
30
|
+
set(newValue) {
|
|
31
|
+
emits('update:selected-metric', newValue)
|
|
32
|
+
},
|
|
33
|
+
})
|
|
24
34
|
</script>
|
|
25
35
|
|
|
26
36
|
<style scoped lang="scss">
|
package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics.ts
CHANGED
|
@@ -13,14 +13,16 @@ export const metricsFunc = (
|
|
|
13
13
|
text: localization.cpu,
|
|
14
14
|
value: 'cpu',
|
|
15
15
|
},
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
// {
|
|
17
|
+
// text: currentRegister(localization.clusterServices, 'first'),
|
|
18
|
+
// value: 'cluster_services',
|
|
19
|
+
// disabled: true,
|
|
20
|
+
// },
|
|
21
|
+
// {
|
|
22
|
+
// text: localization.datastore,
|
|
23
|
+
// value: 'datastore',
|
|
24
|
+
// disabled: true,
|
|
25
|
+
// },
|
|
24
26
|
{
|
|
25
27
|
text: localization.disk,
|
|
26
28
|
value: 'disk',
|
|
@@ -33,72 +35,64 @@ export const metricsFunc = (
|
|
|
33
35
|
text: localization.network,
|
|
34
36
|
value: 'network',
|
|
35
37
|
},
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
38
|
+
// {
|
|
39
|
+
// text: localization.power,
|
|
40
|
+
// value: 'power',
|
|
41
|
+
// disabled: true,
|
|
42
|
+
// },
|
|
43
|
+
// {
|
|
44
|
+
// text: currentRegister(localization.storageAdapter, 'first'),
|
|
45
|
+
// value: 'storage_adapter',
|
|
46
|
+
// disabled: true,
|
|
47
|
+
// },
|
|
48
|
+
// {
|
|
49
|
+
// text: localization.storagePath,
|
|
50
|
+
// value: 'storage_path',
|
|
51
|
+
// disabled: true,
|
|
52
|
+
// },
|
|
53
|
+
// {
|
|
54
|
+
// text: localization.system,
|
|
55
|
+
// value: 'system',
|
|
56
|
+
// disabled: true,
|
|
57
|
+
// },
|
|
58
|
+
// {
|
|
59
|
+
// text: currentRegister(localization.procuratorReplication, 'last'),
|
|
60
|
+
// value: 'v_sphere_replication',
|
|
61
|
+
// disabled: true,
|
|
62
|
+
// },
|
|
56
63
|
],
|
|
57
64
|
vm: [
|
|
58
|
-
{
|
|
59
|
-
text: localization.cpu,
|
|
60
|
-
value: 'cpu',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
text: localization.datastore,
|
|
64
|
-
value: 'datastore',
|
|
65
|
-
},
|
|
66
65
|
{
|
|
67
66
|
text: localization.disk,
|
|
68
67
|
value: 'disk',
|
|
69
68
|
},
|
|
70
|
-
{
|
|
71
|
-
text: localization.memory,
|
|
72
|
-
value: 'memory',
|
|
73
|
-
},
|
|
74
69
|
{
|
|
75
70
|
text: localization.network,
|
|
76
71
|
value: 'network',
|
|
77
72
|
},
|
|
78
73
|
{
|
|
79
|
-
text: localization.
|
|
80
|
-
value: '
|
|
74
|
+
text: localization.cpu,
|
|
75
|
+
value: 'cpu',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
text: localization.memory,
|
|
79
|
+
value: 'memory',
|
|
81
80
|
},
|
|
82
81
|
{
|
|
83
|
-
text: localization.
|
|
84
|
-
value: '
|
|
82
|
+
text: localization.datastore,
|
|
83
|
+
value: 'datastore',
|
|
85
84
|
},
|
|
86
|
-
{
|
|
85
|
+
// {
|
|
86
|
+
// text: localization.power,
|
|
87
|
+
// value: 'power',
|
|
88
|
+
// },
|
|
89
|
+
// {
|
|
90
|
+
// text: localization.system,
|
|
91
|
+
// value: 'system',
|
|
92
|
+
// },
|
|
93
|
+
// { text: localization.virtualDisk, value: 'virtualDisk' },
|
|
87
94
|
],
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
return metrics[type]
|
|
91
98
|
}
|
|
92
|
-
|
|
93
|
-
const currentRegister = (text: string, type: string): string => {
|
|
94
|
-
let result = ''
|
|
95
|
-
const { $text } = useNuxtApp()
|
|
96
|
-
|
|
97
|
-
if (type === 'first') {
|
|
98
|
-
result = $text.toCapitalize(text)
|
|
99
|
-
} else if (type === 'last') {
|
|
100
|
-
result = $text.toCapitalizeByIndex(text, [1])
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return result
|
|
104
|
-
}
|
|
@@ -10,8 +10,10 @@ export interface UI_I_GraphDataSettingItem {
|
|
|
10
10
|
export interface UI_I_MonitorGraphPayload {
|
|
11
11
|
period: number[]
|
|
12
12
|
view: string
|
|
13
|
+
periodType?: string
|
|
13
14
|
id?: string
|
|
14
15
|
requestType?: UI_T_OverviewRequestType
|
|
15
16
|
storageId?: string
|
|
16
17
|
hostName?: string
|
|
18
|
+
fields?: string
|
|
17
19
|
}
|
package/package.json
CHANGED