From 4f098d00c72731ecb5fe2871318331e5ebfa9ede Mon Sep 17 00:00:00 2001
From: Steffen Vogel
Date: Wed, 23 Aug 2017 18:32:08 +0200
Subject: [PATCH] first draft of welcome message
missing:
- test of stores
- images
---
src/containers/home.js | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/src/containers/home.js b/src/containers/home.js
index 22e6782..d04525c 100644
--- a/src/containers/home.js
+++ b/src/containers/home.js
@@ -24,6 +24,7 @@ import { Container } from 'flux/utils';
// import AppDispatcher from '../app-dispatcher';
import VillasStore from '../stores/villas-store';
+import UserStore from '../stores/users-store';
class Home extends Component {
static getStores() {
@@ -32,13 +33,41 @@ class Home extends Component {
static calculateState() {
return {
- villas: VillasStore.getState()
+ villas: VillasStore.getState(),
+ currentUser: UserStore.getState().currentUser
+ counts: {
+ users: UserStore.getState().users.length
};
}
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.
+
+
+
);
}
}