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';
7 import { Dispatch } from 'redux';
8 import { getProcess } from '~/store/processes/process';
10 export const PROCESS_COMMAND_DIALOG_NAME = 'processCommandDialog';
12 export interface ProcessCommandDialogData {
17 export const openProcessCommandDialog = (processUuid: string) =>
18 (dispatch: Dispatch<any>, getState: () => RootState) => {
19 const process = getProcess(processUuid)(getState().resources);
21 const data: ProcessCommandDialogData = {
22 command: process.containerRequest.command.join(' '),
23 processName: process.containerRequest.name,
25 dispatch(dialogActions.OPEN_DIALOG({ id: PROCESS_COMMAND_DIALOG_NAME, data }));