[ARVADOS-WORKBENCH2] updated: 1.3.0-96-g3c5e47e

Git user git at public.curoverse.com
Tue Dec 11 08:32:55 EST 2018


Summary of changes:
 src/routes/routes.ts                      |  6 ++++++
 src/store/navigation/navigation-action.ts |  4 +++-
 src/views/groups-panel/groups-panel.tsx   | 13 ++++++++-----
 src/views/workbench/workbench.tsx         |  1 +
 4 files changed, 18 insertions(+), 6 deletions(-)

       via  3c5e47e956b63a7caf08a9f25d2c6237e6370b65 (commit)
      from  4223548258ddb3dd7bfb9c520c7c8eb3b5e80f84 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 3c5e47e956b63a7caf08a9f25d2c6237e6370b65
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Tue Dec 11 14:31:17 2018 +0100

    Setup routing for group details
    
    Feature #14505
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/routes/routes.ts b/src/routes/routes.ts
index 2c6dbea..6d44725 100644
--- a/src/routes/routes.ts
+++ b/src/routes/routes.ts
@@ -29,6 +29,7 @@ export const Routes = {
     USERS: '/users',
     API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations`,
     GROUPS: '/groups',
+    GROUP_DETAILS: `/group/:id(${RESOURCE_UUID_PATTERN})`,
 };
 
 export const getResourceUrl = (uuid: string) => {
@@ -49,6 +50,8 @@ export const getProcessUrl = (uuid: string) => `/processes/${uuid}`;
 
 export const getProcessLogUrl = (uuid: string) => `/process-logs/${uuid}`;
 
+export const getGroupUrl = (uuid: string) => `/group/${uuid}`;
+
 export interface ResourceRouteParams {
     id: string;
 }
@@ -112,3 +115,6 @@ export const matchApiClientAuthorizationsRoute = (route: string) =>
 
 export const matchGroupsRoute = (route: string) =>
     matchPath(route, { path: Routes.GROUPS });
+
+export const matchGroupDetailsRoute = (route: string) =>
+    matchPath<ResourceRouteParams>(route, { path: Routes.GROUP_DETAILS });
diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts
index 8fef0ea..7930fe2 100644
--- a/src/store/navigation/navigation-action.ts
+++ b/src/store/navigation/navigation-action.ts
@@ -8,7 +8,7 @@ import { ResourceKind, extractUuidKind } from '~/models/resource';
 import { getCollectionUrl } from "~/models/collection";
 import { getProjectUrl } from "~/models/project";
 import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions';
-import { Routes, getProcessUrl, getProcessLogUrl } from '~/routes/routes';
+import { Routes, getProcessUrl, getProcessLogUrl, getGroupUrl } from '~/routes/routes';
 import { RootState } from '~/store/store';
 import { ServiceRepository } from '~/services/services';
 
@@ -79,3 +79,5 @@ export const navigateToUsers = push(Routes.USERS);
 export const navigateToApiClientAuthorizations = push(Routes.API_CLIENT_AUTHORIZATIONS);
 
 export const navigateToGroups = push(Routes.GROUPS);
+
+export const navigateToGroupDetails = compose(push, getGroupUrl);
diff --git a/src/views/groups-panel/groups-panel.tsx b/src/views/groups-panel/groups-panel.tsx
index 0d318bc..0b2cd2c 100644
--- a/src/views/groups-panel/groups-panel.tsx
+++ b/src/views/groups-panel/groups-panel.tsx
@@ -23,6 +23,7 @@ import { Dispatch } from 'redux';
 import { openContextMenu } from '~/store/context-menu/context-menu-actions';
 import { ResourceKind } from '~/models/resource';
 import { LinkClass, LinkResource } from '~/models/link';
+import { navigateToGroupDetails } from '~/store/navigation/navigation-action';
 
 export enum GroupsPanelColumnNames {
     GROUP = "Name",
@@ -61,14 +62,16 @@ const mapStateToProps = (state: RootState) => {
     };
 };
 
-const mapDispatchToProps = (dispatch: Dispatch) => ({
-    onContextMenu: (event: React.MouseEvent<HTMLElement>, item: any) => dispatch<any>(openContextMenu(event, item)),
-    onNewGroup: () => dispatch<any>(openCreateGroupDialog()),
-});
+const mapDispatchToProps = {
+    onContextMenu: openContextMenu,
+    onRowDoubleClick: navigateToGroupDetails,
+    onNewGroup: openCreateGroupDialog,
+};
 
 export interface GroupsPanelProps {
     onNewGroup: () => void;
     onContextMenu: (event: React.MouseEvent<HTMLElement>, item: any) => void;
+    onRowDoubleClick: (item: string) => void;
     resources: ResourcesState;
 }
 
@@ -82,7 +85,7 @@ export const GroupsPanel = connect(
                 <DataExplorer
                     id={GROUPS_PANEL_ID}
                     onRowClick={noop}
-                    onRowDoubleClick={noop}
+                    onRowDoubleClick={this.props.onRowDoubleClick}
                     onContextMenu={this.handleContextMenu}
                     contextMenuColumn={true}
                     hideColumnSelector
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 62c10f2..e137d0a 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -157,6 +157,7 @@ export const WorkbenchPanel =
                                 <Route path={Routes.API_CLIENT_AUTHORIZATIONS} component={ApiClientAuthorizationPanel} />
                                 <Route path={Routes.MY_ACCOUNT} component={MyAccountPanel} />
                                 <Route path={Routes.GROUPS} component={GroupsPanel} />
+                                <Route path={Routes.GROUP_DETAILS} render={() => <h1>Group details</h1>} />
                             </Switch>
                         </Grid>
                     </Grid>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list