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:
parent
4ac80aafab
commit
5c4afb686f
1 changed files with 15 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue