浏览代码

[frontend] added 'hue' to metastore url prefix when running Knox

Previously the hue prefix was only added if Knox was not running, which caused the back button to trigger a 404.
Björn Alm 1 年之前
父节点
当前提交
55f561bc7e
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      desktop/core/src/desktop/js/apps/tableBrowser/metastoreViewModel.js

+ 3 - 4
desktop/core/src/desktop/js/apps/tableBrowser/metastoreViewModel.js

@@ -181,10 +181,9 @@ class MetastoreViewModel {
     });
 
     huePubSub.subscribe('metastore.url.change', () => {
-      const prefix =
-        window.HUE_BASE_URL && window.HUE_BASE_URL.length
-          ? window.HUE_BASE_URL + '/metastore/'
-          : '/hue/metastore/';
+      const possibleKnoxUrlPathPrefix = window.HUE_BASE_URL;
+      const prefix = possibleKnoxUrlPathPrefix + '/hue/metastore/';
+
       if (this.source() && this.source().namespace()) {
         const params = {
           source_type: this.source().type