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

[oozie] Restyled old-editor messages to fit better any size of the screen

Enrico Berti 10 жил өмнө
parent
commit
420e1e9

+ 7 - 9
apps/oozie/src/oozie/templates/editor2/workflow_editor.mako

@@ -202,13 +202,6 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user, "40px") | n,unicode }
     <div class="inline object-description">
       <span data-bind="editable: $root.workflow.properties.description, editableOptions: {enabled: $root.isEditing(), placement: 'right', emptytext: '${_('Add a description...')}'}"></span>
     </div>
-    
-    <!-- ko if: $root.workflow.properties.imported -->
-    <div class="inline alert alert-warn" style="margin-left:100px">
-      ${ _('This workflow was imported from an old Hue version, save it to create a copy in the new format or') }
-      <a data-bind="attr: { href: '/oozie/edit_workflow/' + $root.workflow.properties.wf1_id() }">${ _('open it in the old editor.') }</a>
-    </div>
-    <!-- /ko -->
   </form>
 </div>
 
@@ -225,6 +218,12 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user, "40px") | n,unicode }
 
 
 <div data-bind="css: {'dashboard': true, 'readonly': ! isEditing()}">
+  <!-- ko if: $root.workflow.properties.imported -->
+    <div class="alert alert-warn" style="margin-top: 93px; margin-bottom: 0; border: none; text-align: center">
+      ${ _('This workflow was imported from an old Hue version, save it to create a copy in the new format or') }
+      <a data-bind="attr: { href: '/oozie/edit_workflow/' + $root.workflow.properties.wf1_id() }">${ _('open it in the old editor.') }</a>
+    </div>
+  <!-- /ko -->
   <div class="container-fluid">
     <div class="row-fluid" data-bind="template: { name: 'column-template', foreach: oozieColumns}">
     </div>
@@ -235,8 +234,7 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user, "40px") | n,unicode }
 
 <script type="text/html" id="column-template">
   <div data-bind="css: klass()" style="min-height: 50px !important;">
-    <div data-bind="template: { name: 'row-template', data: oozieStartRow }" style="margin-top: 50px"></div>
-
+    <div data-bind="template: { name: 'row-template', data: oozieStartRow }, style:{'margin-top' : $root.workflow.properties.imported() ? '0': '50px'}"></div>
     <div class="container-fluid" data-bind="visible: $root.isEditing() && oozieRows().length > 0">
       <div class="row-fluid">
         <div data-bind="visible: enableOozieDropOnBefore, css: {'span4 offset4': true, 'drop-target': true, 'drop-target-dragging': $root.isDragging(), 'is-editing': $root.isEditing}, droppable: {enabled: $root.isEditing, onDrop: function(x, y){ var _w = $root.addDraggedWidget($data, true); widgetDraggedAdditionalHandler(_w); } }"></div>

+ 6 - 7
apps/oozie/src/oozie/templates/navigation-bar.mako

@@ -53,13 +53,6 @@
                   <li class="${utils.is_selected(section, 'workflows')}"><a href="${url('oozie:list_workflows')}">${ _('Workflows') }</a></li>
                   <li class="${utils.is_selected(section, 'coordinators')}"><a href="${url('oozie:list_coordinators')}">${ _('Coordinators') }</a></li>
                   <li class="${utils.is_selected(section, 'bundles')}"><a href="${url('oozie:list_bundles')}">${ _('Bundles') }</a></li>
-
-                  % if ENABLE_V2.get():
-                    <li class="inline alert alert-warn" style="margin-left:20px; margin-bottom:0px; margin-top:4px">
-                      ${ _('This is the old editor, please migrate your jobs to the ') }
-                      <a style="display:inline" href="${url('oozie:new_workflow') if utils.is_selected(section, 'workflows') else url('oozie:new_coordinator') if utils.is_selected(section, 'coordinators') else url('oozie:new_bundle')}">${ _('new editor.') }</a>
-                    </li>
-                  % endif
                 % endif
               % endif
             </ul>
@@ -67,5 +60,11 @@
         </div>
       </div>
   </div>
+  % if not dashboard and not is_editor and ENABLE_V2.get():
+    <div class="alert alert-warn" style="position: fixed; top: 28px; z-index: 1031; right: 0; height: 28px; line-height: 28px; border: none">
+      ${ _('This is the old editor, please migrate your jobs to the ') }
+      <a style="display:inline" href="${url('oozie:new_workflow') if utils.is_selected(section, 'workflows') else url('oozie:new_coordinator') if utils.is_selected(section, 'coordinators') else url('oozie:new_bundle')}">${ _('new editor.') }</a>
+    </div>
+  % endif
 </%def>