diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-21 15:33:37 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:16 +0200 |
| commit | 912e1b96bfa7d6c022d854fa744f719b49ca98d0 (patch) | |
| tree | 49cdaf109aa08b0149c34174ce0f00c7056221ea /frontend/src/pages | |
| parent | 791b5d1e443f97adc756264878c3aae41ca0f748 (diff) | |
Add first plotting attempts for portfolios
Diffstat (limited to 'frontend/src/pages')
| -rw-r--r-- | frontend/src/pages/App.js | 57 | ||||
| -rw-r--r-- | frontend/src/pages/Home.js | 22 | ||||
| -rw-r--r-- | frontend/src/pages/NotFound.js | 2 | ||||
| -rw-r--r-- | frontend/src/pages/Profile.js | 8 | ||||
| -rw-r--r-- | frontend/src/pages/Projects.js | 10 |
5 files changed, 49 insertions, 50 deletions
diff --git a/frontend/src/pages/App.js b/frontend/src/pages/App.js index 3ccae29d..078ad51a 100644 --- a/frontend/src/pages/App.js +++ b/frontend/src/pages/App.js @@ -22,6 +22,7 @@ import ProjectSidebarContainer from '../containers/app/sidebars/project/ProjectS import { openScenarioSucceeded } from '../actions/scenarios' import NewPortfolioModal from '../containers/modals/NewPortfolioModal' import NewScenarioModal from '../containers/modals/NewScenarioModal' +import PortfolioResultsContainer from '../containers/app/results/PortfolioResultsContainer' const shortcutManager = new ShortcutManager(KeymapConfiguration) @@ -55,28 +56,28 @@ class AppComponent extends React.Component { render() { const constructionElements = this.props.topologyIsLoading ? ( <div className="full-height d-flex align-items-center justify-content-center"> - <LoadingScreen/> + <LoadingScreen /> </div> ) : ( <div className="full-height"> - <MapStage/> - <ScaleIndicatorContainer/> - <ToolPanelComponent/> - <ProjectSidebarContainer/> - <TopologySidebarContainer/> + <MapStage /> + <ScaleIndicatorContainer /> + <ToolPanelComponent /> + <ProjectSidebarContainer /> + <TopologySidebarContainer /> </div> ) const portfolioElements = ( - <div className="full-height"> - <ProjectSidebarContainer/> - <h2>Portfolio loading</h2> + <div className="full-height app-page-container"> + <ProjectSidebarContainer /> + <PortfolioResultsContainer/> </div> ) const scenarioElements = ( - <div className="full-height"> - <ProjectSidebarContainer/> + <div className="full-height app-page-container"> + <ProjectSidebarContainer /> <h2>Scenario loading</h2> </div> ) @@ -86,23 +87,20 @@ class AppComponent extends React.Component { title={this.props.projectName ? this.props.projectName + ' - OpenDC' : 'Simulation - OpenDC'} > <div className="page-container full-height"> - <AppNavbarContainer fullWidth={true}/> - {this.props.scenarioId ? ( - scenarioElements - ) : (this.props.portfolioId ? ( - portfolioElements - ) : ( - constructionElements - ) - )} - <NewTopologyModal/> - <NewPortfolioModal/> - <NewScenarioModal/> - <EditRoomNameModal/> - <DeleteRoomModal/> - <EditRackNameModal/> - <DeleteRackModal/> - <DeleteMachineModal/> + <AppNavbarContainer fullWidth={true} /> + {this.props.scenarioId + ? scenarioElements + : this.props.portfolioId + ? portfolioElements + : constructionElements} + <NewTopologyModal /> + <NewPortfolioModal /> + <NewScenarioModal /> + <EditRoomNameModal /> + <DeleteRoomModal /> + <EditRackNameModal /> + <DeleteRackModal /> + <DeleteMachineModal /> </div> </DocumentTitle> ) @@ -125,7 +123,8 @@ const mapDispatchToProps = (dispatch) => { return { openProjectSucceeded: (projectId) => dispatch(openProjectSucceeded(projectId)), openPortfolioSucceeded: (projectId, portfolioId) => dispatch(openPortfolioSucceeded(projectId, portfolioId)), - openScenarioSucceeded: (projectId, portfolioId, scenarioId) => dispatch(openScenarioSucceeded(projectId, portfolioId, scenarioId)), + openScenarioSucceeded: (projectId, portfolioId, scenarioId) => + dispatch(openScenarioSucceeded(projectId, portfolioId, scenarioId)), } } diff --git a/frontend/src/pages/Home.js b/frontend/src/pages/Home.js index e69c2049..1bdfc5c7 100644 --- a/frontend/src/pages/Home.js +++ b/frontend/src/pages/Home.js @@ -21,7 +21,7 @@ class Home extends React.Component { const scrollOffset = 60 jQuery('#navbar') .find('li a') - .click(function(e) { + .click(function (e) { if (jQuery(e.target).parents('.auth-links').length > 0) { return } @@ -42,17 +42,17 @@ class Home extends React.Component { render() { return ( <div> - <HomeNavbar/> + <HomeNavbar /> <div className="body-wrapper page-container"> - <JumbotronHeader/> - <IntroSection/> - <StakeholderSection/> - <ModelingSection/> - <SimulationSection/> - <TechnologiesSection/> - <TeamSection/> - <ContactSection/> - <DocumentTitle title="OpenDC"/> + <JumbotronHeader /> + <IntroSection /> + <StakeholderSection /> + <ModelingSection /> + <SimulationSection /> + <TechnologiesSection /> + <TeamSection /> + <ContactSection /> + <DocumentTitle title="OpenDC" /> </div> </div> ) diff --git a/frontend/src/pages/NotFound.js b/frontend/src/pages/NotFound.js index 959cceec..f72c7d01 100644 --- a/frontend/src/pages/NotFound.js +++ b/frontend/src/pages/NotFound.js @@ -6,7 +6,7 @@ import './NotFound.css' const NotFound = () => ( <DocumentTitle title="Page Not Found - OpenDC"> <div className="not-found-backdrop"> - <TerminalWindow/> + <TerminalWindow /> </div> </DocumentTitle> ) diff --git a/frontend/src/pages/Profile.js b/frontend/src/pages/Profile.js index 527dc721..0d94b519 100644 --- a/frontend/src/pages/Profile.js +++ b/frontend/src/pages/Profile.js @@ -8,18 +8,18 @@ import AppNavbarContainer from '../containers/navigation/AppNavbarContainer' const ProfileContainer = ({ onDelete }) => ( <DocumentTitle title="My Profile - OpenDC"> <div className="full-height"> - <AppNavbarContainer fullWidth={false}/> + <AppNavbarContainer fullWidth={false} /> <div className="container text-page-container full-height"> <button className="btn btn-danger mb-2 ml-auto mr-auto" style={{ maxWidth: 300 }} onClick={onDelete}> Delete my account on OpenDC </button> <p className="text-muted text-center"> This does not delete your Google account, but simply disconnects it from the OpenDC platform and - deletes any project info that is associated with you (projects you own and any authorizations - you may have on other projects). + deletes any project info that is associated with you (projects you own and any authorizations you + may have on other projects). </p> </div> - <DeleteProfileModal/> + <DeleteProfileModal /> </div> </DocumentTitle> ) diff --git a/frontend/src/pages/Projects.js b/frontend/src/pages/Projects.js index f4af10c3..bb54aaa5 100644 --- a/frontend/src/pages/Projects.js +++ b/frontend/src/pages/Projects.js @@ -18,13 +18,13 @@ class ProjectsContainer extends React.Component { return ( <DocumentTitle title="My Projects - OpenDC"> <div className="full-height"> - <AppNavbarContainer fullWidth={false}/> + <AppNavbarContainer fullWidth={false} /> <div className="container text-page-container full-height"> - <ProjectFilterPanel/> - <VisibleProjectList/> - <NewProjectButtonContainer/> + <ProjectFilterPanel /> + <VisibleProjectList /> + <NewProjectButtonContainer /> </div> - <NewProjectModal/> + <NewProjectModal /> </div> </DocumentTitle> ) |
