瀏覽代碼

HUE-4210 [editor] Don't revert to Hive on browser refresh of new Impala query

Johan Ahlen 9 年之前
父節點
當前提交
bba73565ce
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

+ 5 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -1942,7 +1942,11 @@
             self.selectedNotebook().snippets()[0].statement_raw($.totalStorage('hue.notebook.lastWrittenSnippet.' + self.user + '.' + window.location.getParameter('type')));
             self.selectedNotebook().snippets()[0].statement_raw($.totalStorage('hue.notebook.lastWrittenSnippet.' + self.user + '.' + window.location.getParameter('type')));
             $.totalStorage('hue.notebook.lastWrittenSnippet.' + self.user +  '.' + window.location.getParameter('type'), '');
             $.totalStorage('hue.notebook.lastWrittenSnippet.' + self.user +  '.' + window.location.getParameter('type'), '');
           }
           }
-          hueUtils.changeURL('/notebook/editor');
+          if (window.location.getParameter('type')) {
+            hueUtils.changeURL('/notebook/editor?type=' + window.location.getParameter('type'));
+          } else {
+            hueUtils.changeURL('/notebook/editor');
+          }
         } else {
         } else {
           hueUtils.changeURL('/notebook/notebook');
           hueUtils.changeURL('/notebook/notebook');
         }
         }