X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/38d27e9783f7f760cee84cc225e86144069848c4..a4c96d2e98d9f2971e9268355bd31331c2b6a5e2:/src/store/groups-panel/groups-panel-middleware-service.ts diff --git a/src/store/groups-panel/groups-panel-middleware-service.ts b/src/store/groups-panel/groups-panel-middleware-service.ts index 5fb4718d..3997e33c 100644 --- a/src/store/groups-panel/groups-panel-middleware-service.ts +++ b/src/store/groups-panel/groups-panel-middleware-service.ts @@ -15,6 +15,7 @@ import { OrderBuilder, OrderDirection } from 'services/api/order-builder'; import { GroupResource, GroupClass } from 'models/group'; import { SortDirection } from 'components/data-table/data-column'; import { GroupsPanelColumnNames } from 'views/groups-panel/groups-panel'; +import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions"; export class GroupsPanelMiddlewareService extends DataExplorerMiddlewareService { constructor(private services: ServiceRepository, id: string) { @@ -26,6 +27,7 @@ export class GroupsPanelMiddlewareService extends DataExplorerMiddlewareService api.dispatch(groupsPanelDataExplorerIsNotSet()); } else { try { + api.dispatch(progressIndicatorActions.START_WORKING(this.getId())); const order = new OrderBuilder(); const sortColumn = getSortColumn(dataExplorer); if (sortColumn) { @@ -36,7 +38,7 @@ export class GroupsPanelMiddlewareService extends DataExplorerMiddlewareService order.addOrder(direction, 'name'); } const filters = new FilterBuilder() - .addNotIn('group_class', [GroupClass.PROJECT, GroupClass.FILTER]) + .addEqual('group_class', GroupClass.ROLE) .addILike('name', dataExplorer.searchValue) .getFilters(); const response = await this.services.groupsService @@ -52,12 +54,14 @@ export class GroupsPanelMiddlewareService extends DataExplorerMiddlewareService })); const permissions = await this.services.permissionService.list({ filters: new FilterBuilder() - .addIn('tail_uuid', response.items.map(item => item.uuid)) + .addIn('head_uuid', response.items.map(item => item.uuid)) .getFilters() }); api.dispatch(updateResources(permissions.items)); } catch (e) { api.dispatch(couldNotFetchFavoritesContents()); + } finally { + api.dispatch(progressIndicatorActions.STOP_WORKING(this.getId())); } } } @@ -74,4 +78,3 @@ const couldNotFetchFavoritesContents = () => message: 'Could not fetch groups.', kind: SnackbarKind.ERROR }); -