bfg-common 1.4.55 → 1.4.57
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/img/icons/icons-sprite-dark-6.svg +1 -190
- package/assets/img/icons/icons-sprite-dark-9.svg +71 -0
- package/assets/img/icons/icons-sprite-light-6.svg +1 -190
- package/assets/img/icons/icons-sprite-light-9.svg +71 -0
- package/assets/localization/local_be.json +14 -1
- package/assets/localization/local_en.json +14 -1
- package/assets/localization/local_hy.json +14 -1
- package/assets/localization/local_kk.json +14 -1
- package/assets/localization/local_ru.json +38 -25
- package/assets/localization/local_zh.json +14 -1
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +31 -4
- package/components/atoms/table/dataGrid/lib/models/interfaces.ts +5 -0
- package/components/common/graph/Graph.vue +5 -4
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +6 -6
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +0 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +1 -1
- package/components/common/pages/hardwareHealth/HardwareHealth.vue +12 -9
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +103 -22
- package/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces.ts +1 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +9 -4
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +29 -11
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +10 -5
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +6 -4
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/form/Form.vue +13 -13
- package/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar.ts +4 -0
- package/components/common/pages/hardwareHealth/lib/config/status.ts +1 -1
- package/components/common/pages/hardwareHealth/tableView/TableView.vue +7 -2
- package/components/common/pages/hardwareHealth/tableView/lib/config/historyTestimonyTable.ts +11 -2
- package/components/common/pages/hardwareHealth/tableView/lib/models/interfaces.ts +1 -0
- package/components/common/pages/hardwareHealth/tableView/modal/{sensorWarning.vue → SensorWarning.vue} +1 -1
- package/components/common/recursionTree/RecursionTree.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuHotPlug.vue +19 -9
- package/lib/models/interfaces.ts +2 -0
- package/package.json +1 -1
|
@@ -37,14 +37,10 @@
|
|
|
37
37
|
|
|
38
38
|
<common-pages-hardware-health-tools-panel :selected-tab="activeTab" />
|
|
39
39
|
|
|
40
|
-
<div
|
|
41
|
-
:class="[
|
|
42
|
-
'bottom-container',
|
|
43
|
-
{ 'history-testimony': activeTab === 'history-testimony' },
|
|
44
|
-
]"
|
|
45
|
-
>
|
|
40
|
+
<div :class="['hardware-health__content', activeTab]">
|
|
46
41
|
<common-pages-hardware-health-history-testimony-graph
|
|
47
42
|
v-if="activeTab === 'history-testimony'"
|
|
43
|
+
v-model:selected-view="selectedGraphView"
|
|
48
44
|
:power-data="props.historyTestimonyPower"
|
|
49
45
|
:temperature-data="props.historyTestimonyTemperature"
|
|
50
46
|
:counters-table-data="hardwareHealth"
|
|
@@ -59,7 +55,8 @@
|
|
|
59
55
|
|
|
60
56
|
<common-pages-hardware-health-table-view
|
|
61
57
|
:key="uniqueKey"
|
|
62
|
-
v-model:selected="selectedRow"
|
|
58
|
+
v-model:selected-row="selectedRow"
|
|
59
|
+
:selected-graph-view="selectedGraphView"
|
|
63
60
|
:data-table="hardwareHealth"
|
|
64
61
|
:total-items="hardwareHealth.length"
|
|
65
62
|
:total-pages="1"
|
|
@@ -96,6 +93,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
96
93
|
const { $store }: any = useNuxtApp()
|
|
97
94
|
|
|
98
95
|
const activeTab = ref<UI_T_HardwareHealthTabMode>('sensor')
|
|
96
|
+
const selectedGraphView = ref<string>('all')
|
|
99
97
|
const uniqueKey = ref<number>(0)
|
|
100
98
|
|
|
101
99
|
const selectedRow = ref<number[]>([])
|
|
@@ -182,10 +180,15 @@ onUnmounted(() => {
|
|
|
182
180
|
margin-top: 0;
|
|
183
181
|
}
|
|
184
182
|
}
|
|
185
|
-
|
|
183
|
+
&__content {
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
height: inherit;
|
|
187
|
+
overflow: hidden;
|
|
188
|
+
|
|
186
189
|
&.history-testimony {
|
|
187
|
-
overflow: hidden;
|
|
188
190
|
overflow-y: auto;
|
|
191
|
+
display: block;
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-pages-hardware-health-history-testimony-tools
|
|
3
|
+
v-model:selected-view="selectedView"
|
|
3
4
|
v-model:selected-timespan-type="selectedTimespanType"
|
|
4
5
|
:selected-chart-option-name="selectedChartOptionName"
|
|
5
6
|
:is-show-chart-modal="isShowChartModal"
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
:custom-time-from="customTimeFrom"
|
|
19
20
|
:custom-time-to="customTimeTo"
|
|
20
21
|
:start-date="props.powerData?.pointStart || 0"
|
|
21
|
-
:period-type="
|
|
22
|
+
:timespan-period-type="timespanPeriodType"
|
|
22
23
|
@power-selected-rows-local="powerSelectedRowsLocal = $event"
|
|
23
24
|
@temperature-selected-rows-local="temperatureSelectedRowsLocal = $event"
|
|
24
25
|
@show-chart-modal="isShowChartModal = true"
|
|
@@ -26,9 +27,13 @@
|
|
|
26
27
|
@update-tools="onUpdateTools"
|
|
27
28
|
@delete-option="onDeleteOption"
|
|
28
29
|
@submit-options="onSubmitOptions"
|
|
30
|
+
@update-timespan-period-type="timespanPeriodType = $event"
|
|
29
31
|
/>
|
|
30
|
-
<div
|
|
31
|
-
|
|
32
|
+
<div
|
|
33
|
+
ref="historyTestimonyGraph"
|
|
34
|
+
:class="`history-testimony-graph ${selectedView}`"
|
|
35
|
+
>
|
|
36
|
+
<div>
|
|
32
37
|
<common-graph
|
|
33
38
|
v-if="powerDataLocal && !props.powerLoading"
|
|
34
39
|
:data="powerDataLocal"
|
|
@@ -36,12 +41,15 @@
|
|
|
36
41
|
:chart="powerChart"
|
|
37
42
|
:selected-row="selectedRowPower"
|
|
38
43
|
/>
|
|
39
|
-
<div
|
|
44
|
+
<div
|
|
45
|
+
v-else-if="props.powerLoading"
|
|
46
|
+
class="history-testimony-graph__loader-block"
|
|
47
|
+
>
|
|
40
48
|
<div class="spinner"></div>
|
|
41
49
|
</div>
|
|
42
|
-
<div v-else class="
|
|
50
|
+
<div v-else class="history-testimony-graph__empty-content"></div>
|
|
43
51
|
</div>
|
|
44
|
-
<div
|
|
52
|
+
<div>
|
|
45
53
|
<common-graph
|
|
46
54
|
v-if="temperatureDataLocal && !props.temperatureLoading"
|
|
47
55
|
:data="temperatureDataLocal"
|
|
@@ -49,10 +57,13 @@
|
|
|
49
57
|
:chart="temperatureChart"
|
|
50
58
|
:selected-row="selectedRowTemperature"
|
|
51
59
|
/>
|
|
52
|
-
<div
|
|
60
|
+
<div
|
|
61
|
+
v-else-if="props.temperatureLoading"
|
|
62
|
+
class="history-testimony-graph__loader-block"
|
|
63
|
+
>
|
|
53
64
|
<div class="spinner"></div>
|
|
54
65
|
</div>
|
|
55
|
-
<div v-else class="
|
|
66
|
+
<div v-else class="history-testimony-graph__empty-content"></div>
|
|
56
67
|
</div>
|
|
57
68
|
</div>
|
|
58
69
|
</template>
|
|
@@ -83,9 +94,31 @@ const props = defineProps<{
|
|
|
83
94
|
getDateFormat: any
|
|
84
95
|
mainSelectedRow: number[]
|
|
85
96
|
}>()
|
|
97
|
+
const selectedView = defineModel<string>('selectedView')
|
|
86
98
|
|
|
87
99
|
const { $store }: any = useNuxtApp()
|
|
88
100
|
|
|
101
|
+
// const historyTestimonyGraph = ref(null)
|
|
102
|
+
// const contentWidth = ref<number>(
|
|
103
|
+
// useElementSize(historyTestimonyGraph)?.width || 0
|
|
104
|
+
// )
|
|
105
|
+
// watch(contentWidth, (newValue) => {
|
|
106
|
+
// if (newValue) {
|
|
107
|
+
// updatePowerChart()
|
|
108
|
+
// updateTemperatureChart()
|
|
109
|
+
// }
|
|
110
|
+
// if (!powerChart.value || !temperatureChart.value) return
|
|
111
|
+
//
|
|
112
|
+
// powerChart.value.setSize(1, powerChart.chartHeight)
|
|
113
|
+
// temperatureChart.value.setSize(1, temperatureChart.chartHeight)
|
|
114
|
+
//
|
|
115
|
+
// setTimeout(() => {
|
|
116
|
+
// powerChart.value.setSize(newValue, powerChart.chartHeight)
|
|
117
|
+
// temperatureChart.value.setSize(newValue, temperatureChart.chartHeight)
|
|
118
|
+
// }, 1000)
|
|
119
|
+
// })
|
|
120
|
+
// const isContentMediumSize = computed<boolean>(() => contentWidth.value <= 1200)
|
|
121
|
+
|
|
89
122
|
const selectedChartOptionName = ref<string>('')
|
|
90
123
|
const isShowChartModal = ref<boolean>(false)
|
|
91
124
|
const selectedMetric = ref<UI_T_Chart>('power')
|
|
@@ -99,22 +132,43 @@ const customTimeTo = ref<string>('')
|
|
|
99
132
|
|
|
100
133
|
const selectedRowPower = ref<number[]>([])
|
|
101
134
|
const selectedRowTemperature = ref<number[]>([])
|
|
135
|
+
let powerCounters: UI_I_HardwareHealthSensors[] = []
|
|
136
|
+
let temperatureCounters: UI_I_HardwareHealthSensors[] = []
|
|
102
137
|
const updateAllSelectedSelectedRow = (): void => {
|
|
103
138
|
selectedRowPower.value = []
|
|
104
139
|
selectedRowTemperature.value = []
|
|
140
|
+
|
|
141
|
+
if (!props.mainSelectedRow.length) return
|
|
142
|
+
|
|
105
143
|
props.mainSelectedRow.forEach((key) => {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
144
|
+
const selectedItem = props.countersTableData[key]
|
|
145
|
+
const category = selectedItem.category.toLowerCase()
|
|
146
|
+
|
|
147
|
+
if (category === 'power') {
|
|
148
|
+
const currentKey = powerCounters.findIndex(
|
|
149
|
+
(item) => item.id === selectedItem.id
|
|
150
|
+
)
|
|
151
|
+
selectedRowPower.value.push(currentKey)
|
|
152
|
+
} else if (category === 'temperature') {
|
|
153
|
+
const currentKey = temperatureCounters.findIndex(
|
|
154
|
+
(item) => item.id === selectedItem.id
|
|
155
|
+
)
|
|
156
|
+
selectedRowTemperature.value.push(currentKey)
|
|
115
157
|
}
|
|
116
158
|
})
|
|
117
159
|
}
|
|
160
|
+
watch(
|
|
161
|
+
() => props.countersTableData,
|
|
162
|
+
(newValue) => {
|
|
163
|
+
powerCounters = newValue.filter(
|
|
164
|
+
(item) => item.category.toLowerCase() === 'power'
|
|
165
|
+
)
|
|
166
|
+
temperatureCounters = newValue.filter(
|
|
167
|
+
(item) => item.category.toLowerCase() === 'temperature'
|
|
168
|
+
)
|
|
169
|
+
},
|
|
170
|
+
{ deep: true, immediate: true }
|
|
171
|
+
)
|
|
118
172
|
watch(
|
|
119
173
|
() => props.mainSelectedRow,
|
|
120
174
|
() => {
|
|
@@ -122,6 +176,13 @@ watch(
|
|
|
122
176
|
},
|
|
123
177
|
{ deep: true, immediate: true }
|
|
124
178
|
)
|
|
179
|
+
watch(
|
|
180
|
+
selectedView,
|
|
181
|
+
() => {
|
|
182
|
+
updateAllSelectedSelectedRow()
|
|
183
|
+
},
|
|
184
|
+
{ deep: true }
|
|
185
|
+
)
|
|
125
186
|
|
|
126
187
|
const unitsCount = ref<number>(0)
|
|
127
188
|
const powerCountersTableData = ref<UI_I_HardwareHealthSensorsGraph[]>([])
|
|
@@ -146,6 +207,7 @@ watch(
|
|
|
146
207
|
units: '',
|
|
147
208
|
nameEn: item.mainName || '',
|
|
148
209
|
testId: `counters-table-${item.name}-item`,
|
|
210
|
+
hidden: item.hidden,
|
|
149
211
|
}
|
|
150
212
|
if (item.category.toLowerCase() === 'power')
|
|
151
213
|
powerCountersTableData.value.push(newData)
|
|
@@ -166,7 +228,7 @@ const selectAllCounters = (): void => {
|
|
|
166
228
|
selectedPowerCountersKeys.value.push(item.id)
|
|
167
229
|
})
|
|
168
230
|
temperatureCountersTableData.value.forEach((item) => {
|
|
169
|
-
selectedTemperatureCountersKeys.value.push(item.id)
|
|
231
|
+
if (!item.hidden) selectedTemperatureCountersKeys.value.push(item.id)
|
|
170
232
|
})
|
|
171
233
|
}
|
|
172
234
|
}
|
|
@@ -184,6 +246,7 @@ const updateTemperatureHelper = ref<number>(0)
|
|
|
184
246
|
let dateFormat = ''
|
|
185
247
|
const powerChart = ref<any>(null)
|
|
186
248
|
const temperatureChart = ref<any>(null)
|
|
249
|
+
const timespanPeriodType = ref<string>('last')
|
|
187
250
|
|
|
188
251
|
const powerChartCallback = (newValue: any): void => {
|
|
189
252
|
newValue && (powerChart.value = newValue)
|
|
@@ -334,20 +397,38 @@ const onDeleteOption = (): void => {}
|
|
|
334
397
|
</script>
|
|
335
398
|
|
|
336
399
|
<style scoped lang="scss">
|
|
337
|
-
.
|
|
400
|
+
.history-testimony-graph {
|
|
338
401
|
display: grid;
|
|
339
402
|
align-items: center;
|
|
340
|
-
grid-template-columns: 1fr 1fr;
|
|
341
403
|
grid-gap: 20px;
|
|
404
|
+
grid-template-columns: 1fr 1fr;
|
|
405
|
+
|
|
406
|
+
//&.medium {
|
|
407
|
+
// grid-template-columns: 1fr;
|
|
408
|
+
//}
|
|
409
|
+
&.power {
|
|
410
|
+
grid-template-columns: 1fr 0;
|
|
411
|
+
|
|
412
|
+
& > div:nth-child(2) {
|
|
413
|
+
visibility: hidden;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
&.temperature {
|
|
417
|
+
grid-template-columns: 0 1fr;
|
|
418
|
+
|
|
419
|
+
& > div:nth-child(1) {
|
|
420
|
+
visibility: hidden;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
342
423
|
|
|
343
|
-
|
|
424
|
+
&__loader-block {
|
|
344
425
|
height: inherit;
|
|
345
426
|
display: flex;
|
|
346
427
|
justify-content: center;
|
|
347
428
|
align-items: center;
|
|
348
429
|
min-height: 300px;
|
|
349
430
|
}
|
|
350
|
-
|
|
431
|
+
&__empty-content {
|
|
351
432
|
height: inherit;
|
|
352
433
|
}
|
|
353
434
|
}
|
|
@@ -78,9 +78,11 @@
|
|
|
78
78
|
:custom-date-to="props.customDateTo"
|
|
79
79
|
:custom-time-from="props.customTimeFrom"
|
|
80
80
|
:custom-time-to="props.customTimeTo"
|
|
81
|
+
:timespan-period-type="props.timespanPeriodType"
|
|
81
82
|
@save-option-name="onSaveOptionName"
|
|
82
83
|
@delete-option="emits('delete-option')"
|
|
83
84
|
@power-selected-rows-local="emits('power-selected-rows-local', $event)"
|
|
85
|
+
@update-timespan-period-type="emits('update-timespan-period-type', $event)"
|
|
84
86
|
@temperature-selected-rows-local="
|
|
85
87
|
emits('temperature-selected-rows-local', $event)
|
|
86
88
|
"
|
|
@@ -123,8 +125,9 @@ const props = defineProps<{
|
|
|
123
125
|
customTimeTo: string
|
|
124
126
|
selectedTimespanType: string
|
|
125
127
|
startDate: number
|
|
126
|
-
|
|
128
|
+
timespanPeriodType: string
|
|
127
129
|
}>()
|
|
130
|
+
const selectedView = defineModel<string>('selectedView')
|
|
128
131
|
|
|
129
132
|
const emits = defineEmits<{
|
|
130
133
|
(event: 'show-chart-modal'): void
|
|
@@ -144,7 +147,7 @@ const emits = defineEmits<{
|
|
|
144
147
|
(event: 'update-chart-type', value: string): void
|
|
145
148
|
(event: 'update-timespan-type', value: string): void
|
|
146
149
|
(event: 'update-unit-count', value: number): void
|
|
147
|
-
(event: 'update-period-type', value: string): void
|
|
150
|
+
(event: 'update-timespan-period-type', value: string): void
|
|
148
151
|
(event: 'update-custom-time', value: string): void
|
|
149
152
|
(event: 'delete-option'): void
|
|
150
153
|
(event: 'update-custom-date-from', value: string): void
|
|
@@ -172,7 +175,6 @@ const selectedPeriod = computed<string>({
|
|
|
172
175
|
|
|
173
176
|
const optionsNames = ref<string[]>([])
|
|
174
177
|
|
|
175
|
-
const selectedView = ref<string>('power')
|
|
176
178
|
const viewOptions = computed<UI_I_OptionItem[]>(() =>
|
|
177
179
|
viewFunc(localization.value, optionsNames.value)
|
|
178
180
|
)
|
|
@@ -222,7 +224,10 @@ const onUpdateTools = (): void => {
|
|
|
222
224
|
Math.round(validPeriodData[1] / 1000),
|
|
223
225
|
]
|
|
224
226
|
|
|
225
|
-
if (
|
|
227
|
+
if (
|
|
228
|
+
periodValue === 'custom_interval' &&
|
|
229
|
+
props.timespanPeriodType === 'period'
|
|
230
|
+
) {
|
|
226
231
|
const checkDateResult = checkDateFunc(
|
|
227
232
|
localization.value,
|
|
228
233
|
props.customDateFrom,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
:selected-chart-type="localSelectedChartType"
|
|
43
43
|
:selected-timespan-type="localSelectedTimespanType"
|
|
44
44
|
:units-count="localUnitsCount"
|
|
45
|
-
:period-type="
|
|
45
|
+
:timespan-period-type="localTimespanPeriodType"
|
|
46
46
|
:selected-custom-time="localCustomTime"
|
|
47
47
|
:custom-date-from="props.customDateFrom"
|
|
48
48
|
:custom-date-to="props.customDateTo"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
@update-custom-time="localCustomTime = $event"
|
|
55
55
|
@update-timespan-type="timespanType = $event"
|
|
56
56
|
@update-unit-count="unitCount = $event"
|
|
57
|
-
@update-period-type="
|
|
57
|
+
@update-timespan-period-type="localTimespanPeriodType = $event"
|
|
58
58
|
@update-custom-date-from="onUpdateCustomDateFrom"
|
|
59
59
|
@update-custom-date-to="onUpdateCustomDateTo"
|
|
60
60
|
@update-custom-time-from="onUpdateCustomTimeFrom"
|
|
@@ -94,6 +94,7 @@ const props = defineProps<{
|
|
|
94
94
|
customDateTo: string
|
|
95
95
|
customTimeFrom: string
|
|
96
96
|
customTimeTo: string
|
|
97
|
+
timespanPeriodType: string
|
|
97
98
|
}>()
|
|
98
99
|
|
|
99
100
|
const emits = defineEmits<{
|
|
@@ -110,7 +111,7 @@ const emits = defineEmits<{
|
|
|
110
111
|
(event: 'update-chart-type', value: string): void
|
|
111
112
|
(event: 'update-timespan-type', value: string): void
|
|
112
113
|
(event: 'update-unit-count', value: number): void
|
|
113
|
-
(event: 'update-period-type', value: string): void
|
|
114
|
+
(event: 'update-timespan-period-type', value: string): void
|
|
114
115
|
(event: 'update-custom-time', value: string): void
|
|
115
116
|
(event: 'delete-option'): void
|
|
116
117
|
(event: 'save-option-name'): void
|
|
@@ -187,11 +188,11 @@ watch(
|
|
|
187
188
|
{ immediate: true }
|
|
188
189
|
)
|
|
189
190
|
|
|
190
|
-
const
|
|
191
|
+
const localTimespanPeriodType = ref<string>('')
|
|
191
192
|
watch(
|
|
192
|
-
() => props.
|
|
193
|
+
() => props.timespanPeriodType,
|
|
193
194
|
(newValue) => {
|
|
194
|
-
|
|
195
|
+
localTimespanPeriodType.value = newValue
|
|
195
196
|
},
|
|
196
197
|
{ immediate: true }
|
|
197
198
|
)
|
|
@@ -251,7 +252,7 @@ const checkValidations = (): boolean => {
|
|
|
251
252
|
return false
|
|
252
253
|
} else if (
|
|
253
254
|
timespanType.value === 'custom_interval' &&
|
|
254
|
-
|
|
255
|
+
localTimespanPeriodType.value === 'period' &&
|
|
255
256
|
checkDateResult !== '' &&
|
|
256
257
|
typeof checkDateResult === 'string'
|
|
257
258
|
) {
|
|
@@ -300,13 +301,29 @@ const onSubmit = (): void => {
|
|
|
300
301
|
unitCount.value,
|
|
301
302
|
localCustomTime.value
|
|
302
303
|
)
|
|
304
|
+
if (
|
|
305
|
+
timespanType.value === 'custom_interval' &&
|
|
306
|
+
localTimespanPeriodType.value === 'period'
|
|
307
|
+
) {
|
|
308
|
+
const checkDateResult = checkDateFunc(
|
|
309
|
+
localization.value,
|
|
310
|
+
localCustomDateFrom.value,
|
|
311
|
+
localCustomDateTo.value,
|
|
312
|
+
localCustomTimeFrom.value,
|
|
313
|
+
localCustomTimeTo.value
|
|
314
|
+
)
|
|
315
|
+
if (Array.isArray(checkDateResult)) {
|
|
316
|
+
validPeriod[0] = checkDateResult[0]
|
|
317
|
+
validPeriod[1] = checkDateResult[1]
|
|
318
|
+
}
|
|
319
|
+
}
|
|
303
320
|
|
|
304
321
|
const savedObject = {
|
|
305
322
|
fields: currentFields,
|
|
306
323
|
optionName: selectedLocalOptionName.value,
|
|
307
324
|
metric: selectedMetric.value,
|
|
308
325
|
periodName: timespanType.value,
|
|
309
|
-
periodType:
|
|
326
|
+
periodType: localTimespanPeriodType.value,
|
|
310
327
|
unitCount: unitCount.value,
|
|
311
328
|
localTimespanType: localCustomTime.value,
|
|
312
329
|
dateFrom: localCustomDateFrom.value,
|
|
@@ -317,6 +334,7 @@ const onSubmit = (): void => {
|
|
|
317
334
|
period: validPeriod,
|
|
318
335
|
}
|
|
319
336
|
|
|
337
|
+
emits('update-timespan-period-type', savedObject.periodType)
|
|
320
338
|
emits('submit-options', savedObject)
|
|
321
339
|
onHide()
|
|
322
340
|
}
|
|
@@ -343,7 +361,7 @@ const onSaveOptions = (name: string): void => {
|
|
|
343
361
|
counters,
|
|
344
362
|
metric: selectedMetric.value,
|
|
345
363
|
timespan: {
|
|
346
|
-
periodType:
|
|
364
|
+
periodType: localTimespanPeriodType.value,
|
|
347
365
|
units: localCustomTime.value,
|
|
348
366
|
unitsCount: unitCount.value,
|
|
349
367
|
type: timespanType.value,
|
|
@@ -366,7 +384,7 @@ const setDefaultOptions = (): void => {
|
|
|
366
384
|
localSelectedChartType.value = 'spline'
|
|
367
385
|
localSelectedTimespanType.value = ''
|
|
368
386
|
localUnitsCount.value = 0
|
|
369
|
-
|
|
387
|
+
localTimespanPeriodType.value = ''
|
|
370
388
|
localCustomTime.value = ''
|
|
371
389
|
}
|
|
372
390
|
|
|
@@ -392,7 +410,7 @@ const setCustomOptions = (name: string): void => {
|
|
|
392
410
|
localSelectedChartType.value = currentChartType
|
|
393
411
|
localSelectedTimespanType.value = selectedValue.timespan.type
|
|
394
412
|
localUnitsCount.value = selectedValue.timespan.unitsCount
|
|
395
|
-
|
|
413
|
+
localTimespanPeriodType.value = selectedValue.timespan.periodType
|
|
396
414
|
localCustomTime.value = selectedValue.timespan.units
|
|
397
415
|
}
|
|
398
416
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:selected-chart-type="props.selectedChartType"
|
|
16
16
|
:selected-timespan-type="props.selectedTimespanType"
|
|
17
17
|
:units-count="props.unitsCount"
|
|
18
|
-
:period-type="props.
|
|
18
|
+
:timespan-period-type="props.timespanPeriodType"
|
|
19
19
|
:selected-custom-time="props.selectedCustomTime"
|
|
20
20
|
:custom-date-from="props.customDateFrom"
|
|
21
21
|
:custom-date-to="props.customDateTo"
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
@update-custom-time="emits('update-custom-time', $event)"
|
|
26
26
|
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
27
27
|
@update-unit-count="emits('update-unit-count', $event)"
|
|
28
|
-
@update-period-type="
|
|
28
|
+
@update-timespan-period-type="
|
|
29
|
+
emits('update-timespan-period-type', $event)
|
|
30
|
+
"
|
|
29
31
|
@update-custom-date-from="emits('update-custom-date-from', $event)"
|
|
30
32
|
@update-custom-date-to="emits('update-custom-date-to', $event)"
|
|
31
33
|
@update-custom-time-from="emits('update-custom-time-from', $event)"
|
|
@@ -48,7 +50,7 @@ const props = defineProps<{
|
|
|
48
50
|
selectedChartType: string
|
|
49
51
|
selectedTimespanType: string
|
|
50
52
|
unitsCount: number
|
|
51
|
-
|
|
53
|
+
timespanPeriodType: string
|
|
52
54
|
selectedCustomTime: string
|
|
53
55
|
customDateFrom: string
|
|
54
56
|
customDateTo: string
|
|
@@ -58,12 +60,15 @@ const props = defineProps<{
|
|
|
58
60
|
|
|
59
61
|
const emits = defineEmits<{
|
|
60
62
|
(event: 'select-power-row', value: UI_I_HardwareHealthSensorsGraph[]): void
|
|
61
|
-
(
|
|
63
|
+
(
|
|
64
|
+
event: 'select-temperature-row',
|
|
65
|
+
value: UI_I_HardwareHealthSensorsGraph[]
|
|
66
|
+
): void
|
|
62
67
|
(event: 'update-chart-type', value: string): void
|
|
63
68
|
(event: 'update-custom-time', value: string): void
|
|
64
69
|
(event: 'update-timespan-type', value: string): void
|
|
65
70
|
(event: 'update-unit-count', value: number): void
|
|
66
|
-
(event: 'update-period-type', value: string): void
|
|
71
|
+
(event: 'update-timespan-period-type', value: string): void
|
|
67
72
|
(event: 'update-custom-date-from', value: string): void
|
|
68
73
|
(event: 'update-custom-date-to', value: string): void
|
|
69
74
|
(event: 'update-custom-time-from', value: string): void
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:selected-chart-type="props.selectedChartType"
|
|
6
6
|
:selected-timespan-type="props.selectedTimespanType"
|
|
7
7
|
:units-count="props.unitsCount"
|
|
8
|
-
:period-type="props.
|
|
8
|
+
:timespan-period-type="props.timespanPeriodType"
|
|
9
9
|
:selected-custom-time="props.selectedCustomTime"
|
|
10
10
|
:custom-date-from="props.customDateFrom"
|
|
11
11
|
:custom-date-to="props.customDateTo"
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
@update-custom-time="emits('update-custom-time', $event)"
|
|
16
16
|
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
17
17
|
@update-unit-count="emits('update-unit-count', $event)"
|
|
18
|
-
@update-period-type="
|
|
18
|
+
@update-timespan-period-type="
|
|
19
|
+
emits('update-timespan-period-type', $event)
|
|
20
|
+
"
|
|
19
21
|
@update-custom-date-from="emits('update-custom-date-from', $event)"
|
|
20
22
|
@update-custom-date-to="emits('update-custom-date-to', $event)"
|
|
21
23
|
@update-custom-time-from="emits('update-custom-time-from', $event)"
|
|
@@ -30,7 +32,7 @@ const props = defineProps<{
|
|
|
30
32
|
selectedChartType: string
|
|
31
33
|
selectedTimespanType: string
|
|
32
34
|
unitsCount: number
|
|
33
|
-
|
|
35
|
+
timespanPeriodType: string
|
|
34
36
|
selectedCustomTime: string
|
|
35
37
|
customDateFrom: string
|
|
36
38
|
customDateTo: string
|
|
@@ -43,7 +45,7 @@ const emits = defineEmits<{
|
|
|
43
45
|
(event: 'update-custom-time', value: string): void
|
|
44
46
|
(event: 'update-timespan-type', value: string): void
|
|
45
47
|
(event: 'update-unit-count', value: number): void
|
|
46
|
-
(event: 'update-period-type', value: string): void
|
|
48
|
+
(event: 'update-timespan-period-type', value: string): void
|
|
47
49
|
(event: 'update-custom-date-from', value: string): void
|
|
48
50
|
(event: 'update-custom-date-to', value: string): void
|
|
49
51
|
(event: 'update-custom-time-from', value: string): void
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<td class="relative">
|
|
38
38
|
<input
|
|
39
39
|
id="custom-time-lastInput"
|
|
40
|
-
v-model="
|
|
40
|
+
v-model="localTimespanPeriodType"
|
|
41
41
|
data-id="custom-time-lastInput"
|
|
42
42
|
type="radio"
|
|
43
43
|
value="last"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<div
|
|
56
56
|
:class="[
|
|
57
57
|
'custom-timespan-type-last-container',
|
|
58
|
-
{ active:
|
|
58
|
+
{ active: localTimespanPeriodType === 'last' },
|
|
59
59
|
]"
|
|
60
60
|
>
|
|
61
61
|
<input
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
<td class="relative">
|
|
96
96
|
<input
|
|
97
97
|
id="custom-time-fromInput"
|
|
98
|
-
v-model="
|
|
98
|
+
v-model="localTimespanPeriodType"
|
|
99
99
|
data-id="custom-time-from-input"
|
|
100
100
|
type="radio"
|
|
101
101
|
value="period"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
<div
|
|
113
113
|
:class="[
|
|
114
114
|
'date-container-row disabled-container calendar-date-row',
|
|
115
|
-
{ active:
|
|
115
|
+
{ active: localTimespanPeriodType === 'period' },
|
|
116
116
|
]"
|
|
117
117
|
>
|
|
118
118
|
<input
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
<div
|
|
149
149
|
:class="[
|
|
150
150
|
'date-container-row disabled-container calendar-date-row',
|
|
151
|
-
{ active:
|
|
151
|
+
{ active: localTimespanPeriodType === 'period' },
|
|
152
152
|
]"
|
|
153
153
|
>
|
|
154
154
|
<input
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
<td
|
|
182
182
|
:class="[
|
|
183
183
|
'disabled-container',
|
|
184
|
-
{ active:
|
|
184
|
+
{ active: localTimespanPeriodType === 'period' },
|
|
185
185
|
]"
|
|
186
186
|
>
|
|
187
187
|
<span> ({{ localization.common.isoTimeFormat }}) </span>
|
|
@@ -233,7 +233,7 @@ const props = defineProps<{
|
|
|
233
233
|
selectedChartType: string
|
|
234
234
|
selectedTimespanType: string
|
|
235
235
|
unitsCount: number
|
|
236
|
-
|
|
236
|
+
timespanPeriodType: string
|
|
237
237
|
selectedCustomTime: string
|
|
238
238
|
customDateFrom: string
|
|
239
239
|
customDateTo: string
|
|
@@ -246,7 +246,7 @@ const emits = defineEmits<{
|
|
|
246
246
|
(event: 'update-custom-time', value: string): void
|
|
247
247
|
(event: 'update-timespan-type', value: string): void
|
|
248
248
|
(event: 'update-unit-count', value: number): void
|
|
249
|
-
(event: 'update-period-type', value: string): void
|
|
249
|
+
(event: 'update-timespan-period-type', value: string): void
|
|
250
250
|
(event: 'update-custom-date-from', value: string): void
|
|
251
251
|
(event: 'update-custom-date-to', value: string): void
|
|
252
252
|
(event: 'update-custom-time-from', value: string): void
|
|
@@ -269,11 +269,11 @@ watch(
|
|
|
269
269
|
localSelectedTimespan.value = newValue || timespanOptions.value[0].value
|
|
270
270
|
}
|
|
271
271
|
)
|
|
272
|
-
const
|
|
272
|
+
const localTimespanPeriodType = ref<string>('last')
|
|
273
273
|
watch(
|
|
274
|
-
() => props.
|
|
274
|
+
() => props.timespanPeriodType,
|
|
275
275
|
(newValue) => {
|
|
276
|
-
|
|
276
|
+
localTimespanPeriodType.value = newValue || 'last'
|
|
277
277
|
},
|
|
278
278
|
{ immediate: true }
|
|
279
279
|
)
|
|
@@ -287,10 +287,10 @@ watch(
|
|
|
287
287
|
)
|
|
288
288
|
|
|
289
289
|
watch(
|
|
290
|
-
|
|
290
|
+
localTimespanPeriodType,
|
|
291
291
|
(newValue) => {
|
|
292
292
|
const currentValue = newValue || 'period'
|
|
293
|
-
emits('update-period-type', currentValue)
|
|
293
|
+
emits('update-timespan-period-type', currentValue)
|
|
294
294
|
},
|
|
295
295
|
{ immediate: true }
|
|
296
296
|
)
|