X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/578c6026645cda9432f3386f29521075b8526609..73e8a8225a4a702e3392da9ac9bb50ff479377c0:/src/views-components/multiselect-toolbar/ms-process-action-set.ts?ds=inline diff --git a/src/views-components/multiselect-toolbar/ms-process-action-set.ts b/src/views-components/multiselect-toolbar/ms-process-action-set.ts index f8ab66d9..a5a4f0fb 100644 --- a/src/views-components/multiselect-toolbar/ms-process-action-set.ts +++ b/src/views-components/multiselect-toolbar/ms-process-action-set.ts @@ -2,11 +2,14 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { MoveToIcon, RemoveIcon, ReRunProcessIcon } from "components/icon/icon"; +import { MoveToIcon, RemoveIcon, ReRunProcessIcon, OutputIcon, RenameIcon } from "components/icon/icon"; import { openMoveProcessDialog } from "store/processes/process-move-actions"; import { openCopyProcessDialog } from "store/processes/process-copy-actions"; import { openRemoveProcessDialog } from "store/processes/processes-actions"; -import { MultiSelectMenuAction, MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "./ms-menu-actions"; +import { MultiSelectMenuAction, MultiSelectMenuActionSet, msCommonActionSet } from "./ms-menu-actions"; +import { MultiSelectMenuActionNames } from "views-components/multiselect-toolbar/ms-menu-actions"; +import { openProcessUpdateDialog } from "store/processes/process-update-actions"; +import { msNavigateToOutput } from "store/multiselect/multiselect-actions"; const msCopyAndRerunProcess: MultiSelectMenuAction = { name: MultiSelectMenuActionNames.COPY_AND_RERUN_PROCESS, @@ -40,14 +43,39 @@ const msMoveTo: MultiSelectMenuAction = { }, } +const msViewOutputs: MultiSelectMenuAction = { + name: MultiSelectMenuActionNames.OUTPUTS, + icon: OutputIcon, + hasAlts: false, + isForMulti: false, + execute: (dispatch, resources) => { + if (resources[0]) { + dispatch(msNavigateToOutput(resources[0])); + } + }, +} + +const msEditProcess: MultiSelectMenuAction = { + name: MultiSelectMenuActionNames.EDIT_PROCESS, + icon: RenameIcon, + hasAlts: false, + isForMulti: false, + execute: (dispatch, resources) => { + dispatch(openProcessUpdateDialog(resources[0])); + }, +} + export const msProcessActionSet: MultiSelectMenuActionSet = [ [ + ...msCommonActionSet, msCopyAndRerunProcess, msRemoveProcess, - msMoveTo + msMoveTo, + msViewOutputs, + msEditProcess ] ]; -const { MOVE_TO, REMOVE, COPY_AND_RERUN_PROCESS } = MultiSelectMenuActionNames +const { MOVE_TO, REMOVE, COPY_AND_RERUN_PROCESS, ADD_TO_FAVORITES, OPEN_IN_NEW_TAB, VIEW_DETAILS, API_DETAILS, SHARE, ADD_TO_PUBLIC_FAVORITES, OUTPUTS, EDIT_PROCESS } = MultiSelectMenuActionNames -export const processResourceMSActionsFilter = new Set([MOVE_TO, REMOVE, COPY_AND_RERUN_PROCESS ]); +export const msCommonProcessActionFilter = new Set([MOVE_TO, REMOVE, COPY_AND_RERUN_PROCESS, ADD_TO_FAVORITES, OPEN_IN_NEW_TAB, VIEW_DETAILS, API_DETAILS, SHARE, ADD_TO_PUBLIC_FAVORITES, OUTPUTS, EDIT_PROCESS ]);