浏览代码

HUE-7437 [dashboard] History back sometimes shows the list of dashboards

Enrico Berti 8 年之前
父节点
当前提交
d3b87f6c3b

+ 1 - 1
desktop/libs/dashboard/src/dashboard/static/dashboard/js/collections.ko.js

@@ -125,7 +125,7 @@ var SearchCollectionsModel = function (props) {
 
   self.editCollection = function (collection) {
     cleanCollections();
-    location.href = collection.absoluteUrl();
+    location.href = (IS_HUE_4 ? '/hue' : '') + collection.absoluteUrl();
   };
 
   self.markManyForDeletion = function (collections) {

+ 3 - 1
desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js

@@ -1914,7 +1914,9 @@ var SearchViewModel = function (collection_json, query_json, initial_json) {
       }
       else if (location.getParameter("collection") != "") {
         var firstQuery = self.query.qs()[0].q();
-        hueUtils.changeURL("?collection=" + location.getParameter("collection") + (firstQuery ? "&q=" + firstQuery : ""));
+        if (firstQuery) {
+          hueUtils.changeURL("?collection=" + location.getParameter("collection") + "&q=" + firstQuery);
+        }
       }
 
       // Multi queries