1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-16 00:00:03 +01:00

store file of all widgets in state of dashboard

This commit is contained in:
Sonja Happ 2020-03-13 17:24:36 +01:00
parent 4ac80aafab
commit 5c4afb686f

View file

@ -78,12 +78,26 @@ class Dashboard extends Component {
// TODO filter signals to the ones belonging to the scenario at hand!
let signals = SignalStore.getState();
// get files of all widgets
let allFiles = FileStore.getState();
let files = [];
let file, widget;
for (file of allFiles){
for (widget of widgets){
if (file.widgetID === widget.id){
files.push(file);
}
}
}
return {
dashboard,
widgets,
signals,
sessionToken: sessionToken,
files: null,
files: files,
editing: prevState.editing || false,
paused: prevState.paused || false,