atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-atlas git commit: ATLAS-1421: Regression : HTML is displayed for deleted entities in search-result and entity-details pages
Date Wed, 04 Jan 2017 20:08:35 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master c99117308 -> e5b6438f2


ATLAS-1421: Regression : HTML is displayed for deleted entities in search-result and entity-details
pages

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


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

Branch: refs/heads/master
Commit: e5b6438f2af3193edd7567af013eb23261d3ef45
Parents: c991173
Author: kalyanikk <kalyani.kashikar@freestoneinfotech.com>
Authored: Tue Jan 3 17:32:19 2017 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Wed Jan 4 12:08:23 2017 -0800

----------------------------------------------------------------------
 dashboardv2/public/js/utils/CommonViewFunction.js  | 17 +++++++++--------
 .../public/js/views/audit/AuditTableLayoutView.js  |  4 ++--
 .../js/views/audit/CreateAuditTableLayoutView.js   | 12 ++++++------
 .../js/views/detail_page/DetailPageLayoutView.js   |  8 +++++---
 .../js/views/search/SearchResultLayoutView.js      |  2 +-
 release-log.txt                                    |  8 +++++++-
 6 files changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e5b6438f/dashboardv2/public/js/utils/CommonViewFunction.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js
index d3a3f67..ac14dfe 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -128,14 +128,14 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages',
'utils/Enum
                 var subLink = "";
                 for (var i = 0; i < keyValue.length; i++) {
                     var inputOutputField = keyValue[i],
-                        id = inputOutputField.guid,
+                        id = inputOutputField.guid || inputOutputField.id,
                         tempLink = "",
                         readOnly = false;
                     if (_.isString(inputOutputField) || _.isBoolean(inputOutputField) ||
_.isNumber(inputOutputField)) {
                         if (inputOutputField.indexOf("$") == -1) {
                             valueOfArray.push('<span>' + _.escape(inputOutputField)
+ '</span>');
                         }
-                    } else if (_.isObject(inputOutputField) && !inputOutputField.attributes
&& !id) {
+                    } else if (_.isObject(inputOutputField) && !id) {
                         _.each(inputOutputField, function(objValue, objKey) {
                             var value = objValue;
                             if (objKey.indexOf("$") == -1) {
@@ -156,7 +156,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                             } else if (inputOutputField.typeName) {
                                 tempLink += '<a href="#!/detailPage/' + id + '">' +
_.escape(inputOutputField.typeName) + '</a>'
                             } else {
-                                tempLink += '<a href="#!/detailPage/' + id + '">' +
id + '</a>'
+                                tempLink += '<a href="#!/detailPage/' + id + '">' +
_.escape(id) + '</a>'
                             }
                         } else if (inputOutputField.name) {
                             tempLink += '<a href="#!/detailPage/' + id + '">' + _.escape(inputOutputField.name)
+ '</a>';
@@ -164,8 +164,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                             tempLink += '<a href="#!/detailPage/' + id + '">' + _.escape(inputOutputField.qualifiedName)
+ '</a>'
                         } else {
                             var fetch = true;
-                            fetchInputOutputValue(id);
-                            tempLink += '<div data-id="' + id + '"></div>';
+                            var fetchId = (_.isObject(id) ? id.id : id);
+                            fetchInputOutputValue(fetchId);
+                            tempLink += '<div data-id="' + fetchId + '"></div>';
                         }
                     }
 
@@ -192,14 +193,14 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages',
'utils/Enum
                 if (searchTable) {
                     table = subLink;
                 } else {
-                    table += '<tr><td>' + key + '</td><td>' + _.escape(subLink)
+ '</td></tr>';
+                    table += '<tr><td>' + _.escape(key) + '</td><td>'
+ subLink + '</td></tr>';
                 }
             } else {
                 if (key.indexOf("Time") !== -1 || key == "retention") {
                     if (searchTable) {
                         table = new Date(valueObject[key]);
                     } else {
-                        table += '<tr><td>' + key + '</td><td>' +
new Date(valueObject[key]) + '</td></tr>';
+                        table += '<tr><td>' + _.escape(key) + '</td><td>'
+ new Date(valueObject[key]) + '</td></tr>';
                     }
                 } else {
                     if (searchTable) {
@@ -209,7 +210,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
                             table = valueObject[key];
                         }
                     } else {
-                        table += '<tr><td>' + key + '</td><td>' +
_.escape(valueObject[key]) + '</td></tr>';
+                        table += '<tr><td>' + _.escape(key) + '</td><td>'
+ _.escape(valueObject[key]) + '</td></tr>';
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e5b6438f/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
index 9f42e4a..b8b65e2 100644
--- a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
@@ -58,7 +58,7 @@ define(['require',
              * @constructs
              */
             initialize: function(options) {
-                _.extend(this, _.pick(options, 'globalVent', 'guid', 'vent'));
+                _.extend(this, _.pick(options, 'globalVent', 'guid', 'vent', 'entityObject'));
                 this.entityCollection = new VEntityList();
                 this.count = 26;
                 this.entityCollection.url = UrlLinks.entityCollectionaudit(this.guid);
@@ -239,7 +239,7 @@ define(['require',
                     that.action = $(e.target).data("action");
                     var eventModel = that.entityCollection.findWhere({ 'eventKey': $(e.currentTarget).data('modalid')
}).toJSON(),
                         collectionModel = new that.entityCollection.model(eventModel),
-                        view = new CreateAuditTableLayoutView({ guid: that.guid, entityModel:
collectionModel, action: that.action });
+                        view = new CreateAuditTableLayoutView({ guid: that.guid, entityModel:
collectionModel, action: that.action, entityObject: that.entityObject });
                     var modal = new Modal({
                         title: that.action,
                         content: view,

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e5b6438f/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
index 76e229d..2b43b59 100644
--- a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
@@ -53,7 +53,7 @@ define(['require',
              * @constructs
              */
             initialize: function(options) {
-                _.extend(this, _.pick(options, 'globalVent', 'guid', 'entityModel', 'action'));
+                _.extend(this, _.pick(options, 'globalVent', 'guid', 'entityModel', 'action',
'entityObject'));
             },
             bindEvents: function() {},
             onRender: function() {
@@ -69,7 +69,7 @@ define(['require',
                     //Append string for JSON parse
                     var valueObject = detailsObject.values;
                     if (this.action == Enums.auditAction.TAG_ADD) {
-                        this.ui.auditHeaderValue.html('<th>Tag</th>');
+                        this.ui.auditHeaderValue.html('<th>' + Enums.auditAction.TAG_ADD
+ '</th>');
                         this.ui.auditValue.html("<tr><td>" + _.escape(detailsObject.typeName)
+ "</td></tr>");
                     } else {
                         this.ui.auditHeaderValue.html('<th>Key</th><th>New
Value</th>');
@@ -83,10 +83,10 @@ define(['require',
                             this.ui.tableAudit.hide();
                         }
                     }
-                } else if (this.action == Enums.auditAction.TAG_DELETE) {
-                    var appendedString = this.entityModel.get('details').split(':');
-                    this.ui.auditHeaderValue.html('<th>Tag</th>');
-                    this.ui.auditValue.html("<tr><td>" + _.escape(appendedString[1])
+ "</td></tr>");
+                } else if (this.action == Enums.auditAction.TAG_DELETE || Enums.auditAction.ENTITY_DELETE)
{
+                    //var appendedString = this.entityModel.get('details').split(':');
+                    this.ui.auditHeaderValue.html('<th>' + this.action + '</th>');
+                    this.ui.auditValue.html("<tr><td>" + this.entityObject.name
+ "</td></tr>");
                 }
 
             },

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e5b6438f/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index c34e6f7..781f745 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -177,6 +177,7 @@ define(['require',
                     this.renderEntityDetailTableLayoutView();
                     this.renderTagTableLayoutView(tagGuid);
                     this.renderTermTableLayoutView(tagGuid);
+                    this.renderAuditTableLayoutView(this.id, collectionJSON.attributes);
                 }, this);
             },
             onRender: function() {
@@ -184,7 +185,7 @@ define(['require',
                 this.ui.editBox.hide();
                 this.renderLineageLayoutView(this.id);
                 this.renderSchemaLayoutView(this.id);
-                this.renderAuditTableLayoutView(this.id);
+
             },
             fetchCollection: function() {
                 this.collection.fetch({ reset: true });
@@ -340,13 +341,14 @@ define(['require',
                     }));
                 });
             },
-            renderAuditTableLayoutView: function(tagGuid) {
+            renderAuditTableLayoutView: function(tagGuid, entityObject) {
                 var that = this;
                 require(['views/audit/AuditTableLayoutView'], function(AuditTableLayoutView)
{
                     that.RAuditTableLayoutView.show(new AuditTableLayoutView({
                         globalVent: that.globalVent,
                         guid: tagGuid,
-                        vent: that.auditVent
+                        vent: that.auditVent,
+                        entityObject: entityObject
                     }));
                 });
             },

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e5b6438f/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 71dcb8b..64182b2 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -451,7 +451,7 @@ define(['require',
                                 }
                                 if (model.get('$id$') && model.get('$id$').state
&& Enums.entityStateReadOnly[model.get('$id$').state]) {
                                     nameHtml += '<button type="button" title="Deleted"
class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
-                                    return '<div class="readOnly readOnlyLink">' +
_.escape(nameHtml) + '</div>';
+                                    return '<div class="readOnly readOnlyLink">' +
nameHtml + '</div>';
                                 } else {
                                     nameHtml += '<button title="Edit" data-id="editEntityButton"
 data-giud= "' + (model.get('$id$').id || model.get('$id$')) + '" class="btn btn-atlasAction
btn-atlas editBtn"><i class="fa fa-pencil"></i></button>'
                                     return nameHtml;

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e5b6438f/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 1ffad27..3d550b8 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,7 +9,13 @@ ATLAS-1060 Add composite indexes for exact match performance improvements
for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
-ATLAS-1391 Add exclusion mechanism for Atlas audit
+ATLAS-1421 Regression : HTML is displayed for deleted entities in search-result and entity-details
pages (Kalyanikashikar via mneethiraj)
+ATLAS-1417 HIveHook: synchronous execution fails to notify (sumasai via mneethiraj)
+ATLAS-1391 Add exclusion mechanism for Atlas audit (guptaneeru via mneethiraj)
+ATLAS-1424 Avoid stack-trace in REST API error response (nixonrodrigues via mneethiraj)
+ATLAS-1415 fix potential NPE issues found by Coverity scan (mneethiraj)
+ATLAS-1412 delete AtlasApiEntities, as it is not used (david_radley via mneethiraj)
+ATLAS-1402 UI issues due to v2 API integration (Kalyanikashikar via mneethiraj)
 ATLAS-1407 improve LOG statement performance (apoorvnaik via mneethiraj)
 ATLAS-1350 update authorization to handle v2 REST endpoints (saqeeb.s via mneethiraj)
 ATLAS-1311 Integration tests for V2 Entity APIs (apoorvnaik via mneethiraj)


Mime
View raw message