X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/fe41be6c6bcc21fc0c7c6450485a1d1f7955ebe5..24f65df0b986dd604b47d148cc84e3a96b25cc66:/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 4f93f48c..ceba293e 100644 --- a/src/views/process-panel/process-io-card.tsx +++ b/src/views/process-panel/process-io-card.tsx @@ -74,6 +74,7 @@ import { Process } from 'store/processes/process'; import { navigateTo } from 'store/navigation/navigation-action'; import classNames from 'classnames'; import { DefaultCodeSnippet } from 'components/default-code-snippet/default-code-snippet'; +import { KEEP_URL_REGEX } from 'models/resource'; type CssRules = | "card" @@ -127,7 +128,8 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ paddingTop: theme.spacing.unit * 0.5 }, tableWrapper: { - height: `calc(100% - ${theme.spacing.unit * 6}px)`, + height: 'auto', + maxHeight: `calc(100% - ${theme.spacing.unit * 4.5}px)`, overflow: 'auto', }, tableRoot: { @@ -657,6 +659,11 @@ const isFileImage = (basename?: string): boolean => { return basename ? (mime.getType(basename) || "").startsWith('image/') : false; }; +const isFileUrl = (location?: string): boolean => ( + !!location && !KEEP_URL_REGEX.exec(location) && + (location.startsWith("http://") || location.startsWith("https://")) +); + const normalizeDirectoryLocation = (directory: Directory): Directory => { if (!directory.location) { return directory; @@ -680,6 +687,13 @@ const directoryToProcessIOValue = (directory: Directory, auth: AuthState, pdh?: const fileToProcessIOValue = (file: File, secondary: boolean, auth: AuthState, pdh: string | undefined, mainFilePdh: string): ProcessIOValue => { if (isExternalValue(file)) {return {display: }} + if (isFileUrl(file.location)) { + return { + display: {file.location}, + secondary, + }; + } + const resourcePdh = getResourcePdhUrl(file, pdh); return { display: ,