From e808c0494809c9ca0b56747f534d082ba6ad6068 Mon Sep 17 00:00:00 2001
From: Steffen Vogel
Date: Sat, 16 Sep 2017 20:52:35 +0200
Subject: [PATCH] finished home page
---
src/config.js | 9 +-
src/containers/home.js | 88 +++++++----
src/img/eonerc_rwth.svg | 152 ++++++++++++++++++
src/img/european_commission.svg | 272 ++++++++++++++++++++++++++++++++
src/img/jara.svg | 157 ++++++++++++++++++
src/img/villas_web.svg | 158 +++++++++++++++++++
src/styles/app.css | 13 ++
7 files changed, 815 insertions(+), 34 deletions(-)
create mode 100644 src/img/eonerc_rwth.svg
create mode 100644 src/img/european_commission.svg
create mode 100644 src/img/jara.svg
create mode 100644 src/img/villas_web.svg
diff --git a/src/config.js b/src/config.js
index 4ade8ce..4054518 100644
--- a/src/config.js
+++ b/src/config.js
@@ -1,6 +1,11 @@
const config = {
- publicPathBase: 'public/'
+ publicPathBase: 'public/',
+ instance: 'frontend of the Global RT-SuperLab Demonstration',
+ admin: {
+ name: 'Steffen Vogel',
+ mail: 'stvogel@eonerc.rwth-aachen.de'
+ }
}
-export default config
\ No newline at end of file
+export default config
diff --git a/src/containers/home.js b/src/containers/home.js
index 64dabd3..c365f0f 100644
--- a/src/containers/home.js
+++ b/src/containers/home.js
@@ -22,50 +22,74 @@
import React, { Component } from 'react';
import { Container } from 'flux/utils';
-// import AppDispatcher from '../app-dispatcher';
-import UserStore from '../stores/users-store';
+import AppDispatcher from '../app-dispatcher';
+
+import NodeStore from '../stores/node-store';
+import SimulationStore from '../stores/simulation-store';
+import ProjectStore from '../stores/project-store';
+
+import config from '../config';
class Home extends Component {
static getStores() {
- return [ UserStore ];
+ return [ NodeStore, SimulationStore, ProjectStore ];
}
static calculateState() {
return {
- currentUser: UserStore.getState().currentUser
- counts: {
- users: UserStore.getState().users.length
+ nodes: NodeStore.getState(),
+ projects: ProjectStore.getState(),
+ simulations: SimulationStore.getState(),
};
}
+ componentWillMount() {
+ AppDispatcher.dispatch({
+ type: 'projects/start-load',
+ token: this.state.sessionToken
+ });
+
+ AppDispatcher.dispatch({
+ type: 'simulations/start-load',
+ token: this.state.sessionToken
+ });
+ }
+
render() {
return (
- Home
- Welcome {this.state.currentUser}! This is the VILLASweb frontend version [version] hosted by [admin].
- This instance is hosting {this.state.counts.projects} projects consisting of {this.state.counts.nodes} nodes, {this.state.counts.simulations} simulations and {this.state.counts.visualizations} visualisations.
-
There are currently {this.state.counts.users} users registered.
- Credits
- VILLASweb is developed by the Institute for Automation of Complex Power Systems at the RWTH Aachen University.
-
-
- Links
-
- Funding
- The development of VILLASframework projects have received funding from
-
- RESERVE a European Union’s Horizon 2020 research and innovation programme under grant agreement No 727481
- JARA-ENERGY . Jülich-Aachen Research Alliance (JARA) is an initiative of RWTH Aachen University and Forschungszentrum Jülich.
-
-
-
+
+
+
Home
+
+ Welcome to {config.instance} !
+ VILLASweb is a frontend for distributed real-time simulation hosted by {config.admin.name} .
+
+
+ This instance is hosting {this.state.projects.length} projects consisting of {this.state.nodes.length} nodes and {this.state.simulations.length} simulations.
+
+
Credits
+
VILLASweb is developed by the Institute for Automation of Complex Power Systems at the RWTH Aachen University .
+
+
Links
+
+
Funding
+
The development of VILLASframework projects have received funding from
+
+ RESERVE a European Union’s Horizon 2020 research and innovation programme under grant agreement No 727481
+ JARA-ENERGY . Jülich-Aachen Research Alliance (JARA) is an initiative of RWTH Aachen University and Forschungszentrum Jülich.
+
+
+
+
+
);
}
}
diff --git a/src/img/eonerc_rwth.svg b/src/img/eonerc_rwth.svg
new file mode 100644
index 0000000..42c4c3f
--- /dev/null
+++ b/src/img/eonerc_rwth.svg
@@ -0,0 +1,152 @@
+
+
+
+image/svg+xml
\ No newline at end of file
diff --git a/src/img/european_commission.svg b/src/img/european_commission.svg
new file mode 100644
index 0000000..5bf4867
--- /dev/null
+++ b/src/img/european_commission.svg
@@ -0,0 +1,272 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/img/jara.svg b/src/img/jara.svg
new file mode 100644
index 0000000..2f3f0d6
--- /dev/null
+++ b/src/img/jara.svg
@@ -0,0 +1,157 @@
+
+
+
+image/svg+xml
\ No newline at end of file
diff --git a/src/img/villas_web.svg b/src/img/villas_web.svg
new file mode 100644
index 0000000..ccbc714
--- /dev/null
+++ b/src/img/villas_web.svg
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/styles/app.css b/src/styles/app.css
index f01e3a6..18caa91 100644
--- a/src/styles/app.css
+++ b/src/styles/app.css
@@ -197,6 +197,19 @@ body {
text-decoration: none;
color: #f1f1f1;
}
+
+/**
+ * Home page
+ */
+.home-container > ul {
+ margin-left: 2em;
+}
+
+.home-container > img {
+ margin: 20px;
+}
+
+
/**
* Login form
*/