diff options
| author | jc0b <j@jc0b.computer> | 2020-07-10 15:18:49 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:02 +0200 |
| commit | d8479e7e3744b8d1d31ac4d9f972e560eacd2cf8 (patch) | |
| tree | 79b7dfccec6e3cc1fce189b4605a37b354d676a2 /frontend/src/components/experiments/ExperimentListComponent.js | |
| parent | 4befa57993831274ad7e6ca62f96aa582f81cc5d (diff) | |
| parent | 3b4e27320c479bd6ef48998f448ed070e8bd7511 (diff) | |
Merge branch 'master' of github.com:atlarge-research/opendc-dev
Diffstat (limited to 'frontend/src/components/experiments/ExperimentListComponent.js')
| -rw-r--r-- | frontend/src/components/experiments/ExperimentListComponent.js | 59 |
1 files changed, 0 insertions, 59 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 |
