1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from "react";
6 import { Dialog, DialogActions, Button, CardHeader, DialogContent } from '@mui/material';
7 import { WithDialogProps } from 'store/dialog/with-dialog';
8 import { withDialog } from "store/dialog/with-dialog";
9 import { PROCESS_INPUT_DIALOG_NAME } from 'store/processes/process-input-actions';
10 import { RunProcessInputsForm } from "views/run-process-panel/run-process-inputs-form";
11 import { MOUNT_PATH_CWL_WORKFLOW, MOUNT_PATH_CWL_INPUT } from "models/process";
12 import { getWorkflowInputs } from "models/workflow";
14 export const ProcessInputDialog = withDialog(PROCESS_INPUT_DIALOG_NAME)(
15 (props: WithDialogProps<any>) =>
19 onClose={props.closeDialog}>
21 title="Inputs - Pipeline template that generates a config file from a template" />
23 <RunProcessInputsForm inputs={getInputs(props.data.containerRequest)} />
29 onClick={props.closeDialog}>
36 const getInputs = (data: any) => {
37 if (!data || !data.mounts || !data.mounts[MOUNT_PATH_CWL_WORKFLOW]) { return []; }
38 const inputs = getWorkflowInputs(data.mounts[MOUNT_PATH_CWL_WORKFLOW].content);
40 ? inputs.map( (it: any) => (
45 value: data.mounts[MOUNT_PATH_CWL_INPUT].content[it.id.split('/').pop()] || [],