You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2020/12/16 08:43:20 UTC

[atlas] branch master updated (b5ce624 -> de87800)

This is an automated email from the ASF dual-hosted git repository.

nixon pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git.


    from b5ce624  Atlas-4078 :- UI - Lineage tab not shown on UI for entity with type Dataset or Process
     new b1cc951  Atlas-4073: UI Column sorting not working in BusinessMetadata details page Fix
     new de87800  ATLAS-4058: UI: Fix Entity detail page Hive Column Position with 0 is set to NA.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dashboardv2/public/js/utils/TableLayout.js         | 43 ++++++++++++++-------
 .../js/views/audit/AdminAuditTableLayoutView.js    |  1 +
 .../js/views/audit/CreateAuditTableLayoutView.js   |  3 ++
 .../BusinessMetadataAttrTableLayoutView.js         |  3 +-
 .../js/views/entity/EntityDetailTableLayoutView.js | 10 ++++-
 dashboardv3/public/js/utils/TableLayout.js         | 44 +++++++++++++++-------
 .../js/views/audit/AdminAuditTableLayoutView.js    |  1 +
 .../js/views/audit/CreateAuditTableLayoutView.js   |  3 ++
 .../BusinessMetadataAttrTableLayoutView.js         |  3 +-
 .../js/views/entity/EntityDetailTableLayoutView.js | 10 ++++-
 10 files changed, 91 insertions(+), 30 deletions(-)


[atlas] 02/02: ATLAS-4058: UI: Fix Entity detail page Hive Column Position with 0 is set to NA.

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit de87800c19ea06f53904a2948fcde29a57d2f051
Author: prasad pawar <pr...@freestoneinfotech.com>
AuthorDate: Wed Dec 16 13:12:33 2020 +0530

    ATLAS-4058: UI: Fix Entity detail page Hive Column Position with 0 is set to NA.
---
 .../public/js/views/audit/CreateAuditTableLayoutView.js        |  3 +++
 .../public/js/views/entity/EntityDetailTableLayoutView.js      | 10 +++++++++-
 .../public/js/views/audit/CreateAuditTableLayoutView.js        |  3 +++
 .../public/js/views/entity/EntityDetailTableLayoutView.js      | 10 +++++++++-
 4 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
index 41ad4ac..3733195 100644
--- a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
@@ -78,6 +78,9 @@ define(['require',
                     getValue: function(val, key) {
                         if (key && key.toLowerCase().indexOf("time") > 0) {
                             return Utils.formatDate({ date: val });
+                        } else if (key && key.toLowerCase().indexOf("position") === 0 && val === 0) {
+                            //if position value is 0 we are showing N/A
+                            return "N/A";
                         } else {
                             return val;
                         }
diff --git a/dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js b/dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
index a5b5262..a47e075 100644
--- a/dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
+++ b/dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
@@ -81,7 +81,15 @@ define(['require',
                         scope: this,
                         valueObject: _.extend({ "isIncomplete": this.entity.isIncomplete }, this.entity.attributes),
                         attributeDefs: this.attributeDefs,
-                        highlightString: highlightString
+                        highlightString: highlightString,
+                        getValue: function(val, key) {
+                            if (key && key.toLowerCase().indexOf("position") === 0 && val === 0) {
+                                //if position value is 0 we are showing N/A
+                                return "N/A";
+                            } else {
+                                return val;
+                            }
+                        }
                     });
                 this.ui.detailValue.append(table);
                 Utils.togglePropertyRelationshipTableEmptyValues({
diff --git a/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js b/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
index 41ad4ac..3733195 100644
--- a/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
+++ b/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
@@ -78,6 +78,9 @@ define(['require',
                     getValue: function(val, key) {
                         if (key && key.toLowerCase().indexOf("time") > 0) {
                             return Utils.formatDate({ date: val });
+                        } else if (key && key.toLowerCase().indexOf("position") === 0 && val === 0) {
+                            //if position value is 0 we are showing N/A
+                            return "N/A";
                         } else {
                             return val;
                         }
diff --git a/dashboardv3/public/js/views/entity/EntityDetailTableLayoutView.js b/dashboardv3/public/js/views/entity/EntityDetailTableLayoutView.js
index a5b5262..a47e075 100644
--- a/dashboardv3/public/js/views/entity/EntityDetailTableLayoutView.js
+++ b/dashboardv3/public/js/views/entity/EntityDetailTableLayoutView.js
@@ -81,7 +81,15 @@ define(['require',
                         scope: this,
                         valueObject: _.extend({ "isIncomplete": this.entity.isIncomplete }, this.entity.attributes),
                         attributeDefs: this.attributeDefs,
-                        highlightString: highlightString
+                        highlightString: highlightString,
+                        getValue: function(val, key) {
+                            if (key && key.toLowerCase().indexOf("position") === 0 && val === 0) {
+                                //if position value is 0 we are showing N/A
+                                return "N/A";
+                            } else {
+                                return val;
+                            }
+                        }
                     });
                 this.ui.detailValue.append(table);
                 Utils.togglePropertyRelationshipTableEmptyValues({


[atlas] 01/02: Atlas-4073: UI Column sorting not working in BusinessMetadata details page Fix

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit b1cc951d9c2dfeb971e342006fcf6680b982a8fb
Author: prasad pawar <pr...@freestoneinfotech.com>
AuthorDate: Tue Dec 15 13:04:55 2020 +0530

    Atlas-4073: UI Column sorting not working in BusinessMetadata details page Fix
---
 dashboardv2/public/js/utils/TableLayout.js         | 43 ++++++++++++++-------
 .../js/views/audit/AdminAuditTableLayoutView.js    |  1 +
 .../BusinessMetadataAttrTableLayoutView.js         |  3 +-
 dashboardv3/public/js/utils/TableLayout.js         | 44 +++++++++++++++-------
 .../js/views/audit/AdminAuditTableLayoutView.js    |  1 +
 .../BusinessMetadataAttrTableLayoutView.js         |  3 +-
 6 files changed, 67 insertions(+), 28 deletions(-)

diff --git a/dashboardv2/public/js/utils/TableLayout.js b/dashboardv2/public/js/utils/TableLayout.js
index 89216bd..377abca 100644
--- a/dashboardv2/public/js/utils/TableLayout.js
+++ b/dashboardv2/public/js/utils/TableLayout.js
@@ -209,19 +209,36 @@ define(['require',
                         val.fullCollection.sort();
                         this.comparator = function(next, previous, data) {
                             var getValue = function(options) {
-                                var next = options.next,
-                                    previous = options.previous,
-                                    order = options.order;
-                                if (next === previous) {
-                                    return null;
-                                } else {
-                                    if (order === -1) {
-                                        return next < previous ? -1 : 1;
+                                    var next = options.next,
+                                        previous = options.previous,
+                                        order = options.order;
+                                    if (next === previous) {
+                                        return null;
                                     } else {
-                                        return next < previous ? 1 : -1;
+                                        if (order === -1) {
+                                            return next < previous ? -1 : 1;
+                                        } else {
+                                            return next < previous ? 1 : -1;
+                                        }
                                     }
-                                }
-                            }
+                                },
+                                getKeyVal = function(model, key) {
+                                    //for nested obj
+                                    var value = null;
+                                    if (model && key) {
+                                        value = model[key];
+                                        if (!value) {
+                                            _.each(model, function(modalValue) {
+                                                if (typeof(modalValue) == "object") {
+                                                    if (!value) {
+                                                        value = getKeyVal(modalValue, key);
+                                                    }
+                                                }
+                                            });
+                                        }
+                                    }
+                                    return Number(value) || value;
+                                };
                             if (val.state && (!_.isNull(val.state.sortKey))) {
                                 var nextValue,
                                     previousValue;
@@ -229,8 +246,8 @@ define(['require',
                                     nextValue = next.get("attributes")[val.state.sortKey];
                                     previousValue = previous.get("attributes")[val.state.sortKey];
                                 } else {
-                                    nextValue = next.attributes[val.state.sortKey];
-                                    previousValue = previous.attributes[val.state.sortKey];
+                                    nextValue = getKeyVal(next.attributes, val.state.sortKey);
+                                    previousValue = getKeyVal(previous.attributes, val.state.sortKey);
                                 }
                                 nextValue = (typeof nextValue === 'string') ? nextValue.toLowerCase() : nextValue;
                                 previousValue = (typeof previousValue === 'string') ? previousValue.toLowerCase() : previousValue;
diff --git a/dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js b/dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js
index e8babde..dcfd82a 100644
--- a/dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js
@@ -315,6 +315,7 @@ define(['require',
                         cell: "html",
                         renderable: false,
                         editable: false,
+                        sortable: false,
                         formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
                             fromRaw: function(rawValue, model) {
                                 var startTime = model.get('startTime') ? parseInt(model.get('startTime')) : null,
diff --git a/dashboardv2/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js b/dashboardv2/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js
index 12cc710..37058bb 100644
--- a/dashboardv2/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js
+++ b/dashboardv2/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js
@@ -186,6 +186,7 @@ define(['require',
                         label: "Enable Multivalues",
                         cell: "html",
                         editable: false,
+                        sortable: false,
                         formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
                             fromRaw: function(rawValue, model) {
                                 var enableMultipleValue = '';
@@ -210,7 +211,7 @@ define(['require',
                             }
                         })
                     },
-                    options: {
+                    applicableEntityTypes: {
                         label: "Entity Type(s)",
                         cell: "html",
                         editable: false,
diff --git a/dashboardv3/public/js/utils/TableLayout.js b/dashboardv3/public/js/utils/TableLayout.js
index 89216bd..487851e 100644
--- a/dashboardv3/public/js/utils/TableLayout.js
+++ b/dashboardv3/public/js/utils/TableLayout.js
@@ -209,19 +209,36 @@ define(['require',
                         val.fullCollection.sort();
                         this.comparator = function(next, previous, data) {
                             var getValue = function(options) {
-                                var next = options.next,
-                                    previous = options.previous,
-                                    order = options.order;
-                                if (next === previous) {
-                                    return null;
-                                } else {
-                                    if (order === -1) {
-                                        return next < previous ? -1 : 1;
+                                    var next = options.next,
+                                        previous = options.previous,
+                                        order = options.order;
+                                    if (next === previous) {
+                                        return null;
                                     } else {
-                                        return next < previous ? 1 : -1;
+                                        if (order === -1) {
+                                            return next < previous ? -1 : 1;
+                                        } else {
+                                            return next < previous ? 1 : -1;
+                                        }
                                     }
-                                }
-                            }
+                                },
+                                getKeyVal = function(model, key) {
+                                    //for nested obj
+                                    var value = null;
+                                    if (model && key) {
+                                        value = model[key];
+                                        if (!value) {
+                                            _.each(model, function(modalValue) {
+                                                if (typeof(modalValue) == "object") {
+                                                    if (!value) {
+                                                        value = getKeyVal(modalValue, key);
+                                                    }
+                                                }
+                                            });
+                                        }
+                                    }
+                                    return Number(value) || value;
+                                };
                             if (val.state && (!_.isNull(val.state.sortKey))) {
                                 var nextValue,
                                     previousValue;
@@ -229,8 +246,8 @@ define(['require',
                                     nextValue = next.get("attributes")[val.state.sortKey];
                                     previousValue = previous.get("attributes")[val.state.sortKey];
                                 } else {
-                                    nextValue = next.attributes[val.state.sortKey];
-                                    previousValue = previous.attributes[val.state.sortKey];
+                                    nextValue = getKeyVal(next.attributes, val.state.sortKey);
+                                    previousValue = getKeyVal(previous.attributes, val.state.sortKey);
                                 }
                                 nextValue = (typeof nextValue === 'string') ? nextValue.toLowerCase() : nextValue;
                                 previousValue = (typeof previousValue === 'string') ? previousValue.toLowerCase() : previousValue;
@@ -246,6 +263,7 @@ define(['require',
                 }
                 this.bindEvents();
             },
+
             /** all events binding here */
             bindEvents: function() {
                 this.listenTo(this.collection, 'request', function() {
diff --git a/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js b/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
index e8babde..dcfd82a 100644
--- a/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
+++ b/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
@@ -315,6 +315,7 @@ define(['require',
                         cell: "html",
                         renderable: false,
                         editable: false,
+                        sortable: false,
                         formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
                             fromRaw: function(rawValue, model) {
                                 var startTime = model.get('startTime') ? parseInt(model.get('startTime')) : null,
diff --git a/dashboardv3/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js b/dashboardv3/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js
index ff2c02c..dd1e470 100644
--- a/dashboardv3/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js
+++ b/dashboardv3/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js
@@ -186,6 +186,7 @@ define(['require',
                         label: "Enable Multivalues",
                         cell: "html",
                         editable: false,
+                        sortable: false,
                         formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
                             fromRaw: function(rawValue, model) {
                                 var enableMultipleValue = '';
@@ -210,7 +211,7 @@ define(['require',
                             }
                         })
                     },
-                    options: {
+                    applicableEntityTypes: {
                         label: "Entity Type(s)",
                         cell: "html",
                         editable: false,