Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion geonode_mapstore_client/client/MapStore2
Submodule MapStore2 updated 150 files
198 changes: 0 additions & 198 deletions geonode_mapstore_client/client/js/api/geonode/v2/facets.js

This file was deleted.

34 changes: 0 additions & 34 deletions geonode_mapstore_client/client/js/api/geonode/v2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,39 +134,6 @@ export const getMaps = ({
});
};

export const getDatasets = ({
q,
pageSize = 20,
page = 1,
sort
}) => {
return axios
.get(
getEndpointUrl(RESOURCES), {
// axios will format query params array to `key[]=value1&key[]=value2`
params: {
'filter{resource_type.in}': 'dataset',
'filter{metadata_only}': false,
...(q && {
search: q,
search_index: getResourcesSearchIndex()
}),
...(sort && { sort: isArray(sort) ? sort : [ sort ]}),
page,
page_size: pageSize,
api_preset: API_PRESET.CATALOGS
},
...paramsSerializer()
})
.then(({ data }) => {
return {
totalCount: data.total,
isNextPageAvailable: !!data.links.next,
resources: (data.resources || [])
};
});
};

export const getDocuments = ({
q,
pageSize = 10,
Expand Down Expand Up @@ -843,7 +810,6 @@ export default {
deleteResource,
copyResource,
downloadResource,
getDatasets,
deleteExecutionRequest,
getResourceByTypeAndByPk,
createDataset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
} from '@js/actions/gnresource';
import { clickOnMap } from '@mapstore/framework/actions/map';
import { SET_CONTROL_PROPERTY } from '@mapstore/framework/actions/controls';
import { CATALOG_CLOSE } from '@mapstore/framework/actions/catalog';
import {
SHOW_NOTIFICATION
} from '@mapstore/framework/actions/notifications';
Expand Down Expand Up @@ -194,7 +195,7 @@ describe('gnresource epics', () => {
requests: ["something"]
},
controls: {
datasetsCatalog: {
metadataexplorer: {
enabled: true
}
}
Expand All @@ -206,9 +207,7 @@ describe('gnresource epics', () => {
(actions) => {
try {
expect(actions.length).toBe(1);
expect(actions[0].type).toBe(SET_CONTROL_PROPERTY);
expect(actions[0].control).toBe("datasetsCatalog");
expect(actions[0].value).toBe(false);
expect(actions[0].type).toBe(CATALOG_CLOSE);
} catch (e) {
done(e);
}
Expand Down
52 changes: 0 additions & 52 deletions geonode_mapstore_client/client/js/epics/datasetscatalog.js

This file was deleted.

Loading
Loading