-
Notifications
You must be signed in to change notification settings - Fork 29
GNIP WM5 Map revision history
Add functionality to record every saved state (viewer JSON) of a map, along with date and the user who saved it. Also add a UI for editors to browse through and view all previously saved versions of the map.
Matt Bertrand
TBD.
Implemented in WorldMap with a MapSnapshot model: https://github.com/cga-harvard/cga-worldmap/blob/master/src/GeoNodePy/geonode/maps/models.py#L1849
and a UI tool (needs to be refactored to extend gxp.Tool): https://github.com/cga-harvard/geonode-client/blob/master/app/static/script/app/GeoExplorer/MapSnapshotGrid.js
Some WorldMap users were frequently making changes to their maps that they later regretted, or several editors working simultaneously on the same map overwrote the other's changes, and they wanted a way to revert back to a previous version.
- A new MapSnapshot object is created every time a user saves a map. The object records the map's viewer JSON, date created, and user id who saved. The map composer toolbar displays a 'Map Revision History' tool for users who have edit permissions. The tool opens a popup window containing a grid showing the revision date and user of every snapshot, sorted by descending date. The date is a link to a URL that displays the map with that snapshot's viewer JSON. Currently the tool loads all snapshots into a grid at once, which can take awhile to load for maps with many saves. Ideally this grid should be paged.