diff --git a/zeppelin-web/src/app/app.js b/zeppelin-web/src/app/app.js index 98d6b879f09..1fac30b713f 100644 --- a/zeppelin-web/src/app/app.js +++ b/zeppelin-web/src/app/app.js @@ -62,6 +62,10 @@ templateUrl: 'app/notebook/notebook.html', controller: 'NotebookCtrl' }) + .when('/notebook/:noteId/revision/:revisionId', { + templateUrl: 'app/notebook/notebook.html', + controller: 'NotebookCtrl' + }) .when('/jobmanager', { templateUrl: 'app/jobmanager/jobmanager.html', controller: 'JobmanagerCtrl' diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js index dc59f50ae71..94de8d57baf 100644 --- a/zeppelin-web/src/app/notebook/notebook.controller.js +++ b/zeppelin-web/src/app/notebook/notebook.controller.js @@ -77,7 +77,11 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', function($scope, $ro /** Init the new controller */ var initNotebook = function() { - websocketMsgSrv.getNotebook($routeParams.noteId); + if ($routeParams.revisionId) { + websocketMsgSrv.getNoteRevision($routeParams.noteId, $routeParams.revisionId); + } else { + websocketMsgSrv.getNotebook($routeParams.noteId); + } websocketMsgSrv.listRevisionHistory($routeParams.noteId); var currentRoute = $route.current;