X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/0399c993a117c3489f1fe0160d6a554a56b8bbab..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 c157e9ab..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 @@ -58,6 +60,8 @@ export class GroupsPanelMiddlewareService extends DataExplorerMiddlewareService api.dispatch(updateResources(permissions.items)); } catch (e) { api.dispatch(couldNotFetchFavoritesContents()); + } finally { + api.dispatch(progressIndicatorActions.STOP_WORKING(this.getId())); } } }