You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sh...@apache.org on 2016/07/29 12:02:38 UTC
incubator-atlas git commit: ATLAS-1065 UI: Full text search view same
as DSL's (kevalbhat18 via shwethags)
Repository: incubator-atlas
Updated Branches:
refs/heads/master 2b14ec102 -> 28c9efb1d
ATLAS-1065 UI: Full text search view same as DSL's (kevalbhat18 via shwethags)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/28c9efb1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/28c9efb1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/28c9efb1
Branch: refs/heads/master
Commit: 28c9efb1dea7b9c6aff026aa93584858201606fb
Parents: 2b14ec1
Author: Shwetha GS <ss...@hortonworks.com>
Authored: Fri Jul 29 17:32:28 2016 +0530
Committer: Shwetha GS <ss...@hortonworks.com>
Committed: Fri Jul 29 17:32:28 2016 +0530
----------------------------------------------------------------------
.../js/views/search/SearchResultLayoutView.js | 129 +++++++------------
release-log.txt | 1 +
2 files changed, 44 insertions(+), 86 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/28c9efb1/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 0e62873..62852e5 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -317,53 +317,53 @@ define(['require',
col = {};
var responseData = this.searchCollection.responseData;
if (this.searchCollection.responseData) {
- if (responseData.dataType) {
- 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();
- } else {
- var idFound = false;
- _.each(this.searchCollection.models, function(model) {
- var modelJSON = model.toJSON();
- var guid = "";
- _.each(modelJSON, function(val, key) {
- if (_.isObject(val) && val.id) {
- model.set('id', val.id);
- guid = val.id;
- } else if (key === "id") {
- model.set('id', val);
- guid = val;
- }
- });
- if (guid.length) {
- idFound = true;
- model.getEntity(guid, {
- async: false,
- success: function(data) {
- if (data.definition) {
- if (data.definition.id && data.definition.values) {
- that.searchCollection.get(data.definition.id).set(data.definition.values);
- that.searchCollection.get(data.definition.id).set('$id$', data.definition.id);
- that.searchCollection.get(data.definition.id).set('$traits$', data.definition.traits);
- }
- }
- },
- error: function(error, data, status) {},
- complete: function() {}
- });
+ if (responseData.dataType && responseData.dataType.typeName.indexOf('_temp') == -1) {
+ return this.getFixedDslColumn();
+ } else {
+ var idFound = false;
+ _.each(this.searchCollection.models, function(model) {
+ var modelJSON = model.toJSON();
+ var guid = "";
+ _.each(modelJSON, function(val, key) {
+ if (_.isObject(val)) {
+ if (val.id) {
+ model.set('id', val.id);
+ guid = val.id;
+ } else if (val.guid) {
+ model.set('id', val.guid);
+ guid = val.guid;
}
- });
- if (idFound) {
- return this.getFixedDslColumn();
- } else {
- return this.getDaynamicColumn();
+ } else if (key === "id") {
+ model.set('id', val);
+ guid = val;
+ } else if (key === "guid") {
+ model.set('id', val);
+ guid = val;
}
+ });
+ if (guid.length) {
+ idFound = true;
+ model.getEntity(guid, {
+ async: false,
+ success: function(data) {
+ if (data.definition) {
+ if (data.definition.id && data.definition.values) {
+ that.searchCollection.get(data.definition.id).set(data.definition.values);
+ that.searchCollection.get(data.definition.id).set('$id$', data.definition.id);
+ that.searchCollection.get(data.definition.id).set('$traits$', data.definition.traits);
+ }
+ }
+ },
+ error: function(error, data, status) {},
+ complete: function() {}
+ });
}
+ });
+ if (idFound) {
+ return this.getFixedDslColumn();
+ } else {
+ return this.getDaynamicColumn();
}
- } else {
- return this.getFixedFullTextColumn();
}
}
},
@@ -478,49 +478,6 @@ define(['require',
that.checkTableFetch();
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) {
var that = this;
require(['views/tag/addTagModalView'], function(AddTagModalView) {
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/28c9efb1/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 3e7cc2a..18c9173 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -6,6 +6,7 @@ INCOMPATIBLE 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-1064 UI: Pagination for full text search results (Kalyanikashikar via shwethags)
ATLAS-1006 Paginate full text search results (shwethags)