diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-22 15:47:54 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-22 15:47:54 +0300 |
commit | 5541fa8aa255edda1904631294e7c7ecb6650245 (patch) | |
tree | 11f4e89ea9bdb887a9fe475b52a2e8ed4e70e6d7 /src/views/_sila/Motherboard/Dynamic | |
parent | 1654f7790058017d8e18961b98a8994b162708c4 (diff) | |
parent | b9aa6bae1deeb200791fab52760b70eedfcb04f5 (diff) | |
download | webui-vue-5541fa8aa255edda1904631294e7c7ecb6650245.tar.xz |
merge with dynamic
Diffstat (limited to 'src/views/_sila/Motherboard/Dynamic')
-rw-r--r-- | src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue | 53 | ||||
-rw-r--r-- | src/views/_sila/Motherboard/Dynamic/index.js | 2 |
2 files changed, 55 insertions, 0 deletions
diff --git a/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue new file mode 100644 index 00000000..b4d13f3f --- /dev/null +++ b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue @@ -0,0 +1,53 @@ +<template> + <b-container fluid="xl"> + <page-title :description="$t('appPageTitle.dynamicInformation')" /> + + <chart + type="motherboard" + :data="filteredSensors" + :warning="temperatureWarning" + :non-normal="temperatureNonNormal" + :critical-start="temperatureCriticalStart" + ></chart> + </b-container> +</template> + +<script> +import PageTitle from '@/components/_sila/Global/PageTitle'; +import Chart from '@/components/_sila/Global/Chart'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; + +export default { + components: { PageTitle, Chart }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + data() { + return { + activeFilters: [], + temperatureWarning: 72, + temperatureNonNormal: 44, + temperatureCriticalStart: 55, + }; + }, + + computed: { + allSensors() { + let sensors = this.$store.getters['motherboard/motherboard']; + return sensors; + }, + + filteredSensors() { + return this.getFilteredTableData(this.allSensors, this.activeFilters); + }, + }, + + created() { + this.startLoader(); + this.$store.dispatch('motherboard/getMotherboardDynamic').finally(() => { + this.endLoader(); + }); + }, +}; +</script> diff --git a/src/views/_sila/Motherboard/Dynamic/index.js b/src/views/_sila/Motherboard/Dynamic/index.js new file mode 100644 index 00000000..bd155997 --- /dev/null +++ b/src/views/_sila/Motherboard/Dynamic/index.js @@ -0,0 +1,2 @@ +import MotherboardDynamicPage from './MotherboardDynamicPage.vue'; +export default MotherboardDynamicPage; |