This is an automated email from the ASF dual-hosted git repository. kbhatt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
commit b3563fd319fa530021cb7358c1cc232f06bda24a Author: kevalbhatt <[email protected]> AuthorDate: Tue Jan 28 16:25:28 2020 +0530 ATLAS-3599 : Beta UI: While Saving search , limit and offset are not set properly when using Beta UI. --- .../search/tree/CustomFilterTreeLayoutView.js | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/dashboardv3/public/js/views/search/tree/CustomFilterTreeLayoutView.js b/dashboardv3/public/js/views/search/tree/CustomFilterTreeLayoutView.js index d4f3d19..1c44669 100644 --- a/dashboardv3/public/js/views/search/tree/CustomFilterTreeLayoutView.js +++ b/dashboardv3/public/js/views/search/tree/CustomFilterTreeLayoutView.js @@ -354,15 +354,18 @@ define([ entityDefCollection: that.entityDefCollection }); searchType === 'ADVANCED' ? that.isBasic = false : that.isBasic = true; - _.extend({}, this.options.value, params), + _.extend({}, this.options.value, params); + // Utils.notifyInfo({ + // content: "Saved values are selected." + // }) - Utils.setUrl({ - url: '#!/search/searchResult', - urlParams: _.extend({}, { 'searchType': that.isBasic ? 'basic' : 'dsl', 'isCF': true }, params), - mergeBrowserUrl: false, - trigger: true, - updateTabState: true - }); + Utils.setUrl({ + url: '#!/search/searchResult', + urlParams: _.extend({}, { 'searchType': that.isBasic ? 'basic' : 'dsl', 'isCF': true }, params), + mergeBrowserUrl: false, + trigger: true, + updateTabState: true + }); } } else { @@ -447,11 +450,18 @@ define([ var value = this.getValue(); if (value && (value.type || value.tag || value.query || value.term)) { value.searchType == "basic" ? this.isBasic = true : this.isBasic = false; + var urlObj = Utils.getUrlState.getQueryParams(); + if (urlObj) { + // includeDE value in because we need to send "true","false" to the server. + urlObj.includeDE = urlObj.includeDE == "true" ? true : false; + urlObj.excludeSC = urlObj.excludeSC == "true" ? true : false; + urlObj.excludeST = urlObj.excludeST == "true" ? true : false; + } this.customFilterSwitchBtnUpdate(); this.callSaveModalLayoutView({ 'collection': this.isBasic ? this.saveSearchBaiscCollection.fullCollection : this.saveSearchAdvanceCollection.fullCollection, getValue: function() { - return value + return _.extend({}, value, urlObj); }, 'isBasic': this.isBasic });
