Эх сурвалжийг харах

HUE-3494 [editor] Unify query history workflow

Romain Rigaux 9 жил өмнө
parent
commit
f7c5529

+ 2 - 0
desktop/libs/notebook/src/notebook/api.py

@@ -97,6 +97,7 @@ def execute(request):
         _snippet['status'] = 'failed'
       history = _historify(notebook, request.user)
       response['history_id'] = history.id
+      response['history_uuid'] = history.uuid
 
   # Materialize and HTML escape results
   if response['handle'].get('sync') and response['handle']['result'].get('data'):
@@ -278,6 +279,7 @@ def _historify(notebook, user):
     extra=query_type
   )
 
+  notebook['uuid'] = history_doc.uuid
   history_doc.update_data(notebook)
   history_doc.save()
 

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

@@ -589,6 +589,7 @@
         if (vm.editorMode && data.history_id) {
           hueUtils.changeURL('/notebook/editor?editor=' + data.history_id);
           notebook.id(data.history_id);
+          notebook.uuid(data.history_uuid);
         }
         if (data.status == 0) {
           self.result.clear();