12 | { isEmpty(log) ? (
13 |
14 |
15 | We don't have any logs. Try to wait or restart the job.
16 |
17 |
18 | We're re-fetching logs every 5 seconds...
19 |
20 |
21 | ) :
22 | { multilineLog }
23 |
}
24 |
25 | )
26 |
27 | export default compose(
28 | pure,
29 | withPropsOnChange(
30 | ['log'],
31 | ({ log }) => ({
32 | multilineLog: nl2br(log),
33 | })
34 | ),
35 | withStyles(styles)
36 | )(Logs);
37 |
--------------------------------------------------------------------------------
/web/src/components/Logs/styles.js:
--------------------------------------------------------------------------------
1 |
2 | export default () => ({
3 | root: {
4 | background: '#333',
5 | color: 'white',
6 | padding: 12,
7 | borderRadius: 4,
8 | lineHeight: '1.2',
9 | fontSize: 12,
10 | fontFamily: 'monospace',
11 | fontWeight: 'normal',
12 | maxHeight: 1200,
13 | overflowY: 'auto',
14 |
15 | '& a': {
16 | textDecoration: 'underline',
17 | cursor: 'pointer',
18 | }
19 | },
20 | empty: {
21 | padding: '40px 0',
22 | textAlign: 'center'
23 | }
24 | })
25 |
--------------------------------------------------------------------------------
/web/src/components/Page/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { compose, pure } from 'recompose'
3 | import { Link } from 'react-router'
4 | import { withStyles } from 'material-ui/styles'
5 | import classnames from 'classnames'
6 |
7 | import Typography from 'material-ui/Typography'
8 | import KeyboardArrowLeft from 'material-ui-icons/KeyboardArrowLeft'
9 |
10 | import Grid from 'components/Grid'
11 |
12 | import styles from './styles'
13 |
14 | const Page = ({ classes, title, maxWidth, backLink, backTitle, children }) => (
15 |