Răsfoiți Sursa

HUE-3635 [editor] Clear also clears the URL too

Beware: need to test when clearing a new editor with type=impala, type=pig...
Romain Rigaux 9 ani în urmă
părinte
comite
fef888d

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

@@ -600,7 +600,7 @@
           notebook.id(data.history_id);
           notebook.uuid(data.history_uuid);
 
-          notebook.history.push( // TODO append to beginning
+          notebook.history.unshift(
             notebook._makeHistoryRecord(
               url,
               self.statement_raw(),
@@ -675,6 +675,8 @@
       logGA('clear');
       self.ace().setValue('', 1);
       self.result.clear();
+      self.status('ready');
+      hueUtils.changeURL('/notebook/editor');
     };
 
     self.explain = function () {