}
async requestItems(api: MiddlewareAPI<Dispatch, RootState>) {
-
const dataExplorer = getDataExplorer(api.getState().dataExplorer, this.getId());
const groupUuid = getCurrentGroupDetailsPanelUuid(api.getState().properties);
-
if (!dataExplorer || !groupUuid) {
-
api.dispatch(groupsDetailsPanelDataExplorerIsNotSet());
-
} else {
-
try {
-
const permissions = await this.services.permissionService.list({
-
filters: new FilterBuilder()
- .addEqual('tailUuid', groupUuid)
- .addEqual('linkClass', LinkClass.PERMISSION)
+ .addEqual('tail_uuid', groupUuid)
+ .addEqual('link_class', LinkClass.PERMISSION)
.getFilters()
-
});
-
api.dispatch(updateResources(permissions.items));
-
const users = await this.services.userService.list({
-
filters: new FilterBuilder()
.addIn('uuid', permissions.items.map(item => item.headUuid))
- .getFilters()
-
+ .getFilters(),
+ count: "none"
});
-
api.dispatch(GroupDetailsPanelActions.SET_ITEMS({
...listResultsToDataExplorerItemsMeta(permissions),
items: users.items.map(item => item.uuid),
}));
-
api.dispatch(updateResources(users.items));
-
} catch (e) {
-
api.dispatch(couldNotFetchGroupDetailsContents());
-
}
}
}
const groupsDetailsPanelDataExplorerIsNotSet = () =>
snackbarActions.OPEN_SNACKBAR({
- message: 'Group details panel is not ready.'
+ message: 'Group details panel is not ready.',
+ kind: SnackbarKind.ERROR
});
const couldNotFetchGroupDetailsContents = () =>