diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-06 10:59:45 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-06 10:59:45 +0300 |
commit | 257b9b29b1c5ffb608b015bd780d1491de99bff6 (patch) | |
tree | 9a6fda42c529f62103156828ff6c519161842e5d /src/views | |
parent | da090728003de7cf409d9df97b6bbbd5e672b444 (diff) | |
download | webui-vue-257b9b29b1c5ffb608b015bd780d1491de99bff6.tar.xz |
add dynamic info for motherboard
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/Motherboard/DynamicInfo/MotherboardDynamicPage.vue | 21 | ||||
-rw-r--r-- | src/views/Motherboard/DynamicInfo/helpers.js | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/views/Motherboard/DynamicInfo/MotherboardDynamicPage.vue b/src/views/Motherboard/DynamicInfo/MotherboardDynamicPage.vue index e50bc399..cb937ce3 100644 --- a/src/views/Motherboard/DynamicInfo/MotherboardDynamicPage.vue +++ b/src/views/Motherboard/DynamicInfo/MotherboardDynamicPage.vue @@ -45,6 +45,8 @@ import TemperatureTable from './TemperatureTable'; import AccessoryTable from '@/components/Global/SilaComponents/Tables/AccessoryTableWithLabel'; import iconChevronUp from '@carbon/icons-vue/es/chevron--up/16'; +import TableFilterMixin from '@/components/Mixins/TableFilterMixin'; + import { AccessoryData } from './helpers'; export default { @@ -54,16 +56,35 @@ export default { TemperatureTable, AccessoryTable, }, + mixins: [TableFilterMixin], data() { return { + isBusy: true, timeScale: 'hour', temperatureWarning: 72, temperatureWarningInput: 72, notificationInput: 42, accessoryData: AccessoryData, iconChevronUp: iconChevronUp, + activeFilters: [], }; }, + + computed: { + allSensors() { + let sensors = this.$store.getters['sensors/tempSensors']; + return sensors; + }, + }, + created() { + this.$store.dispatch('sensors/getTempSensors').finally(() => { + this.accessoryData.temperatureTable.items = this.getFilteredTableData( + this.allSensors, + this.activeFilters + ); + this.isBusy = false; + }); + }, methods: { switchTimeScale(period) { this.timeScale = period; diff --git a/src/views/Motherboard/DynamicInfo/helpers.js b/src/views/Motherboard/DynamicInfo/helpers.js index 807de83a..157c5ffe 100644 --- a/src/views/Motherboard/DynamicInfo/helpers.js +++ b/src/views/Motherboard/DynamicInfo/helpers.js @@ -431,7 +431,7 @@ export const AccessoryData = { tdClass: 'bootstrap-fans-table__td light-12px', }, { - key: 'currentTemperature', + key: 'currentValue', label: 'Текущее, С°', thClass: 'bootstrap-fans-table__th semi-bold-12px', tdClass: 'bootstrap-fans-table__td light-12px', |