X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7869d0e6e67f4c6d376f8c0ff4bb3123cabe7ed7..ce2ea2b32bdbaa8a9156ca80f8bf2eb33308ba89:/src/views/process-panel/process-io-card.tsx diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx index e1daa25634..0a1ec9e22c 100644 --- a/src/views/process-panel/process-io-card.tsx +++ b/src/views/process-panel/process-io-card.tsx @@ -26,7 +26,7 @@ import { Chip, } from '@material-ui/core'; import { ArvadosTheme } from 'common/custom-theme'; -import { CloseIcon, ImageIcon, InfoIcon, InputIcon, InvisibleIcon, OutputIcon, VisibleIcon } from 'components/icon/icon'; +import { CloseIcon, ImageIcon, InputIcon, ImageOffIcon, OutputIcon, MaximizeIcon } from 'components/icon/icon'; import { MPVPanelProps } from 'components/multi-panel-view/multi-panel-view'; import { BooleanCommandInputParameter, @@ -82,6 +82,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ paddingTop: theme.spacing.unit * 0.5 }, content: { + height: `calc(100% - ${theme.spacing.unit * 7}px - ${theme.spacing.unit * 1.5}px)`, padding: theme.spacing.unit * 1.0, paddingTop: theme.spacing.unit * 0.5, '&:last-child': { @@ -93,6 +94,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ paddingTop: theme.spacing.unit * 0.5 }, tableWrapper: { + height: `calc(100% - ${theme.spacing.unit * 6}px)`, overflow: 'auto', }, tableRoot: { @@ -186,7 +188,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ProcessIOCardActionProps => ({ type ProcessIOCardProps = ProcessIOCardDataProps & ProcessIOCardActionProps & WithStyles & MPVPanelProps; export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps)( - ({ classes, label, params, raw, mounts, outputUuid, doHidePanel, panelName, process, navigateTo }: ProcessIOCardProps) => { + ({ classes, label, params, raw, mounts, outputUuid, doHidePanel, doMaximizePanel, panelMaximized, panelName, process, navigateTo }: ProcessIOCardProps) => { const [mainProcTabState, setMainProcTabState] = useState(0); const handleMainProcTabChange = (event: React.MouseEvent, value: number) => { setMainProcTabState(value); @@ -213,7 +215,11 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps action={
{ mainProcess && - {setShowImagePreview(!showImagePreview)}}>{showImagePreview ? : } + {setShowImagePreview(!showImagePreview)}}>{showImagePreview ? : } + } + { doMaximizePanel && !panelMaximized && + + } { doHidePanel && @@ -222,46 +228,50 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps
} /> -
- {mainProcess ? - (<> - - - - - {mainProcTabState === 0 &&
- {params.length ? - : - - - } -
} - {mainProcTabState === 1 &&
- {params.length ? - : - - - } -
} - ) : - (<> - - {label === ProcessIOCardType.INPUT && } - {label === ProcessIOCardType.OUTPUT && } - -
- {label === ProcessIOCardType.INPUT && } - {label === ProcessIOCardType.OUTPUT && <> - {outputUuid && - Output Collection: {navigateTo(outputUuid)}}> - {outputUuid} - } - - } -
- ) - } -
+ {mainProcess ? + (<> + {params.length ? + <> + + + + + {mainProcTabState === 0 &&
+ +
} + {mainProcTabState === 1 &&
+ +
} + : + + + + } + ) : + (<> + {((mounts && mounts.length) || outputUuid) ? + <> + + {label === ProcessIOCardType.INPUT && } + {label === ProcessIOCardType.OUTPUT && } + +
+ {label === ProcessIOCardType.INPUT && } + {label === ProcessIOCardType.OUTPUT && <> + {outputUuid && + Output Collection: {navigateTo(outputUuid || "")}}> + {outputUuid} + } + + } +
+ : + + + + } + ) + }
; } @@ -276,7 +286,6 @@ export type ProcessIOValue = { export type ProcessIOParameter = { id: string; label: string; - doc: string; value: ProcessIOValue[]; } @@ -288,13 +297,13 @@ interface ProcessIOPreviewDataProps { type ProcessIOPreviewProps = ProcessIOPreviewDataProps & WithStyles; const ProcessIOPreview = withStyles(styles)( - ({ classes, data, showImagePreview }: ProcessIOPreviewProps) => - + ({ classes, data, showImagePreview }: ProcessIOPreviewProps) => { + const showLabel = data.some((param: ProcessIOParameter) => param.label); + return
Name - Label - Description + {showLabel && Label} Value Collection @@ -310,8 +319,7 @@ const ProcessIOPreview = withStyles(styles)( {param.id} - {param.label} - {param.doc} + {showLabel && {param.label}} {firstVal && } @@ -324,8 +332,7 @@ const ProcessIOPreview = withStyles(styles)( {rest.map((val, i) => ( - - + {showLabel && } @@ -339,8 +346,8 @@ const ProcessIOPreview = withStyles(styles)( ; })} -
-); + ; +}); interface ProcessValuePreviewProps { value: ProcessIOValue;