Commit 0023236f by Keval Bhatt

ATLAS-1141 UI-Issue - Tag with spaces, when searched, then it is wrongly set in…

ATLAS-1141 UI-Issue - Tag with spaces, when searched, then it is wrongly set in search textbox. (Kalyanikashikar via kevalbhatt)
parent f408e93e
...@@ -109,7 +109,8 @@ define(['require', ...@@ -109,7 +109,8 @@ define(['require',
this.ui.description.hide(); this.ui.description.hide();
} }
if (createdDate) { 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); }, this);
}, },
......
...@@ -317,7 +317,7 @@ define(['require', ...@@ -317,7 +317,7 @@ define(['require',
var str = '<option></option>'; var str = '<option></option>';
this.termCollection.fullCollection.comparator = function(model) { this.termCollection.fullCollection.comparator = function(model) {
return model.get('name'); return model.get('name');
} };
this.termCollection.fullCollection.sort().each(function(model) { this.termCollection.fullCollection.sort().each(function(model) {
str += '<option>' + model.get('name') + '</option>'; str += '<option>' + model.get('name') + '</option>';
}); });
...@@ -344,7 +344,7 @@ define(['require', ...@@ -344,7 +344,7 @@ define(['require',
}); });
}, },
selectFirstElement: function() { 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) { if (dataURL) {
this.url = dataURL; this.url = dataURL;
if (this.viewBased) { if (this.viewBased) {
...@@ -386,10 +386,11 @@ define(['require', ...@@ -386,10 +386,11 @@ define(['require',
} }
var name = Utils.checkTagOrTerm(model.get('name'), true); var name = Utils.checkTagOrTerm(model.get('name'), true);
if (name.name) { if (name.name) {
// data-name="<space>'<tagName>'" Space is required for DSL search Input
if (that.viewBased) { 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 { } 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', ...@@ -405,7 +406,7 @@ define(['require',
function createTerm() { function createTerm() {
that.childCollection.fullCollection.comparator = function(model) { that.childCollection.fullCollection.comparator = function(model) {
return model.get('name').toLowerCase(); return model.get('name').toLowerCase();
} };
that.childCollection.fullCollection.sort().each(function(model, key) { that.childCollection.fullCollection.sort().each(function(model, key) {
var name = Utils.checkTagOrTerm(model.get('name'), true); var name = Utils.checkTagOrTerm(model.get('name'), true);
var hrefUrl = "/api" + model.get('href').split("/api")[1]; var hrefUrl = "/api" + model.get('href').split("/api")[1];
......
...@@ -154,16 +154,17 @@ define(['require', ...@@ -154,16 +154,17 @@ define(['require',
str = ''; str = '';
that.tagCollection.fullCollection.comparator = function(model) { that.tagCollection.fullCollection.comparator = function(model) {
return model.get('tags').toLowerCase(); return model.get('tags').toLowerCase();
} };
that.tagCollection.fullCollection.sort().each(function(model) { that.tagCollection.fullCollection.sort().each(function(model) {
if (searchString) { if (searchString) {
if (model.get('tags').search(new RegExp(searchString, "i")) != -1) { 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 { } else {
return; return;
} }
} else { } 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); this.ui.tagsParent.empty().html(str);
...@@ -205,7 +206,7 @@ define(['require', ...@@ -205,7 +206,7 @@ define(['require',
placeholder: "Search Tags", placeholder: "Search Tags",
allowClear: true allowClear: true
}); });
}) });
modal.on('ok', function() { modal.on('ok', function() {
that.onCreateButton(view); that.onCreateButton(view);
}); });
......
...@@ -10,6 +10,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -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) ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES: 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-1129 Remove notification failed logs on retry and add sleep between retries (svimal2106 via sumasai)
ATLAS-1126 Fix NPE in getSchema calls (sumasai) ATLAS-1126 Fix NPE in getSchema calls (sumasai)
ATLAS-1125 Enable compression on hbase audit table (shwethags via sumasai) ATLAS-1125 Enable compression on hbase audit table (shwethags via sumasai)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment