atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject atlas git commit: ATLAS-2046: UI Regression - Columns Filter not listing all attributes of a datatype
Date Wed, 16 Aug 2017 18:14:08 GMT
Repository: atlas
Updated Branches:
  refs/heads/master 376298540 -> fa11d13a5


ATLAS-2046: UI Regression - Columns Filter not listing all attributes of a datatype

Signed-off-by: Madhan Neethiraj <madhan@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/fa11d13a
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/fa11d13a
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/fa11d13a

Branch: refs/heads/master
Commit: fa11d13a5c431fe3c46a7ad2b267bea1f61da3e9
Parents: 3762985
Author: kevalbhatt <kbhatt@apache.org>
Authored: Wed Aug 16 16:02:06 2017 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Wed Aug 16 10:32:50 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/fa11d13a/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);


Mime
View raw message