Skip to content

Commit

Permalink
possible solution for #197
Browse files Browse the repository at this point in the history
  • Loading branch information
njakuschona committed Dec 23, 2020
1 parent 5bdf869 commit 4657ac0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ui/src/components/erc/Check/Check.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ import './check.css';
import config from '../../../helpers/config';
import Comparison from './Comparison/Comparison';
import Logs from './Logs/Logs';
import { useTheme } from '@material-ui/core/styles';


function Status(status) {
const theme = useTheme();
switch (status.status) {
case 'success':
return <span className="success">Success</span>
return <span style={{"color": theme.palette.success.main}}>Success</span>
case 'failure':
if (status.checkStatus !== "failure") {
return <span className="failure">Process Failed (check logs)</span>
return <span style={{"color": theme.palette.failure.main}}>Process Failed (check logs)</span>
}
else {
return <span className="failure">Reproduction Failed (click on "Show Result" for details)</span>
return <span style={{"color": theme.palette.failure.main}}>Reproduction Failed (click on "Show Result" for details)</span>
}
case 'running':
return <span className="running">Running <CircularProgress size={15} /></span>
Expand Down
6 changes: 6 additions & 0 deletions ui/src/helpers/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ const o2rTheme = createMuiTheme({
},
success: {
main: '#008643'
},
warn: {
main: '#CE5100'
},
failure: {
main: '#860000'
}
}

Expand Down

0 comments on commit 4657ac0

Please sign in to comment.