You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/08/21 17:10:45 UTC
atlas git commit: ATLAS-2073: UI - removing tag or type from
drop-down will not exclude respective filters
Repository: atlas
Updated Branches:
refs/heads/branch-0.8 099adde53 -> fa1a5d702
ATLAS-2073: UI - removing tag or type from drop-down will not exclude respective filters
Signed-off-by: Madhan Neethiraj <ma...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/fa1a5d70
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/fa1a5d70
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/fa1a5d70
Branch: refs/heads/branch-0.8
Commit: fa1a5d702dc47658fff168ddb0700a0e0b4d629b
Parents: 099adde
Author: kevalbhatt <kb...@apache.org>
Authored: Mon Aug 21 17:45:11 2017 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Mon Aug 21 09:54:25 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/fa1a5d70/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/fa1a5d70/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 = {};
}