From b4bdf9fde013bb7ff9579693b64ff575f7b00e44 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Tue, 7 Jul 2020 09:55:10 +0200 Subject: Rename simulations to projects and remove experiment view --- frontend/src/pages/Experiments.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'frontend/src/pages/Experiments.js') diff --git a/frontend/src/pages/Experiments.js b/frontend/src/pages/Experiments.js index 43bd15be..66362299 100644 --- a/frontend/src/pages/Experiments.js +++ b/frontend/src/pages/Experiments.js @@ -2,8 +2,8 @@ import PropTypes from 'prop-types' import React from 'react' import DocumentTitle from 'react-document-title' import { connect } from 'react-redux' -import { fetchExperimentsOfSimulation } from '../actions/experiments' -import { openSimulationSucceeded } from '../actions/simulations' +import { fetchExperimentsOfProject } from '../actions/experiments' +import { openProjectSucceeded } from '../actions/projects' import AppNavbar from '../components/navigation/AppNavbar' import ExperimentListContainer from '../containers/experiments/ExperimentListContainer' import NewExperimentButtonContainer from '../containers/experiments/NewExperimentButtonContainer' @@ -11,31 +11,31 @@ import NewExperimentModal from '../containers/modals/NewExperimentModal' class ExperimentsComponent extends React.Component { static propTypes = { - simulationId: PropTypes.string.isRequired, - simulationName: PropTypes.string, + projectId: PropTypes.string.isRequired, + projectName: PropTypes.string, } componentDidMount() { - this.props.storeSimulationId(this.props.simulationId) - this.props.fetchExperimentsOfSimulation(this.props.simulationId) + this.props.storeProjectId(this.props.projectId) + this.props.fetchExperimentsOfProject(this.props.projectId) } render() { return (
- +
- - + +
- +
) @@ -43,20 +43,20 @@ class ExperimentsComponent extends React.Component { } const mapStateToProps = (state) => { - let simulationName = undefined - if (state.currentSimulationId !== '-1' && state.objects.simulation[state.currentSimulationId]) { - simulationName = state.objects.simulation[state.currentSimulationId].name + let projectName = undefined + if (state.currentProjectId !== '-1' && state.objects.project[state.currentProjectId]) { + projectName = state.objects.project[state.currentProjectId].name } return { - simulationName, + projectName, } } const mapDispatchToProps = (dispatch) => { return { - storeSimulationId: (id) => dispatch(openSimulationSucceeded(id)), - fetchExperimentsOfSimulation: (id) => dispatch(fetchExperimentsOfSimulation(id)), + storeProjectId: (id) => dispatch(openProjectSucceeded(id)), + fetchExperimentsOfProject: (id) => dispatch(fetchExperimentsOfProject(id)), } } -- cgit v1.2.3