X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/5941908e7a1d369ca823702f60e8fd048ae08a9a..d9ee24d0f78a21603e2276d0d3142d4db40a831b:/src/views/subprocess-panel/subprocess-panel.tsx?ds=sidebyside

diff --git a/src/views/subprocess-panel/subprocess-panel.tsx b/src/views/subprocess-panel/subprocess-panel.tsx
new file mode 100644
index 00000000..4717f2d7
--- /dev/null
+++ b/src/views/subprocess-panel/subprocess-panel.tsx
@@ -0,0 +1,28 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { Dispatch } from "redux";
+import { connect } from "react-redux";
+import { openContextMenu, resourceKindToContextMenuKind } from '~/store/context-menu/context-menu-actions';
+import { SubprocessPanelRoot, SubprocessActionProps } from '~/views/subprocess-panel/subprocess-panel-root';
+import { ResourceKind } from '~/models/resource';
+
+const mapDispatchToProps = (dispatch: Dispatch): SubprocessActionProps => ({
+    onContextMenu: (event, resourceUuid) => {
+        const kind = resourceKindToContextMenuKind(resourceUuid);
+        if (kind) {
+            dispatch<any>(openContextMenu(event, {
+                name: '',
+                uuid: resourceUuid,
+                ownerUuid: '',
+                kind: ResourceKind.PROCESS,
+                menuKind: kind
+            }));
+        }
+    },
+    onItemClick: (resourceUuid: string) => { return; },
+    onItemDoubleClick: uuid => { return; }
+});
+
+export const SubprocessPanel = connect(mapDispatchToProps)(SubprocessPanelRoot);
\ No newline at end of file
