From 3e93647fe333862abe0fad5951f8738e2e1efd2f Mon Sep 17 00:00:00 2001
From: Maksim Zakharov <m.zakharov@IBS.RU>
Date: Wed, 19 Oct 2022 14:57:21 +0300
Subject: fix charts

---
 src/views/_sila/Power/Dynamic/VoltOutput.vue | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'src/views/_sila/Power/Dynamic/VoltOutput.vue')

diff --git a/src/views/_sila/Power/Dynamic/VoltOutput.vue b/src/views/_sila/Power/Dynamic/VoltOutput.vue
index 2d6f99dc..6284c5ce 100644
--- a/src/views/_sila/Power/Dynamic/VoltOutput.vue
+++ b/src/views/_sila/Power/Dynamic/VoltOutput.vue
@@ -62,7 +62,13 @@
           </b-col>
         </b-row>
       </b-form>
+      <b-col v-if="isNoData" class="chart-no-data">
+        <span>
+          {{ $t('global.table.emptyMessage') }}
+        </span>
+      </b-col>
       <chart
+        v-else
         type="voltage-output"
         :time-scale="timeScale"
         :data="filteredItems"
@@ -148,6 +154,7 @@ export default {
       critical: null,
       isBusy: false,
       opened: false,
+      isNoData: false,
       fields: [
         {
           key: 'name',
@@ -325,6 +332,9 @@ export default {
       this.isBusy = false;
       this.$store.commit('powerSupply/setIsLoadingVol', false);
       this.$root.$emit('psu-volt-output', false);
+      if (this.filteredItems.length === 0) {
+        this.isNoData = true;
+      }
     },
   },
 };
-- 
cgit v1.2.3

