Skip to content

Commit

Permalink
geosolutions-it#4716. Fixed issues with map details and thubmnail cre…
Browse files Browse the repository at this point in the history
…ation in home page
  • Loading branch information
offtherailz committed Jan 15, 2020
1 parent d1e87d0 commit b2a7cfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions web/client/actions/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,7 @@ function createThumbnail(map, metadataMap, nameThumbnail, dataThumbnail, categor
};
dispatch(updatePermissions(response.data, groupPermission, group, userPermission, user, options)); // UPDATE resource permissions
const thumbnailUrl = ConfigUtils.getDefaults().geoStoreUrl + "data/" + response.data + "/raw?decode=datauri";
const encodedThumbnailUrl = encodeURIComponent(encodeURIComponent(thumbnailUrl));
dispatch(updateAttribute(resourceIdMap, "thumbnail", encodedThumbnailUrl, "STRING", options)); // UPDATE resource map with new attribute
dispatch(updateAttribute(resourceIdMap, "thumbnail", thumbnailUrl, "STRING", options)); // UPDATE resource map with new attribute
if (onSuccess) {
dispatch(onSuccess);
}
Expand Down
5 changes: 2 additions & 3 deletions web/client/utils/ObservableUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ const createAssociatedResource = ({attribute, permissions, mapId, metadata, valu
// update permissions
let actions = [];
actions.push(updatePermissions(resourceId, permissions));
const attibuteUri = ConfigUtils.getDefaults().geoStoreUrl + "data/" + resourceId + "/raw?decode=datauri";
const encodedResourceUri = encodeURIComponent(encodeURIComponent(attibuteUri));
const attributeUri = ConfigUtils.getDefaults().geoStoreUrl + "data/" + resourceId + "/raw?decode=datauri";
// UPDATE resource map with new attribute
actions.push(updateAttribute(mapId, attribute, encodedResourceUri, type, optionsAttr));
actions.push(updateAttribute(mapId, attribute, attributeUri, type, optionsAttr));
// display a success message
actions.push(basicSuccess({message: "maps.feedback." + attribute + ".savedSuccesfully" }));
return Rx.Observable.from(actions);
Expand Down

0 comments on commit b2a7cfe

Please sign in to comment.