summaryrefslogtreecommitdiff
path: root/src/views/_sila
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/_sila')
-rw-r--r--src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue22
-rw-r--r--src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue26
-rw-r--r--src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue24
3 files changed, 51 insertions, 21 deletions
diff --git a/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue b/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue
index f635e307..fb9be306 100644
--- a/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue
+++ b/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue
@@ -57,6 +57,7 @@
<chart
type="memory"
:colors="colors"
+ :time-scale="timeScale"
:data="filteredSensors"
:warning="temperatureWarning"
:non-normal="temperatureNonNormal"
@@ -186,13 +187,13 @@ export default {
},
created() {
- this.loadData();
+ this.loadData('hour');
},
methods: {
switchTimeScale(period) {
this.timeScale = period;
- this.loadData();
+ this.loadData(period);
},
updateTemperature() {
@@ -201,11 +202,18 @@ export default {
this.temperatureCritical = +this.temperatureCriticalInput;
},
- loadData() {
- this.startLoader();
- this.$store.dispatch('memory/getMemoryDynamic').finally(() => {
- this.endLoader();
- });
+ loadData(period) {
+ if (period === 'hour') {
+ this.startLoader();
+ this.$store.dispatch('memory/getMemoryDynamicHour').finally(() => {
+ this.endLoader();
+ });
+ } else {
+ this.startLoader();
+ this.$store.dispatch('memory/getMemoryDynamic').finally(() => {
+ this.endLoader();
+ });
+ }
},
},
};
diff --git a/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue
index 343988f1..d04e32cf 100644
--- a/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue
+++ b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue
@@ -34,6 +34,7 @@
<b-col class="pl-4 pr-4">
<chart
type="motherboard"
+ :time-scale="timeScale"
:colors="colors"
:data="filteredSensors"
:warning="temperatureWarning"
@@ -161,13 +162,13 @@ export default {
},
created() {
- this.loadData();
+ this.loadData('hour');
},
methods: {
switchTimeScale(period) {
this.timeScale = period;
- this.loadData();
+ this.loadData(period);
},
updateTemperature() {
@@ -176,11 +177,22 @@ export default {
this.temperatureCritical = +this.temperatureCriticalInput;
},
- loadData() {
- this.startLoader();
- this.$store.dispatch('motherboard/getMotherboardDynamic').finally(() => {
- this.endLoader();
- });
+ loadData(period) {
+ if (period === 'hour') {
+ this.startLoader();
+ this.$store
+ .dispatch('motherboard/getMotherboardDynamicHour')
+ .finally(() => {
+ this.endLoader();
+ });
+ } else {
+ this.startLoader();
+ this.$store
+ .dispatch('motherboard/getMotherboardDynamic')
+ .finally(() => {
+ this.endLoader();
+ });
+ }
},
},
};
diff --git a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue
index de3c3480..45ef53f6 100644
--- a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue
+++ b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue
@@ -60,6 +60,7 @@
</b-row>
<chart
type="processors"
+ :time-scale="timeScale"
:data="filteredSensors"
:colors="colors"
:warning="temperatureWarning"
@@ -195,13 +196,13 @@ export default {
},
},
created() {
- this.loadData();
+ this.loadData('hour');
},
methods: {
switchTimeScale(period) {
this.timeScale = period;
- this.loadData();
+ this.loadData(period);
},
updateTemperature() {
@@ -210,11 +211,20 @@ export default {
this.temperatureCritical = +this.temperatureCriticalInput;
},
- loadData() {
- this.startLoader();
- this.$store.dispatch('processors/getProcessorsDynamic').finally(() => {
- this.endLoader();
- });
+ loadData(period) {
+ if (period === 'hour') {
+ this.startLoader();
+ this.$store
+ .dispatch('processors/getProcessorsDynamicHour')
+ .finally(() => {
+ this.endLoader();
+ });
+ } else {
+ this.startLoader();
+ this.$store.dispatch('processors/getProcessorsDynamic').finally(() => {
+ this.endLoader();
+ });
+ }
},
},
};