Commit 28c9efb1 by Shwetha GS

ATLAS-1065 UI: Full text search view same as DSL's (kevalbhat18 via shwethags)

parent 2b14ec10
...@@ -317,11 +317,7 @@ define(['require', ...@@ -317,11 +317,7 @@ define(['require',
col = {}; col = {};
var responseData = this.searchCollection.responseData; var responseData = this.searchCollection.responseData;
if (this.searchCollection.responseData) { if (this.searchCollection.responseData) {
if (responseData.dataType) { if (responseData.dataType && responseData.dataType.typeName.indexOf('_temp') == -1) {
if (responseData.dataType.attributeDefinitions.length == 2 && responseData.dataType.attributeDefinitions[1].name == "instanceInfo") {
return this.getFixedFullTextColumn();
} else {
if (responseData.dataType.typeName.indexOf('_temp') == -1) {
return this.getFixedDslColumn(); return this.getFixedDslColumn();
} else { } else {
var idFound = false; var idFound = false;
...@@ -329,12 +325,20 @@ define(['require', ...@@ -329,12 +325,20 @@ define(['require',
var modelJSON = model.toJSON(); var modelJSON = model.toJSON();
var guid = ""; var guid = "";
_.each(modelJSON, function(val, key) { _.each(modelJSON, function(val, key) {
if (_.isObject(val) && val.id) { if (_.isObject(val)) {
if (val.id) {
model.set('id', val.id); model.set('id', val.id);
guid = val.id; guid = val.id;
} else if (val.guid) {
model.set('id', val.guid);
guid = val.guid;
}
} else if (key === "id") { } else if (key === "id") {
model.set('id', val); model.set('id', val);
guid = val; guid = val;
} else if (key === "guid") {
model.set('id', val);
guid = val;
} }
}); });
if (guid.length) { if (guid.length) {
...@@ -362,10 +366,6 @@ define(['require', ...@@ -362,10 +366,6 @@ define(['require',
} }
} }
} }
} else {
return this.getFixedFullTextColumn();
}
}
}, },
getDaynamicColumn: function() { getDaynamicColumn: function() {
var that = this, var that = this,
...@@ -478,49 +478,6 @@ define(['require', ...@@ -478,49 +478,6 @@ define(['require',
that.checkTableFetch(); that.checkTableFetch();
return this.searchCollection.constructor.getTableCols(col, this.searchCollection); return this.searchCollection.constructor.getTableCols(col, this.searchCollection);
}, },
getFixedFullTextColumn: function() {
var that = this;
return this.searchCollection.constructor.getTableCols({
instanceInfo: {
label: "Type Name",
cell: "html",
editable: false,
sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var modelObject = model.toJSON();
if (modelObject.$typeName$ && modelObject.instanceInfo) {
return '<a href="#!/detailPage/' + modelObject.instanceInfo.guid + '">' + modelObject.instanceInfo.typeName + '</a>';
} else if (!modelObject.$typeName$) {
return '<a href="#!/detailPage/' + modelObject.guid + '">' + modelObject.typeName + '</a>';
}
}
})
},
name: {
label: "Name",
cell: "html",
editable: false,
sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var modelObject = model.toJSON();
if (modelObject.$typeName$ && modelObject.instanceInfo) {
var guid = model.toJSON().instanceInfo.guid;
var json = model.toJSON();
json['id'] = guid;
return CommonViewFunction.propertyTable({ 'notUsedKey': json }, that, true);
} else if (!modelObject.$typeName$) {
var guid = model.toJSON().guid;
var json = model.toJSON();
json['id'] = guid;
return CommonViewFunction.propertyTable({ 'notUsedKey': json }, that, true);
}
}
})
}
}, this.searchCollection);
},
addTagModalView: function(e) { addTagModalView: function(e) {
var that = this; var that = this;
require(['views/tag/addTagModalView'], function(AddTagModalView) { require(['views/tag/addTagModalView'], function(AddTagModalView) {
......
...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES: ...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES: ALL CHANGES:
ATLAS-1065 UI: Full text search view same as DSL's (kevalbhat18 via shwethags)
ATLAS-1066 Falcon fails to post entity to Atlas due to kafka exception (mneethiraj via shwethags) ATLAS-1066 Falcon fails to post entity to Atlas due to kafka exception (mneethiraj via shwethags)
ATLAS-1064 UI: Pagination for full text search results (Kalyanikashikar via shwethags) ATLAS-1064 UI: Pagination for full text search results (Kalyanikashikar via shwethags)
ATLAS-1006 Paginate full text search results (shwethags) ATLAS-1006 Paginate full text search results (shwethags)
......
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