atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject atlas git commit: ATLAS-2073: UI - removing tag or type from drop-down will not exclude respective filters
Date Mon, 21 Aug 2017 17:11:13 GMT
Repository: atlas
Updated Branches:
  refs/heads/master ce8f65c9c -> 2841b85ec


ATLAS-2073: UI - removing tag or type from drop-down will not exclude respective filters

Signed-off-by: Madhan Neethiraj <madhan@apache.org>
(cherry picked from commit fa1a5d702dc47658fff168ddb0700a0e0b4d629b)


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/2841b85e
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/2841b85e
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/2841b85e

Branch: refs/heads/master
Commit: 2841b85ec5039170d39ec8252724f74e4362112f
Parents: ce8f65c
Author: kevalbhatt <kbhatt@apache.org>
Authored: Mon Aug 21 17:45:11 2017 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Mon Aug 21 10:11:02 2017 -0700

----------------------------------------------------------------------
 dashboardv2/public/js/router/Router.js          | 10 ++---
 .../public/js/views/search/SearchLayoutView.js  | 40 ++++++++++++--------
 2 files changed, 29 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/2841b85e/dashboardv2/public/js/router/Router.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/router/Router.js b/dashboardv2/public/js/router/Router.js
index 4fac9c9..a43fbf7 100644
--- a/dashboardv2/public/js/router/Router.js
+++ b/dashboardv2/public/js/router/Router.js
@@ -132,7 +132,7 @@ define([
                         App.rSideNav.show(new SideNavLayoutView(
                             _.extend({
                                 'url': url
-                            }, that.preFetchedCollectionLists)
+                            }, that.preFetchedCollectionLists, that.sharedObj)
                         ));
                     } else {
                         App.rSideNav.currentView.RBusinessCatalogLayoutView.currentView.manualRender("/"
+ url);
@@ -163,7 +163,7 @@ define([
                     App.rNHeader.show(new Header());
                     if (!App.rSideNav.currentView) {
                         App.rSideNav.show(new SideNavLayoutView(
-                            _.extend({}, that.preFetchedCollectionLists)
+                            _.extend({}, that.preFetchedCollectionLists, that.sharedObj)
                         ));
                     } else {
                         App.rSideNav.currentView.selectTab();
@@ -171,7 +171,7 @@ define([
                     App.rNContent.show(new DetailPageLayoutView(_.extend({
                         'collection': this.entityCollection,
                         'id': id,
-                    }, that.preFetchedCollectionLists)));
+                    }, that.preFetchedCollectionLists, that.sharedObj)));
                     this.entityCollection.url = UrlLinks.entitiesApiUrl(id);
                     this.entityCollection.fetch({ reset: true });
                 });
@@ -201,7 +201,7 @@ define([
                     App.rSideNav.show(new SideNavLayoutView(
                         _.extend({
                             'tag': tagName
-                        }, that.preFetchedCollectionLists)
+                        }, that.preFetchedCollectionLists, that.sharedObj)
                     ));
                 } else {
                     if (paramObj && paramObj.dlttag) {
@@ -225,7 +225,7 @@ define([
                     App.rNContent.show(new TagDetailLayoutView(
                         _.extend({
                             'tag': tagName
-                        }, that.preFetchedCollectionLists)
+                        }, that.preFetchedCollectionLists, that.sharedObj)
                     ));
                 }
             });

http://git-wip-us.apache.org/repos/asf/atlas/blob/2841b85e/dashboardv2/public/js/views/search/SearchLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchLayoutView.js b/dashboardv2/public/js/views/search/SearchLayoutView.js
index 5957a46..5916aa0 100644
--- a/dashboardv2/public/js/views/search/SearchLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchLayoutView.js
@@ -289,7 +289,10 @@ define(['require',
             okAttrFilterButton: function(e) {
                 var isTag = this.attrModal.tag ? true : false,
                     filtertype = isTag ? 'tagFilters' : 'entityFilters',
-                    rule = this.attrModal.RQueryBuilder.currentView.ui.builder.queryBuilder('getRules');
+                    queryBuilderRef = this.attrModal.RQueryBuilder.currentView.ui.builder;
+                if (queryBuilderRef.data('queryBuilder')) {
+                    var rule = queryBuilderRef.queryBuilder('getRules');
+                }
                 if (rule) {
                     var ruleUrl = CommonViewFunction.attributeFilter.generateUrl(rule.rules);
                     this.searchTableFilters[filtertype][(isTag ? this.value.tag : this.value.type)]
= ruleUrl;
@@ -380,7 +383,9 @@ define(['require',
                 this.query[this.type].query = value || null;
                 var params = {
                     searchType: this.type,
-                    dslChecked: this.ui.searchType.is(':checked')
+                    dslChecked: this.ui.searchType.is(':checked'),
+                    tagFilters: null,
+                    entityFilters: null
                 }
                 this.query[this.type].type = this.ui.typeLov.select2('val') || null;
                 if (!this.dsl) {
@@ -436,27 +441,30 @@ define(['require',
                     this.updateQueryObject(paramObj);
                 }
                 if (paramObj && this.type == "basic") {
-                    this.query[this.type].attribute = paramObj.attributes ? paramObj.attributes
: null;
+                    this.query[this.type].attributes = paramObj.attributes ? paramObj.attributes
: null;
+                }
+                if (Utils.getUrlState.isSearchTab()) {
+                    Utils.setUrl({
+                        url: '#!/search/searchResult',
+                        urlParams: _.extend(this.query[this.type], {
+                            searchType: this.type,
+                            dslChecked: this.ui.searchType.is(':checked'),
+                            includeDE: this.value.includeDE
+                        }),
+                        updateTabState: function() {
+                            return { searchUrl: this.url, stateChanged: true };
+                        },
+                        mergeBrowserUrl: false,
+                        trigger: true
+                    });
                 }
-                Utils.setUrl({
-                    url: '#!/search/searchResult',
-                    urlParams: _.extend(this.query[this.type], {
-                        searchType: this.type,
-                        dslChecked: this.ui.searchType.is(':checked')
-                    }),
-                    updateTabState: function() {
-                        return { searchUrl: this.url, stateChanged: true };
-                    },
-                    mergeBrowserUrl: false,
-                    trigger: true
-                });
             },
             clearSearchData: function() {
                 this.updateQueryObject();
                 this.ui.typeLov.val("").trigger("change");
                 this.ui.tagLov.val("").trigger("change");
                 this.ui.searchInput.val("");
-                if (this.dsl) {
+                if (!this.dsl) {
                     this.searchTableFilters.tagFilters = {};
                     this.searchTableFilters.entityFilters = {};
                 }


Mime
View raw message