+
+ const initial = {
+ itemsAvailable: 0,
+ items: [] as GroupContentsResource[],
+ kind: '',
+ offset: 0,
+ limit: 10
+ };
+
+ if (criteriaChanged) {
+ api.dispatch(setItems(initial));
+ }
+
+ sessions.map(session => {
+ const params = getParams(dataExplorer, searchValue, session.apiRevision);
+ this.services.groupsService.contents('', params, session)
+ .then((response) => {
+ api.dispatch(updateResources(response.items));
+ api.dispatch(appendItems(response));
+ }).catch(() => {
+ api.dispatch(couldNotFetchSearchResults(session.clusterId));
+ });
+ }
+ );