From e50a43a56988a16cc1be004834ae9dce95dc5777 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Tue, 26 Nov 2019 16:33:57 +0100 Subject: [PATCH] Dashboards are now reachable via scenarios, removed example dashboard --- src/app.js | 3 -- src/common/menu-sidebar.js | 1 - src/dashboard/exdashboard.js | 85 ------------------------------------ 3 files changed, 89 deletions(-) delete mode 100644 src/dashboard/exdashboard.js diff --git a/src/app.js b/src/app.js index cd68009..92bb42c 100644 --- a/src/app.js +++ b/src/app.js @@ -51,7 +51,6 @@ import Scenario from './scenario/scenario'; import SimulationModel from './simulationmodel/simulation-model'; import Users from './user/users'; import User from './user/user'; -import ExDashboard from './dashboard/exdashboard'; import './styles/app.css'; @@ -146,7 +145,6 @@ class App extends React.Component {
- @@ -154,7 +152,6 @@ class App extends React.Component { -
diff --git a/src/common/menu-sidebar.js b/src/common/menu-sidebar.js index be42a68..5f43425 100644 --- a/src/common/menu-sidebar.js +++ b/src/common/menu-sidebar.js @@ -35,7 +35,6 @@ class SidebarMenu extends React.Component {
  • Home
  • Scenarios
  • Simulators
  • -
  • Example Dashboard
  • { this.props.currentRole === 'Admin' ?
  • User Management
  • : '' } diff --git a/src/dashboard/exdashboard.js b/src/dashboard/exdashboard.js deleted file mode 100644 index 21c5615..0000000 --- a/src/dashboard/exdashboard.js +++ /dev/null @@ -1,85 +0,0 @@ -import React, { Component } from 'react'; -import { Container } from 'flux/utils'; -import DashboardStore from './dashboard-store'; -import AppDispatcher from '../common/app-dispatcher'; -import Table from '../common/table'; -import TableColumn from '../common/table-column'; -import UserStore from '../user/user-store'; -import { Button } from 'react-bootstrap'; -import Icon from '../common/icon'; - - - - - - - -class ExDashboard extends Component { - static getStores() { - return [ DashboardStore ]; - } - - static calculateState(prevState, props) { - prevState = prevState || {}; - - console.log("calculateState has been called"); - const dashboards = DashboardStore.getState(); - let tokenState = UserStore.getState().token; - console.log(dashboards); - - return{ - dashboards, - tokenState - } - - } - - componentDidMount() { - AppDispatcher.dispatch({ - type: 'dashboards/start-load', - token: this.state.tokenState, - param: '?scenarioID=1' - }); - } - - loadDash(){ - console.log('bis hierhin gekommen'); - AppDispatcher.dispatch({ - type: 'dashboards/start-load', - token: this.state.tokenState, - param: '?scenarioID=1' - }); - } - - - - render() { - const buttonStyle = { - marginLeft: '10px' - }; - - return ( - -
    - -

    Dashboards

    - - - - - -
    - -
    - -
    -
    - ); - } -} - - - - -let fluxContainerConverter = require('../common/FluxContainerConverter'); -export default Container.create(fluxContainerConverter.convert(ExDashboard));