[ARVADOS-WORKBENCH2] created: 1.2.0-683-ga533e69
Git user
git at public.curoverse.com
Wed Oct 17 06:09:48 EDT 2018
at a533e690eaf32ab9c1357b8d87d46ad3378a1648 (commit)
commit a533e690eaf32ab9c1357b8d87d46ad3378a1648
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Wed Oct 17 12:09:30 2018 +0200
triggering-view-details-from-more-options-does-not-works
Feature #14254
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/views-components/context-menu/action-sets/collection-action-set.ts b/src/views-components/context-menu/action-sets/collection-action-set.ts
index 67249fc..cff30fb 100644
--- a/src/views-components/context-menu/action-sets/collection-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-action-set.ts
@@ -12,6 +12,7 @@ import { openMoveCollectionDialog } from '~/store/collections/collection-move-ac
import { openCollectionCopyDialog } from "~/store/collections/collection-copy-actions";
import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action";
import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
+import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
export const collectionActionSet: ContextMenuActionSet = [[
{
@@ -57,9 +58,7 @@ export const collectionActionSet: ContextMenuActionSet = [[
{
icon: DetailsIcon,
name: "View details",
- execute: (dispatch, resource) => {
- // add code
- }
+ execute: dispatch => dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL())
},
{
icon: ProvenanceGraphIcon,
diff --git a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
index b7d3e64..8665bc1 100644
--- a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
@@ -12,6 +12,7 @@ import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-acti
import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions';
import { openCollectionCopyDialog } from '~/store/collections/collection-copy-actions';
import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
+import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
export const collectionResourceActionSet: ContextMenuActionSet = [[
{
@@ -57,9 +58,7 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
{
icon: DetailsIcon,
name: "View details",
- execute: (dispatch, resource) => {
- // add code
- }
+ execute: dispatch => dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL())
},
{
icon: RemoveIcon,
diff --git a/src/views-components/context-menu/action-sets/process-action-set.ts b/src/views-components/context-menu/action-sets/process-action-set.ts
index 107f182..3248873 100644
--- a/src/views-components/context-menu/action-sets/process-action-set.ts
+++ b/src/views-components/context-menu/action-sets/process-action-set.ts
@@ -15,6 +15,7 @@ import { openMoveProcessDialog } from '~/store/processes/process-move-actions';
import { openProcessUpdateDialog } from "~/store/processes/process-update-actions";
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';
export const processActionSet: ContextMenuActionSet = [[
{
@@ -78,9 +79,7 @@ export const processActionSet: ContextMenuActionSet = [[
{
icon: DetailsIcon,
name: "View details",
- execute: (dispatch, resource) => {
- // add code
- }
+ execute: dispatch => dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL())
},
{
icon: LogIcon,
diff --git a/src/views-components/context-menu/action-sets/process-resource-action-set.ts b/src/views-components/context-menu/action-sets/process-resource-action-set.ts
index b198523..a446dc8 100644
--- a/src/views-components/context-menu/action-sets/process-resource-action-set.ts
+++ b/src/views-components/context-menu/action-sets/process-resource-action-set.ts
@@ -10,6 +10,7 @@ import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-acti
import { openMoveProcessDialog } from '~/store/processes/process-move-actions';
import { openProcessUpdateDialog } from "~/store/processes/process-update-actions";
import { openCopyProcessDialog } from '~/store/processes/process-copy-actions';
+import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
export const processResourceActionSet: ContextMenuActionSet = [[
{
@@ -45,9 +46,7 @@ export const processResourceActionSet: ContextMenuActionSet = [[
{
icon: DetailsIcon,
name: "View details",
- execute: (dispatch, resource) => {
- // add code
- }
+ execute: dispatch => dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL())
},
{
icon: RemoveIcon,
diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts
index e5a1915..85848a2 100644
--- a/src/views-components/context-menu/action-sets/project-action-set.ts
+++ b/src/views-components/context-menu/action-sets/project-action-set.ts
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0
import { ContextMenuActionSet } from "../context-menu-action-set";
-import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon } from "~/components/icon/icon";
+import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon, DetailsIcon } from '~/components/icon/icon';
import { ToggleFavoriteAction } from "../actions/favorite-action";
import { toggleFavorite } from "~/store/favorites/favorites-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
@@ -12,6 +12,7 @@ import { openProjectCreateDialog } from '~/store/projects/project-create-actions
import { openProjectUpdateDialog } from '~/store/projects/project-update-actions';
import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action";
import { toggleProjectTrashed } from "~/store/trash/trash-actions";
+import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
export const projectActionSet: ContextMenuActionSet = [[
{
@@ -54,4 +55,9 @@ export const projectActionSet: ContextMenuActionSet = [[
// add code
}
},
+ {
+ icon: DetailsIcon,
+ name: "View details",
+ execute: dispatch => dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL())
+ }
]];
diff --git a/src/views/shared-with-me-panel/shared-with-me-panel.tsx b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
index 9106f87..4aee73a 100644
--- a/src/views/shared-with-me-panel/shared-with-me-panel.tsx
+++ b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
@@ -14,9 +14,8 @@ import { navigateTo } from "~/store/navigation/navigation-action";
import { loadDetailsPanel } from "~/store/details-panel/details-panel-action";
import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
import { SHARED_WITH_ME_PANEL_ID } from '~/store/shared-with-me-panel/shared-with-me-panel-actions';
-import { openContextMenu } from '~/store/context-menu/context-menu-actions';
+import { openContextMenu, resourceKindToContextMenuKind } from '~/store/context-menu/context-menu-actions';
import { GroupResource } from '~/models/group';
-import { ContextMenuKind } from '~/views-components/context-menu/context-menu';
type CssRules = "toolbar" | "button";
@@ -52,15 +51,16 @@ export const SharedWithMePanel = withStyles(styles)(
}
handleContextMenu = (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => {
+ const menuKind = resourceKindToContextMenuKind(resourceUuid);
const resource = getResource<GroupResource>(resourceUuid)(this.props.resources);
- if (resource) {
+ if (menuKind && resource) {
this.props.dispatch<any>(openContextMenu(event, {
name: '',
uuid: resource.uuid,
ownerUuid: resource.ownerUuid,
isTrashed: resource.isTrashed,
kind: resource.kind,
- menuKind: ContextMenuKind.PROJECT,
+ menuKind
}));
}
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list