[arvados-workbench2] updated: 2.4.0-222-gcd7f6fd8

git repository hosting git at public.arvados.org
Fri Sep 30 13:28:14 UTC 2022


Summary of changes:
 src/store/process-panel/process-panel-actions.ts |  6 ++-
 src/store/processes/processes-actions.ts         |  5 +++
 src/views/process-panel/process-io-card.tsx      | 56 ++++++++++++++++++------
 src/views/process-panel/process-panel-root.tsx   | 31 ++++++++-----
 4 files changed, 71 insertions(+), 27 deletions(-)

       via  cd7f6fd81788f459642408df05be2daf214ef437 (commit)
       via  511b214fdb4da6cb7a96a8c253514897a4a83660 (commit)
       via  5037fa02e44b5d53872ed82977e1e172e6848df1 (commit)
       via  e90926e12f0d64e435475a7c9c025df4f824b608 (commit)
       via  8a5cbfb69be9405bd2e798ec830a8d1c679adeb7 (commit)
       via  c2341d7339373cd8d0b62e951d4716b1a8724c0f (commit)
      from  80052fec619ff95dda77e5b9b030fd39c8d26057 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit cd7f6fd81788f459642408df05be2daf214ef437
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Sep 29 17:34:07 2022 -0400

    16073: Show loading indicator when process io params are not loaded
    
    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 d60d71c4..7284159e 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -24,6 +24,7 @@ import {
     Paper,
     Grid,
     Chip,
+    CircularProgress,
 } from '@material-ui/core';
 import { ArvadosTheme } from 'common/custom-theme';
 import { CloseIcon, ImageIcon, InputIcon, ImageOffIcon, OutputIcon, MaximizeIcon } from 'components/icon/icon';
@@ -192,7 +193,7 @@ export enum ProcessIOCardType {
 export interface ProcessIOCardDataProps {
     process: Process;
     label: ProcessIOCardType;
-    params: ProcessIOParameter[];
+    params?: ProcessIOParameter[];
     raw?: any;
     mounts?: InputCollectionMount[];
     outputUuid?: string;
@@ -251,7 +252,10 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps
             <CardContent className={classes.content}>
                 {mainProcess ?
                     (<>
-                        {params.length ?
+                        {params === undefined && <Grid container item alignItems='center' justify='center'>
+                            <CircularProgress />
+                        </Grid>}
+                        {params && params.length > 0 &&
                             <>
                                 <Tabs value={mainProcTabState} onChange={handleMainProcTabChange} variant="fullWidth" className={classes.symmetricTabs}>
                                     <Tab label="Parameters" />
@@ -263,12 +267,12 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps
                                 {mainProcTabState === 1 && <div className={classes.tableWrapper}>
                                         <ProcessIORaw data={raw || params} />
                                     </div>}
-                            </> :
-                            <Grid container item alignItems='center' justify='center'>
-                                <DefaultView messages={["No parameters found"]} />
-                            </Grid>
-                        }
+                            </>}
+                        {params && params.length === 0 && <Grid container item alignItems='center' justify='center'>
+                            <DefaultView messages={["No parameters found"]} />
+                        </Grid>}
                     </>) :
+                    // Subprocess
                     (<>
                         {((mounts && mounts.length) || outputUuid) ?
                             <>
diff --git a/src/views/process-panel/process-panel-root.tsx b/src/views/process-panel/process-panel-root.tsx
index 9fc043d9..a08d8aec 100644
--- a/src/views/process-panel/process-panel-root.tsx
+++ b/src/views/process-panel/process-panel-root.tsx
@@ -68,18 +68,25 @@ const panelsData: MPVPanelState[] = [
 export const ProcessPanelRoot = withStyles(styles)(
     ({ process, auth, processLogsPanel, fetchOutputs, ...props }: ProcessPanelRootProps) => {
 
-    const [outputDetails, setOutputs] = useState<OutputDetails>({});
-    const [rawInputs, setInputs] = useState<CommandInputParameter[]>([]);
+    const [outputDetails, setOutputs] = useState<OutputDetails | undefined>(undefined);
+    const [rawInputs, setInputs] = useState<CommandInputParameter[] | undefined>(undefined);
 
-
-    const [processedOutputs, setProcessedOutputs] = useState<ProcessIOParameter[]>([]);
-    const [processedInputs, setProcessedInputs] = useState<ProcessIOParameter[]>([]);
+    const [processedOutputs, setProcessedOutputs] = useState<ProcessIOParameter[] | undefined>(undefined);
+    const [processedInputs, setProcessedInputs] = useState<ProcessIOParameter[] | undefined>(undefined);
 
     const outputUuid = process?.containerRequest.outputUuid;
     const requestUuid = process?.containerRequest.uuid;
 
     const inputMounts = getInputCollectionMounts(process?.containerRequest);
 
+    // Resets state when changing processes
+    React.useEffect(() => {
+        setOutputs(undefined);
+        setInputs(undefined);
+        setProcessedOutputs(undefined);
+        setProcessedInputs(undefined);
+    }, [requestUuid]);
+
     React.useEffect(() => {
         if (outputUuid) {
             fetchOutputs(outputUuid, setOutputs);
@@ -87,11 +94,9 @@ export const ProcessPanelRoot = withStyles(styles)(
     }, [outputUuid, fetchOutputs]);
 
     React.useEffect(() => {
-        if (outputDetails.rawOutputs && process) {
+        if (outputDetails !== undefined && outputDetails.rawOutputs && process) {
             const outputDefinitions = getOutputParameters(process.containerRequest);
             setProcessedOutputs(formatOutputData(outputDefinitions, outputDetails.rawOutputs, outputDetails.pdh, auth));
-        } else {
-            setProcessedOutputs([]);
         }
     }, [outputDetails, auth, process]);
 
@@ -149,7 +154,7 @@ export const ProcessPanelRoot = withStyles(styles)(
                     label={ProcessIOCardType.OUTPUT}
                     process={process}
                     params={processedOutputs}
-                    raw={outputDetails.rawOutputs}
+                    raw={outputDetails?.rawOutputs}
                     outputUuid={outputUuid || ""}
                  />
             </MPVPanelContent>

commit 511b214fdb4da6cb7a96a8c253514897a4a83660
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Sep 29 17:32:54 2022 -0400

    16073: Use link element for keep-web links to allow open in new tab
    
    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 2e01282b..d60d71c4 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -587,7 +587,7 @@ const KeepUrlPath = withStyles(styles)(({auth, res, pdh, classes}: KeepUrlProps
 
     const keepUrlPathNav = getKeepNavUrl(auth, res, pdh);
     return keepUrlPath && keepUrlPathNav ?
-        <Tooltip title={"View in keep-web"}><MuiLink className={classes.keepLink} onClick={() => handleClick(keepUrlPathNav)}>{keepUrlPath}</MuiLink></Tooltip> :
+        <Tooltip title={"View in keep-web"}><a className={classes.keepLink} href={keepUrlPathNav} target="_blank">{keepUrlPath}</a></Tooltip> :
         // Show No value for root collection io that lacks path part
         <EmptyValue />;
 });

commit 5037fa02e44b5d53872ed82977e1e172e6848df1
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Sep 29 17:24:58 2022 -0400

    16073: Remove keep: prefix from io param pdh links
    
    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 71b831b4..2e01282b 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -553,9 +553,14 @@ export const getIOParamDisplayValue = (auth: AuthState, input: CommandInputParam
     }
 };
 
+/*
+ * @returns keep url without keep: prefix
+ */
 const getKeepUrl = (file: File | Directory, pdh?: string): string => {
     const isKeepUrl = file.location?.startsWith('keep:') || false;
-    const keepUrl = isKeepUrl ? file.location : pdh ? `keep:${pdh}/${file.location}` : file.location;
+    const keepUrl = isKeepUrl ?
+                        file.location?.replace('keep:', '') :
+                        pdh ? `${pdh}/${file.location}` : file.location;
     return keepUrl || '';
 };
 
@@ -569,7 +574,7 @@ const KeepUrlBase = withStyles(styles)(({auth, res, pdh, classes}: KeepUrlProps
     const keepUrl = getKeepUrl(res, pdh);
     const pdhUrl = keepUrl ? keepUrl.split('/').slice(0, 1)[0] : '';
     // Passing a pdh always returns a relative wb2 collection url
-    const pdhWbPath = getNavUrl(pdhUrl.replace('keep:', ''), auth);
+    const pdhWbPath = getNavUrl(pdhUrl, auth);
     return pdhUrl && pdhWbPath ?
         <Tooltip title={"View collection in Workbench"}><RouterLink to={pdhWbPath} className={classes.keepLink}>{pdhUrl}</RouterLink></Tooltip> :
         <></>;
@@ -588,12 +593,12 @@ const KeepUrlPath = withStyles(styles)(({auth, res, pdh, classes}: KeepUrlProps
 });
 
 const getKeepNavUrl = (auth: AuthState, file: File | Directory, pdh?: string): string => {
-    let keepUrl = getKeepUrl(file, pdh).replace('keep:', '');
+    let keepUrl = getKeepUrl(file, pdh);
     return (getInlineFileUrl(`${auth.config.keepWebServiceUrl}/c=${keepUrl}?api_token=${auth.apiToken}`, auth.config.keepWebServiceUrl, auth.config.keepWebInlineServiceUrl));
 };
 
 const getImageUrl = (auth: AuthState, file: File, pdh?: string): string => {
-    const keepUrl = getKeepUrl(file, pdh).replace('keep:', '');
+    const keepUrl = getKeepUrl(file, pdh);
     return getInlineFileUrl(`${auth.config.keepWebServiceUrl}/c=${keepUrl}?api_token=${auth.apiToken}`, auth.config.keepWebServiceUrl, auth.config.keepWebInlineServiceUrl);
 };
 

commit e90926e12f0d64e435475a7c9c025df4f824b608
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Sep 29 17:24:09 2022 -0400

    16073: Reduce process io preview table padding
    
    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 0a1ec9e2..71b831b4 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -63,7 +63,25 @@ import { ProcessOutputCollectionFiles } from './process-output-collection-files'
 import { Process } from 'store/processes/process';
 import { navigateTo } from 'store/navigation/navigation-action';
 
-type CssRules = 'card' | 'content' | 'title' | 'header' | 'avatar' | 'iconHeader' | 'tableWrapper' | 'tableRoot' | 'paramValue' | 'keepLink' | 'collectionLink' | 'imagePreview' | 'valArray' | 'emptyValue' | 'halfRow' | 'symmetricTabs' | 'imagePlaceholder' | 'rowWithPreview';
+type CssRules =
+  | "card"
+  | "content"
+  | "title"
+  | "header"
+  | "avatar"
+  | "iconHeader"
+  | "tableWrapper"
+  | "tableRoot"
+  | "paramValue"
+  | "keepLink"
+  | "collectionLink"
+  | "imagePreview"
+  | "valArray"
+  | "emptyValue"
+  | "halfRow"
+  | "symmetricTabs"
+  | "imagePlaceholder"
+  | "rowWithPreview";
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     card: {
@@ -102,6 +120,9 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
         '& thead th': {
             verticalAlign: 'bottom',
             paddingBottom: '10px',
+        },
+        '& td, & th': {
+            paddingRight: '25px',
         }
     },
     paramValue: {

commit 8a5cbfb69be9405bd2e798ec830a8d1c679adeb7
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Sep 29 17:22:34 2022 -0400

    16073: Correctly fetch raw inputs wihtout processing
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/store/processes/processes-actions.ts b/src/store/processes/processes-actions.ts
index dbca03ab..eb04ed67 100644
--- a/src/store/processes/processes-actions.ts
+++ b/src/store/processes/processes-actions.ts
@@ -133,6 +133,11 @@ export const reRunProcess = (processUuid: string, workflowUuid: string) =>
         }
     };
 
+export const getRawInputs = (data: any): CommandInputParameter[] | undefined => {
+    if (!data || !data.mounts || !data.mounts[MOUNT_PATH_CWL_INPUT]) { return undefined; }
+    return (data.mounts[MOUNT_PATH_CWL_INPUT].content);
+}
+
 export const getInputs = (data: any): CommandInputParameter[] => {
     if (!data || !data.mounts || !data.mounts[MOUNT_PATH_CWL_WORKFLOW]) { return []; }
     const inputs = getWorkflowInputs(data.mounts[MOUNT_PATH_CWL_WORKFLOW].content);
diff --git a/src/views/process-panel/process-panel-root.tsx b/src/views/process-panel/process-panel-root.tsx
index 1651b63a..9fc043d9 100644
--- a/src/views/process-panel/process-panel-root.tsx
+++ b/src/views/process-panel/process-panel-root.tsx
@@ -17,7 +17,7 @@ import { getIOParamDisplayValue, ProcessIOCard, ProcessIOCardType, ProcessIOPara
 import { getProcessPanelLogs, ProcessLogsPanel } from 'store/process-logs-panel/process-logs-panel';
 import { ProcessLogsCard } from './process-log-card';
 import { FilterOption } from 'views/process-panel/process-log-form';
-import { getInputs, getInputCollectionMounts, getOutputParameters } from 'store/processes/processes-actions';
+import { getInputs, getInputCollectionMounts, getOutputParameters, getRawInputs } from 'store/processes/processes-actions';
 import { CommandInputParameter, getIOParamId } from 'models/workflow';
 import { CommandOutputParameter } from 'cwlts/mappings/v1.0/CommandOutputParameter';
 import { AuthState } from 'store/auth/auth-reducer';
@@ -97,9 +97,11 @@ export const ProcessPanelRoot = withStyles(styles)(
 
     React.useEffect(() => {
         if (process) {
-            const rawInputs = getInputs(process.containerRequest);
+            const rawInputs = getRawInputs(process.containerRequest);
             setInputs(rawInputs);
-            setProcessedInputs(formatInputData(rawInputs, auth));
+
+            const inputs = getInputs(process.containerRequest);
+            setProcessedInputs(formatInputData(inputs, auth));
         }
     }, [requestUuid, auth, process]);
 

commit c2341d7339373cd8d0b62e951d4716b1a8724c0f
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Sep 29 17:20:25 2022 -0400

    16073: Parallelize process output requests
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/store/process-panel/process-panel-actions.ts b/src/store/process-panel/process-panel-actions.ts
index d21b9b83..c8c0bcc7 100644
--- a/src/store/process-panel/process-panel-actions.ts
+++ b/src/store/process-panel/process-panel-actions.ts
@@ -49,8 +49,10 @@ export const navigateToOutput = (uuid: string) =>
 export const loadOutputs = (uuid: string, setOutputs) =>
     async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
         try {
-            const files = await services.collectionService.files(uuid);
-            const collection = await services.collectionService.get(uuid);
+            const filesPromise = services.collectionService.files(uuid);
+            const collectionPromise = services.collectionService.get(uuid);
+            const [files, collection] = await Promise.all([filesPromise, collectionPromise]);
+
             const outputFile = files.find((file) => file.name === 'cwl.output.json') as CollectionFile | undefined;
             let outputData = outputFile ? await services.collectionService.getFileContents(outputFile) : undefined;
             if ((outputData = JSON.parse(outputData)) && collection.portableDataHash) {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list