Browse Source

HUE-6392 [oozie] Creating a new bundle should not redirect to Hue 3

Romain Rigaux 8 năm trước cách đây
mục cha
commit
7afec42

+ 6 - 1
apps/oozie/src/oozie/templates/editor2/bundle_editor.mako

@@ -68,7 +68,12 @@ ${ layout.menubar(section='bundles', is_editor=True, pullright=buttons, is_embed
 <script type="text/javascript">
   if (window.location.hash != "") {
     if (window.location.hash.indexOf("bundle") > -1) {
-      location.href = "/oozie/editor/bundle/edit/?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
+      var url = "/oozie/editor/bundle/edit/?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
+      % if is_embeddable:
+        huePubSub.publish('open.link', url);
+      % else:
+        location.href = url);
+      % endif
     }
   }
 </script>

+ 3 - 2
apps/oozie/src/oozie/templates/editor2/coordinator_editor.mako

@@ -74,10 +74,11 @@ ${ layout.menubar(section='coordinators', is_editor=True, pullright=buttons, is_
 <script type="text/javascript">
   if (window.location.hash != "") {
     if (window.location.hash.indexOf("coordinator") > -1) {
+      var url = "/oozie/editor/coordinator/edit/?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
       % if is_embeddable:
-        huePubSub.publish('open.link', "/oozie/editor/coordinator/edit/?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, ""));
+        huePubSub.publish('open.link', url);
       % else:
-        location.href = "/oozie/editor/coordinator/edit/?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
+        location.href = url;
       % endif
     }
   }