diff options
| author | jc0b <j@jc0b.computer> | 2020-07-22 16:28:47 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:21 +0200 |
| commit | d7469b9ebb01cf36a78cc98aab31fa8f307c4f65 (patch) | |
| tree | d0535fa0cfe95001302fbd2b0d046d51caab6ffd /frontend/src/components/app/sidebars/project | |
| parent | 67b6ec800df8e023efadb60ae5f7919030b19789 (diff) | |
| parent | 9e7cb3bd367607b32e102c3a87b68b33c53dec46 (diff) | |
Merge branch 'master' onto working copy
Diffstat (limited to 'frontend/src/components/app/sidebars/project')
4 files changed, 43 insertions, 21 deletions
diff --git a/frontend/src/components/app/sidebars/project/PortfolioListComponent.js b/frontend/src/components/app/sidebars/project/PortfolioListComponent.js index a31f11cf..b000b9e2 100644 --- a/frontend/src/components/app/sidebars/project/PortfolioListComponent.js +++ b/frontend/src/components/app/sidebars/project/PortfolioListComponent.js @@ -24,8 +24,11 @@ class PortfolioListComponent extends React.Component { <div className="pb-3"> <h2> Portfolios - <button className="btn btn-outline-primary float-right" onClick={this.props.onNewPortfolio.bind(this)}> - <FontAwesome name="plus"/> + <button + className="btn btn-outline-primary float-right" + onClick={this.props.onNewPortfolio.bind(this)} + > + <FontAwesome name="plus" /> </button> </h2> @@ -33,10 +36,14 @@ class PortfolioListComponent extends React.Component { <div key={portfolio._id}> <div className="row mb-1"> <div - className={'col-8 align-self-center ' + (portfolio._id === this.props.currentPortfolioId ? 'font-weight-bold' : '')}> + className={ + 'col-7 align-self-center ' + + (portfolio._id === this.props.currentPortfolioId ? 'font-weight-bold' : '') + } + > {portfolio.name} </div> - <div className="col-4 text-right"> + <div className="col-5 text-right"> <Link className="btn btn-outline-primary mr-1 fa fa-play" to={`/projects/${this.props.currentProjectId}/portfolios/${portfolio._id}`} @@ -48,7 +55,7 @@ class PortfolioListComponent extends React.Component { /> </div> </div> - <ScenarioListContainer portfolioId={portfolio._id}/> + <ScenarioListContainer portfolioId={portfolio._id} /> </div> ))} </div> diff --git a/frontend/src/components/app/sidebars/project/ProjectSidebarComponent.js b/frontend/src/components/app/sidebars/project/ProjectSidebarComponent.js index b21b012b..4789315e 100644 --- a/frontend/src/components/app/sidebars/project/ProjectSidebarComponent.js +++ b/frontend/src/components/app/sidebars/project/ProjectSidebarComponent.js @@ -3,11 +3,13 @@ import Sidebar from '../Sidebar' import TopologyListContainer from '../../../../containers/app/sidebars/project/TopologyListContainer' import PortfolioListContainer from '../../../../containers/app/sidebars/project/PortfolioListContainer' -const ProjectSidebarComponent = ({collapsible}) => ( - <Sidebar isRight={false} collapsible={collapsible}> - <TopologyListContainer/> - <PortfolioListContainer/> - </Sidebar> - ) +const ProjectSidebarComponent = ({ collapsible }) => ( + <Sidebar isRight={false} collapsible={collapsible}> + <div className="h-100 overflow-auto container-fluid"> + <TopologyListContainer /> + <PortfolioListContainer /> + </div> + </Sidebar> +) export default ProjectSidebarComponent diff --git a/frontend/src/components/app/sidebars/project/ScenarioListComponent.js b/frontend/src/components/app/sidebars/project/ScenarioListComponent.js index 9d2e261e..e775a663 100644 --- a/frontend/src/components/app/sidebars/project/ScenarioListComponent.js +++ b/frontend/src/components/app/sidebars/project/ScenarioListComponent.js @@ -24,25 +24,33 @@ class ScenarioListComponent extends React.Component { <> {this.props.scenarios.map((scenario, idx) => ( <div key={scenario._id} className="row mb-1"> - <div className={'col-8 pl-5 align-self-center ' + (scenario._id === this.props.currentScenarioId ? 'font-weight-bold' : '')}> + <div + className={ + 'col-7 pl-5 align-self-center ' + + (scenario._id === this.props.currentScenarioId ? 'font-weight-bold' : '') + } + > {scenario.name} </div> - <div className="col-4 text-right"> + <div className="col-5 text-right"> <Link - className="btn btn-outline-primary mr-1 fa fa-play" + className="btn btn-outline-primary mr-1 fa fa-play disabled" to={`/projects/${this.props.currentProjectId}/portfolios/${scenario.portfolioId}/scenarios/${scenario._id}`} onClick={() => this.props.onChooseScenario(scenario.portfolioId, scenario._id)} /> <span className={'btn btn-outline-danger fa fa-trash ' + (idx === 0 ? 'disabled' : '')} - onClick={() => idx !== 0 ? this.onDelete(scenario._id) : undefined} + onClick={() => (idx !== 0 ? this.onDelete(scenario._id) : undefined)} /> </div> </div> ))} <div className="pl-4 mb-2"> - <div className="btn btn-outline-primary" onClick={() => this.props.onNewScenario(this.props.portfolioId)}> - <FontAwesome name="plus" className="mr-1"/> + <div + className="btn btn-outline-primary" + onClick={() => this.props.onNewScenario(this.props.portfolioId)} + > + <FontAwesome name="plus" className="mr-1" /> New scenario </div> </div> diff --git a/frontend/src/components/app/sidebars/project/TopologyListComponent.js b/frontend/src/components/app/sidebars/project/TopologyListComponent.js index b8b41200..2f42f7e4 100644 --- a/frontend/src/components/app/sidebars/project/TopologyListComponent.js +++ b/frontend/src/components/app/sidebars/project/TopologyListComponent.js @@ -26,23 +26,28 @@ class TopologyListComponent extends React.Component { <h2> Topologies <button className="btn btn-outline-primary float-right" onClick={this.props.onNewTopology}> - <FontAwesome name="plus"/> + <FontAwesome name="plus" /> </button> </h2> {this.props.topologies.map((topology, idx) => ( <div key={topology._id} className="row mb-1"> - <div className={'col-8 align-self-center ' + (topology._id === this.props.currentTopologyId ? 'font-weight-bold' : '')}> + <div + className={ + 'col-7 align-self-center ' + + (topology._id === this.props.currentTopologyId ? 'font-weight-bold' : '') + } + > {topology.name} </div> - <div className="col-4 text-right"> + <div className="col-5 text-right"> <span className="btn btn-outline-primary mr-1 fa fa-play" onClick={() => this.onChoose(topology._id)} /> <span className={'btn btn-outline-danger fa fa-trash ' + (idx === 0 ? 'disabled' : '')} - onClick={() => idx !== 0 ? this.onDelete(topology._id) : undefined} + onClick={() => (idx !== 0 ? this.onDelete(topology._id) : undefined)} /> </div> </div> |
