16073: Correctly fetch raw inputs wihtout processing
[arvados-workbench2.git] / src / views / process-panel / process-panel-root.tsx
index 4508f5ac3e720a89b57335ecaa7e082ca36c92d9..9fc043d9e0a4aa4db20294fe821c3995da75c0cb 100644 (file)
@@ -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]);
 
@@ -133,7 +135,7 @@ export const ProcessPanelRoot = withStyles(styles)(
                     navigateToLog={props.navigateToLog}
                 />
             </MPVPanelContent>
-            <MPVPanelContent forwardProps xs="auto" data-cy="process-inputs">
+            <MPVPanelContent forwardProps xs maxHeight='50%' data-cy="process-inputs">
                 <ProcessIOCard
                     label={ProcessIOCardType.INPUT}
                     process={process}
@@ -142,7 +144,7 @@ export const ProcessPanelRoot = withStyles(styles)(
                     mounts={inputMounts}
                  />
             </MPVPanelContent>
-            <MPVPanelContent forwardProps xs="auto" data-cy="process-outputs">
+            <MPVPanelContent forwardProps xs maxHeight='50%' data-cy="process-outputs">
                 <ProcessIOCard
                     label={ProcessIOCardType.OUTPUT}
                     process={process}
@@ -168,11 +170,9 @@ export const ProcessPanelRoot = withStyles(styles)(
 
 const formatInputData = (inputs: CommandInputParameter[], auth: AuthState): ProcessIOParameter[] => {
     return inputs.map(input => {
-        const doc = Array.isArray(input.doc) ? input.doc.join(', ') : input.doc || "";
         return {
             id: getIOParamId(input),
             label: input.label || "",
-            doc: doc.substring(0,50) + (doc.length > 50 ? "..." : ""),
             value: getIOParamDisplayValue(auth, input)
         };
     });
@@ -180,11 +180,9 @@ const formatInputData = (inputs: CommandInputParameter[], auth: AuthState): Proc
 
 const formatOutputData = (definitions: CommandOutputParameter[], values: any, pdh: string | undefined, auth: AuthState): ProcessIOParameter[] => {
     return definitions.map(output => {
-        const doc = Array.isArray(output.doc) ? output.doc.join(', ') : output.doc || "";
         return {
             id: getIOParamId(output),
             label: output.label || "",
-            doc: doc.substring(0,50) + (doc.length > 50 ? "..." : ""),
             value: getIOParamDisplayValue(auth, Object.assign(output, { value: values[getIOParamId(output)] || [] }), pdh)
         };
     });