Merge branch 'master' into 14129-inputs-modal-new
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / process-action-set.ts
index d41b59d6f31b0547dff1d380091d4910d7038aa9..5db50dd50d85a86f61cdc94d9b05c0b65415c2da 100644 (file)
@@ -16,7 +16,9 @@ import { openProcessUpdateDialog } from "~/store/processes/process-update-action
 import { openCopyProcessDialog } from '~/store/processes/process-copy-actions';
 import { openProcessCommandDialog } from '~/store/processes/process-command-actions';
 import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
+import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
+import { openProcessInputDialog } from "~/store/processes/process-input-actions";
 
 export const processActionSet: ContextMenuActionSet = [[
     {
@@ -29,15 +31,8 @@ export const processActionSet: ContextMenuActionSet = [[
     {
         icon: ShareIcon,
         name: "Share",
-        execute: (dispatch, resource) => {
-            // add code
-        }
-    },
-    {
-        icon: MoveToIcon,
-        name: "Move to",
-        execute: (dispatch, resource) => {
-            dispatch<any>(openMoveProcessDialog(resource));
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openSharingDialog(uuid));
         }
     },
     {
@@ -48,6 +43,13 @@ export const processActionSet: ContextMenuActionSet = [[
             });
         }
     },
+    {
+        icon: MoveToIcon,
+        name: "Move to",
+        execute: (dispatch, resource) => {
+            dispatch<any>(openMoveProcessDialog(resource));
+        }
+    },
     {
         icon: CopyIcon,
         name: "Copy to project",
@@ -66,7 +68,7 @@ export const processActionSet: ContextMenuActionSet = [[
         icon: InputIcon,
         name: "Inputs",
         execute: (dispatch, resource) => {
-            // add code
+            dispatch<any>(openProcessInputDialog(resource.uuid));
         }
     },
     {
@@ -83,13 +85,6 @@ export const processActionSet: ContextMenuActionSet = [[
             dispatch<any>(openProcessCommandDialog(resource.uuid));
         }
     },
-    {
-        icon: DetailsIcon,
-        name: "View details",
-        execute: dispatch => {
-            dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
-        }
-    },
     {
         icon: LogIcon,
         name: "Log",
@@ -98,24 +93,31 @@ export const processActionSet: ContextMenuActionSet = [[
         }
     },
     {
-        icon: ProvenanceGraphIcon,
-        name: "Provenance graph",
-        execute: (dispatch, resource) => {
-            // add code
+        icon: DetailsIcon,
+        name: "View details",
+        execute: dispatch => {
+            dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
         }
     },
+    // {
+    //     icon: ProvenanceGraphIcon,
+    //     name: "Provenance graph",
+    //     execute: (dispatch, resource) => {
+    //         // add code
+    //     }
+    // },
     {
         icon: AdvancedIcon,
         name: "Advanced",
         execute: (dispatch, resource) => {
             dispatch<any>(openAdvancedTabDialog(resource.uuid));
         }
-    },
-    {
-        icon: RemoveIcon,
-        name: "Remove",
-        execute: (dispatch, resource) => {
-            // add code
-        }
     }
+    // {
+    //     icon: RemoveIcon,
+    //     name: "Remove",
+    //     execute: (dispatch, resource) => {
+    //         // add code
+    //     }
+    // }
 ]];