Explorar o código

[oozie] Add message warning about using the old editor

Romain Rigaux %!s(int64=11) %!d(string=hai) anos
pai
achega
2ad70db

+ 4 - 4
apps/oozie/src/oozie/templates/editor/workflow_editor.mako

@@ -197,10 +197,10 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user, "40px") | n,unicode }
       <span data-bind="editable: $root.workflow.properties.description, editableOptions: {enabled: $root.isEditing(), placement: 'right', emptytext: '${_('Add a description...')}'}"></span>
     </div>
     
-<div class="inline alert alert-warn" style="margin-left:200px" data-bind="visible: $root.workflow.properties.imported">
-    ${ _('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>    
+    <div class="inline alert alert-warn" style="margin-left:200px" data-bind="visible: $root.workflow.properties.imported">
+      ${ _('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>    
   </form>
 </div>
 

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

@@ -16,6 +16,7 @@
 
 <%!
   from django.utils.translation import ugettext as _
+  from oozie.conf import ENABLE_V2
 %>
 
 <%namespace name="utils" file="utils.inc.mako" />
@@ -52,6 +53,12 @@
                   <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">
+                     ${ _('This is the old editor, please migrate your workflows to the ') } <a style="display:inline" href="${url('oozie:list_editor_workflows')}">${ _('new editor.') }</a>
+                    </li>
+                  % endif
                 % endif
               % endif
             </ul>