import { MoreOptionsIcon, ProcessIcon } from '~/components/icon/icon';
import { DetailsAttribute } from '~/components/details-attribute/details-attribute';
import { Process } from '~/store/processes/process';
-import { getProcessStatus, getProcessStatusColor } from '../../store/processes/process';
+import { getProcessStatus, getProcessStatusColor } from '~/store/processes/process';
import { formatDate } from '~/common/formatters';
export interface ProcessInformationCardDataProps {
process: Process;
onContextMenu: (event: React.MouseEvent<HTMLElement>) => void;
+ openProcessInputDialog: (uuid: string) => void;
+ navigateToOutput: (uuid: string) => void;
}
-type ProcessInformationCardProps = ProcessInformationCardDataProps & WithStyles<CssRules>;
+type ProcessInformationCardProps = ProcessInformationCardDataProps & WithStyles<CssRules, true>;
export const ProcessInformationCard = withStyles(styles, { withTheme: true })(
- ({ classes, process, onContextMenu, theme }: ProcessInformationCardProps) =>
+ ({ classes, process, onContextMenu, theme, openProcessInputDialog, navigateToOutput }: ProcessInformationCardProps) =>
<Card className={classes.card}>
<CardHeader
classes={{
<Chip label={getProcessStatus(process)}
className={classes.chip}
style={{ backgroundColor: getProcessStatusColor(getProcessStatus(process), theme as ArvadosTheme) }} />
- <Tooltip title="More options">
+ <Tooltip title="More options" disableFocusListener>
<IconButton
aria-label="More options"
onClick={event => onContextMenu(event)}>
label='Workflow' value='???' />
</Grid>
<Grid item xs={6}>
- <DetailsAttribute classLabel={classes.link} label='Outputs' />
- <DetailsAttribute classLabel={classes.link} label='Inputs' />
+ <span onClick={() => navigateToOutput(process.containerRequest.outputUuid!)}>
+ <DetailsAttribute classLabel={classes.link} label='Outputs' />
+ </span>
+ <span onClick={() => openProcessInputDialog(process.containerRequest.uuid)}>
+ <DetailsAttribute classLabel={classes.link} label='Inputs' />
+ </span>
</Grid>
</Grid>
</CardContent>