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

HUE-6020 [oozie] Missing Hive query document when new layout is not activated

Romain Rigaux 8 жил өмнө
parent
commit
26592f8

+ 12 - 2
apps/oozie/src/oozie/templates/editor2/workflow_editor.mako

@@ -218,6 +218,16 @@ ${ layout.menubar(section='workflows', is_editor=True, pullright=buttons) }
 
     <!-- ko if: $root.currentDraggableSection() === 'actions' -->
     <span class="draggable-actions">
+
+    % if not ENABLE_DOCUMENT_ACTION.get():
+    <div data-bind="css: { 'draggable-widget': true },
+                    draggable: {data: draggableHiveDocumentAction(), isEnabled: true,
+                    options: {'refreshPositions': true, 'stop': function(){ $root.isDragging(false); }, 'start': function(event, ui){ $root.isDragging(true); $root.currentlyDraggedWidget(draggableHiveDocumentAction());}}}"
+         title="${_('Hive query')}" rel="tooltip" data-placement="top">
+         <a class="draggable-icon"><img src="${ static('oozie/art/icon_beeswax_48.png') }" class="app-icon"><sup style="color: #338bb8; margin-left: -4px; top: -14px; font-size: 12px">2</sup></a>
+    </div>
+    % endif
+
     <div data-bind="css: { 'draggable-widget': true },
                     draggable: {data: draggableHiveAction(), isEnabled: true,
                     options: {'refreshPositions': true, 'stop': function(){ $root.isDragging(false); }, 'start': function(event, ui){ $root.isDragging(true); $root.currentlyDraggedWidget(draggableHiveAction());}}}"
@@ -611,12 +621,12 @@ ${ dashboard.import_bindings() }
 
 
   % if ENABLE_DOCUMENT_ACTION.get():
-  var defaultSection = 'documents';
+  var defaultSection = apiHelper.getFromTotalStorage('oozie', 'draggable_section', 'documents');
   % else:
   var defaultSection = 'actions';
   % endif
 
-  viewModel.currentDraggableSection(apiHelper.getFromTotalStorage('oozie', 'draggable_section', defaultSection));
+  viewModel.currentDraggableSection(defaultSection);
 
   viewModel.init();
   viewModel.workflow.tracker().markCurrentStateAsClean();