[ARVADOS-WORKBENCH2] updated: 1.2.0-918-ge4bb589

Git user git at public.curoverse.com
Wed Nov 21 05:35:49 EST 2018


Summary of changes:
 src/store/repositories/repositories-actions.ts         |  7 +++----
 .../context-menu/action-sets/repository-action-set.ts  | 18 +++++++++---------
 2 files changed, 12 insertions(+), 13 deletions(-)

       via  e4bb589377e9be89787f1b3cc15a0cd2f17a6f7a (commit)
      from  e858ef67d3d17323b31eeb92e99ff8de70b5d591 (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 e4bb589377e9be89787f1b3cc15a0cd2f17a6f7a
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Wed Nov 21 11:35:32 2018 +0100

    sharing repos
    
    Feature #13865
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/store/repositories/repositories-actions.ts b/src/store/repositories/repositories-actions.ts
index 4fa6582..a672738 100644
--- a/src/store/repositories/repositories-actions.ts
+++ b/src/store/repositories/repositories-actions.ts
@@ -13,7 +13,6 @@ import { RepositoryResource } from "~/models/repositories";
 import { startSubmit, reset, stopSubmit } from "redux-form";
 import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
 import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
-import { projectPanelActions } from '~/store/project-panel/project-panel-action';
 
 export const repositoriesActions = unionize({
     SET_REPOSITORIES: ofType<any>(),
@@ -56,8 +55,8 @@ export const createRepository = (repository: RepositoryResource) =>
             const newRepository = await services.repositoriesService.create({ name: `${user.username}/${repository.name}` });
             dispatch(dialogActions.CLOSE_DIALOG({ id: REPOSITORY_CREATE_FORM_NAME }));
             dispatch(reset(REPOSITORY_CREATE_FORM_NAME));
-            dispatch<any>(loadRepositoriesData());
-            dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Repository has been successfully created.", hideDuration: 2000, kind: SnackbarKind.SUCCESS }));      
+            dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Repository has been successfully created.", hideDuration: 2000, kind: SnackbarKind.SUCCESS })); 
+            dispatch<any>(loadRepositoriesData());     
             return newRepository;
         } catch (e) {
             const error = getCommonResourceServiceError(e);
@@ -85,8 +84,8 @@ export const removeRepository = (uuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removing ...' }));
         await services.repositoriesService.delete(uuid);
-        dispatch<any>(loadRepositoriesData());
         dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removed.', hideDuration: 2000 }));
+        dispatch<any>(loadRepositoriesData());
     };
 
 const repositoriesBindedActions = bindDataExplorerActions(REPOSITORIES_PANEL);
diff --git a/src/views-components/context-menu/action-sets/repository-action-set.ts b/src/views-components/context-menu/action-sets/repository-action-set.ts
index b2bcb5c..cf7fb88 100644
--- a/src/views-components/context-menu/action-sets/repository-action-set.ts
+++ b/src/views-components/context-menu/action-sets/repository-action-set.ts
@@ -4,32 +4,32 @@
 
 import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
 import { AdvancedIcon, RemoveIcon, ShareIcon, AttributesIcon } from "~/components/icon/icon";
-import { openRenameFileDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
 import { openRepositoryAttributes, openRemoveRepositoryDialog } from "~/store/repositories/repositories-actions";
+import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
 
 export const repositoryActionSet: ContextMenuActionSet = [[{
     name: "Attributes",
     icon: AttributesIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openRepositoryAttributes(resource.index!));
+    execute: (dispatch, { index }) => {
+        dispatch<any>(openRepositoryAttributes(index!));
     }
 }, {
     name: "Share",
     icon: ShareIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
+    execute: (dispatch, { uuid }) => {
+        dispatch<any>(openSharingDialog(uuid));
     }
 }, {
     name: "Advanced",
     icon: AdvancedIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openAdvancedTabDialog(resource.uuid, resource.index));
+    execute: (dispatch, { uuid, index }) => {
+        dispatch<any>(openAdvancedTabDialog(uuid, index));
     }
 }, {
     name: "Remove",
     icon: RemoveIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openRemoveRepositoryDialog(resource.uuid));
+    execute: (dispatch, { uuid }) => {
+        dispatch<any>(openRemoveRepositoryDialog(uuid));
     }
 }]];

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list