Commit ebd6d9e3 by Suma Shivaprasad

ATLAS-204 Lineage I/O Lineage Enhancement (Anilsg via Suma Shivaprasad)

parent cf2c8bc0
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
'use strict'; 'use strict';
angular.module('dgc.details').controller('DetailsController', ['$window', '$scope', '$stateParams', 'DetailsResource', angular.module('dgc.details').controller('DetailsController', ['$window', '$scope', '$stateParams', 'DetailsResource',
...@@ -31,10 +30,11 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop ...@@ -31,10 +30,11 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop
$scope.schemas = data; $scope.schemas = data;
$scope.tableName = data.values.name; $scope.tableName = data.values.name;
$scope.isTable = data.typeName === 'Table'; $scope.isTable = data.typeName === 'Table';
$scope.onActivate('io');
}); });
$scope.isNumber = angular.isNumber; $scope.isNumber = angular.isNumber;
$scope.isString = angular.isString; $scope.isString = angular.isString;
$scope.onActivate = function tabActivate(tabname) { $scope.onActivate = function tabActivate(tabname) {
...@@ -49,4 +49,4 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop ...@@ -49,4 +49,4 @@ angular.module('dgc.details').controller('DetailsController', ['$window', '$scop
}; };
} }
]); ]);
\ No newline at end of file
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
'use strict'; 'use strict';
angular.module('dgc.details', ['dgc.lineage', 'dgc.lineage_io']); angular.module('dgc.details', ['dgc.lineage']);
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<div role="tabpanel" class="col-lg-12"> <div role="tabpanel" class="col-lg-12">
<h2>Name: {{details.values.name}}</h2> <h2>Name: {{details.values.name}}</h2>
<h4>Description: {{details.values.description}}</h4> <h4>Description: {{details.values.description}}</h4>
<h4>Lineage: <ng-include data-table-type="io" src="'/modules/lineage/views/lineage_io.html'"/></h4>
<tabset> <tabset>
<tab heading="Details"> <tab heading="Details">
<table class="table table-bordered"> <table class="table table-bordered">
...@@ -42,9 +43,9 @@ ...@@ -42,9 +43,9 @@
</table> </table>
</tab> </tab>
<tab data-heading="Schema" data-ng-if="isTable"><ng-include src="'/modules/details/views/schema.html'"/></tab> <tab data-heading="Schema" data-ng-if="isTable"><ng-include src="'/modules/details/views/schema.html'"/></tab>
<tab data-heading="Output" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('outputs')"><ng-include data-table-type="outputs" src="'/modules/lineage/views/lineage.html'"/></tab> <!-- <tab data-heading="Output" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('outputs')"><ng-include data-table-type="outputs" src="'/modules/lineage/views/lineage.html'"/></tab>
<tab data-heading="Input" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('inputs')"><ng-include data-table-type="inputs" src="'/modules/lineage/views/lineage.html'"/></tab> <tab data-heading="Input" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('inputs')"><ng-include data-table-type="inputs" src="'/modules/lineage/views/lineage.html'"/></tab>
<tab data-heading="Lineage" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('io')"><ng-include data-table-type="io" src="'/modules/lineage_io/views/lineage_io.html'"/></tab> <tab data-heading="Lineage" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('io')"><ng-include data-table-type="io" src="'/modules/lineage_io/views/lineage_io.html'"/></tab> -->
</tabset> </tabset>
</div> </div>
</div> </div>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element', '$scope', '$state', '$stateParams', 'lodash', 'Lineage_ioResource', 'd3', 'DetailsResource', '$q', angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$scope', '$state', '$stateParams', 'lodash', 'LineageResource', 'd3', 'DetailsResource', '$q',
function($element, $scope, $state, $stateParams, _, LineageResource, d3, DetailsResource, $q) { function($element, $scope, $state, $stateParams, _, LineageResource, d3, DetailsResource, $q) {
var guidsList = []; var guidsList = [];
...@@ -31,7 +31,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element', ...@@ -31,7 +31,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element',
} }
}); });
return newEdgsObj; return newEdgsObj;
} }
function getCombinedLineageData(tableData, callRender) { function getCombinedLineageData(tableData, callRender) {
LineageResource.get({ LineageResource.get({
...@@ -71,9 +71,10 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element', ...@@ -71,9 +71,10 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element',
if (callRender) { if (callRender) {
render(); render();
} }
}); });
} else {
$scope.requested = false;
} }
$scope.requested = false;
}); });
}); });
...@@ -101,7 +102,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element', ...@@ -101,7 +102,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element',
} }
$scope.type = $element.parent().attr('data-table-type'); $scope.type = $element.parent().attr('data-table-type');
$scope.requested = false; $scope.requested = true;
$scope.height = $element[0].offsetHeight; $scope.height = $element[0].offsetHeight;
$scope.width = $element[0].offsetWidth; $scope.width = $element[0].offsetWidth;
...@@ -127,14 +128,13 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element', ...@@ -127,14 +128,13 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element',
$scope.$on('render-lineage', function(event, lineageData) { $scope.$on('render-lineage', function(event, lineageData) {
if (lineageData.type === $scope.type) { if (lineageData.type === $scope.type) {
if (!$scope.lineageData) { if (!$scope.lineageData) {
if (!$scope.requested) { if ($scope.requested) {
if ($scope.type === 'io') { if ($scope.type === 'io') {
console.log($scope.type); console.log($scope.type);
getCombinedLineageData(lineageData, true); getCombinedLineageData(lineageData, true);
} else { } else {
getCombinedLineageData(lineageData, true); getCombinedLineageData(lineageData, true);
} }
$scope.requested = true;
} }
} else { } else {
render(); render();
...@@ -224,8 +224,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element', ...@@ -224,8 +224,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element',
// ************** Generate the tree diagram ***************** // ************** Generate the tree diagram *****************
var element = d3.select(container.element), var element = d3.select(container.element),
widthg = Math.max(container.width, 1100), widthg = Math.max(container.width, 1100),
//heightg = Math.max(container.height, 500), heightg = Math.max((window.innerHeight - 400), 500),
heightg = Math.max((window.innerHeight - 380), 500),
totalNodes = 0, totalNodes = 0,
maxLabelLength = 0, maxLabelLength = 0,
...@@ -419,7 +418,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element', ...@@ -419,7 +418,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element',
var scale = (depthwidth === 10) ? zoomListener.scale() : 0.4; var scale = (depthwidth === 10) ? zoomListener.scale() : 0.4;
var x = -source.y0; var x = -source.y0;
var y = -source.x0; var y = -source.x0;
x = x * scale + 150; x = x * scale - 130;
y = y * scale + viewerHeight / 2; y = y * scale + viewerHeight / 2;
d3.select('g').transition() d3.select('g').transition()
.duration(duration) .duration(duration)
...@@ -728,7 +727,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element', ...@@ -728,7 +727,7 @@ angular.module('dgc.lineage_io').controller('Lineage_ioController', ['$element',
// Layout the tree initially and center on the root node. // Layout the tree initially and center on the root node.
update(root); update(root);
centerNode(root); centerNode(root);
$scope.requested = false;
var couplingParent1 = tree.nodes(root).filter(function(d) { var couplingParent1 = tree.nodes(root).filter(function(d) {
return d.name === 'cluster'; return d.name === 'cluster';
})[0]; })[0];
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<div class="lineage-viz" data-ng-controller="Lineage_ioController"> <div class="lineage-viz table-bordered" data-ng-controller="Lineage_ioController">
<button type="button" class="btn btn-primary pull-right" ng-click="onReset()"> <button type="button" class="btn btn-primary pull-right" ng-click="onReset()">
Reset Reset
</button> </button>
......
Searching 16184 files for "LineageController"
/Users/anilgayakwad/MPR/Anil/incubator-atlas/dashboard/public/modules/lineage/lineageController.js:
18 'use strict';
19
20: angular.module('dgc.lineage').controller('LineageController', ['$element', '$scope', '$state', '$stateParams', 'lodash', 'LineageResource', 'd3', 'DetailsResource', '$q',
21 function($element, $scope, $state, $stateParams, _, LineageResource, d3, DetailsResource, $q) {
22 var guidsList = [];
/Users/anilgayakwad/MPR/Anil/incubator-atlas/dashboard/public/modules/lineage/views/lineage.html:
17 -->
18
19: <div class="lineage-viz" data-ng-controller="LineageController">
20 <button type="button" class="btn btn-primary pull-right" ng-click="onReset()">
21 Reset
2 matches across 2 files
Searching 16184 files for "lineage.html"
/Users/anilgayakwad/MPR/Anil/incubator-atlas/dashboard/public/modules/details/views/details.html:
43 </tab>
44 <tab data-heading="Schema" data-ng-if="isTable"><ng-include src="'/modules/details/views/schema.html'"/></tab>
45: <tab data-heading="Output" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('outputs')"><ng-include data-table-type="outputs" src="'/modules/lineage/views/lineage.html'"/></tab>
46: <tab data-heading="Input" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('inputs')"><ng-include data-table-type="inputs" src="'/modules/lineage/views/lineage.html'"/></tab>
47
48 <tab data-heading="Lineage" data-ng-if="isTable" data-disable="!tableName" data-select="onActivate('io')"><ng-include data-table-type="io" src="'/modules/lineage_io/views/lineage_io.html'"/></tab>
2 matches in 1 file
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
angular.module('dgc.lineage_io', []);
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
angular.module('dgc.lineage_io').factory('Lineage_ioResource', ['$resource', function($resource) {
return $resource('/api/atlas/lineage/hive/table/:tableName/:type/graph', {});
}]);
...@@ -9,6 +9,7 @@ ATLAS-54 Rename configs in hive hook (shwethags) ...@@ -9,6 +9,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags) ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-204 Lineage I/O Lineage Enhancement ( Anilsg via Suma Shivaprasad )
ATLAS-138 Combine Input/Output graph ( Anilsg via Suma Shivaprasad ) ATLAS-138 Combine Input/Output graph ( Anilsg via Suma Shivaprasad )
ATLAS-128 DSL - Add support for comparisions on list type (suma.shivaprasad via shwethags) ATLAS-128 DSL - Add support for comparisions on list type (suma.shivaprasad via shwethags)
ATLAS-168 Atlas UI - Max column in hive 4 (darshankumar89 via shwethags) ATLAS-168 Atlas UI - Max column in hive 4 (darshankumar89 via 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