1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { dialogActions } from '~/store/dialog/dialog-actions';
6 import { RootState } from '~/store/store';
7 import { Dispatch } from 'redux';
8 import { getProcess, Process } from '~/store/processes/process';
10 export const PROCESS_INPUT_DIALOG_NAME = 'processInputDialog';
12 export const openProcessInputDialog = (processUuid: string) =>
13 (dispatch: Dispatch<any>, getState: () => RootState) => {
14 const process = getProcess(processUuid)(getState().resources);
16 const data: Process = process;
17 dispatch(dialogActions.OPEN_DIALOG({ id: PROCESS_INPUT_DIALOG_NAME, data }));