Commit b3563fd3 by kevalbhatt

ATLAS-3599 : Beta UI: While Saving search , limit and offset are not set…

ATLAS-3599 : Beta UI: While Saving search , limit and offset are not set properly when using Beta UI.
parent e04c4f5c
...@@ -354,15 +354,18 @@ define([ ...@@ -354,15 +354,18 @@ define([
entityDefCollection: that.entityDefCollection entityDefCollection: that.entityDefCollection
}); });
searchType === 'ADVANCED' ? that.isBasic = false : that.isBasic = true; 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({ Utils.setUrl({
url: '#!/search/searchResult', url: '#!/search/searchResult',
urlParams: _.extend({}, { 'searchType': that.isBasic ? 'basic' : 'dsl', 'isCF': true }, params), urlParams: _.extend({}, { 'searchType': that.isBasic ? 'basic' : 'dsl', 'isCF': true }, params),
mergeBrowserUrl: false, mergeBrowserUrl: false,
trigger: true, trigger: true,
updateTabState: true updateTabState: true
}); });
} }
} else { } else {
...@@ -447,11 +450,18 @@ define([ ...@@ -447,11 +450,18 @@ define([
var value = this.getValue(); var value = this.getValue();
if (value && (value.type || value.tag || value.query || value.term)) { if (value && (value.type || value.tag || value.query || value.term)) {
value.searchType == "basic" ? this.isBasic = true : this.isBasic = false; 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.customFilterSwitchBtnUpdate();
this.callSaveModalLayoutView({ this.callSaveModalLayoutView({
'collection': this.isBasic ? this.saveSearchBaiscCollection.fullCollection : this.saveSearchAdvanceCollection.fullCollection, 'collection': this.isBasic ? this.saveSearchBaiscCollection.fullCollection : this.saveSearchAdvanceCollection.fullCollection,
getValue: function() { getValue: function() {
return value return _.extend({}, value, urlObj);
}, },
'isBasic': this.isBasic 'isBasic': this.isBasic
}); });
......
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