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

get results from backend

This commit is contained in:
irismarie 2021-01-15 16:35:24 +01:00
parent 971fe750fa
commit 374e1d09f1
3 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,33 @@
/**
* This file is part of VILLASweb.
*
* VILLASweb is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VILLASweb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VILLASweb. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
import ArrayStore from '../common/array-store';
import ResultsDataManager from './results-data-manager';
class ResultStore extends ArrayStore {
constructor() {
super('results', ResultsDataManager);
}
reduce(state, action) {
return super.reduce(state, action);
}
}
export default new ResultStore();

View file

@ -0,0 +1,29 @@
/**
* This file is part of VILLASweb.
*
* VILLASweb is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VILLASweb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VILLASweb. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
import RestDataManager from '../common/data-managers/rest-data-manager';
class ResultsDataManager extends RestDataManager{
constructor() {
super('result', '/results');
}
}
export default new ResultsDataManager()

View file

@ -108,6 +108,12 @@ class ScenariosDataManager extends RestDataManager {
token: token,
param: '?scenarioID=' + scenario.id,
});
AppDispatcher.dispatch({
type: 'results/start-load',
token: token,
param: '?scenarioID=' + scenario.id
})
}
}
}