浏览代码

HUE-7106 [oozie] New oozie doc url doesn't update after saving the page

krish 8 年之前
父节点
当前提交
b8b697c

+ 3 - 0
apps/oozie/src/oozie/static/oozie/js/bundle-editor.ko.js

@@ -114,6 +114,9 @@ var BundleEditorViewModel = function (bundle_json, coordinators_json, can_edit_j
           if (window.location.search.indexOf("bundle") == -1 && !IS_HUE_4) {
             window.location.hash = '#bundle=' + data.id;
           }
+          else if (IS_HUE_4) {
+            hueUtils.changeURL('/hue/oozie/editor/bundle/edit/?bundle=' + data.id);
+          }
         }
         else {
           $(document).trigger("error", data.message);

+ 2 - 0
apps/oozie/src/oozie/static/oozie/js/coordinator-editor.ko.js

@@ -248,6 +248,8 @@ var CoordinatorEditorViewModel = (function () {
             }
             if (window.location.search.indexOf("coordinator") == -1 && !IS_HUE_4) {
               window.location.hash = '#coordinator=' + data.id;
+            } else if (IS_HUE_4) {
+              hueUtils.changeURL('/hue/oozie/editor/coordinator/edit/?coordinator=' + data.id);
             }
           }
           else {

+ 5 - 2
apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js

@@ -1190,11 +1190,14 @@ var WorkflowEditorViewModel = function (layout_json, workflow_json, credentials_
           }
           self.workflow.id(data.id);
           $(document).trigger("info", data.message);
+          self.workflow.tracker().markCurrentStateAsClean();
+
           if (window.location.search.indexOf("workflow") == -1 && !IS_HUE_4) {
             window.location.hash = '#workflow=' + data.id;
+            huePubSub.publish('assist.document.refresh');
+          } else if (IS_HUE_4) {
+            hueUtils.changeURL('/hue/oozie/editor/workflow/edit/?workflow=' + data.id);
           }
-          self.workflow.tracker().markCurrentStateAsClean();
-          huePubSub.publish('assist.document.refresh');
         }
         else {
           $(document).trigger("error", data.message);