Browse Source

HUE-7138 [editor] Open notebook should work also when the editor has not been loaded before

Enrico Berti 8 years ago
parent
commit
bfaa816
1 changed files with 4 additions and 3 deletions
  1. 4 3
      desktop/core/src/desktop/templates/hue.mako

+ 4 - 3
desktop/core/src/desktop/templates/hue.mako

@@ -1000,11 +1000,12 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
             page('/metastore/tables');
           }},
           { url: '/metastore/*', app: 'metastore' },
-          { url: '/notebook', app: function () {
+          { url: '/notebook', app: function (ctx) {
             self.loadApp('notebook');
-            if (window.location.getParameter('notebook') !== '') {
+            var notebookId = hueUtils.getSearchParameter('?' + ctx.querystring, 'notebook');
+            if (notebookId !== '') {
               self.getActiveAppViewModel(function (viewModel) {
-                viewModel.openNotebook(window.location.getParameter('notebook'));
+                viewModel.openNotebook(notebookId);
               });
             } else {
               self.getActiveAppViewModel(function (viewModel) {