diff options
Diffstat (limited to 'frontend/src/components/experiments')
3 files changed, 0 insertions, 112 deletions
diff --git a/frontend/src/components/experiments/ExperimentListComponent.js b/frontend/src/components/experiments/ExperimentListComponent.js deleted file mode 100644 index 3c53fc94..00000000 --- a/frontend/src/components/experiments/ExperimentListComponent.js +++ /dev/null @@ -1,59 +0,0 @@ -import PropTypes from 'prop-types' -import React from 'react' -import ExperimentRowContainer from '../../containers/experiments/ExperimentRowContainer' - -const ExperimentListComponent = ({ experimentIds, loading }) => { - let alert - - if (loading) { - alert = ( - <div className="alert alert-success"> - <span className="fa fa-refresh fa-spin mr-2"/> - <strong>Loading Experiments...</strong> - </div> - ) - } else if (experimentIds.length === 0 && !loading) { - alert = ( - <div className="alert alert-info"> - <span className="fa fa-question-circle mr-2"/> - <strong>No experiments here yet...</strong> Add some with the button - below! - </div> - ) - } - - return ( - <div className="vertically-expanding-container"> - {alert ? ( - alert - ) : ( - <table className="table table-striped"> - <thead> - <tr> - <th>Name</th> - <th>Topology</th> - <th>Trace</th> - <th>Scheduler</th> - <th/> - </tr> - </thead> - <tbody> - {experimentIds.map(experimentId => ( - <ExperimentRowContainer - experimentId={experimentId} - key={experimentId} - /> - ))} - </tbody> - </table> - )} - </div> - ) -} - -ExperimentListComponent.propTypes = { - experimentIds: PropTypes.arrayOf(PropTypes.string).isRequired, - loading: PropTypes.bool, -} - -export default ExperimentListComponent diff --git a/frontend/src/components/experiments/ExperimentRowComponent.js b/frontend/src/components/experiments/ExperimentRowComponent.js deleted file mode 100644 index c6ae1ba4..00000000 --- a/frontend/src/components/experiments/ExperimentRowComponent.js +++ /dev/null @@ -1,36 +0,0 @@ -import PropTypes from 'prop-types' -import React from 'react' -import { Link } from 'react-router-dom' -import Shapes from '../../shapes/index' - -const ExperimentRowComponent = ({ experiment, projectId, onDelete }) => ( - <tr> - <td className="pt-3">{experiment.name}</td> - <td className="pt-3">{experiment.topology.name}</td> - <td className="pt-3">{experiment.trace.name}</td> - <td className="pt-3">{experiment.scheduler.name}</td> - <td className="text-right"> - <Link - to={'/projects/' + projectId + '/experiments/' + experiment._id} - className="btn btn-outline-primary btn-sm mr-2" - title="Open this experiment" - > - <span className="fa fa-play"/> - </Link> - <div - className="btn btn-outline-danger btn-sm" - title="Delete this experiment" - onClick={() => onDelete(experiment._id)} - > - <span className="fa fa-trash"/> - </div> - </td> - </tr> -) - -ExperimentRowComponent.propTypes = { - experiment: Shapes.Experiment.isRequired, - projectId: PropTypes.string.isRequired, -} - -export default ExperimentRowComponent diff --git a/frontend/src/components/experiments/NewExperimentButtonComponent.js b/frontend/src/components/experiments/NewExperimentButtonComponent.js deleted file mode 100644 index 2902825d..00000000 --- a/frontend/src/components/experiments/NewExperimentButtonComponent.js +++ /dev/null @@ -1,17 +0,0 @@ -import PropTypes from 'prop-types' -import React from 'react' - -const NewExperimentButtonComponent = ({ onClick }) => ( - <div className="bottom-btn-container"> - <div className="btn btn-primary float-right" onClick={onClick}> - <span className="fa fa-plus mr-2"/> - New Experiment - </div> - </div> -) - -NewExperimentButtonComponent.propTypes = { - onClick: PropTypes.func.isRequired, -} - -export default NewExperimentButtonComponent |
