[arvados-workbench2] updated: 2.4.0-230-g3e467c1a
git repository hosting
git at public.arvados.org
Mon Oct 17 20:14:20 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 | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
via 3e467c1a87339c399f63db00b15bf34ac8781e31 (commit)
from 3c6ea6ded33b5740035d059d7d9812ed951ab215 (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 3e467c1a87339c399f63db00b15bf34ac8781e31
Author: Stephen Smith <stephen at curii.com>
Date: Mon Oct 17 16:13:45 2022 -0400
16073: Correctly handle processes with no outputs to avoid infinite loading indicatior
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 b62a4886..758c3523 100644
--- a/src/store/process-panel/process-panel-actions.ts
+++ b/src/store/process-panel/process-panel-actions.ts
@@ -63,17 +63,17 @@ export const loadOutputs = (containerRequest: ContainerRequestResource, setOutpu
// Fetch outputs from keep
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) {
+ if (outputData && (outputData = JSON.parse(outputData)) && collection.portableDataHash) {
setOutputs({
rawOutputs: outputData,
pdh: collection.portableDataHash,
});
} else {
- setOutputs({});
+ setOutputs({rawOutputs: {}});
}
}
} catch {
- setOutputs({});
+ setOutputs({rawOutputs: {}});
}
};
diff --git a/src/store/processes/processes-actions.ts b/src/store/processes/processes-actions.ts
index 1f672759..1deb4cb8 100644
--- a/src/store/processes/processes-actions.ts
+++ b/src/store/processes/processes-actions.ts
@@ -135,12 +135,14 @@ export const reRunProcess = (processUuid: string, workflowUuid: string) =>
/*
* Fetches raw inputs from containerRequest mounts with fallback to properties
+ * Returns undefined if containerRequest not loaded
+ * Returns [] if inputs not found in mounts or props
*/
export const getRawInputs = (data: any): CommandInputParameter[] | undefined => {
if (!data) { return undefined; }
const mountInput = data.mounts?.[MOUNT_PATH_CWL_INPUT]?.content;
const propsInput = data.properties?.cwl_input;
- if (!mountInput && !propsInput) { return undefined; }
+ if (!mountInput && !propsInput) { return []; }
return (mountInput || propsInput);
}
@@ -166,6 +168,7 @@ export const getInputs = (data: any): CommandInputParameter[] => {
/*
* Fetches raw outputs from containerRequest properties
+ * Assumes containerRequest is loaded
*/
export const getRawOutputs = (data: any): CommandInputParameter[] | undefined => {
if (!data || !data.properties || !data.properties.cwl_output) { return undefined; }
diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx
index 94544918..82846128 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -287,7 +287,7 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps
<ProcessIORaw data={raw} />
</div>}
</>}
- {raw && Object.keys(raw).length === 0 && <Grid container item alignItems='center' justify='center'>
+ {!loading && raw && Object.keys(raw).length === 0 && <Grid container item alignItems='center' justify='center'>
<DefaultView messages={["No parameters found"]} />
</Grid>}
</>) :
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list