[ARVADOS-WORKBENCH2] updated: 1.2.0-935-g5fa4619

Git user git at public.curoverse.com
Thu Nov 22 13:40:30 EST 2018


Summary of changes:
 src/store/sharing-dialog/sharing-dialog-actions.ts |  1 +
 src/views-components/data-explorer/renderers.tsx   | 15 +++++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

       via  5fa46194c4a94e58a2b92de83f410112ef4c9150 (commit)
      from  d9c7613b436dad495a2b5a3d06b58c5cd5ef9592 (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 5fa46194c4a94e58a2b92de83f410112ef4c9150
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date:   Thu Nov 22 19:40:20 2018 +0100

    refs #14523 fix share button for workflow and progress when add collabs
    
    Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>

diff --git a/src/store/sharing-dialog/sharing-dialog-actions.ts b/src/store/sharing-dialog/sharing-dialog-actions.ts
index d1ac14c..0e3c76b 100644
--- a/src/store/sharing-dialog/sharing-dialog-actions.ts
+++ b/src/store/sharing-dialog/sharing-dialog-actions.ts
@@ -50,6 +50,7 @@ export const sendSharingInvitations = async (dispatch: Dispatch) => {
         message: 'Resource has been shared',
         kind: SnackbarKind.SUCCESS,
     }));
+    dispatch(progressIndicatorActions.STOP_WORKING(SHARING_DIALOG_NAME));
 };
 
 const loadSharingDialog = async (dispatch: Dispatch, getState: () => RootState, { permissionService }: ServiceRepository) => {
diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index c8c6428..d0266ad 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -9,18 +9,19 @@ import { ResourceKind, TrashableResource } from '~/models/resource';
 import { ProjectIcon, CollectionIcon, ProcessIcon, DefaultIcon, WorkflowIcon, ShareIcon } from '~/components/icon/icon';
 import { formatDate, formatFileSize } from '~/common/formatters';
 import { resourceLabel } from '~/common/labels';
-import { connect } from 'react-redux';
+import { connect, DispatchProp } from 'react-redux';
 import { RootState } from '~/store/store';
 import { getResource } from '~/store/resources/resources';
 import { GroupContentsResource } from '~/services/groups-service/groups-service';
 import { getProcess, Process, getProcessStatus, getProcessStatusColor } from '~/store/processes/process';
 import { ArvadosTheme } from '~/common/custom-theme';
-import { compose } from 'redux';
+import { compose, Dispatch } from 'redux';
 import { WorkflowResource } from '~/models/workflow';
 import { ResourceStatus } from '~/views/workflow-panel/workflow-panel-view';
 import { getUuidPrefix } from '~/store/workflow-panel/workflow-panel-actions';
 import { CollectionResource } from "~/models/collection";
 import { getResourceData } from "~/store/resources-data/resources-data";
+import { openSharingDialog } from '~/store/sharing-dialog/sharing-dialog-actions';
 
 export const renderName = (item: { name: string; uuid: string, kind: string }) =>
     <Grid container alignItems="center" wrap="nowrap" spacing={16}>
@@ -87,13 +88,13 @@ const getPublicUuid = (uuidPrefix: string) => {
 };
 
 // ToDo: share onClick
-export const resourceShare = (uuidPrefix: string, ownerUuid?: string) => {
+export const resourceShare = (dispatch: Dispatch, uuidPrefix: string, ownerUuid?: string, uuid?: string) => {
     const isPublic = ownerUuid === getPublicUuid(uuidPrefix);
     return (
         <div>
-            { isPublic &&
+            { !isPublic && uuid &&
                 <Tooltip title="Share">
-                    <IconButton onClick={() => undefined}>
+                    <IconButton onClick={() => dispatch<any>(openSharingDialog(uuid))}>
                         <ShareIcon />
                     </IconButton>
                 </Tooltip>
@@ -107,10 +108,12 @@ export const ResourceShare = connect(
         const resource = getResource<WorkflowResource>(props.uuid)(state.resources);
         const uuidPrefix = getUuidPrefix(state);
         return {
+            uuid: resource ? resource.uuid : '',
             ownerUuid: resource ? resource.ownerUuid : '',
             uuidPrefix
         };
-    })((props: { ownerUuid?: string, uuidPrefix: string }) => resourceShare(props.uuidPrefix, props.ownerUuid));
+    })((props: { ownerUuid?: string, uuidPrefix: string, uuid?: string } & DispatchProp<any>) =>
+        resourceShare(props.dispatch, props.uuidPrefix, props.ownerUuid, props.uuid));
 
 export const renderWorkflowStatus = (uuidPrefix: string, ownerUuid?: string) => {
     if (ownerUuid === getPublicUuid(uuidPrefix)) {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list