summaryrefslogtreecommitdiff
path: root/frontend/src/pages
diff options
context:
space:
mode:
authorjc0b <j@jc0b.computer>2020-07-22 16:28:47 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:21 +0200
commitd7469b9ebb01cf36a78cc98aab31fa8f307c4f65 (patch)
treed0535fa0cfe95001302fbd2b0d046d51caab6ffd /frontend/src/pages
parent67b6ec800df8e023efadb60ae5f7919030b19789 (diff)
parent9e7cb3bd367607b32e102c3a87b68b33c53dec46 (diff)
Merge branch 'master' onto working copy
Diffstat (limited to 'frontend/src/pages')
-rw-r--r--frontend/src/pages/App.js63
-rw-r--r--frontend/src/pages/Home.js22
-rw-r--r--frontend/src/pages/NotFound.js2
-rw-r--r--frontend/src/pages/Profile.js8
-rw-r--r--frontend/src/pages/Projects.js10
5 files changed, 54 insertions, 51 deletions
diff --git a/frontend/src/pages/App.js b/frontend/src/pages/App.js
index 3ccae29d..cbc805b8 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,29 +56,33 @@ 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 />
+ <div className="container-fluid full-height">
+ <PortfolioResultsContainer />
+ </div>
</div>
)
const scenarioElements = (
- <div className="full-height">
- <ProjectSidebarContainer/>
- <h2>Scenario loading</h2>
+ <div className="full-height app-page-container">
+ <ProjectSidebarContainer />
+ <div className="container-fluid full-height">
+ <h2>Scenario loading</h2>
+ </div>
</div>
)
@@ -86,23 +91,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 +127,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>
)