Merge branch '16073-process-io-panels' into main. Closes #16073
[arvados-workbench2.git] / src / store / process-panel / process-panel.ts
index 935cfa58b4bf6929a1ed6c3e27428fd4b258a79d..d0d5edebf3e7c35807c8f35c11a0f3aafc45c13a 100644 (file)
@@ -2,7 +2,29 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
+import { CommandInputParameter } from 'models/workflow';
+import { RouterState } from "react-router-redux";
+import { matchProcessRoute } from "routes/routes";
+import { ProcessIOParameter } from "views/process-panel/process-io-card";
+import { CommandOutputParameter } from 'cwlts/mappings/v1.0/CommandOutputParameter';
+
+export type OutputDetails = {
+    rawOutputs?: any;
+    pdh?: string;
+}
+
 export interface ProcessPanel {
     containerRequestUuid: string;
     filters: { [status: string]: boolean };
+    inputRaw: CommandInputParameter[] | null;
+    inputParams: ProcessIOParameter[] | null;
+    outputRaw: OutputDetails | null;
+    outputDefinitions: CommandOutputParameter[];
+    outputParams: ProcessIOParameter[] | null;
 }
+
+export const getProcessPanelCurrentUuid = (router: RouterState) => {
+    const pathname = router.location ? router.location.pathname : '';
+    const match = matchProcessRoute(pathname);
+    return match ? match.params.id : undefined;
+};