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

HUE-8750 [useradmin] Fix 404 after creating a user.

Jean-Francois Desjeans Gauthier 6 жил өмнө
parent
commit
48a82fb4a2

+ 8 - 2
desktop/core/src/desktop/js/onePageViewModel.js

@@ -837,8 +837,14 @@ class OnePageViewModel {
     huePubSub.subscribe('open.link', href => {
       if (href) {
         const prefix = window.IS_EMBEDDED ? '' : '/hue';
-        if (href.startsWith('/') && !href.startsWith(prefix)) {
-          page(window.HUE_BASE_URL + prefix + href);
+        if (href.startsWith('/')) {
+          if (window.HUE_BASE_URL.length && href.startsWith(window.HUE_BASE_URL)) {
+            page(href);
+          } else if (href.startsWith(prefix)) {
+            page(window.HUE_BASE_URL + href);
+          } else {
+            page(window.HUE_BASE_URL + prefix + href);
+          }
         } else if (href.indexOf('#') == 0) {
           // Only place that seem to use this is hbase onclick row
           window.location.hash = href;