Bladeren bron

HUE-5924 [responsive] Default fallback for loading Metastore

Enrico Berti 8 jaren geleden
bovenliggende
commit
edf3291
1 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 5 1
      apps/metastore/src/metastore/static/metastore/js/metastore.ko.js

+ 5 - 1
apps/metastore/src/metastore/static/metastore/js/metastore.ko.js

@@ -935,7 +935,11 @@ var MetastoreViewModel = (function () {
   MetastoreViewModel.prototype.loadURL = function () {
     var self = this;
 
-    var path = (IS_HUE_4 ? window.location.getParameter('path', true) : window.location.pathname).split('/');
+    var path = (IS_HUE_4 ? window.location.getParameter('path', true) : window.location.pathname);
+    if (!path) {
+      path = '/metastore/tables';
+    }
+    path = path.split('/');
     if (path[0] === '') {
       path.shift();
     }