-export const readOnlyProcessResourceActionSet: ContextMenuActionSet = [[
- {
- component: ToggleFavoriteAction,
- execute: (dispatch, resource) => {
- dispatch<any>(toggleFavorite(resource)).then(() => {
- dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
- });
- }
- },
- {
- icon: CopyIcon,
- name: "Copy to project",
- execute: (dispatch, resource) => {
- dispatch<any>(openCopyProcessDialog(resource));
- }
- },
- {
- icon: ReRunProcessIcon,
- name: "Re-run process",
- execute: (dispatch, resource) => {
- if(resource.workflowUuid) {
- dispatch<any>(reRunProcess(resource.uuid, resource.workflowUuid));
- } else {
- dispatch(snackbarActions.OPEN_SNACKBAR({ message: `You can't re-run this process`, hideDuration: 2000, kind: SnackbarKind.ERROR }));
- }
- }
- },
- {
- icon: InputIcon,
- name: "Inputs",
- execute: (dispatch, resource) => {
- dispatch<any>(openProcessInputDialog(resource.uuid));
- }
- },
- {
- icon: OutputIcon,
- name: "Outputs",
- execute: (dispatch, resource) => {
- if(resource.outputUuid){
- dispatch<any>(navigateToOutput(resource.outputUuid));
- }
- }
- },
- {
- icon: DetailsIcon,
- name: "View details",
- execute: dispatch => {
- dispatch<any>(toggleDetailsPanel());
- }
- },
- {
- icon: AdvancedIcon,
- name: "Advanced",
- execute: (dispatch, resource) => {
- dispatch<any>(openAdvancedTabDialog(resource.uuid));
- }
- },
-]];
+export const readOnlyProcessResourceActionSet: ContextMenuActionSet = [
+ [
+ {
+ component: ToggleFavoriteAction,
+ execute: (dispatch, resource) => {
+ dispatch<any>(toggleFavorite(resource)).then(() => {
+ dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
+ });
+ },
+ },
+ {
+ icon: OpenIcon,
+ name: "Open in new tab",
+ execute: (dispatch, resource) => {
+ dispatch<any>(openInNewTabAction(resource));
+ },
+ },
+ {
+ icon: ReRunProcessIcon,
+ name: "Copy and re-run process",
+ execute: (dispatch, resource) => {
+ dispatch<any>(openCopyProcessDialog(resource));
+ },
+ },
+ {
+ icon: OutputIcon,
+ name: "Outputs",
+ execute: (dispatch, resource) => {
+ if (resource.outputUuid) {
+ dispatch<any>(navigateToOutput(resource.outputUuid));
+ }
+ },
+ },
+ {
+ icon: DetailsIcon,
+ name: "View details",
+ execute: dispatch => {
+ dispatch<any>(toggleDetailsPanel());
+ },
+ },
+ {
+ icon: AdvancedIcon,
+ name: "API Details",
+ execute: (dispatch, resource) => {
+ dispatch<any>(openAdvancedTabDialog(resource.uuid));
+ },
+ },
+ ],
+];