You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2016/08/31 08:27:17 UTC
[1/2] incubator-atlas git commit: ATLAS-1141 UI-Issue - Tag with
spaces, when searched,
then it is wrongly set in search textbox. (Kalyanikashikar via kevalbhatt)
Repository: incubator-atlas
Updated Branches:
refs/heads/master f408e93ee -> a2c3faad1
ATLAS-1141 UI-Issue - Tag with spaces, when searched, then it is wrongly set in search textbox. (Kalyanikashikar via kevalbhatt)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/0023236f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/0023236f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/0023236f
Branch: refs/heads/master
Commit: 0023236fbaee47e6c80852943d253b3ff641f823
Parents: f408e93
Author: Keval Bhatt <kb...@apache.org>
Authored: Wed Aug 31 13:52:02 2016 +0530
Committer: Keval Bhatt <kb...@apache.org>
Committed: Wed Aug 31 13:52:02 2016 +0530
----------------------------------------------------------------------
.../business_catalog/BusinessCatalogDetailLayoutView.js | 3 ++-
.../public/js/views/business_catalog/TreeLayoutView.js | 11 ++++++-----
dashboardv2/public/js/views/tag/TagLayoutView.js | 9 +++++----
release-log.txt | 1 +
4 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/0023236f/dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js b/dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js
index d592d1e..0518578 100644
--- a/dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js
+++ b/dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js
@@ -109,7 +109,8 @@ define(['require',
this.ui.description.hide();
}
if (createdDate) {
- this.ui.createDate.html('<strong> Date Created: </strong> ' + new Date(createdDate));
+ var splitDate = createdDate.split(":");
+ this.ui.createDate.html('<strong> Date Created: </strong> ' + splitDate[0] + " " + splitDate[1] + ":" + splitDate[2] + ":" + splitDate[3] + " (GMT)");
}
}, this);
},
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/0023236f/dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/business_catalog/TreeLayoutView.js b/dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
index be47725..9c7816a 100644
--- a/dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
+++ b/dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
@@ -317,7 +317,7 @@ define(['require',
var str = '<option></option>';
this.termCollection.fullCollection.comparator = function(model) {
return model.get('name');
- }
+ };
this.termCollection.fullCollection.sort().each(function(model) {
str += '<option>' + model.get('name') + '</option>';
});
@@ -344,7 +344,7 @@ define(['require',
});
},
selectFirstElement: function() {
- var dataURL = this.$('.taxonomyTree').find('li[data-id="Parent"]').find("a").data('href')
+ var dataURL = this.$('.taxonomyTree').find('li[data-id="Parent"]').find("a").data('href');
if (dataURL) {
this.url = dataURL;
if (this.viewBased) {
@@ -386,10 +386,11 @@ define(['require',
}
var name = Utils.checkTagOrTerm(model.get('name'), true);
if (name.name) {
+ // data-name="<space>'<tagName>'" Space is required for DSL search Input
if (that.viewBased) {
- parentLi = '<div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover"></i></div><i class="fa fa-angle-right toggleArrow" data-id="expandArrow" data-href="' + hrefUrl + '"></i><a href="javascript:void(0)" data-href="' + hrefUrl + '" data-name="`' + model.get('name') + '`">' + name.name + '</a>';
+ parentLi = '<div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover"></i></div><i class="fa fa-angle-right toggleArrow" data-id="expandArrow" data-href="' + hrefUrl + '"></i><a href="javascript:void(0)" data-href="' + hrefUrl + '" data-name=" `' + model.get('name') + '`">' + name.name + '</a>';
} else {
- parentLi = '<div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i></div><i class="fa fa-angle-right toggleArrow" data-id="expandArrow" data-href="' + hrefUrl + '"></i><a href="javascript:void(0)" data-href="' + hrefUrl + '" data-name="`' + model.get('name') + '`">' + name.name + '</a>';
+ parentLi = '<div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i></div><i class="fa fa-angle-right toggleArrow" data-id="expandArrow" data-href="' + hrefUrl + '"></i><a href="javascript:void(0)" data-href="' + hrefUrl + '" data-name=" `' + model.get('name') + '`">' + name.name + '</a>';
}
}
});
@@ -405,7 +406,7 @@ define(['require',
function createTerm() {
that.childCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase();
- }
+ };
that.childCollection.fullCollection.sort().each(function(model, key) {
var name = Utils.checkTagOrTerm(model.get('name'), true);
var hrefUrl = "/api" + model.get('href').split("/api")[1];
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/0023236f/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 b1cb6cc..b22c0ec 100644
--- a/dashboardv2/public/js/views/tag/TagLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagLayoutView.js
@@ -154,16 +154,17 @@ define(['require',
str = '';
that.tagCollection.fullCollection.comparator = function(model) {
return model.get('tags').toLowerCase();
- }
+ };
that.tagCollection.fullCollection.sort().each(function(model) {
if (searchString) {
if (model.get('tags').search(new RegExp(searchString, "i")) != -1) {
- str += '<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/' + model.get('tags') + '" data-name="`' + model.get('tags') + '`" >' + model.get('tags') + '</a></li>';
+ // data-name="<space>'<tagName>'" Space is required for DSL search Input
+ str += '<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/' + model.get('tags') + '" data-name=" `' + model.get('tags') + '`" >' + model.get('tags') + '</a></li>';
} else {
return;
}
} else {
- str += '<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/' + model.get('tags') + '" data-name="`' + model.get('tags') + '`">' + model.get('tags') + '</a></li>';
+ str += '<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/' + model.get('tags') + '" data-name=" `' + model.get('tags') + '`">' + model.get('tags') + '</a></li>';
}
});
this.ui.tagsParent.empty().html(str);
@@ -205,7 +206,7 @@ define(['require',
placeholder: "Search Tags",
allowClear: true
});
- })
+ });
modal.on('ok', function() {
that.onCreateButton(view);
});
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/0023236f/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 98e61e8..cf59c98 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -10,6 +10,7 @@ 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-1141 UI-Issue - Tag with spaces, when searched, then it is wrongly set in search textbox. (Kalyanikashikar via kevalbhatt)
ATLAS-1129 Remove notification failed logs on retry and add sleep between retries (svimal2106 via sumasai)
ATLAS-1126 Fix NPE in getSchema calls (sumasai)
ATLAS-1125 Enable compression on hbase audit table (shwethags via sumasai)
[2/2] incubator-atlas git commit: ATLAS-1140 All the tag's attributes
are not seen while applying a tag to entity (kevalbhatt)
Posted by kb...@apache.org.
ATLAS-1140 All the tag's attributes are not seen while applying a tag to entity (kevalbhatt)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/a2c3faad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/a2c3faad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/a2c3faad
Branch: refs/heads/master
Commit: a2c3faad143a284dd22557b289efa8190688abf1
Parents: 0023236
Author: Keval Bhatt <kb...@apache.org>
Authored: Wed Aug 31 13:56:04 2016 +0530
Committer: Keval Bhatt <kb...@apache.org>
Committed: Wed Aug 31 13:56:04 2016 +0530
----------------------------------------------------------------------
dashboardv2/public/css/scss/override.scss | 2 +
.../js/templates/tag/addTagModalView_tmpl.html | 10 ++-
.../public/js/views/tag/addTagModalView.js | 65 +++++++++++++++-----
release-log.txt | 1 +
4 files changed, 60 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a2c3faad/dashboardv2/public/css/scss/override.scss
----------------------------------------------------------------------
diff --git a/dashboardv2/public/css/scss/override.scss b/dashboardv2/public/css/scss/override.scss
index fc05f78..2db5568 100644
--- a/dashboardv2/public/css/scss/override.scss
+++ b/dashboardv2/public/css/scss/override.scss
@@ -45,6 +45,8 @@
.modal-body {
position: relative;
padding: 15px;
+ max-height: 400px;
+ overflow: auto;
}
.cancel {
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a2c3faad/dashboardv2/public/js/templates/tag/addTagModalView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/tag/addTagModalView_tmpl.html b/dashboardv2/public/js/templates/tag/addTagModalView_tmpl.html
index f0826ca..3b6b429 100644
--- a/dashboardv2/public/js/templates/tag/addTagModalView_tmpl.html
+++ b/dashboardv2/public/js/templates/tag/addTagModalView_tmpl.html
@@ -20,7 +20,15 @@
</select>
</div>
<div class="row modalHeight">
- <div class="col-sm-12" data-id="tagAttribute" style="display:none">
+ <div class="col-sm-12">
+ <div class="attrLoader" style="margin-left:45%;display:none">
+ <i class="fa fa-refresh fa-spin-custom"></i>
+ </div>
+ </div>
+ <div class="col-sm-12" style="display:none">
+ <p>Tag Attributes(optional)</p>
+ <p class="tagAttributeLabel">Add attribute values for this tag</p>
+ <div data-id="tagAttribute"></div>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a2c3faad/dashboardv2/public/js/views/tag/addTagModalView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/addTagModalView.js b/dashboardv2/public/js/views/tag/addTagModalView.js
index 2a0b004..972997c 100644
--- a/dashboardv2/public/js/views/tag/addTagModalView.js
+++ b/dashboardv2/public/js/views/tag/addTagModalView.js
@@ -48,6 +48,7 @@ define(['require',
_.extend(this, _.pick(options, 'vent', 'modalCollection', 'guid', 'callback', 'multiple', 'showLoader'));
this.collection = new VTagList();
this.commonCollection = new VCommonList();
+ this.asyncAttrFetchCounter = 0;
this.modal = new Modal({
title: 'Add Tag',
content: this,
@@ -56,6 +57,14 @@ define(['require',
allowCancel: true,
}).open();
this.on('ok', function() {
+ var tagName = this.ui.addTagOptions.val();
+ var tagAttributes = {};
+ var tagAttributeNames = this.$(".attrName");
+ tagAttributeNames.each(function(i, item) {
+ var selection = $(item).data("key");
+ tagAttributes[selection] = $(item).val();
+ });
+
if (that.multiple) {
that.asyncFetchCounter = 0;
for (var i = 0; i < that.multiple.length; i++) {
@@ -63,7 +72,8 @@ define(['require',
that.showLoader();
}
var obj = {
- tagName: this.ui.addTagOptions.val(),
+ tagName: tagName,
+ tagAttributes: tagAttributes,
guid: that.multiple[i].id.id
}
that.saveTagData(obj);
@@ -71,7 +81,8 @@ define(['require',
} else {
that.asyncFetchCounter = 0;
that.saveTagData({
- tagName: that.ui.addTagOptions.val(),
+ tagName: tagName,
+ tagAttributes: tagAttributes,
guid: that.guid
});
}
@@ -91,8 +102,13 @@ define(['require',
this.tagsCollection();
}, this);
this.listenTo(this.commonCollection, 'reset', function() {
+ --this.asyncAttrFetchCounter
this.subAttributeData();
}, this);
+ this.listenTo(this.commonCollection, 'error', function() {
+ --this.asyncAttrFetchCounter
+ this.$('.attrLoader').hide();
+ }, this);
},
tagsCollection: function() {
this.collection.fullCollection.comparator = function(model) {
@@ -114,45 +130,60 @@ define(['require',
var saveBtn = this.modal.$el.find('.btn-success');
saveBtn.prop("disabled", false);
var tagname = this.ui.addTagOptions.val();
+ this.hideAttributeBox();
this.fetchTagSubData(tagname);
},
fetchTagSubData: function(tagname) {
this.commonCollection.url = "/api/atlas/types/" + tagname;
this.commonCollection.modelAttrName = 'definition';
+ ++this.asyncAttrFetchCounter
this.commonCollection.fetch({ reset: true });
},
+ showAttributeBox: function() {
+ if (this.asyncAttrFetchCounter === 0) {
+ this.$('.attrLoader').hide();
+ if (this.ui.tagAttribute.children().length !== 0) {
+ this.ui.tagAttribute.parent().show();
+ }
+ }
+ },
+ hideAttributeBox: function() {
+ this.ui.tagAttribute.children().empty();
+ this.ui.tagAttribute.parent().hide();
+ this.$('.attrLoader').show();
+ },
subAttributeData: function() {
if (this.commonCollection.models[0] && this.commonCollection.models[0].attributes && this.commonCollection.models[0].attributes.traitTypes[0].attributeDefinitions) {
- var strAttribute = '<p>Tag Attributes(optional)</p>' +
- '<p class="tagAttributeLabel">Add attribute values for this tag</p>';
for (var i = 0; i < this.commonCollection.models[0].attributes.traitTypes[0].attributeDefinitions.length; i++) {
var attribute = this.commonCollection.models[0].attributes.traitTypes[0].attributeDefinitions;
- this.ui.tagAttribute.show();
- strAttribute += '<div class="form-group"><label>' + attribute[i].name + '</label>' +
+ var strAttribute = '<div class="form-group"><label>' + attribute[i].name + '</label>' +
'<input type="text" class="form-control attributeInputVal attrName" data-key="' + attribute[i].name + '" ></input></div>';
- this.ui.tagAttribute.html(strAttribute);
+ this.ui.tagAttribute.append(strAttribute);
}
if (this.commonCollection.models[0].attributes.traitTypes[0].superTypes.length > 0) {
for (var j = 0; j < this.commonCollection.models[0].attributes.traitTypes[0].superTypes.length; j++) {
var superTypeAttr = this.commonCollection.models[0].attributes.traitTypes[0].superTypes[j];
this.fetchTagSubData(superTypeAttr);
}
+ } else {
+ this.showAttributeBox();
}
+ } else {
+ this.showAttributeBox();
}
},
saveTagData: function(options) {
- var that = this,
- values = {};
+ var that = this;
++this.asyncFetchCounter;
this.entityModel = new VEntity();
- var name = options.tagName;
- var tagName = this.ui.addTagOptions.val();
- var json = {
- "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
- "typeName": name,
- "values": values
- };
- that.entityModel.saveEntity(options.guid, {
+ var tagName = options.tagName,
+ tagAttributes = options.tagAttributes,
+ json = {
+ "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
+ "typeName": tagName,
+ "values": tagAttributes
+ };
+ this.entityModel.saveEntity(options.guid, {
data: JSON.stringify(json),
success: function(data) {
Utils.notifySuccess({
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a2c3faad/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index cf59c98..137acba 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -10,6 +10,7 @@ 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-1140 All the tag's attributes are not seen while applying a tag to entity (kevalbhatt)
ATLAS-1141 UI-Issue - Tag with spaces, when searched, then it is wrongly set in search textbox. (Kalyanikashikar via kevalbhatt)
ATLAS-1129 Remove notification failed logs on retry and add sleep between retries (svimal2106 via sumasai)
ATLAS-1126 Fix NPE in getSchema calls (sumasai)