bfg-common 1.4.43 → 1.4.45

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.
@@ -2431,7 +2431,7 @@
2431
2431
  "ioCountForPathSwitch": "Количество операций ввода-вывода для переключения пути",
2432
2432
  "byteCountForPathSwitch": "Количество байт для переключения пути",
2433
2433
  "theValueEitherEmptyOrInvalid": "Значение либо пустое, либо недопустимое",
2434
- "weight": "Бес"
2434
+ "weight": "Вес"
2435
2435
  },
2436
2436
  "auth": {
2437
2437
  "welcomeTo": "Добро пожаловать в",
@@ -37,12 +37,7 @@
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'"
48
43
  v-model:selected-view="selectedGraphView"
@@ -185,10 +180,15 @@ onUnmounted(() => {
185
180
  margin-top: 0;
186
181
  }
187
182
  }
188
- .bottom-container {
183
+ &__content {
184
+ display: flex;
185
+ flex-direction: column;
186
+ height: inherit;
187
+ overflow: hidden;
188
+
189
189
  &.history-testimony {
190
- overflow: hidden;
191
190
  overflow-y: auto;
191
+ display: block;
192
192
  }
193
193
  }
194
194
  }
@@ -19,7 +19,7 @@
19
19
  :custom-time-from="customTimeFrom"
20
20
  :custom-time-to="customTimeTo"
21
21
  :start-date="props.powerData?.pointStart || 0"
22
- :period-type="tools.periodName"
22
+ :timespan-period-type="timespanPeriodType"
23
23
  @power-selected-rows-local="powerSelectedRowsLocal = $event"
24
24
  @temperature-selected-rows-local="temperatureSelectedRowsLocal = $event"
25
25
  @show-chart-modal="isShowChartModal = true"
@@ -27,9 +27,13 @@
27
27
  @update-tools="onUpdateTools"
28
28
  @delete-option="onDeleteOption"
29
29
  @submit-options="onSubmitOptions"
30
+ @update-timespan-period-type="timespanPeriodType = $event"
30
31
  />
31
- <div :class="`hardware-health-graph ${selectedView}`">
32
- <div class="power-container">
32
+ <div
33
+ ref="historyTestimonyGraph"
34
+ :class="`history-testimony-graph ${selectedView}`"
35
+ >
36
+ <div>
33
37
  <common-graph
34
38
  v-if="powerDataLocal && !props.powerLoading"
35
39
  :data="powerDataLocal"
@@ -37,12 +41,15 @@
37
41
  :chart="powerChart"
38
42
  :selected-row="selectedRowPower"
39
43
  />
40
- <div v-else-if="props.powerLoading" class="graphic-loader-block">
44
+ <div
45
+ v-else-if="props.powerLoading"
46
+ class="history-testimony-graph__loader-block"
47
+ >
41
48
  <div class="spinner"></div>
42
49
  </div>
43
- <div v-else class="empty-content"></div>
50
+ <div v-else class="history-testimony-graph__empty-content"></div>
44
51
  </div>
45
- <div class="temperature-container">
52
+ <div>
46
53
  <common-graph
47
54
  v-if="temperatureDataLocal && !props.temperatureLoading"
48
55
  :data="temperatureDataLocal"
@@ -50,10 +57,13 @@
50
57
  :chart="temperatureChart"
51
58
  :selected-row="selectedRowTemperature"
52
59
  />
53
- <div v-else-if="props.temperatureLoading" class="graphic-loader-block">
60
+ <div
61
+ v-else-if="props.temperatureLoading"
62
+ class="history-testimony-graph__loader-block"
63
+ >
54
64
  <div class="spinner"></div>
55
65
  </div>
56
- <div v-else class="empty-content"></div>
66
+ <div v-else class="history-testimony-graph__empty-content"></div>
57
67
  </div>
58
68
  </div>
59
69
  </template>
@@ -88,6 +98,27 @@ const selectedView = defineModel<string>('selectedView')
88
98
 
89
99
  const { $store }: any = useNuxtApp()
90
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
+
91
122
  const selectedChartOptionName = ref<string>('')
92
123
  const isShowChartModal = ref<boolean>(false)
93
124
  const selectedMetric = ref<UI_T_Chart>('power')
@@ -214,6 +245,7 @@ const updateTemperatureHelper = ref<number>(0)
214
245
  let dateFormat = ''
215
246
  const powerChart = ref<any>(null)
216
247
  const temperatureChart = ref<any>(null)
248
+ const timespanPeriodType = ref<string>('last')
217
249
 
218
250
  const powerChartCallback = (newValue: any): void => {
219
251
  newValue && (powerChart.value = newValue)
@@ -364,14 +396,15 @@ const onDeleteOption = (): void => {}
364
396
  </script>
365
397
 
366
398
  <style scoped lang="scss">
367
- .hardware-health-graph {
399
+ .history-testimony-graph {
368
400
  display: grid;
369
401
  align-items: center;
370
402
  grid-gap: 20px;
403
+ grid-template-columns: 1fr 1fr;
371
404
 
372
- &.all {
373
- grid-template-columns: 1fr 1fr;
374
- }
405
+ //&.medium {
406
+ // grid-template-columns: 1fr;
407
+ //}
375
408
  &.power {
376
409
  grid-template-columns: 1fr 0;
377
410
 
@@ -387,14 +420,14 @@ const onDeleteOption = (): void => {}
387
420
  }
388
421
  }
389
422
 
390
- .graphic-loader-block {
423
+ &__loader-block {
391
424
  height: inherit;
392
425
  display: flex;
393
426
  justify-content: center;
394
427
  align-items: center;
395
428
  min-height: 300px;
396
429
  }
397
- .empty-content {
430
+ &__empty-content {
398
431
  height: inherit;
399
432
  }
400
433
  }
@@ -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,7 +125,7 @@ const props = defineProps<{
123
125
  customTimeTo: string
124
126
  selectedTimespanType: string
125
127
  startDate: number
126
- periodType: string
128
+ timespanPeriodType: string
127
129
  }>()
128
130
  const selectedView = defineModel<string>('selectedView')
129
131
 
@@ -145,7 +147,7 @@ const emits = defineEmits<{
145
147
  (event: 'update-chart-type', value: string): void
146
148
  (event: 'update-timespan-type', value: string): void
147
149
  (event: 'update-unit-count', value: number): void
148
- (event: 'update-period-type', value: string): void
150
+ (event: 'update-timespan-period-type', value: string): void
149
151
  (event: 'update-custom-time', value: string): void
150
152
  (event: 'delete-option'): void
151
153
  (event: 'update-custom-date-from', value: string): void
@@ -222,7 +224,10 @@ const onUpdateTools = (): void => {
222
224
  Math.round(validPeriodData[1] / 1000),
223
225
  ]
224
226
 
225
- if (periodValue === 'custom_interval' && props.periodType === 'period') {
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="localPeriodType"
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="localPeriodType = $event"
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 localPeriodType = ref<string>('')
191
+ const localTimespanPeriodType = ref<string>('')
191
192
  watch(
192
- () => props.periodType,
193
+ () => props.timespanPeriodType,
193
194
  (newValue) => {
194
- localPeriodType.value = newValue
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
- localPeriodType.value === 'period' &&
255
+ localTimespanPeriodType.value === 'period' &&
255
256
  checkDateResult !== '' &&
256
257
  typeof checkDateResult === 'string'
257
258
  ) {
@@ -302,7 +303,7 @@ const onSubmit = (): void => {
302
303
  )
303
304
  if (
304
305
  timespanType.value === 'custom_interval' &&
305
- localPeriodType.value === 'period'
306
+ localTimespanPeriodType.value === 'period'
306
307
  ) {
307
308
  const checkDateResult = checkDateFunc(
308
309
  localization.value,
@@ -322,7 +323,7 @@ const onSubmit = (): void => {
322
323
  optionName: selectedLocalOptionName.value,
323
324
  metric: selectedMetric.value,
324
325
  periodName: timespanType.value,
325
- periodType: localPeriodType.value,
326
+ periodType: localTimespanPeriodType.value,
326
327
  unitCount: unitCount.value,
327
328
  localTimespanType: localCustomTime.value,
328
329
  dateFrom: localCustomDateFrom.value,
@@ -333,6 +334,7 @@ const onSubmit = (): void => {
333
334
  period: validPeriod,
334
335
  }
335
336
 
337
+ emits('update-timespan-period-type', savedObject.periodType)
336
338
  emits('submit-options', savedObject)
337
339
  onHide()
338
340
  }
@@ -359,7 +361,7 @@ const onSaveOptions = (name: string): void => {
359
361
  counters,
360
362
  metric: selectedMetric.value,
361
363
  timespan: {
362
- periodType: localPeriodType.value,
364
+ periodType: localTimespanPeriodType.value,
363
365
  units: localCustomTime.value,
364
366
  unitsCount: unitCount.value,
365
367
  type: timespanType.value,
@@ -382,7 +384,7 @@ const setDefaultOptions = (): void => {
382
384
  localSelectedChartType.value = 'spline'
383
385
  localSelectedTimespanType.value = ''
384
386
  localUnitsCount.value = 0
385
- localPeriodType.value = ''
387
+ localTimespanPeriodType.value = ''
386
388
  localCustomTime.value = ''
387
389
  }
388
390
 
@@ -408,7 +410,7 @@ const setCustomOptions = (name: string): void => {
408
410
  localSelectedChartType.value = currentChartType
409
411
  localSelectedTimespanType.value = selectedValue.timespan.type
410
412
  localUnitsCount.value = selectedValue.timespan.unitsCount
411
- localPeriodType.value = selectedValue.timespan.periodType
413
+ localTimespanPeriodType.value = selectedValue.timespan.periodType
412
414
  localCustomTime.value = selectedValue.timespan.units
413
415
  }
414
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.periodType"
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="emits('update-period-type', $event)"
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
- periodType: string
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
- (event: 'select-temperature-row', value: UI_I_HardwareHealthSensorsGraph[]): void
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.periodType"
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="emits('update-period-type', $event)"
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
- periodType: string
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="localPeriodType"
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: localPeriodType === 'last' },
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="localPeriodType"
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: localPeriodType === 'period' },
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: localPeriodType === 'period' },
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: localPeriodType === 'period' },
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
- periodType: string
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 localPeriodType = ref<string>('last')
272
+ const localTimespanPeriodType = ref<string>('last')
273
273
  watch(
274
- () => props.periodType,
274
+ () => props.timespanPeriodType,
275
275
  (newValue) => {
276
- localPeriodType.value = newValue || 'last'
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
- localPeriodType,
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
  )
@@ -1,6 +1,10 @@
1
1
  <template>
2
2
  <div class="recursion-tree">
3
- <div v-for="node in nodes" :key="`${node.type}_${node.id}`">
3
+ <div
4
+ v-for="node in nodes"
5
+ :key="`${node.type}_${node.id}`"
6
+ :data-id="`${node.testId}-${node.type}-root`"
7
+ >
4
8
  <div
5
9
  :id="`tree-node-${node.type}-${node.id}`"
6
10
  :data-id="node.testId"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.43",
4
+ "version": "1.4.45",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",