Commit 234b3005 by kevalbhatt

ATLAS-2130 : Call made to fetch tables of a database doesn't have exlcudeDeletedEntities parameter

parent 6426e9df
...@@ -160,6 +160,7 @@ define([ ...@@ -160,6 +160,7 @@ define([
'collection/VEntityList' 'collection/VEntityList'
], function(Header, DetailPageLayoutView, SideNavLayoutView, VEntityList) { ], function(Header, DetailPageLayoutView, SideNavLayoutView, VEntityList) {
this.entityCollection = new VEntityList([], {}); this.entityCollection = new VEntityList([], {});
var paramObj = Utils.getUrlState.getQueryParams();
App.rNHeader.show(new Header()); App.rNHeader.show(new Header());
if (!App.rSideNav.currentView) { if (!App.rSideNav.currentView) {
App.rSideNav.show(new SideNavLayoutView( App.rSideNav.show(new SideNavLayoutView(
...@@ -171,6 +172,7 @@ define([ ...@@ -171,6 +172,7 @@ define([
App.rNContent.show(new DetailPageLayoutView(_.extend({ App.rNContent.show(new DetailPageLayoutView(_.extend({
'collection': this.entityCollection, 'collection': this.entityCollection,
'id': id, 'id': id,
'value': paramObj
}, that.preFetchedCollectionLists, that.sharedObj))); }, that.preFetchedCollectionLists, that.sharedObj)));
this.entityCollection.url = UrlLinks.entitiesApiUrl(id); this.entityCollection.url = UrlLinks.entitiesApiUrl(id);
this.entityCollection.fetch({ reset: true }); this.entityCollection.fetch({ reset: true });
......
...@@ -106,7 +106,7 @@ define(['require', ...@@ -106,7 +106,7 @@ define(['require',
* @constructs * @constructs
*/ */
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'collection', 'id', 'entityDefCollection', 'typeHeaders', 'enumDefCollection', 'classificationDefCollection')); _.extend(this, _.pick(options, 'value', 'collection', 'id', 'entityDefCollection', 'typeHeaders', 'enumDefCollection', 'classificationDefCollection'));
this.bindEvents(); this.bindEvents();
}, },
bindEvents: function() { bindEvents: function() {
...@@ -200,7 +200,8 @@ define(['require', ...@@ -200,7 +200,8 @@ define(['require',
this.renderProfileLayoutView(_.extend({}, obj, { this.renderProfileLayoutView(_.extend({}, obj, {
entityDetail: collectionJSON.attributes, entityDetail: collectionJSON.attributes,
profileData: collectionJSON.attributes.profileData, profileData: collectionJSON.attributes.profileData,
typeName: collectionJSON.typeName typeName: collectionJSON.typeName,
value: that.value
})); }));
} }
......
...@@ -57,7 +57,7 @@ define(['require', ...@@ -57,7 +57,7 @@ define(['require',
* @constructs * @constructs
*/ */
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'profileData', 'guid', 'typeName', 'entityDetail', 'typeHeaders', 'entityDefCollection', 'enumDefCollection', 'classificationDefCollection')); _.extend(this, _.pick(options, 'profileData', 'guid', 'value', 'typeName', 'entityDetail', 'typeHeaders', 'entityDefCollection', 'enumDefCollection', 'classificationDefCollection'));
if (this.typeName === "hive_db") { if (this.typeName === "hive_db") {
this.profileData = { attributes: true }; this.profileData = { attributes: true };
} }
...@@ -73,16 +73,15 @@ define(['require', ...@@ -73,16 +73,15 @@ define(['require',
this.renderProfileColumnLayoutView(); this.renderProfileColumnLayoutView();
} }
} }
}, },
renderSearchResultLayoutView: function() { renderSearchResultLayoutView: function() {
var that = this; var that = this;
require(['views/search/SearchResultLayoutView'], function(SearchResultLayoutView) { require(['views/search/SearchResultLayoutView'], function(SearchResultLayoutView) {
var value = { var value = _.extend({}, that.value, {
'guid': that.guid, 'guid': that.guid,
'searchType': 'relationship', 'searchType': 'relationship',
'profileDBView': true 'profileDBView': true
}; });
that.RProfileTableOrColumnLayoutView.show(new SearchResultLayoutView({ that.RProfileTableOrColumnLayoutView.show(new SearchResultLayoutView({
'value': value, 'value': value,
'typeHeaders': that.typeHeaders, 'typeHeaders': that.typeHeaders,
......
...@@ -406,7 +406,7 @@ define(['require', ...@@ -406,7 +406,7 @@ define(['require',
} }
if (isPostMethod) { if (isPostMethod) {
that.searchCollection.referredEntities = dataOrCollection.rnoRecordFoeferredEntities; that.searchCollection.referredEntities = dataOrCollection.rnoRecordFoeferredEntities;
that.searchCollection.reset(dataOrCollection.entities); that.searchCollection.reset(dataOrCollection.entities, { silent: true });
} }
/*Next button check. /*Next button check.
...@@ -480,6 +480,9 @@ define(['require', ...@@ -480,6 +480,9 @@ define(['require',
} else { } else {
apiObj.data = null; apiObj.data = null;
this.searchCollection.filterObj = null; this.searchCollection.filterObj = null;
if (this.value.profileDBView) {
_.extend(this.searchCollection.queryParams, { 'excludeDeletedEntities': (this.value && this.value.includeDE ? false : true) });
}
Globals.searchApiCallRef = this.searchCollection.fetch(apiObj); Globals.searchApiCallRef = this.searchCollection.fetch(apiObj);
} }
} else { } else {
...@@ -490,6 +493,9 @@ define(['require', ...@@ -490,6 +493,9 @@ define(['require',
Globals.searchApiCallRef = this.searchCollection.getBasicRearchResult(apiObj); Globals.searchApiCallRef = this.searchCollection.getBasicRearchResult(apiObj);
} else { } else {
apiObj.data = null; apiObj.data = null;
if (this.value.profileDBView) {
_.extend(this.searchCollection.queryParams, { 'excludeDeletedEntities': (this.value && this.value.includeDE ? false : true) });
}
Globals.searchApiCallRef = this.searchCollection.fetch(apiObj); Globals.searchApiCallRef = this.searchCollection.fetch(apiObj);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment