feat(web-app): control wrong multiselect input

- handle wraong multiselect input with a text which says "No data to
display"
This commit is contained in:
fastium
2025-06-14 17:08:23 +02:00
parent bd503d5641
commit 83008b42af
2 changed files with 11 additions and 7 deletions

View File

@@ -1,7 +1,6 @@
import { Prop } from "vue";
import { Serie } from "./Serie";
import { HttpClient } from "../Services/HttpClient";
import { TEMPERATURE, HUMIDITY, TYPE, VALUE } from "../const";
import { TEMPERATURE, HUMIDITY, TYPE } from "../const";
import { ref } from "vue";
export class TimeSeriesManager {
@@ -57,8 +56,6 @@ export class TimeSeriesManager {
},
];
error = ref(false);
loading = ref("");
series = ref<Serie[]>([]);
@@ -125,12 +122,11 @@ export class TimeSeriesManager {
this.selected_room.room,
this.selected_device.device
);
this.series.value = [temperatureSerie, humiditySerie];
})
.catch((error) => {
console.error("Error fetching time series data:", error);
throw error; // Re-throw to allow calling code to handle it
this.series.value = [];
});
}