[ARVADOS-WORKBENCH2] updated: 2.2.1-112-g81d2af2f

Git user git at public.arvados.org
Thu Oct 14 00:00:18 UTC 2021


Summary of changes:
 ...oup-details-panel-members-middleware-service.ts | 30 ++++++++++++--------
 ...details-panel-permissions-middleware-service.ts | 32 +++++++++++-----------
 2 files changed, 35 insertions(+), 27 deletions(-)

       via  81d2af2f535cbfb8bbb653fe69c3d769184816bb (commit)
      from  b706c68e69b79dc541928c9af01e6eae167b76fc (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 81d2af2f535cbfb8bbb653fe69c3d769184816bb
Author: Stephen Smith <stephen at curii.com>
Date:   Wed Oct 13 19:59:49 2021 -0400

    18123: Add projects to group member list, make variables and error messages clearer.
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/store/group-details-panel/group-details-panel-members-middleware-service.ts b/src/store/group-details-panel/group-details-panel-members-middleware-service.ts
index 23f0bbfd..05a12d22 100644
--- a/src/store/group-details-panel/group-details-panel-members-middleware-service.ts
+++ b/src/store/group-details-panel/group-details-panel-members-middleware-service.ts
@@ -26,26 +26,34 @@ export class GroupDetailsPanelMembersMiddlewareService extends DataExplorerMiddl
             api.dispatch(groupsDetailsPanelDataExplorerIsNotSet());
         } else {
             try {
-                const permissions = await this.services.permissionService.list({
+                const permissionsIn = await this.services.permissionService.list({
                     filters: new FilterBuilder()
                         .addEqual('head_uuid', groupUuid)
                         .addEqual('link_class', LinkClass.PERMISSION)
                         .getFilters()
                 });
-                api.dispatch(updateResources(permissions.items));
+                api.dispatch(updateResources(permissionsIn.items));
 
-                const users = await this.services.userService.list({
+                api.dispatch(GroupMembersPanelActions.SET_ITEMS({
+                    ...listResultsToDataExplorerItemsMeta(permissionsIn),
+                    items: permissionsIn.items.map(item => item.uuid),
+                }));
+
+                const usersIn = await this.services.userService.list({
                     filters: new FilterBuilder()
-                        .addIn('uuid', permissions.items.map(item => item.tailUuid))
+                        .addIn('uuid', permissionsIn.items.map(item => item.tailUuid))
                         .getFilters(),
                     count: "none"
                 });
-                api.dispatch(updateResources(users.items));
+                api.dispatch(updateResources(usersIn.items));
 
-                api.dispatch(GroupMembersPanelActions.SET_ITEMS({
-                    ...listResultsToDataExplorerItemsMeta(permissions),
-                    items: permissions.items.map(item => item.uuid),
-                }));
+                const projectsIn = await this.services.projectService.list({
+                    filters: new FilterBuilder()
+                        .addIn('uuid', permissionsIn.items.map(item => item.tailUuid))
+                        .getFilters(),
+                    count: "none"
+                });
+                api.dispatch(updateResources(projectsIn.items));
             } catch (e) {
                 api.dispatch(couldNotFetchGroupDetailsContents());
             }
@@ -55,12 +63,12 @@ export class GroupDetailsPanelMembersMiddlewareService extends DataExplorerMiddl
 
 const groupsDetailsPanelDataExplorerIsNotSet = () =>
     snackbarActions.OPEN_SNACKBAR({
-        message: 'Group details panel is not ready.',
+        message: 'Group members panel is not ready.',
         kind: SnackbarKind.ERROR
     });
 
 const couldNotFetchGroupDetailsContents = () =>
     snackbarActions.OPEN_SNACKBAR({
-        message: 'Could not fetch group details.',
+        message: 'Could not fetch group members.',
         kind: SnackbarKind.ERROR
     });
diff --git a/src/store/group-details-panel/group-details-panel-permissions-middleware-service.ts b/src/store/group-details-panel/group-details-panel-permissions-middleware-service.ts
index 91bff1e9..7ce2d380 100644
--- a/src/store/group-details-panel/group-details-panel-permissions-middleware-service.ts
+++ b/src/store/group-details-panel/group-details-panel-permissions-middleware-service.ts
@@ -26,42 +26,42 @@ export class GroupDetailsPanelPermissionsMiddlewareService extends DataExplorerM
             api.dispatch(groupsDetailsPanelDataExplorerIsNotSet());
         } else {
             try {
-                const permissions = await this.services.permissionService.list({
+                const permissionsOut = await this.services.permissionService.list({
                     filters: new FilterBuilder()
                         .addEqual('tail_uuid', groupUuid)
                         .addEqual('link_class', LinkClass.PERMISSION)
                         .getFilters()
                 });
-                api.dispatch(updateResources(permissions.items));
+                api.dispatch(updateResources(permissionsOut.items));
 
-                const users = await this.services.userService.list({
+                api.dispatch(GroupPermissionsPanelActions.SET_ITEMS({
+                    ...listResultsToDataExplorerItemsMeta(permissionsOut),
+                    items: permissionsOut.items.map(item => item.uuid),
+                }));
+
+                const usersOut = await this.services.userService.list({
                     filters: new FilterBuilder()
-                        .addIn('uuid', permissions.items.map(item => item.headUuid))
+                        .addIn('uuid', permissionsOut.items.map(item => item.headUuid))
                         .getFilters(),
                     count: "none"
                 });
-                api.dispatch(updateResources(users.items));
+                api.dispatch(updateResources(usersOut.items));
 
-                const collections = await this.services.collectionService.list({
+                const collectionsOut = await this.services.collectionService.list({
                     filters: new FilterBuilder()
-                        .addIn('uuid', permissions.items.map(item => item.headUuid))
+                        .addIn('uuid', permissionsOut.items.map(item => item.headUuid))
                         .getFilters(),
                     count: "none"
                 });
-                api.dispatch(updateResources(collections.items));
+                api.dispatch(updateResources(collectionsOut.items));
 
-                const projects = await this.services.projectService.list({
+                const projectsOut = await this.services.projectService.list({
                     filters: new FilterBuilder()
-                        .addIn('uuid', permissions.items.map(item => item.headUuid))
+                        .addIn('uuid', permissionsOut.items.map(item => item.headUuid))
                         .getFilters(),
                     count: "none"
                 });
-                api.dispatch(updateResources(projects.items));
-
-                api.dispatch(GroupPermissionsPanelActions.SET_ITEMS({
-                    ...listResultsToDataExplorerItemsMeta(permissions),
-                    items: permissions.items.map(item => item.uuid),
-                }));
+                api.dispatch(updateResources(projectsOut.items));
             } catch (e) {
                 api.dispatch(couldNotFetchGroupDetailsContents());
             }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list