mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Merge commit 'c31f6ea42cd46de026fad473008b897ed1ce404b' into additional-widgets
This commit is contained in:
commit
21029dda2b
5 changed files with 61 additions and 7 deletions
36
README.md
36
README.md
|
@ -1,4 +1,4 @@
|
|||
# VILLASweb
|
||||
# <img src="doc/pictures/villas_web.png" width=40 /> VILLASweb
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -22,3 +22,37 @@ Additional libraries are used, for a complete list see package.json.
|
|||
|
||||
To start the website locally run `npm start`. This will open a local webserver serving the _frontend_. To make the website work, you still need to start at least the VILLASweb-backend (See repository for information).
|
||||
|
||||
## Copyright
|
||||
|
||||
2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
|
||||
## License
|
||||
|
||||
This project is released under the terms of the [GPL version 3](COPYING.md).
|
||||
|
||||
```
|
||||
This program 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
|
||||
any later version.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
```
|
||||
|
||||
For other licensing options please consult [Prof. Antonello Monti](mailto:amonti@eonerc.rwth-aachen.de).
|
||||
|
||||
## Contact
|
||||
|
||||
[](http://www.acs.eonerc.rwth-aachen.de)
|
||||
|
||||
- Markus Grigull <mgrigull@eonerc.rwth-aachen.de>
|
||||
|
||||
[Institute for Automation of Complex Power Systems (ACS)](http://www.acs.eonerc.rwth-aachen.de)
|
||||
[EON Energy Research Center (EONERC)](http://www.eonerc.rwth-aachen.de)
|
||||
[RWTH University Aachen, Germany](http://www.rwth-aachen.de)
|
BIN
doc/pictures/eonerc_logo.png
Normal file
BIN
doc/pictures/eonerc_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
@ -20,8 +20,30 @@ class SimulatorStore extends ArrayStore {
|
|||
var simulator;
|
||||
|
||||
switch (action.type) {
|
||||
|
||||
case 'simulators/added':
|
||||
SimulatorsDataManager.startRunningDetection(action.data);
|
||||
|
||||
return super.reduce(state, action);
|
||||
|
||||
case 'simulators/removed':
|
||||
SimulatorsDataManager.stopRunningDetection(action.original);
|
||||
|
||||
return super.reduce(state, action);
|
||||
|
||||
case 'simulators/start-edit':
|
||||
// An update will be requested, stop the 'runningDetection' already
|
||||
SimulatorsDataManager.stopRunningDetection(action.data);
|
||||
|
||||
return super.reduce(state, action);
|
||||
|
||||
case 'simulators/edited':
|
||||
// The update was done, resume the 'runningDetection'
|
||||
SimulatorsDataManager.startRunningDetection(action.data);
|
||||
|
||||
return super.reduce(state, action);
|
||||
|
||||
case 'simulators/loaded':
|
||||
//case 'simulators/is-running':
|
||||
// get simulator running state
|
||||
if (Array.isArray(action.data)) {
|
||||
action.data.forEach((simulator) => {
|
||||
|
@ -35,12 +57,10 @@ class SimulatorStore extends ArrayStore {
|
|||
|
||||
case 'simulators/running':
|
||||
// check if simulator running state changed
|
||||
simulator = state.find(element => {
|
||||
return element._id === action.simulator._id;
|
||||
});
|
||||
simulator = state.find(element => element._id === action.simulator._id );
|
||||
|
||||
// only update if state changed
|
||||
if (simulator.running == null || simulator.running !== action.simulator.running) {
|
||||
// is this simulator still in the state? update it only if state changed
|
||||
if (simulator && simulator.running !== action.simulator.running) {
|
||||
state = this.updateElements(state, [ action.simulator ]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue