X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/59329caeae17903b97b90b167df5a8122a0c9d95..5a84b3bf9b7bf9a1d07e9595b2453c4133ffd23d:/src/store/processes/process-input-actions.ts diff --git a/src/store/processes/process-input-actions.ts b/src/store/processes/process-input-actions.ts index b35081c19e..7ce2749c92 100644 --- a/src/store/processes/process-input-actions.ts +++ b/src/store/processes/process-input-actions.ts @@ -6,7 +6,7 @@ import { dialogActions } from '~/store/dialog/dialog-actions'; import { RootState } from '~/store/store'; import { Dispatch } from 'redux'; import { getProcess } from '~/store/processes/process'; -import { snackbarActions } from '~/store/snackbar/snackbar-actions'; +import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions'; export const PROCESS_INPUT_DIALOG_NAME = 'processInputDialog'; @@ -15,10 +15,10 @@ export const openProcessInputDialog = (processUuid: string) => const process = getProcess(processUuid)(getState().resources); if (process) { const data: any = process; - if (data && data.containerRequest.mounts.varLibCwlWorkflowJson && data.containerRequest.mounts.varLibCwlWorkflowJson.content.graph[1].inputs.length > 0) { + if (data && data.containerRequest.mounts.varLibCwlWorkflowJson && data.containerRequest.mounts.varLibCwlWorkflowJson.content.graph.filter((a: any) => a.class === 'Workflow')[0] && data.containerRequest.mounts.varLibCwlWorkflowJson.content.graph.filter((a: any) => a.class === 'Workflow')[0].inputs.length > 0) { dispatch(dialogActions.OPEN_DIALOG({ id: PROCESS_INPUT_DIALOG_NAME, data })); } else { - dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'There are no inputs in this process!' })); + dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'There are no inputs in this process!', kind: SnackbarKind.ERROR })); } } }; \ No newline at end of file