2017-03-02 12:47:52 +01:00
|
|
|
/**
|
|
|
|
* File: router.js
|
|
|
|
* Author: Markus Grigull <mgrigull@eonerc.rwth-aachen.de>
|
|
|
|
* Date: 02.03.2017
|
|
|
|
* Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
|
|
|
|
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
|
|
|
|
* Unauthorized copying of this file, via any medium is strictly prohibited.
|
|
|
|
**********************************************************************************/
|
|
|
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { Router, Route, hashHistory } from 'react-router';
|
|
|
|
|
|
|
|
import App from './containers/app';
|
|
|
|
import Home from './containers/home';
|
|
|
|
import Projects from './containers/projects';
|
2017-03-08 12:54:21 +01:00
|
|
|
import Project from './containers/project';
|
2017-03-02 12:47:52 +01:00
|
|
|
import Simulators from './containers/simulators';
|
2017-03-03 13:21:25 +01:00
|
|
|
import Visualization from './containers/visualization';
|
2017-03-06 22:01:33 +01:00
|
|
|
import Simulations from './containers/simulations';
|
|
|
|
import Simulation from './containers/simulation';
|
2017-03-02 12:47:52 +01:00
|
|
|
|
|
|
|
class Root extends Component {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Router history={hashHistory}>
|
|
|
|
<Route path='/' component={App}>
|
|
|
|
<Route path='/home' component={Home} />
|
2017-03-08 12:54:21 +01:00
|
|
|
|
2017-03-02 12:47:52 +01:00
|
|
|
<Route path='/projects' component={Projects} />
|
2017-03-08 12:54:21 +01:00
|
|
|
<Route path='/projects/:project' component={Project} />
|
|
|
|
|
2017-03-02 12:47:52 +01:00
|
|
|
<Route path='/simulators' component={Simulators} />
|
2017-03-03 13:21:25 +01:00
|
|
|
|
|
|
|
<Route path='/visualizations/:visualization' component={Visualization} />
|
2017-03-06 22:01:33 +01:00
|
|
|
|
|
|
|
<Route path='/simulations' component={Simulations} />
|
|
|
|
<Route path='/simulations/:simulation' component={Simulation} />
|
2017-03-02 12:47:52 +01:00
|
|
|
</Route>
|
|
|
|
</Router>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Root;
|