mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Fix fetching simulators from nodes
This commit is contained in:
parent
6c608f42e6
commit
060c08b5e3
2 changed files with 13 additions and 2 deletions
|
@ -48,7 +48,7 @@ class NodesDataManager extends RestDataManager {
|
|||
});
|
||||
|
||||
AppDispatcher.dispatch({
|
||||
type: 'nodes/edited',
|
||||
type: 'nodes/simulatorsFetched',
|
||||
data: node
|
||||
});
|
||||
|
||||
|
@ -59,7 +59,7 @@ class NodesDataManager extends RestDataManager {
|
|||
});
|
||||
}).catch(error => {
|
||||
AppDispatcher.dispatch({
|
||||
type: 'nodes/edit-error',
|
||||
type: 'nodes/simulatorsFetch-error',
|
||||
error: error
|
||||
});
|
||||
});
|
||||
|
|
|
@ -41,6 +41,17 @@ class NodeStore extends ArrayStore {
|
|||
|
||||
return super.reduce(state, action);
|
||||
|
||||
case 'nodes/edited':
|
||||
NodesDataManager.getSimulators(action.data);
|
||||
|
||||
return super.reduce(state, action);
|
||||
|
||||
case 'nodes/simulatorsFetched':
|
||||
return this.updateElements(state, [action.data]);
|
||||
|
||||
case 'nodes/simulatorsFetch-error':
|
||||
return state;
|
||||
|
||||
default:
|
||||
return super.reduce(state, action);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue