Преглед изворни кода

HUE-3422 [editor] Polishing the display of the workflows of a Hive query

Romain Rigaux пре 9 година
родитељ
комит
71acfe24cf

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

@@ -247,9 +247,8 @@ def save_notebook(request):
   notebook = json.loads(request.POST.get('notebook', '{}'))
   notebook_type = notebook.get('type', 'notebook')
 
-  if notebook.get('parentUuid'):
-    notebook_doc = Document2.objects.get(uuid=notebook['parentUuid'])
-    notebook_doc.can_read_or_exception(request.user)
+  if notebook.get('parentUuid'): # We save into the original saved query, not into the query history
+    notebook_doc = Document2.objects.get_by_uuid(user=request.user, uuid=notebook['parentUuid'])
   elif notebook.get('id'):
     notebook_doc = Document2.objects.get(id=notebook['id'])
   else:

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

@@ -212,7 +212,7 @@ ${ hueIcons.symbols() }
 
            <!-- ko if: $root.selectedNotebook() && $root.selectedNotebook().dependentsWorkflows().length > 0 -->
             <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
-            <ul class="dropdown-menu" data-bind="foreach: $root.selectedNotebook().dependentsWorkflows">
+            <ul class="dropdown-menu pull-right" data-bind="foreach: $root.selectedNotebook().dependentsWorkflows">
               <li>
                 <a class="pointer" data-bind="attr: { 'href': absoluteUrl }">
                   <img src="${ static('oozie/art/icon_oozie_workflow_48.png') }" class="app-icon"/> <span data-bind="text: name"></span>