diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-04 10:49:11 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-04 10:49:11 +0300 |
commit | a1609142e4f59a1e731ab6472792d3cfe6014f40 (patch) | |
tree | 7cafee26e71162e2c3d330dbf3a15a31dd69cc74 /src/views | |
parent | e566e7aa1974b43174f1e8b2be0f9a8128b60881 (diff) | |
download | webui-vue-a1609142e4f59a1e731ab6472792d3cfe6014f40.tar.xz |
fixs for sensors
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/Fans/StaticInformation/FansStaticPage.vue | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/views/Fans/StaticInformation/FansStaticPage.vue b/src/views/Fans/StaticInformation/FansStaticPage.vue index ba312384..56a5c183 100644 --- a/src/views/Fans/StaticInformation/FansStaticPage.vue +++ b/src/views/Fans/StaticInformation/FansStaticPage.vue @@ -30,7 +30,7 @@ </div> </template> <template #cell(currentValue)="data"> - {{ data.value }} {{ data.item.units }} + {{ data.value }} </template> </b-table> </page-section> @@ -115,7 +115,22 @@ export default { computed: { allSensors() { - return this.$store.getters['sensors/sensors']; + let sensors = this.$store.getters['sensors/sensors']; + if (this.isSensorsExist) { + sensors.forEach((sensor) => { + sensor.type = sensor.name.toLowerCase().includes('cpu') + ? this.$t('tablesDescription.cpu') + : this.$t('tablesDescription.system'); + }); + } + return sensors; + }, + + isSensorsExist() { + return ( + this.$store.getters['sensors/sensors'] && + this.$store.getters['sensors/sensors'].length > 0 + ); }, filteredSensors() { |