/** * File: home.js * Author: Markus Grigull * Date: 02.03.2017 * * 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 . ******************************************************************************/ import React from 'react'; //import { Link } from 'react-router-dom'; //import RestAPI from '../api/rest-api'; import config from '../config'; import UserStore from "../user/user-store"; class Home extends React.Component { constructor(props) { super(props); let currentUser = UserStore.getState().currentUser; this.state = { currentRole: currentUser ? currentUser.role : '', currentUsername: currentUser ? currentUser.username: '', currentUserID: currentUser ? currentUser.id: 0, token: UserStore.getState().token }; } getCounts(type) { if (this.state.hasOwnProperty('counts')) return this.state.counts[type]; else return '?'; } componentWillMount() { //RestAPI.get('/api/v1/counts').then(response => { // this.setState({ counts: response }); //}); } render() { return (
Logo VILLASweb

Home

Welcome to {config.instance}!
VILLASweb is a frontend for distributed real-time simulation hosted by {config.admin.name}.

You are logged in as user {this.state.currentUsername} with ID {this.state.currentUserID} and role {this.state.currentRole}.

{/*

This instance is hosting {this.getCounts('projects')} projects consisting of {this.getCounts('simulators')} simulators, {this.getCounts('dashboards')} dashboards and {this.getCounts('simulations')} simulations. A total of {this.getCounts('users')} users are 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

  • Urban Energy Lab 4.0 a project funded by OP EFRE NRW (European Regional Development Fund) for the setup of a novel energy research infrastructure.
  • 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.
Logo EU Logo EU Logo UEL OP EFRE NRW Logo UEL Logo ACS { //Logo JARA }
); } } export default Home;