Commit fe28c005 by Vishal Kadam

Vishal: Added no linage data message and retry

parent f7ce5a27
......@@ -24,8 +24,8 @@ angular.module('dgc.home.routes', []).config(['$stateProvider',
// states for my app
$stateProvider.state('home', {
url: '/',
templateUrl: '/modules/home/views/home.html'
url: '/',
templateUrl: '/modules/home/views/home.html'
});
}
]);
......@@ -26,16 +26,18 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
tableName: tableData.tableName,
type: tableData.type
}, function lineageSuccess(response) {
$scope.lineageData = transformData(response.results);
if (callRender) {
render();
if (!_.isEmpty(response.results.values.vertices)) {
$scope.lineageData = transformData(response.results);
if (callRender) {
render();
}
}
$scope.requested = false;
});
}
$scope.type = $element.parent().attr('data-table-type');
$scope.rendered = false;
var requested = false;
$scope.requested = false;
function render() {
renderGraph($scope.lineageData, {
......@@ -49,9 +51,9 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
$scope.$on('render-lineage', function(event, lineageData) {
if (lineageData.type === $scope.type) {
if (!$scope.lineageData) {
if (!requested) {
if (!$scope.requested) {
getLineageData(lineageData, true);
requested = true;
$scope.requested = true;
}
} else {
render();
......
......@@ -17,7 +17,8 @@
-->
<div class="lineage-viz" data-ng-controller="LineageController">
<i data-ng-hide="rendered" class="fa fa-spinner fa-spin fa-5x"></i>
<h4 data-ng-if="!requested && !lineageData">No lineage data found</h4>
<i data-ng-if="requested" class="fa fa-spinner fa-spin fa-5x"></i>
<svg>
<g/>
</svg>
......
......@@ -106,6 +106,6 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.query = ($location.search()).query;
if ($scope.query) {
$scope.search($scope.query);
}
}
}
]);
......@@ -25,7 +25,7 @@ angular.module('dgc.search').config(['$stateProvider',
$stateProvider.state('search', {
url: '/search?query',
templateUrl: '/modules/search/views/search.html',
controller: 'SearchController',
})
controller: 'SearchController'
});
}
]);
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