atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suma...@apache.org
Subject incubator-atlas git commit: ATLAS-1071 : Regression - UI - Details Button under Audits Tab is not working.
Date Wed, 03 Aug 2016 18:46:41 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 6078c9aec -> bb7895502


ATLAS-1071 : Regression - UI - Details Button under Audits Tab is not working.


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

Branch: refs/heads/master
Commit: bb78955020044d111589b24c96df9d755657853c
Parents: 6078c9a
Author: Keval Bhatt <kevalbhatt18@gmail.com>
Authored: Wed Aug 3 17:33:32 2016 +0530
Committer: Suma Shivaprasad <sumasai.shivaprasad@gmail.com>
Committed: Wed Aug 3 11:46:16 2016 -0700

----------------------------------------------------------------------
 dashboardv2/package.json                            |  2 +-
 dashboardv2/public/js/modules/Modal.js              |  4 +++-
 .../js/templates/tag/createTagLayoutView_tmpl.html  |  2 +-
 .../public/js/views/audit/AuditTableLayoutView.js   |  5 +++--
 .../js/views/audit/CreateAuditTableLayoutView.js    |  8 ++++----
 .../public/js/views/tag/CreateTagLayoutView.js      | 16 ++++++----------
 dashboardv2/public/js/views/tag/TagLayoutView.js    |  7 +++++++
 release-log.txt                                     |  1 +
 8 files changed, 26 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bb789550/dashboardv2/package.json
----------------------------------------------------------------------
diff --git a/dashboardv2/package.json b/dashboardv2/package.json
index 5a07006..91c7756 100644
--- a/dashboardv2/package.json
+++ b/dashboardv2/package.json
@@ -39,7 +39,7 @@
     "noty": "^2.3.8",
     "requirejs": "^2.1.16",
     "requirejs-text": "^2.0.12",
-    "select2": "^4.0.2",
+    "select2": "^4.0.3",
     "underscore": "^1.8.3"
   },
   "devDependencies": {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bb789550/dashboardv2/public/js/modules/Modal.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/modules/Modal.js b/dashboardv2/public/js/modules/Modal.js
index f17fda2..7889fea 100644
--- a/dashboardv2/public/js/modules/Modal.js
+++ b/dashboardv2/public/js/modules/Modal.js
@@ -198,7 +198,9 @@ define(function(require) {
             if (cb) {
                 self.on('ok', cb);
             }
-
+            $el.one('shown.bs.modal', function() {
+                self.trigger('shownModal');
+            });
             return this;
         },
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bb789550/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html b/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html
index b990130..8fa0ccc 100644
--- a/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/tag/createTagLayoutView_tmpl.html
@@ -29,7 +29,7 @@
         {{#if create}}
         <span class="row-margin-bottom">Select tags to inherit attributes(optional)</span>
         <p class="attributeText">Attributes define additional properties for the tag</p>
-        <select class="form-control tagList" data-id="parentTag" multiple="multiple"></select>
+        <select class="form-control" data-id="parentTagList" multiple="multiple"></select>
         {{/if}}
     </div>
 </form>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bb789550/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 1822e57..6d2f722 100644
--- a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js
@@ -223,9 +223,10 @@ define(['require',
                     'modules/Modal',
                     'views/audit/CreateAuditTableLayoutView',
                 ], function(Modal, CreateAuditTableLayoutView) {
-                    var collectionModel = that.entityCollection.findWhere({ 'eventKey': $(e.currentTarget).data('modalid')
});
+                    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 });
                     that.action = $(e.target).data("action");
-                    var view = new CreateAuditTableLayoutView({ guid: that.guid, model: collectionModel,
action: that.action });
                     var modal = new Modal({
                         title: that.action,
                         content: view,

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bb789550/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 65f5341..58d5de8 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', 'model', 'action'));
+                _.extend(this, _.pick(options, 'globalVent', 'guid', 'entityModel', 'action'));
             },
             bindEvents: function() {},
             onRender: function() {
@@ -62,8 +62,8 @@ define(['require',
             auditTableGenerate: function() {
                 var that = this,
                     table = "";
-                if (this.model.get('details').search('{') >= 0) {
-                    var appendedString = "{" + this.model.get('details') + "}";
+                if (this.entityModel.get('details').search('{') >= 0) {
+                    var appendedString = "{" + this.entityModel.get('details') + "}";
                     var auditData = appendedString.split('"')[0].split(':')[0].split("{")[1];
                     var detailsObject = JSON.parse(appendedString.replace("{" + auditData
+ ":", '{"' + auditData + '":'))[auditData];
                     //Append string for JSON parse
@@ -84,7 +84,7 @@ define(['require',
                         }
                     }
                 } else if (this.action == Globals.auditAction.TAG_DELETE) {
-                    var appendedString = this.model.get('details').split(':');
+                    var appendedString = this.entityModel.get('details').split(':');
                     this.ui.auditHeaderValue.html('<th>Tag</th>');
                     this.ui.auditValue.html("<tr><td>" + appendedString[1] +
"</td></tr>");
                 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bb789550/dashboardv2/public/js/views/tag/CreateTagLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/CreateTagLayoutView.js b/dashboardv2/public/js/views/tag/CreateTagLayoutView.js
index fa16de4..a199b03 100644
--- a/dashboardv2/public/js/views/tag/CreateTagLayoutView.js
+++ b/dashboardv2/public/js/views/tag/CreateTagLayoutView.js
@@ -42,7 +42,7 @@ define(['require',
             /** ui selector cache */
             ui: {
                 tagName: "[data-id='tagName']",
-                parentTag: "[data-id='parentTag']",
+                parentTag: "[data-id='parentTagList']",
                 description: "[data-id='description']",
                 title: "[data-id='title']"
             },
@@ -74,17 +74,13 @@ define(['require',
                 }
             },
             tagCollectionList: function() {
+                var str = '',
+                    that = this;
                 this.ui.parentTag.empty();
-                var str = '';
-                for (var i = 0; i < this.tagCollection.fullCollection.models.length; i++)
{
-                    var tags = this.tagCollection.fullCollection.models[i].get("tags");
-                    str += '<option>' + tags + '</option>';
-                    this.ui.parentTag.html(str);
-                }
-                this.ui.parentTag.select2({
-                    placeholder: "Search Tags",
-                    allowClear: true
+                this.tagCollection.each(function(val) {
+                    str += '<option>' + val.get("tags") + '</option>';
                 });
+                that.ui.parentTag.html(str);
             }
         });
     return CreateTagLayoutView;

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bb789550/dashboardv2/public/js/views/tag/TagLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/TagLayoutView.js b/dashboardv2/public/js/views/tag/TagLayoutView.js
index 5304737..16c69c4 100644
--- a/dashboardv2/public/js/views/tag/TagLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagLayoutView.js
@@ -202,6 +202,13 @@ define(['require',
                             modal.$el.find('button.ok').attr("disabled", "true");
                         }
                     });
+                    modal.on('shownModal', function() {
+                        view.ui.parentTag.select2({
+                            multiple: true,
+                            placeholder: "Search Tags",
+                            allowClear: true
+                        });
+                    })
                     modal.on('ok', function() {
                         that.onCreateButton(view);
                     });

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/bb789550/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 7b19fb4..b7cff4c 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
 
 
 ALL CHANGES:
+ATLAS-1071 Regression - UI - Details Button under Audits Tab is not working.(kevalbhatt18
via sumasai)
 ATLAS-965 Old lineage still exists after dropping tables and re-creating tables with same
name. (shwethags via sumasai)
 ATLAS-1048 TestMetadata.py test in distro project fails on Windows (jnhagelb via shwethags)
 ATLAS-1026 StoreBackedTypeCache issues (dkantor via shwethags)


Mime
View raw message