Commit 41c81145 by dileep8014

Merge pull request #5 from MPR-Global/HDPDGI-34-1

Hdpdgi 34 1
parents cbf662db 9cea4f64
......@@ -120,7 +120,10 @@ footer.navbar-bottom img {
min-height: 0;
padding: 5px 5px 5px 0;
}
#Details
{
height: 800px;
}
.pagination {
float: right;
}
\ No newline at end of file
......@@ -38,6 +38,10 @@ angular.module('dgc').factory('lodash', ['$window',
function($window) {
return $window.d3;
}
]).factory('dagreD3', ['$window',
function($window) {
return $window.dagreD3;
}
]).factory('Global', ['$window',
function($window) {
return {
......
......@@ -23,6 +23,6 @@ angular.module('dgc').config(['$locationProvider', '$urlRouterProvider',
function($locationProvider, $urlRouterProvider) {
$locationProvider.hashPrefix('!');
// For unmatched routes:
$urlRouterProvider.otherwise('/');
$urlRouterProvider.otherwise('/search');
}
]);
......@@ -21,8 +21,11 @@
angular.module('dgc.details').controller('DetailsController', ['$scope', '$stateParams', 'DetailsResource',
function($scope, $stateParams, DetailsResource) {
$scope.details = DetailsResource.get({
DetailsResource.get({
id: $stateParams.id
}, function(data) {
$scope.details = data;
$scope.tableName = data.values.name;
});
$scope.isString = angular.isString;
......
......@@ -22,18 +22,9 @@
<!--{{value}}-->
<!--</div>-->
<div class="row" data-ng-repeat="(key1,value1) in value" ng-if="value1">
<div class="col-md-6" data-ng-if="!isString(value1)" data-ng-repeat="(key2,value2) in value1 track by $index"></div>
<div data-ng-if="isString(value2)" data-ng-repeat="(key3,value3) in value2"> {{key3}}: {{value3}}</div>
<div class="col-md-6" data-ng-if="isString(value1)"> {{key1}} : {{value1 | date:'medium'}}</div>
<div >
<table class="table table-bordered" ng-if="value && !(key==='columns') && !(key==='name') && !(key==='description')">
<thead>
<tr >
<th>{{key}}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{value}}</td>
</tr>
</tbody>
</table>
</div>
\ No newline at end of file
......@@ -17,23 +17,44 @@
-->
<div role="tabpanel" >
<div role="tabpanel" class="col-md-7 col-lg-offset-3" data-ng-controller="DetailsController">
<h2>{{details.values.name}}</h2>
<h4>{{details.values.description}}</h4>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" ><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Details</a></li>
<li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Schema</a></li>
<li role="presentation" class="active"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Output</a></li>
<!--<li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>-->
<li role="presentation" class="active"><a href="#Details" aria-controls="Details" role="tab" data-toggle="tab">Details</a></li>
<li role="presentation" data-ng-if="details.typeName=='Table'"><a href="#Schema" aria-controls="Schema" role="tab" data-toggle="tab">Schema</a></li>
<li role="presentation" data-ng-if="details.typeName=='Table'"><a href="#Output" aria-controls="Output" role="tab" data-toggle="tab">Output</a></li>
<li role="presentation" data-ng-if="details.typeName=='Table'"><a href="#Input" aria-controls="Input" role="tab" data-toggle="tab">Input</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content" data-ng-controller="DetailsController">
<div role="tabpanel" class="tab-pane " id="home"> <section data-ng-repeat="(key,value) in details" data-ng-if="isString(value)" data-ng-include="'/modules/details/views/attribute.html'"></section>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="Details">
<table class="table table-bordered">
<thead>
<tr >
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="(key,value) in details.values" ng-if="value && !(key==='columns') && !(key==='name') && !(key==='description')">
<td>{{key}}</td>
<td data-ng-if="!isString(value)" data-ng-include="'/modules/details/views/attribute.html'"></td>
<td data-ng-if="isString(value)">{{value | date:'medium'}}</td>
</tr>
</tbody>
</table>
</div>
<div role="tabpanel" class="tab-pane" id="profile"> <section data-ng-include="'/modules/details/views/schema.html'"></section></div>
<div role="tabpanel" class="tab-pane active" id="messages"><div data-ng-include="'/modules/lineage/views/lineage.html'"></div></div>
<!--<div role="tabpanel" class="tab-pane" id="settings">...</div>-->
<div role="tabpanel" class="tab-pane" id="Schema"> <section data-ng-include="'/modules/details/views/schema.html'"></section></div>
<div role="tabpanel" class="tab-pane" id="Output"><div data-ng-include="'/modules/lineage/views/outputs.html'"></div></div>
<div role="tabpanel" class="tab-pane" id="Input"><div data-ng-include="'/modules/lineage/views/inputs.html'"></div></div>
</div>
</div>
\ No newline at end of file
......@@ -15,7 +15,6 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<div>
<table class="table table-bordered">
<thead>
......
......@@ -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: '/search',
templateUrl: '/modules/search/views/search.html'
});
}
]);
......@@ -24,7 +24,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a data-ui-sref="home" data-ui-sref-active="active"><h1>DGI</h1></a>
<a data-ui-sref="search" data-ui-sref-active="active"><h1>DGI</h1></a>
</div>
<nav class="collapse navbar-collapse" data-collapse="isCollapsed" data-role="navigation">
<ul class="navbar-nav nav" data-ng-if="isLoggedIn()">
......
......@@ -19,8 +19,5 @@
'use strict';
angular.module('dgc.lineage').factory('LineageResource', ['$resource', function($resource) {
return $resource('/api/metadata/discovery/search/relationships/:id', {
depth: 3,
edgesToFollow: 'HiveLineage.sourceTables.0,HiveLineage.sourceTables.1,HiveLineage.sourceTables.2,HiveLineage.tableName'
});
return $resource('/api/metadata/lineage/hive/table/:tableName/:type/graph', {});
}]);
<!--
~ 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.
-->
<div data-ng-controller="LineageController">
<div id="inputs">
<svg class="lineage-viz"><g></svg>
</div>
</div>
<!--
~ 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.
-->
<div data-ng-controller="LineageController">
<div id="outputs">
<svg class="lineage-viz"><g></svg>
</div>
</div>
......@@ -21,6 +21,7 @@
angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource',
function($scope, NavigationResource) {
$scope.leftnav= NavigationResource.get();
$scope.updateVar = function(event) {
$scope.$$prevSibling.query = angular.element(event.target).text();
......
......@@ -17,5 +17,4 @@
*/
'use strict';
angular.module('dgc.navigation',[]);
/*
* 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.search').directive(
"myDirective",
function() {
return {
restrict: 'EA',
template: '<a href="javascript: void(0);" button-toggle toggle="isCollapsed" class="show-more" ng-click="isCollapsed = !isCollapsed">..show more</a>',
link: function($scope) {
$scope.isCollapsed = true;
console.log($scope.isCollapsed);
},
transclude: true,
scope: {}
};
});
......@@ -21,12 +21,15 @@
//Setting up route
angular.module('dgc.search').config(['$stateProvider',
function($stateProvider) {
// states for my app
$stateProvider.state('search', {
url: '/search',
templateUrl: '/modules/search/views/search.html',
controller:'SearchController'
controller: 'SearchController'
}).state('search.results', {
url: '/:query',
templateUrl: '/modules/search/views/searchResult.html',
controller: 'SearchController'
}).state('search.results', {
url: '?query',
templateUrl: '/modules/search/views/searchResult.html',
......
......@@ -45,4 +45,3 @@
<pagination total-items="totalItems" items-per-page="itemsPerPage" ng-model="currentPage" ng-change="pageChanged()"></pagination>
<p>
</div>
......@@ -15,11 +15,6 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<script>
$(function () {
$('#myTab a:last').tab('show')
})
</script>
<!-- Angular JS -->
<script type="text/javascript" src="/lib/angular/angular.min.js"></script>
<script type="text/javascript" src="/lib/lodash/lodash.min.js"></script>
......@@ -36,13 +31,6 @@
<script src="http://cpettitt.github.io/project/dagre-d3/latest/dagre-d3.js"></script>
<script type="text/javascript" src="dist/app.min.js"></script>
<!-- Enable the tabs -->
<script type="text/javascript">
$('#myTabs a').click(function (e) {
e.preventDefault()
$(this).tab('show')
});
</script>
{% if (process.env.NODE_ENV == 'local') %}
<!-- Livereload script rendered -->
......
......@@ -35,19 +35,8 @@
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('#tabs').tab();
});
</script>
<style >
</style>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
......
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