diff options
author | Maksim Zakharov <m.zakharov@IBS.RU> | 2022-10-19 14:57:21 +0300 |
---|---|---|
committer | Maksim Zakharov <m.zakharov@IBS.RU> | 2022-10-19 14:57:21 +0300 |
commit | 3e93647fe333862abe0fad5951f8738e2e1efd2f (patch) | |
tree | f5ffc1f35d5ec49dc243016f73b4afe9093d361f /src/views/_sila/Power/Dynamic | |
parent | dbcdb2075fecc350c6c9f97735b2cdd9105ada6a (diff) | |
download | webui-vue-3e93647fe333862abe0fad5951f8738e2e1efd2f.tar.xz |
fix charts
Diffstat (limited to 'src/views/_sila/Power/Dynamic')
-rw-r--r-- | src/views/_sila/Power/Dynamic/CurrentInput.vue | 10 | ||||
-rw-r--r-- | src/views/_sila/Power/Dynamic/CurrentOutput.vue | 10 | ||||
-rw-r--r-- | src/views/_sila/Power/Dynamic/PowerInput.vue | 10 | ||||
-rw-r--r-- | src/views/_sila/Power/Dynamic/PowerOutput.vue | 12 | ||||
-rw-r--r-- | src/views/_sila/Power/Dynamic/PowerTemp.vue | 10 | ||||
-rw-r--r-- | src/views/_sila/Power/Dynamic/VoltInput.vue | 10 | ||||
-rw-r--r-- | src/views/_sila/Power/Dynamic/VoltOutput.vue | 10 |
7 files changed, 72 insertions, 0 deletions
diff --git a/src/views/_sila/Power/Dynamic/CurrentInput.vue b/src/views/_sila/Power/Dynamic/CurrentInput.vue index 34e2c166..8b6cc85f 100644 --- a/src/views/_sila/Power/Dynamic/CurrentInput.vue +++ b/src/views/_sila/Power/Dynamic/CurrentInput.vue @@ -36,7 +36,13 @@ </b-button> </b-col> </b-row> --> + <b-col v-if="isNoData" class="chart-no-data"> + <span> + {{ $t('global.table.emptyMessage') }} + </span> + </b-col> <chart + v-else type="current" :time-scale="timeScale" :data="filteredItems" @@ -109,6 +115,7 @@ export default { shutdown: Infinity, isBusy: true, opened: false, + isNoData: false, fields: [ { key: 'name', @@ -189,6 +196,9 @@ export default { this.$root.$emit('psu-current-output', false); this.isBusy = false; this.endLoader(); + if (this.filteredItems.length === 0) { + this.isNoData = true; + } }); }, }, diff --git a/src/views/_sila/Power/Dynamic/CurrentOutput.vue b/src/views/_sila/Power/Dynamic/CurrentOutput.vue index a51c1fe6..fb6c9e5f 100644 --- a/src/views/_sila/Power/Dynamic/CurrentOutput.vue +++ b/src/views/_sila/Power/Dynamic/CurrentOutput.vue @@ -36,7 +36,13 @@ </b-button> </b-col> </b-row> --> + <b-col v-if="isNoData" class="chart-no-data"> + <span> + {{ $t('global.table.emptyMessage') }} + </span> + </b-col> <chart + v-else type="current" :time-scale="timeScale" :data="filteredItems" @@ -109,6 +115,7 @@ export default { shutdown: Infinity, isBusy: true, opened: false, + isNoData: false, fields: [ { key: 'name', @@ -193,6 +200,9 @@ export default { this.$root.$emit('psu-current-output', false); this.isBusy = false; this.endLoader(); + if (this.filteredItems.length === 0) { + this.isNoData = true; + } }); }, }, diff --git a/src/views/_sila/Power/Dynamic/PowerInput.vue b/src/views/_sila/Power/Dynamic/PowerInput.vue index bfbf9953..b9ac07d1 100644 --- a/src/views/_sila/Power/Dynamic/PowerInput.vue +++ b/src/views/_sila/Power/Dynamic/PowerInput.vue @@ -36,7 +36,13 @@ </b-button> </b-col> </b-row> --> + <b-col v-if="isNoData" class="chart-no-data"> + <span> + {{ $t('global.table.emptyMessage') }} + </span> + </b-col> <chart + v-else type="psu-power" :time-scale="timeScale" :data="filteredItems" @@ -108,6 +114,7 @@ export default { shutdown: Infinity, isBusy: true, opened: false, + isNoData: false, fields: [ { key: 'name', @@ -190,6 +197,9 @@ export default { this.$root.$emit('psu-power-input', false); this.isBusy = false; this.endLoader(); + if (this.filteredItems.length === 0) { + this.isNoData = true; + } }); }, }, diff --git a/src/views/_sila/Power/Dynamic/PowerOutput.vue b/src/views/_sila/Power/Dynamic/PowerOutput.vue index 842cdd59..977c3b6e 100644 --- a/src/views/_sila/Power/Dynamic/PowerOutput.vue +++ b/src/views/_sila/Power/Dynamic/PowerOutput.vue @@ -36,7 +36,13 @@ </b-button> </b-col> </b-row> --> + <b-col v-if="isNoData" class="chart-no-data"> + <span> + {{ $t('global.table.emptyMessage') }} + </span> + </b-col> <chart + v-else type="psu-power" :time-scale="timeScale" :data="filteredItems" @@ -108,6 +114,7 @@ export default { shutdown: Infinity, isBusy: true, opened: false, + isNoData: false, fields: [ { key: 'name', @@ -193,6 +200,11 @@ export default { this.$root.$emit('psu-power-output', false); this.isBusy = false; this.endLoader(); + this.$nextTick(() => { + if (this.filteredItems.length === 0) { + this.isNoData = true; + } + }); }); }, }, diff --git a/src/views/_sila/Power/Dynamic/PowerTemp.vue b/src/views/_sila/Power/Dynamic/PowerTemp.vue index c2d2217e..06784dc6 100644 --- a/src/views/_sila/Power/Dynamic/PowerTemp.vue +++ b/src/views/_sila/Power/Dynamic/PowerTemp.vue @@ -64,7 +64,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="processors" :time-scale="timeScale" :data="allSensors" @@ -148,6 +154,7 @@ export default { critical: null, isBusy: false, opened: false, + isNoData: false, fields: [ { key: 'name', @@ -311,6 +318,9 @@ export default { this.endLoader(); this.isBusy = false; this.$root.$emit('psu-temp', false); + if (this.allSensors.length === 0) { + this.isNoData = true; + } }, }, }; diff --git a/src/views/_sila/Power/Dynamic/VoltInput.vue b/src/views/_sila/Power/Dynamic/VoltInput.vue index b8d21e36..172b2115 100644 --- a/src/views/_sila/Power/Dynamic/VoltInput.vue +++ b/src/views/_sila/Power/Dynamic/VoltInput.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-input" :time-scale="timeScale" :data="filteredItems" @@ -148,6 +154,7 @@ export default { critical: null, isBusy: false, opened: false, + isNoData: false, fields: [ { key: 'name', @@ -324,6 +331,9 @@ export default { this.isBusy = false; this.$store.commit('powerSupply/setIsLoadingVol', false); this.$root.$emit('psu-volt-input', false); + if (this.filteredItems.length === 0) { + this.isNoData = true; + } }, }, }; 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; + } }, }, }; |