Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
// 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;
// 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({
rawOutputs: outputData,
pdh: collection.portableDataHash,
});
} else {
+ setOutputs({rawOutputs: {}});
+ setOutputs({rawOutputs: {}});
/*
* Fetches raw inputs from containerRequest mounts with fallback to properties
/*
* 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;
*/
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);
}
return (mountInput || propsInput);
}
/*
* Fetches raw outputs from containerRequest properties
/*
* 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; }
*/
export const getRawOutputs = (data: any): CommandInputParameter[] | undefined => {
if (!data || !data.properties || !data.properties.cwl_output) { return undefined; }
<ProcessIORaw data={raw} />
</div>}
</>}
<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>}
</>) :
<DefaultView messages={["No parameters found"]} />
</Grid>}
</>) :