From fde35052ff8854401b6d7359d1c1f7cc5a060051 Mon Sep 17 00:00:00 2001
From: Vitalii Lysak <v.lysak@dunice.net>
Date: Wed, 27 Jul 2022 12:14:05 +0300
Subject: fx bugs

---
 src/views/_sila/Processors/Dynamic/CpuPower.vue | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'src/views/_sila/Processors/Dynamic/CpuPower.vue')

diff --git a/src/views/_sila/Processors/Dynamic/CpuPower.vue b/src/views/_sila/Processors/Dynamic/CpuPower.vue
index dffea20f..a4fb753f 100644
--- a/src/views/_sila/Processors/Dynamic/CpuPower.vue
+++ b/src/views/_sila/Processors/Dynamic/CpuPower.vue
@@ -101,7 +101,6 @@ export default {
     return {
       warning: 66,
       shutdown: 88,
-      items: [],
       fields: [
         {
           key: 'name',
@@ -117,6 +116,10 @@ export default {
   },
 
   computed: {
+    items() {
+      return getItems(this.filteredSensors);
+    },
+
     allSensors() {
       return this.$store.getters['processors/cpuPower'];
     },
@@ -134,8 +137,8 @@ export default {
     },
   },
   watch: {
-    filteredSensors(data) {
-      this.items = getItems(data);
+    timeScale() {
+      this.loadData();
     },
   },
 
@@ -147,7 +150,7 @@ export default {
     },
 
     loadData() {
-      let payload = null;
+      let payload = { lastHour: false };
       if (this.timeScale === 'hour') {
         payload = { lastHour: true };
       }
-- 
cgit v1.2.3

