Repository: atlas Updated Branches: refs/heads/0.8-incubating b993f9227 -> 374cc342d
ATLAS-2046: UI Regression - Columns Filter not listing all attributes of a datatype Signed-off-by: Madhan Neethiraj <[email protected]> (cherry picked from commit fa11d13a5c431fe3c46a7ad2b267bea1f61da3e9) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/0d6f7a4f Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/0d6f7a4f Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/0d6f7a4f Branch: refs/heads/0.8-incubating Commit: 0d6f7a4faa9c1066196473704bc125ef4bdd50de Parents: b993f92 Author: kevalbhatt <[email protected]> Authored: Wed Aug 16 16:02:06 2017 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Wed Aug 16 11:14:31 2017 -0700 ---------------------------------------------------------------------- .../js/views/search/SearchResultLayoutView.js | 76 ++++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/0d6f7a4f/dashboardv2/public/js/views/search/SearchResultLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js index b9a8895..072295e 100644 --- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js @@ -637,48 +637,48 @@ define(['require', } }) }; - if (this.value && this.value.searchType === "basic") { - var def = this.entityDefCollection.fullCollection.find({ name: this.value.type }); - if (def) { - var attrObj = Utils.getNestedSuperTypeObj({ data: def.toJSON(), collection: this.entityDefCollection, attrMerge: true }); - _.each(attrObj, function(obj, key) { - var key = obj.name, - isRenderable = _.contains(columnToShow, key) - if (key == "name" || key == "description" || key == "owner") { - if (columnToShow) { - col[key].renderable = isRenderable; - } - return; + } + if (this.value && this.value.searchType === "basic") { + var def = this.entityDefCollection.fullCollection.find({ name: this.value.type }); + if (def) { + var attrObj = Utils.getNestedSuperTypeObj({ data: def.toJSON(), collection: this.entityDefCollection, attrMerge: true }); + _.each(attrObj, function(obj, key) { + var key = obj.name, + isRenderable = _.contains(columnToShow, key) + if (key == "name" || key == "description" || key == "owner") { + if (columnToShow) { + col[key].renderable = isRenderable; } - col[obj.name] = { - label: obj.name.capitalize(), - cell: "Html", - editable: false, - sortable: false, - resizeable: true, - orderable: true, - renderable: isRenderable, - formatter: _.extend({}, Backgrid.CellFormatter.prototype, { - fromRaw: function(rawValue, model) { - var modelObj = model.toJSON(); - - if (modelObj && modelObj.attributes && !_.isUndefined(modelObj.attributes[key])) { - var tempObj = { - 'scope': that, - 'attributeDefs': [obj], - 'valueObject': {}, - 'isTable': false - } + return; + } + col[obj.name] = { + label: obj.name.capitalize(), + cell: "Html", + editable: false, + sortable: false, + resizeable: true, + orderable: true, + renderable: isRenderable, + formatter: _.extend({}, Backgrid.CellFormatter.prototype, { + fromRaw: function(rawValue, model) { + var modelObj = model.toJSON(); - tempObj.valueObject[key] = modelObj.attributes[key] - Utils.findAndMergeRefEntity(tempObj.valueObject, that.searchCollection.referredEntities); - return CommonViewFunction.propertyTable(tempObj); + if (modelObj && modelObj.attributes && !_.isUndefined(modelObj.attributes[key])) { + var tempObj = { + 'scope': that, + 'attributeDefs': [obj], + 'valueObject': {}, + 'isTable': false } + + tempObj.valueObject[key] = modelObj.attributes[key] + Utils.findAndMergeRefEntity(tempObj.valueObject, that.searchCollection.referredEntities); + return CommonViewFunction.propertyTable(tempObj); } - }) - }; - }); - } + } + }) + }; + }); } } return this.searchCollection.constructor.getTableCols(col, this.searchCollection);
