You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/02/10 23:03:29 UTC
incubator-atlas git commit: ATLAS-1549: Remove unwanted API call for
Lineage
Repository: incubator-atlas
Updated Branches:
refs/heads/master 938af9ee8 -> 414b7bbc9
ATLAS-1549: Remove unwanted API call for Lineage
Signed-off-by: Madhan Neethiraj <ma...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/414b7bbc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/414b7bbc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/414b7bbc
Branch: refs/heads/master
Commit: 414b7bbc9fcc523e45846533b4b8eae247eee13c
Parents: 938af9e
Author: kevalbhatt <kb...@apache.org>
Authored: Fri Feb 10 17:17:24 2017 +0530
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Fri Feb 10 14:51:24 2017 -0800
----------------------------------------------------------------------
dashboardv2/gruntfile.js | 1 +
.../detail_page/DetailPageLayoutView_tmpl.html | 6 +++-
.../views/detail_page/DetailPageLayoutView.js | 10 +++---
.../public/js/views/graph/LineageLayoutView.js | 34 +++-----------------
.../public/js/views/schema/SchemaLayoutView.js | 4 +++
5 files changed, 20 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/414b7bbc/dashboardv2/gruntfile.js
----------------------------------------------------------------------
diff --git a/dashboardv2/gruntfile.js b/dashboardv2/gruntfile.js
index c8da73b..cf076b6 100644
--- a/dashboardv2/gruntfile.js
+++ b/dashboardv2/gruntfile.js
@@ -139,6 +139,7 @@ module.exports = function(grunt) {
},
files: {
'bootstrap/css': 'bootstrap/dist/css/bootstrap.min.css',
+ 'bootstrap/fonts': 'bootstrap/fonts/glyphicons-halflings-regular.woff2',
'backgrid/css': 'backgrid/lib/backgrid.css',
'backgrid-filter/css': 'backgrid-filter/backgrid-filter.min.css',
'backgrid-orderable-columns/css': 'backgrid-orderable-columns/backgrid-orderable-columns.css',
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/414b7bbc/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html b/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
index 95cf62a..6ff10f9 100644
--- a/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
@@ -49,7 +49,11 @@
<div class="atlast-tabbable">
<h4 class="lineageLabel">LINEAGE</h4>
<div class="panel panel-default lineageLayout">
- <div id="r_lineageLayoutView"></div>
+ <div id="r_lineageLayoutView" style="height:385px">
+ <div class="fontLoader">
+ <i class="fa fa-refresh fa-spin-custom"></i>
+ </div>
+ </div>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/414b7bbc/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index 261557d..b67fe69 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -108,8 +108,8 @@ define(['require',
bindEvents: function() {
var that = this;
this.listenTo(this.collection, 'reset', function() {
- var entityObject = this.collection.first().toJSON();
- var collectionJSON = entityObject.entity;
+ this.entityObject = this.collection.first().toJSON();
+ var collectionJSON = this.entityObject.entity;
if (collectionJSON && collectionJSON.guid) {
var tagGuid = collectionJSON.guid;
this.readOnly = Enums.entityStateReadOnly[collectionJSON.status];
@@ -164,7 +164,7 @@ define(['require',
this.hideLoader();
var obj = {
entity: collectionJSON,
- referredEntities: entityObject.referredEntities,
+ referredEntities: this.entityObject.referredEntities,
guid: this.id,
entityName: this.name,
entityDefCollection: this.entityDefCollection,
@@ -174,7 +174,6 @@ define(['require',
this.renderAuditTableLayoutView(obj);
this.renderTagTableLayoutView(obj);
this.renderTermTableLayoutView(_.extend({}, obj, { term: true }));
- this.renderLineageLayoutView(obj);
// To render Schema check attribute "schemaElementsAttribute"
var schemaOptions = this.entityDefCollection.fullCollection.find({ name: collectionJSON.typeName }).get('options');
if (schemaOptions && schemaOptions.hasOwnProperty('schemaElementsAttribute') && schemaOptions.schemaElementsAttribute !== "") {
@@ -197,6 +196,7 @@ define(['require',
var that = this;
Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.$('.entityDetail'));
this.$('.fontLoader').show(); // to show tab loader
+ this.renderLineageLayoutView({ guid: this.id, entityDefCollection: this.entityDefCollection });
},
fetchCollection: function() {
this.collection.fetch({ reset: true });
@@ -270,7 +270,7 @@ define(['require',
require(['views/tag/addTagModalView'], function(AddTagModalView) {
var view = new AddTagModalView({
guid: that.id,
- tagList: _.map(that.collection.first().toJSON().classifications, function(obj) {
+ tagList: _.map(that.entityObject.entity.classifications, function(obj) {
return obj.typeName;
}),
callback: function() {
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/414b7bbc/dashboardv2/public/js/views/graph/LineageLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index 32766c3..986b4c3 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -56,7 +56,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
- _.extend(this, _.pick(options, 'guid'));
+ _.extend(this, _.pick(options, 'guid', 'entityDefCollection'));
this.entityModel = new VEntity();
this.collection = new VLineageList();
this.typeMap = {};
@@ -113,29 +113,6 @@ define(['require',
generateData: function(relations, guidEntityMap) {
var that = this;
- function fetchEntity(name) {
- ++that.asyncFetchCounter;
- that.entityModel.getEntityDef(name, {
- success: function(data) {
- if (that.typeMap[data.name]) {
- _.keys(that.fromToObj).map(function(key) {
- var obj = that.fromToObj[key];
- if (obj.typeName === data.name) {
- that.fromToObj[key]['isProcess'] = _.contains(data.superTypes, "Process") ? true : false;
- }
- });
- }
- that.typeMap[data.name] = data.superTypes;
- },
- complete: function() {
- --that.asyncFetchCounter;
- if (that.asyncFetchCounter == 0) {
- that.createGraph();
- }
- }
- });
- }
-
function makeNodeObj(relationObj) {
var obj = {};
obj['shape'] = "img";
@@ -147,12 +124,11 @@ define(['require',
if (relationObj.status) {
obj['status'] = relationObj.status;
}
- if (that.typeMap && that.typeMap[relationObj.typeName]) {
- obj['isProcess'] = _.contains(that.typeMap[relationObj.typeName], "Process") ? true : false;
- } else {
- that.typeMap[relationObj.typeName] = { fetch: true };
- fetchEntity(relationObj.typeName);
+ var entityDef = that.entityDefCollection.fullCollection.find({ name: relationObj.typeName });
+ if (entityDef && entityDef.get('superTypes')) {
+ obj['isProcess'] = _.contains(entityDef.get('superTypes'), "Process") ? true : false;
}
+
return obj;
}
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/414b7bbc/dashboardv2/public/js/views/schema/SchemaLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/schema/SchemaLayoutView.js b/dashboardv2/public/js/views/schema/SchemaLayoutView.js
index 6b6c3fd..747e671 100644
--- a/dashboardv2/public/js/views/schema/SchemaLayoutView.js
+++ b/dashboardv2/public/js/views/schema/SchemaLayoutView.js
@@ -329,10 +329,14 @@ define(['require',
},
addTagModalView: function(guid, multiple) {
var that = this;
+ var tagList = that.schemaCollection.find({ 'guid': guid });
require(['views/tag/addTagModalView'], function(AddTagModalView) {
var view = new AddTagModalView({
guid: guid,
multiple: multiple,
+ tagList: _.map((tagList ? tagList.get('classifications') : []), function(obj) {
+ return obj.typeName;
+ }),
callback: function() {
that.fetchCollection();
that.arr = [];