浏览代码

HUE-3493 [editor] Load saved queries without reloading the editor

Romain Rigaux 9 年之前
父节点
当前提交
9434c2a2f6

+ 6 - 6
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -1494,12 +1494,12 @@
       $.get('/desktop/api2/doc/', {
         uuid: uuid,
         data: true
-   	  }, function(data) {
-   		self.notebooks.removeAll();
-   	    self.loadNotebook(data.data);
-   	    self.selectedNotebook(self.notebooks()[0]);
-   	    hueUtils.changeURL('/notebook/editor?editor=' + data.document.id);
-      });  
+       }, function(data) {
+         self.notebooks.removeAll();
+         self.loadNotebook(data.data);
+         self.selectedNotebook(self.notebooks()[0]);
+         hueUtils.changeURL('/notebook/editor?editor=' + data.document.id);
+      });
     };
 
     self.newNotebook = function () {

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -493,7 +493,7 @@ ${ hueIcons.symbols() }
             </thead>
             <tbody data-bind="foreach: queries">
             <tr>
-              <td style="width: 16%"><a data-bind="text: name, attr: { 'href': absoluteUrl }"></a></td>
+              <td style="width: 16%"><a href="javascript: void(0);" data-bind="text: name, click: function() { $root.openNotebook(uuid) }"></a></td>
               <td style="width: 50%; white-space: normal"><span data-bind="text: description"></span></td>
               <td style="width: 18%"><span data-bind="text: owner"></span></td>
               <td style="width: 16%"><span data-bind="text: last_modified"></span></td>