This is an automated email from the ASF dual-hosted git repository. ppawar pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push: new 5a55dbdf1 ATLAS-4689:UI: Basic Search: Invalid attributes passed in request 5a55dbdf1 is described below commit 5a55dbdf1c9d306ef4b1c0e6d8e846eb1a688bad Author: Prasad Pawar <prasad.pa...@freestoneinfotech.com> AuthorDate: Thu Oct 27 11:38:00 2022 +0530 ATLAS-4689:UI: Basic Search: Invalid attributes passed in request Signed-off-by: Prasad Pawar <prasad.pa...@freestoneinfotech.com> --- dashboardv2/public/js/views/search/SearchLayoutView.js | 10 ++++------ dashboardv3/public/js/views/schema/SchemaLayoutView.js | 4 ++-- dashboardv3/public/js/views/search/SearchDefaultLayoutView.js | 8 +++----- dashboardv3/public/js/views/search/SearchLayoutView.js | 4 +--- .../js/views/search/tree/ClassificationTreeLayoutView.js | 1 + .../public/js/views/search/tree/EntityTreeLayoutView.js | 1 + 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/dashboardv2/public/js/views/search/SearchLayoutView.js b/dashboardv2/public/js/views/search/SearchLayoutView.js index 020775886..ec18d9937 100644 --- a/dashboardv2/public/js/views/search/SearchLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchLayoutView.js @@ -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; diff --git a/dashboardv3/public/js/views/schema/SchemaLayoutView.js b/dashboardv3/public/js/views/schema/SchemaLayoutView.js index 81b7e442c..c4c62547a 100644 --- a/dashboardv3/public/js/views/schema/SchemaLayoutView.js +++ b/dashboardv3/public/js/views/schema/SchemaLayoutView.js @@ -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); } } }) diff --git a/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js b/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js index 340351e8c..c8985b146 100644 --- a/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js +++ b/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js @@ -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; diff --git a/dashboardv3/public/js/views/search/SearchLayoutView.js b/dashboardv3/public/js/views/search/SearchLayoutView.js index 9a38256c9..b0de30f15 100644 --- a/dashboardv3/public/js/views/search/SearchLayoutView.js +++ b/dashboardv3/public/js/views/search/SearchLayoutView.js @@ -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; diff --git a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js index fb9336613..972f2158c 100644 --- a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js +++ b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js @@ -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) { diff --git a/dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js b/dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js index d7106d667..57b0201e0 100644 --- a/dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js +++ b/dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js @@ -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) {