import green from '@material-ui/core/colors/green';
import yellow from '@material-ui/core/colors/yellow';
import red from '@material-ui/core/colors/red';
-import teal from '@material-ui/core/colors/teal';
export interface ArvadosThemeOptions extends ThemeOptions {
customs: any;
blue700: string;
grey500: string;
grey600: string;
+ grey700: string;
+ grey900: string;
purple: string;
- orange: string;
+ orange: string;
+ greyL: string;
+ greyD: string;
+ darkblue: string;
}
-const arvadosPurple = '#361336';
+/**
+* arvadosGreyLight is the hex equivalent of rgba(0,0,0,0.87) on #fafafa background and arvadosGreyDark is the hex equivalent of rgab(0,0,0,0.54) on #fafafa background
+*/
+
+const arvadosDarkBlue = '#052a3c';
+const arvadosGreyLight = '#737373';
+const arvadosGreyDark = '#212121';
const grey500 = grey["500"];
const grey600 = grey["600"];
const grey700 = grey["700"];
+const grey800 = grey["800"];
const grey900 = grey["900"];
export const themeOptions: ArvadosThemeOptions = {
blue500: blue['500'],
blue700: blue['700'],
grey500: grey500,
- purple: arvadosPurple,
+ grey600: grey600,
+ grey700: grey700,
+ grey800: grey800,
+ grey900: grey900,
+ darkblue: arvadosDarkBlue,
orange: '#f0ad4e',
+ greyL: arvadosGreyLight,
+ greyD: arvadosGreyDark,
}
},
overrides: {
},
MuiAppBar: {
colorPrimary: {
- backgroundColor: arvadosPurple
+ backgroundColor: arvadosDarkBlue
}
},
MuiTabs: {
color: grey600
},
indicator: {
- backgroundColor: arvadosPurple
+ backgroundColor: arvadosDarkBlue
}
},
MuiTab: {
root: {
'&$selected': {
fontWeight: 700,
- color: arvadosPurple
}
}
},
},
MuiListItemIcon: {
root: {
- fontSize: '1.25rem'
+ fontSize: '1.25rem',
}
},
MuiCardHeader: {
alignItems: 'center'
},
title: {
- color: grey700,
+ color: arvadosGreyDark,
fontSize: '1.25rem'
}
},
},
underline: {
'&:after': {
- borderBottomColor: arvadosPurple
+ borderBottomColor: arvadosDarkBlue
},
'&:hover:not($disabled):not($focused):not($error):before': {
borderBottom: '1px solid inherit'
fontSize: '0.875rem',
"&$focused": {
"&$focused:not($error)": {
- color: arvadosPurple
+ color: arvadosDarkBlue
}
}
}
MuiStepIcon: {
root: {
'&$active': {
- color: arvadosPurple
+ color: arvadosDarkBlue
},
'&$completed': {
color: 'inherited'
},
palette: {
primary: {
- main: teal.A700,
- dark: teal.A400,
+ main: '#017ead',
+ dark: '#015272',
+ light: '#82cffd',
contrastText: '#fff'
}
},
wrapper: {
display: 'flex',
minHeight: '600px',
- color: 'rgba(0, 0, 0, 0.87)',
+ color: 'rgba(0,0,0,0.87)',
fontSize: '0.875rem',
fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
fontWeight: 400,
},
tableCell: {
wordWrap: 'break-word',
- paddingRight: '24px'
+ paddingRight: '24px',
+ color: '#737373'
+
},
tableCellWorkflows: {
'&:nth-last-child(2)': {
},
label: {
boxSizing: 'border-box',
- color: theme.palette.grey["500"],
+ color: theme.palette.grey["600"],
width: '100%'
},
value: {
},
copyIcon: {
marginLeft: theme.spacing.unit,
- color: theme.palette.grey["500"],
+ color: theme.palette.grey["600"],
cursor: 'pointer',
display: 'inline',
'& svg': {
}
};
-export const getProcessStatusColor = (status: string, { customs }: ArvadosTheme) => {
+
+export const getProcessStatusStyles = (status: string, theme: ArvadosTheme): React.CSSProperties => {
+ let color = theme.customs.colors.grey500;
+ let running = false;
switch (status) {
case ProcessStatus.RUNNING:
- return customs.colors.green800;
+ color = theme.customs.colors.green800;
+ running = true;
+ break;
case ProcessStatus.COMPLETED:
+ color = theme.customs.colors.green800;
+ break;
case ProcessStatus.WARNING:
- return customs.colors.green800;
+ color = theme.customs.colors.green800;
+ running = true;
+ break;
case ProcessStatus.FAILING:
+ color = theme.customs.colors.red900;
+ running = true;
+ break;
case ProcessStatus.CANCELLED:
case ProcessStatus.FAILED:
- return customs.colors.red900;
+ color = theme.customs.colors.red900;
+ break;
default:
- return customs.colors.grey600;
+ color = theme.customs.colors.grey600;
+ break;
}
+
+ // Using color and running we build the text, border, and background style properties
+ return {
+ // Set background color when not running, otherwise use white
+ backgroundColor: running ? theme.palette.common.white : color,
+ // Set text color to status color when running, else use white text for solid button
+ color: running ? color : theme.palette.common.white,
+ // Set border color when running, else omit the style entirely
+ ...(running ? {border: `1px solid ${color}`} : {}),
+ };
};
export const getProcessStatus = ({ containerRequest, container }: Process): ProcessStatus => {
import { RootState } from 'store/store';
import { getResource, filterResources } from 'store/resources/resources';
import { GroupContentsResource } from 'services/groups-service/groups-service';
-import { getProcess, Process, getProcessStatus, getProcessStatusColor, getProcessRuntime } from 'store/processes/process';
+import { getProcess, Process, getProcessStatus, getProcessStatusStyles, getProcessRuntime } from 'store/processes/process';
import { ArvadosTheme } from 'common/custom-theme';
import { compose, Dispatch } from 'redux';
import { WorkflowResource } from 'models/workflow';
style={{
height: props.theme.spacing.unit * 3,
width: props.theme.spacing.unit * 12,
- backgroundColor: getProcessStatusColor(
+ ...getProcessStatusStyles(
getProcessStatus(props.process), props.theme),
- color: props.theme.palette.common.white,
fontSize: '0.875rem',
borderRadius: props.theme.spacing.unit * 0.625,
}}
/>
: <Typography>-</Typography>
- );
+ );
export const ProcessStartDate = connect(
(state: RootState, props: { uuid: string }) => {
whiteSpace: 'pre-line',
},
errorColor: {
- color: theme.customs.colors.red900,
+ color: theme.customs.colors.grey700,
},
error: {
backgroundColor: theme.customs.colors.red100,
backgroundColor: theme.customs.colors.yellow100,
},
warningColor: {
- color: theme.customs.colors.yellow900,
+ color: theme.customs.colors.grey700,
},
paperRoot: {
minHeight: theme.spacing.unit * 6,
},
iconHeader: {
fontSize: '1.875rem',
- color: theme.customs.colors.grey600
+ color: theme.customs.colors.greyL
},
tag: {
marginRight: theme.spacing.unit / 2,
marginBottom: theme.spacing.unit / 2
},
label: {
- fontSize: '0.975rem',
+ fontSize: '0.875rem',
},
centeredLabel: {
fontSize: '0.875rem',
fontSize: '18px'
},
active: {
- color: theme.customs.colors.green700,
+ color: theme.customs.colors.grey700,
textDecoration: 'none',
}
});
},
iconHeader: {
fontSize: '1.875rem',
- color: theme.customs.colors.green700,
+ color: theme.customs.colors.greyL,
},
avatar: {
alignSelf: 'flex-start',
},
title: {
overflow: 'hidden',
- paddingTop: theme.spacing.unit * 0.5
+ paddingTop: theme.spacing.unit * 0.5,
+ color: theme.customs.colors.greyD,
+ fontSize: '1.875rem'
},
});
},
iconHeader: {
fontSize: '1.875rem',
- color: theme.customs.colors.green700,
+ color: theme.customs.colors.greyL,
},
avatar: {
alignSelf: 'flex-start',
},
title: {
overflow: 'hidden',
- paddingTop: theme.spacing.unit * 0.5
+ paddingTop: theme.spacing.unit * 0.5,
+ color: theme.customs.colors.green700,
},
cancelButton: {
paddingRight: theme.spacing.unit * 2,
avatar={<ProcessIcon className={classes.iconHeader} />}
title={
<Tooltip title={process.containerRequest.name} placement="bottom-start">
- <Typography noWrap variant='h6' color='inherit'>
+ <Typography noWrap variant='h6'>
{process.containerRequest.name}
</Typography>
</Tooltip>
},
iconHeader: {
fontSize: '1.875rem',
- color: theme.customs.colors.green700,
+ color: theme.customs.colors.greyL,
},
avatar: {
alignSelf: 'flex-start',
},
title: {
overflow: 'hidden',
- paddingTop: theme.spacing.unit * 0.5
+ paddingTop: theme.spacing.unit * 0.5,
+ color: theme.customs.colors.greyD,
+ fontSize: '1.875rem'
},
tableWrapper: {
height: 'auto',
top: '-9px',
},
emptyValue: {
- color: theme.customs.colors.grey600,
+ color: theme.customs.colors.grey700,
},
noBorderRow: {
'& td': {
},
title: {
overflow: 'hidden',
- paddingTop: theme.spacing.unit * 0.5
+ paddingTop: theme.spacing.unit * 0.5,
+ color: theme.customs.colors.greyD
},
iconHeader: {
fontSize: '1.875rem',
- color: theme.customs.colors.green700
+ color: theme.customs.colors.greyL
},
root: {
height: '100%',
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
iconHeader: {
fontSize: '1.875rem',
- color: theme.customs.colors.green700,
+ color: theme.customs.colors.greyL,
marginRight: theme.spacing.unit * 2,
},
cardHeader: {