diff options
Diffstat (limited to 'src/views/Motherboard/DynamicInfo/MotherboardDynamicPage.vue')
-rw-r--r-- | src/views/Motherboard/DynamicInfo/MotherboardDynamicPage.vue | 21 |
1 files changed, 21 insertions, 0 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; |