From 5367ddb90fef12f6fc1258aaf56dc978168ec07b Mon Sep 17 00:00:00 2001
From: Vitalii Lysak <v.lysak@dunice.net>
Date: Mon, 25 Jul 2022 10:36:05 +0300
Subject: add tables for dynamic

---
 .../Processors/Dynamic/ProcessorsDynamicPage.vue   | 67 +++-------------------
 1 file changed, 7 insertions(+), 60 deletions(-)

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

diff --git a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue
index 54f8e284..fa98e951 100644
--- a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue
+++ b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue
@@ -35,11 +35,13 @@
         <chart
           type="processors"
           :data="filteredSensors"
+          :colors="colors"
           :warning="temperatureWarning"
           :non-normal="temperatureNonNormal"
           :critical-start="temperatureCriticalStart"
         ></chart>
         <b-table
+          v-if="items && items.length > 0"
           responsive="md"
           show-empty
           table-variant="accessory"
@@ -103,15 +105,15 @@ export default {
           label: this.$t('pageProcessors.table.name'),
         },
         {
-          key: 'currentTemperature',
+          key: 'current',
           label: this.$t('pageProcessors.table.currentTemperature'),
         },
         {
-          key: 'middleTemperature',
+          key: 'middle',
           label: this.$t('pageProcessors.table.middleTemperature'),
         },
         {
-          key: 'minTemperature',
+          key: 'min',
           label: this.$t('pageProcessors.table.minTemperature'),
         },
         {
@@ -119,7 +121,7 @@ export default {
           label: this.$t('pageProcessors.table.minDate'),
         },
         {
-          key: 'maxTemperature',
+          key: 'max',
           label: this.$t('pageProcessors.table.maxTemperature'),
         },
         {
@@ -127,62 +129,7 @@ export default {
           label: this.$t('pageProcessors.table.maxDate'),
         },
       ],
-      items: [
-        {
-          name: 'Процессор 1',
-          currentTemperature: 19,
-          middleTemperature: 40,
-          minTemperature: 31,
-          minDate: { time: '15:15', date: '11.11.2021' },
-          maxTemperature: 88,
-          maxDate: { time: '10:26', date: '15.11.2021' },
-        },
-        {
-          name: 'Процессор 2',
-          currentTemperature: 29,
-          middleTemperature: 40,
-          minTemperature: 20,
-          minDate: { time: '15:45', date: '11.11.2021' },
-          maxTemperature: 76,
-          maxDate: { time: '16:59', date: '16.11.2021' },
-        },
-        {
-          name: 'Процессор 3',
-          currentTemperature: 48,
-          middleTemperature: 46,
-          minTemperature: 31,
-          minDate: { time: '15:23', date: '11.11.2021' },
-          maxTemperature: 69,
-          maxDate: { time: '15:26', date: '15.11.2021' },
-        },
-        {
-          name: 'Процессор 4',
-          currentTemperature: 48,
-          middleTemperature: 45,
-          minTemperature: 5,
-          minDate: { time: '16:45', date: '25.11.2021' },
-          maxTemperature: 75,
-          maxDate: { time: '11:26', date: '16.11.2021' },
-        },
-        {
-          name: 'Процессор 5',
-          currentTemperature: 39,
-          middleTemperature: 44,
-          minTemperature: 30,
-          minDate: { time: '15:23', date: '11.11.2021' },
-          maxTemperature: 80,
-          maxDate: { time: '15:26', date: '17.11.2021' },
-        },
-        {
-          name: 'Процессор 6',
-          currentTemperature: 39,
-          middleTemperature: 44,
-          minTemperature: 5,
-          minDate: { time: '16:45', date: '25.11.2021' },
-          maxTemperature: 80,
-          maxDate: { time: '15:26', date: '15.11.2021' },
-        },
-      ],
+      items: [],
     };
   },
 
-- 
cgit v1.2.3

