This component enables users to select a range of commits and step through the changes.
The replay controller uses the built in state object to load the same visual context as when the change was made. As long as the visualizer adheres to the state changes - the replay feature will work.
Once the correct visual state is loaded - the commit is loaded and visualized.
The widget in the footer sends the extra record data to server and provides short-cuts to indicate changes.
Using the webgme-cli the following pieces can easily be imported (execute from root of repository)...
The router handles insertions of record data and exposes the record data to the ui widgets.
webgme import router UIRecorder webgme-ui-replay
To configure the database where the recording data is persisted (should not be the same as the webgme models)
gmeConfig.rest.components.UIRecorder = {
src: __dirname + '/../src/routers/UIRecorder/UIRecorder.js',
mount: 'routers/UIRecorder',
options: {
mongo: {
uri: 'mongodb://127.0.0.1:27017/webgme-ui-recording-data',
options: {}
}
}
}
To import the widgets two steps are required - first make sure the widgets are available from the server.
webgme import viz UIReplay webgme-ui-replay
Secondly make them attach to the footer and project repository widget by adding (or updating) the following to your components settings.
{
...,
"GenericUIProjectRepositoryWidget": {
"commitBadges": {
"UIReplayCommitBadge": {
"path": "widgets/UIReplay/UIReplayCommitBadge"
}
}
},
"GenericUIFooterControlsPanel": {
"extraWidgets": {
"UIReplayWidget": {
"path": "widgets/UIReplay/UIReplayWidget"
}
}
},
...
}
npm version 0.1.0 -m "Release %s"
git push origin master
git checkout v0.1.0
git push origin v0.1.0
npm publish ./