diff options
Diffstat (limited to 'frontend/src/components/app/sidebars/project')
4 files changed, 37 insertions, 17 deletions
diff --git a/frontend/src/components/app/sidebars/project/PortfolioListComponent.js b/frontend/src/components/app/sidebars/project/PortfolioListComponent.js index a31f11cf..837666af 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,7 +36,11 @@ 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-8 align-self-center ' + + (portfolio._id === this.props.currentPortfolioId ? 'font-weight-bold' : '') + } + > {portfolio.name} </div> <div className="col-4 text-right"> @@ -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..aadc451e 100644 --- a/frontend/src/components/app/sidebars/project/ProjectSidebarComponent.js +++ b/frontend/src/components/app/sidebars/project/ProjectSidebarComponent.js @@ -3,11 +3,11 @@ 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}> + <TopologyListContainer /> + <PortfolioListContainer /> + </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..f44ce77f 100644 --- a/frontend/src/components/app/sidebars/project/ScenarioListComponent.js +++ b/frontend/src/components/app/sidebars/project/ScenarioListComponent.js @@ -24,7 +24,12 @@ 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-8 pl-5 align-self-center ' + + (scenario._id === this.props.currentScenarioId ? 'font-weight-bold' : '') + } + > {scenario.name} </div> <div className="col-4 text-right"> @@ -35,14 +40,17 @@ class ScenarioListComponent extends React.Component { /> <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..498ee26d 100644 --- a/frontend/src/components/app/sidebars/project/TopologyListComponent.js +++ b/frontend/src/components/app/sidebars/project/TopologyListComponent.js @@ -26,13 +26,18 @@ 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-8 align-self-center ' + + (topology._id === this.props.currentTopologyId ? 'font-weight-bold' : '') + } + > {topology.name} </div> <div className="col-4 text-right"> @@ -42,7 +47,7 @@ class TopologyListComponent extends React.Component { /> <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> |
