//
// SPDX-License-Identifier: AGPL-3.0
-export const formatDate = (isoDate?: string | null) => {
+export const formatDate = (isoDate?: string) => {
if (isoDate) {
const date = new Date(isoDate);
const text = date.toLocaleString();
import { ProcessStatus } from '~/store/processes/process';
export const procesPanelActions = unionize({
- INIT_PROCESS_PANEL_FILTERS: ofType<string[]>(),
+ SET_PROCESS_PANEL_FILTERS: ofType<string[]>(),
TOGGLE_PROCESS_PANEL_FILTER: ofType<string>(),
});
dispatch(initProcessPanelFilters);
};
-export const initProcessPanelFilters = procesPanelActions.INIT_PROCESS_PANEL_FILTERS([
+export const initProcessPanelFilters = procesPanelActions.SET_PROCESS_PANEL_FILTERS([
ProcessStatus.QUEUED,
ProcessStatus.COMPLETED,
ProcessStatus.FAILED,
export const processPanelReducer = (state = initialState, action: ProcessPanelAction): ProcessPanel =>
procesPanelActions.match(action, {
- INIT_PROCESS_PANEL_FILTERS: statuses => {
+ SET_PROCESS_PANEL_FILTERS: statuses => {
const filters = statuses.reduce((filters, status) => ({ ...filters, [status]: true }), {});
return { filters };
},
</Tooltip>
}
subheader={
- <Tooltip title={process.containerRequest.description || '(no-description)'} placement="bottom-start">
+ <Tooltip title={getDescription(process)} placement="bottom-start">
<Typography noWrap variant="body2" color='inherit'>
- {process.containerRequest.description || '(no-description)'}
+ {getDescription(process)}
</Typography>
</Tooltip>} />
<CardContent className={classes.content}>
<Grid container>
<Grid item xs={6}>
<DetailsAttribute classLabel={classes.label} classValue={classes.value}
- label='From' value={process.container ? formatDate(process.container.startedAt) : 'N/A'} />
+ label='From' value={process.container ? formatDate(process.container.startedAt!) : 'N/A'} />
<DetailsAttribute classLabel={classes.label} classValue={classes.value}
- label='To' value={process.container ? formatDate(process.container.finishedAt) : 'N/A'} />
+ label='To' value={process.container ? formatDate(process.container.finishedAt!) : 'N/A'} />
<DetailsAttribute classLabel={classes.label} classValue={classes.link}
label='Workflow' value='???' />
</Grid>
</Grid>
</CardContent>
</Card>
-);
\ No newline at end of file
+);
+
+const getDescription = (process: Process) =>
+ process.containerRequest.description || '(no-description)';
import { SubprocessFilter } from '~/components/subprocess-filter/subprocess-filter';
import { SubprocessFilterDataProps } from '~/components/subprocess-filter/subprocess-filter';
-type CssRules = 'root' | 'subtitle' | 'title' | 'gridFilter';
+type CssRules = 'root' | 'title' | 'gridFilter';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
fontSize: '0.875rem',
height: '100%'
},
- subtitle: {
- paddingBottom: '32px!important'
- },
title: {
color: theme.customs.colors.grey700
},
<CardContent>
<Grid container direction="column" spacing={16}>
<Grid item xs={12} container spacing={16}>
- <Grid item md={12} lg={6} className={classes.subtitle}>
+ <Grid item md={12} lg={6}>
<SubprocessFilter label='Subprocesses' value={subprocessesAmount} />
</Grid>
<Grid item md={12} lg={6}/>