Forráskód Böngészése

HUE-6265 [home] Do not conflict document filtering type when not on home

Romain Rigaux 8 éve
szülő
commit
3a850ea67a

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/apiHelper.js

@@ -673,7 +673,7 @@ var ApiHelper = (function () {
       }
     };
 
-    if (window.location.getParameter('type') !== '') {
+    if (window.location.pathname.indexOf('/home') > -1 && window.location.getParameter('type') !== '') {
       parameters['data']['type'] = ['directory', window.location.getParameter('type')];
       parameters['traditional'] = true;
     }

+ 1 - 1
desktop/core/src/desktop/templates/common_home.mako

@@ -114,7 +114,7 @@
       loadUrlParam();
 
       viewModel.activeEntry.subscribe(function (newEntry) {
-        var filterType = window.location.getParameter('type') != '' ? '&type=' + window.location.getParameter('type') : '';
+        var filterType = window.location.pathname.indexOf('/home') > -1 && window.location.getParameter('type') != '' ? '&type=' + window.location.getParameter('type') : '';
         if (typeof newEntry !== 'undefined' && newEntry.definition().uuid && ! newEntry.isRoot()) {
           if (window.location.getParameter('uuid') == '' || window.location.getParameter('uuid') !== newEntry.definition().uuid){
             hueUtils.changeURL('${ is_embeddable and '/hue' or ''}/home/?uuid=' + newEntry.definition().uuid + filterType);