ATLAS-4689:UI: Basic Search: Invalid attributes passed in request

Signed-off-by: Prasad Pawar <prasad.pawar@freestoneinfotech.com>
This commit is contained in:
Prasad Pawar 2022-10-27 11:38:00 +05:30
parent 1c7e59478c
commit 5a55dbdf1c
6 changed files with 12 additions and 16 deletions

View File

@ -256,12 +256,12 @@ define(['require',
this.setInitialEntityVal = false;
}
},
disableRefreshButton : function(){
disableRefreshButton: function() {
var that = this;
this.ui.refreshBtn.attr('disabled', true);
setTimeout( function(){
setTimeout(function() {
that.ui.refreshBtn.attr('disabled', false);
},1000);
}, 1000);
},
makeFilterButtonActive: function(filtertypeParam) {
var filtertype = ['entityFilters', 'tagFilters'],
@ -829,9 +829,7 @@ define(['require',
params['entityFilters'] = entityFilterObj[this.value.type]
}
var columnList = this.value.type && this.searchTableColumns ? this.searchTableColumns[this.value.type] : null;
if (columnList) {
params['attributes'] = columnList.join(',');
}
params['attributes'] = columnList ? columnList.join(',') : null;
params['includeDE'] = _.isUndefinedNull(this.value.includeDE) ? false : this.value.includeDE;
params['excludeST'] = _.isUndefinedNull(this.value.excludeST) ? false : this.value.excludeST;
params['excludeSC'] = _.isUndefinedNull(this.value.excludeSC) ? false : this.value.excludeSC;

View File

@ -234,9 +234,9 @@ define(['require',
fromRaw: function(rawValue, model) {
var obj = model.toJSON();
if (obj.status && Enums.entityStateReadOnly[obj.status]) {
return '<div class="readOnly">' + CommonViewFunction.tagForTable(objthat.classificationDefCollection); + '</div>';
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj, that.classificationDefCollection); + '</div>';
} else {
return CommonViewFunction.tagForTable(objthat.classificationDefCollection);
return CommonViewFunction.tagForTable(obj, that.classificationDefCollection);
}
}
})

View File

@ -53,7 +53,7 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa
createNewEntity: '[data-id="createNewEntity"]',
clearQuerySearch: "[data-id='clearQuerySearch']",
refreshSearchQuery: "[data-id='refreshSearchResult']",
includeExclude : "[data-id='includeExclude']"
includeExclude: "[data-id='includeExclude']"
},
/** ui events hash */
events: function() {
@ -74,7 +74,7 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa
if (Utils.getUrlState.isSearchTab()) {
this.options.searchVent.trigger('search:refresh');
}
if(Utils.getUrlState.isRelationTab()){
if (Utils.getUrlState.isRelationTab()) {
this.options.searchVent.trigger('relationSearch:refresh');
}
this.disableRefreshButton();
@ -540,9 +540,7 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa
params["query"] = this.options.value.query;
}
var columnList = this.options.value && this.options.value.type && this.options.searchTableColumns ? this.options.searchTableColumns[this.options.value.type] : null;
if (columnList) {
params["attributes"] = columnList.join(",");
}
params['attributes'] = columnList ? columnList.join(',') : null;
params['includeDE'] = _.isUndefinedNull(this.options.value.includeDE) ? false : this.options.value.includeDE;
params["excludeST"] = _.isUndefinedNull(this.options.value.excludeST) ? false : this.options.value.excludeST;
params["excludeSC"] = _.isUndefinedNull(this.options.value.excludeSC) ? false : this.options.value.excludeSC;

View File

@ -653,9 +653,7 @@ define(['require',
params['entityFilters'] = entityFilterObj[this.value.type]
}
var columnList = this.value && this.value.type && this.searchTableColumns ? this.searchTableColumns[this.value.type] : null;
if (columnList) {
params['attributes'] = columnList.join(',');
}
params['attributes'] = columnList ? columnList.join(',') : null;
params['includeDE'] = _.isUndefinedNull(this.value.includeDE) ? false : this.value.includeDE;
params['excludeST'] = _.isUndefinedNull(this.value.excludeST) ? false : this.value.excludeST;
params['excludeSC'] = _.isUndefinedNull(this.value.excludeSC) ? false : this.value.excludeSC;

View File

@ -314,6 +314,7 @@ define([
this.ui.classificationSearchTree.jstree(true).deselect_all();
this.tagId = null;
} else {
if (that.options.value.attributes) { that.options.value.attributes = null; }
if ((that.options.value.tag === "_ALL_CLASSIFICATION_TYPES" && this.tagId !== "_ALL_CLASSIFICATION_TYPES") || (that.options.value.tag === "_NOT_CLASSIFIED" && this.tagId !== "_NOT_CLASSIFIED") || (that.options.value.tag === "_CLASSIFIED" && this.tagId !== "_CLASSIFIED")) {
this.fromManualRender = true;
if (this.tagId) {

View File

@ -204,6 +204,7 @@ define([
this.ui.entitySearchTree.jstree(true).deselect_all();
this.typeId = null;
} else {
if (that.options.value.attributes) { that.options.value.attributes = null; }
if (that.options.value.type === "_ALL_ENTITY_TYPES" && this.typeId !== "_ALL_ENTITY_TYPES") {
this.fromManualRender = true;
if (this.typeId) {