Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage #5

Merged
merged 1 commit into from Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
86 changes: 82 additions & 4 deletions src/containers/pages/IndexPage/index.js
@@ -1,11 +1,89 @@
import React from 'react';
import { compose, pure } from 'recompose'
import { withRouter } from 'react-router'
import { compose, pure, withHandlers } from 'recompose'

import { withStyles } from 'material-ui/styles';
import Grid from 'material-ui/Grid'
import Typography from 'material-ui/Typography'
import Button from 'material-ui/Button'

import Page from 'components/Page'
import ElixirBenchLogo from 'components/ElixirBenchLogo'

import styles from './styles'

const IndexPage = ({ classes, onClickGoToRepositories }) => (
<Page>
<Grid align="center">
<Typography variant="display3" align="center" style={{fontFamily: 'serif'}}>
ELIXIR
<ElixirBenchLogo color="primary" style={{ fontSize: "76px" }}/>
BENCH
</Typography>
<Typography variant="headline" align="center" style={{borderBottom: '2px solid gray'}}>
Long Running Benchmarks for Elixir Projects
</Typography>
</Grid>

<Grid container className={ classes.gridContainer } align="center">
<Grid item xs={ 12 } sm={ 12 } md={ 4 }>
<Grid >
<Typography variant='display1' className={ classes.gridTitle }>
What is ElixirBench?
</Typography>

<Typography align='justify' className={ classes.gridDescription }>
ElixirBench is a platform for running benchmarks for projects hosted
on Github. Our platform empower developers to easily monitor and detect
performance regressions. Like a CI, you can have your scripts running
automatically on every change. We provide graphics for temporal
tracking of the the performance of each new commits and pull requests
to your project.
</Typography>
</Grid>
</Grid>
<Grid item xs={ 12 } sm={ 12 } md={ 4 }>
<Typography variant='display1' className={ classes.gridTitle }>
Setup your benchmarks
</Typography>

<Typography align='justify' className={ classes.gridDescription }>
Easily setup a benchee/config.yml and the benchmark scripts to start collecting
performance metrics for your project. We currently support benchmarks
written with Benchee, a powerful library specially designed to test
and measure performance of Elixir code. See the examples of the
Ecto library.
</Typography>
</Grid>
<Grid item xs={ 12 } sm={ 12 } md={ 4 }>
<Typography variant='display1' className={ classes.gridTitle }>
Reliable Hardware
</Typography>

<Typography align='justify' className={ classes.gridDescription }>
Confident hardware infrastructure that runs one benchmark job at a time,
all within docker containers and the benefits of isolated and clean
environments for the execution of benchmark jobs. Also, our application
is being designed to support independent runners, so projects will soon
be able to fully control their benchmark environments and hardware
infrasctructure.
</Typography>
</Grid>
</Grid>

const IndexPage = () => (
<Page title="Home page"></Page>
<Grid align="center">
<Button className={ classes.button } color="primary" size='large' variant='raised' onClick={ onClickGoToRepositories }>View tracked repositories</Button>
</Grid>
</Page>
)

export default compose(
pure
pure,
withRouter,
withStyles(styles),
withHandlers({
onClickGoToRepositories: ({ router }) => () => (
router.push('repos')
)
})
)(IndexPage);
17 changes: 17 additions & 0 deletions src/containers/pages/IndexPage/styles.js
@@ -0,0 +1,17 @@
export default () => ({
root: {},
gridDescription: {
lineHeight: 2,
fontSize: 20,
padding: 20,
},
gridTitle: {
fontFamily: 'monospace',
},
gridContainer: {
marginTop: '40px',
},
button: {
marginTop: '30px',
}
})
4 changes: 3 additions & 1 deletion src/routes/index.js
Expand Up @@ -3,6 +3,7 @@ import { IndexRoute, Router, Route, IndexRedirect } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'

import AppLayout from 'containers/layouts/AppLayout'
import IndexPage from 'containers/pages/IndexPage'
import NotFoundPage from 'containers/pages/NotFoundPage'
import ReposListPage from 'containers/pages/ReposListPage'
import RepoDetailsPage from 'containers/pages/RepoDetailsPage'
Expand All @@ -12,7 +13,8 @@ import JobDetailsPage from 'containers/pages/JobDetailsPage'
export default ({ store, history }) => (
<Router history={ syncHistoryWithStore(history, store) }>
<Route path="/" component={ AppLayout }>
<IndexRedirect to="repos" />
<IndexRedirect to="index" />
<Route path="index" component={ IndexPage } />
<Route path="repos">
<IndexRoute component={ ReposListPage } />
<Route path=":owner/:repo">
Expand Down