Browse Source

[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 year ago
parent
commit
55f561bc7e

+ 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