[arvados-workbench2] created: 2.4.0-353-g24f65df0

git repository hosting git at public.arvados.org
Thu Dec 1 16:14:35 UTC 2022


        at  24f65df0b986dd604b47d148cc84e3a96b25cc66 (commit)


commit 24f65df0b986dd604b47d148cc84e3a96b25cc66
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Dec 1 11:14:04 2022 -0500

    19700: Increase io panel max height to prevent unnecessary scrolling
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx
index 14a6eae2..ceba293e 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -128,7 +128,8 @@ const styles: StyleRulesCallback<CssRules> = (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: {

commit 465a61ffcf1a815bf68daeb7bcbf31dd9721cdf4
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Dec 1 11:13:16 2022 -0500

    19700: Detect http/s input files and display as link
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/models/resource.ts b/src/models/resource.ts
index fd867277..2d2b9f21 100644
--- a/src/models/resource.ts
+++ b/src/models/resource.ts
@@ -67,6 +67,7 @@ export const RESOURCE_UUID_PATTERN = '[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}';
 export const PORTABLE_DATA_HASH_PATTERN = '[a-f0-9]{32}\\+\\d+';
 export const RESOURCE_UUID_REGEX = new RegExp("^" + RESOURCE_UUID_PATTERN + "$");
 export const COLLECTION_PDH_REGEX = new RegExp("^" + PORTABLE_DATA_HASH_PATTERN + "$");
+export const KEEP_URL_REGEX = new RegExp("^(keep:)?" + PORTABLE_DATA_HASH_PATTERN);
 
 export const isResourceUuid = (uuid: string) =>
     RESOURCE_UUID_REGEX.test(uuid);
diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx
index 4f93f48c..14a6eae2 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"
@@ -657,6 +658,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 +686,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: <UnsupportedValue />}}
 
+    if (isFileUrl(file.location)) {
+        return {
+            display: <MuiLink href={file.location} target="_blank">{file.location}</MuiLink>,
+            secondary,
+        };
+    }
+
     const resourcePdh = getResourcePdhUrl(file, pdh);
     return {
         display: <KeepUrlPath auth={auth} res={file} pdh={pdh}/>,

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list