소스 검색

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

Romain Rigaux 8 년 전
부모
커밋
85c35c2591
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      apps/oozie/src/oozie/templates/editor2/coordinator_editor.mako

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

@@ -14,8 +14,8 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
-from desktop.views import commonheader, commonfooter, commonshare, _ko
 from django.utils.translation import ugettext as _
+from desktop.views import commonheader, commonfooter, commonshare, _ko
 %>
 
 <%namespace name="dashboard" file="/common_dashboard.mako" />
@@ -70,10 +70,15 @@ ${ commonheader(_("Coordinator Editor"), "Oozie", user, request) | n,unicode }
 
 ${ layout.menubar(section='coordinators', is_editor=True, pullright=buttons, is_embeddable=is_embeddable) }
 
+
 <script type="text/javascript">
   if (window.location.hash != "") {
     if (window.location.hash.indexOf("coordinator") > -1) {
-      location.href = "/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, ""));
+      % else:
+        location.href = "/oozie/editor/coordinator/edit/?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
+      % endif
     }
   }
 </script>