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 { ...@@ -120,7 +120,10 @@ footer.navbar-bottom img {
min-height: 0; min-height: 0;
padding: 5px 5px 5px 0; padding: 5px 5px 5px 0;
} }
#Details
{
height: 800px;
}
.pagination { .pagination {
float: right; float: right;
} }
\ No newline at end of file
...@@ -38,6 +38,10 @@ angular.module('dgc').factory('lodash', ['$window', ...@@ -38,6 +38,10 @@ angular.module('dgc').factory('lodash', ['$window',
function($window) { function($window) {
return $window.d3; return $window.d3;
} }
]).factory('dagreD3', ['$window',
function($window) {
return $window.dagreD3;
}
]).factory('Global', ['$window', ]).factory('Global', ['$window',
function($window) { function($window) {
return { return {
......
...@@ -23,6 +23,6 @@ angular.module('dgc').config(['$locationProvider', '$urlRouterProvider', ...@@ -23,6 +23,6 @@ angular.module('dgc').config(['$locationProvider', '$urlRouterProvider',
function($locationProvider, $urlRouterProvider) { function($locationProvider, $urlRouterProvider) {
$locationProvider.hashPrefix('!'); $locationProvider.hashPrefix('!');
// For unmatched routes: // For unmatched routes:
$urlRouterProvider.otherwise('/'); $urlRouterProvider.otherwise('/search');
} }
]); ]);
...@@ -21,8 +21,11 @@ ...@@ -21,8 +21,11 @@
angular.module('dgc.details').controller('DetailsController', ['$scope', '$stateParams', 'DetailsResource', angular.module('dgc.details').controller('DetailsController', ['$scope', '$stateParams', 'DetailsResource',
function($scope, $stateParams, DetailsResource) { function($scope, $stateParams, DetailsResource) {
$scope.details = DetailsResource.get({ DetailsResource.get({
id: $stateParams.id id: $stateParams.id
}, function(data) {
$scope.details = data;
$scope.tableName = data.values.name;
}); });
$scope.isString = angular.isString; $scope.isString = angular.isString;
......
...@@ -22,18 +22,9 @@ ...@@ -22,18 +22,9 @@
<!--{{value}}--> <!--{{value}}-->
<!--</div>--> <!--</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> </div>
\ No newline at end of file
...@@ -17,23 +17,44 @@ ...@@ -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 --> <!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist"> <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" class="active"><a href="#Details" aria-controls="Details" 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" data-ng-if="details.typeName=='Table'"><a href="#Schema" aria-controls="Schema" 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" data-ng-if="details.typeName=='Table'"><a href="#Output" aria-controls="Output" 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" data-ng-if="details.typeName=='Table'"><a href="#Input" aria-controls="Input" role="tab" data-toggle="tab">Input</a></li>
</ul> </ul>
<!-- Tab panes --> <!-- Tab panes -->
<div class="tab-content" data-ng-controller="DetailsController"> <div class="tab-content">
<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 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>
<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" id="Schema"> <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="Output"><div data-ng-include="'/modules/lineage/views/outputs.html'"></div></div>
<!--<div role="tabpanel" class="tab-pane" id="settings">...</div>--> <div role="tabpanel" class="tab-pane" id="Input"><div data-ng-include="'/modules/lineage/views/inputs.html'"></div></div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -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.
--> -->
<div> <div>
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
...@@ -52,4 +51,4 @@ ...@@ -52,4 +51,4 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
\ No newline at end of file
...@@ -24,8 +24,8 @@ angular.module('dgc.home.routes', []).config(['$stateProvider', ...@@ -24,8 +24,8 @@ angular.module('dgc.home.routes', []).config(['$stateProvider',
// states for my app // states for my app
$stateProvider.state('home', { $stateProvider.state('home', {
url: '/', url: '/search',
templateUrl: '/modules/home/views/home.html' templateUrl: '/modules/search/views/search.html'
}); });
} }
]); ]);
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </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> </div>
<nav class="collapse navbar-collapse" data-collapse="isCollapsed" data-role="navigation"> <nav class="collapse navbar-collapse" data-collapse="isCollapsed" data-role="navigation">
<ul class="navbar-nav nav" data-ng-if="isLoggedIn()"> <ul class="navbar-nav nav" data-ng-if="isLoggedIn()">
......
...@@ -18,162 +18,98 @@ ...@@ -18,162 +18,98 @@
'use strict'; 'use strict';
angular.module('dgc.lineage').controller('LineageController', ['$element', '$scope', '$state', '$stateParams', 'lodash', 'LineageResource', 'd3', angular.module('dgc.lineage').controller('LineageController', ['$element', '$scope', '$state', '$stateParams', 'lodash', 'LineageResource', 'd3', 'dagreD3',
function($element, $scope, $state, $stateParams, _, LineageResource, d3) { function($element, $scope, $state, $stateParams, _, LineageResource, d3, dagreD3) {
$scope.metaData = [];
var metaData = {
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct", LineageResource.get({
"typeName":"__tempQueryResultStruct5", tableName: $scope.tableName,
"values":{ type: "outputs"
"vertices":{ }, function lineageSuccess(response) {
"2318d240-481e-421c-a614-843347d03941":{ $scope.metaData = response.results;
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct", renderGraph(transformData(response.results), d3.select($element[0]).select('svg'));
"typeName":"__tempQueryResultStruct4",
"values":{ });
"vertexId":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct", LineageResource.get({
"typeName":"__IdType", tableName: $scope.tableName,
"values":{ type: "inputs"
"guid":"2318d240-481e-421c-a614-843347d03941", }, function lineageSuccess(response) {
"typeName":"Table" $scope.metaData = response.results;
} renderGraph(transformData(response.results), d3.select($element[0]).select('svg'));
},
"name":"sales_fact_daily_mv"
}
},
"2e2ab719-842e-4150-95bd-c9f684b3e3bf":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct",
"typeName":"__tempQueryResultStruct4",
"values":{
"vertexId":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct",
"typeName":"__IdType",
"values":{
"guid":"2e2ab719-842e-4150-95bd-c9f684b3e3bf",
"typeName":"Table"
}
},
"name":"time_dim"
}
},
"d3991d56-4600-415f-acdb-6f1b0c8079b2":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct",
"typeName":"__tempQueryResultStruct4",
"values":{
"vertexId":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct",
"typeName":"__IdType",
"values":{
"guid":"d3991d56-4600-415f-acdb-6f1b0c8079b2",
"typeName":"Table"
}
},
"name":"sales_fact_monthly_mv"
}
},
"7b516348-d8bb-4624-b330-3082ae87e705":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct",
"typeName":"__tempQueryResultStruct4",
"values":{
"vertexId":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct",
"typeName":"__IdType",
"values":{
"guid":"7b516348-d8bb-4624-b330-3082ae87e705",
"typeName":"Table"
}
},
"name":"sales_fact"
}
}, "7b516348-d8bb-4624-b330-3082ae87e706":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct",
"typeName":"__tempQueryResultStruct4",
"values":{
"vertexId":{
"jsonClass":"org.apache.hadoop.metadata.typesystem.json.InstanceSerialization$_Struct",
"typeName":"__IdType",
"values":{
"guid":"7b516348-d8bb-4624-b330-3082ae87e705",
"typeName":"Table"
}
},
"name":"sales_fact_2"
}
}
},
"edges":{
"2318d240-481e-421c-a614-843347d03941":[
"0f45a2df-9bd5-4579-88ec-6ad0ff251d6f"
],
"0f45a2df-9bd5-4579-88ec-6ad0ff251d6f":[
"7b516348-d8bb-4624-b330-3082ae87e705",
"2e2ab719-842e-4150-95bd-c9f684b3e3bf"
],
"d3991d56-4600-415f-acdb-6f1b0c8079b2":[
"3710a18a-6116-4625-bf99-57670a7a90a8"
],
"3710a18a-6116-4625-bf99-57670a7a90a8":[
"2318d240-481e-421c-a614-843347d03941"
],
"7b516348-d8bb-4624-b330-3082ae87e706": [
"2318d240-481e-421c-a614-843347d03941"
]
}
}
};
function transformData(metaData){ });
function transformData(metaData) {
var nodes = []; var nodes = [];
var name, guid; var name, guid;
var nodeGuids = Object.keys(metaData.values.vertices); var nodeGuids = Object.keys(metaData.values.vertices);
for (var index in nodeGuids) { for (var index in nodeGuids) {
name = metaData.values.vertices[nodeGuids[index]].values.name; name = metaData.values.vertices[nodeGuids[index]].values.name;
guid = nodeGuids[index]; guid = nodeGuids[index];
nodes.push({ guid: guid, label: name, shape: "rect" }); nodes.push({
guid: guid,
label: name,
shape: "rect"
});
} }
var edges = []; var edges = [];
var parent; var parent;
var child; var child;
var edgesParents = Object.keys(metaData.values.edges) var edgesParents = Object.keys(metaData.values.edges);
for(var index in edgesParents){ for (index in edgesParents) {
parent = edgesParents[index]; parent = edgesParents[index];
for(var j = 0; j < metaData.values.edges[parent].length; j++ ) { for (var j = 0; j < metaData.values.edges[parent].length; j++) {
child = metaData.values.edges[parent][j]; child = metaData.values.edges[parent][j];
if(!metaData.values.vertices.hasOwnProperty(child)) { if (!metaData.values.vertices.hasOwnProperty(child)) {
nodes.push({guid: child, label: 'Load Process', shape: "circle"}); nodes.push({
guid: child,
label: 'Load Process',
shape: "circle"
});
} }
edges.push({parent: parent, child: child}); edges.push({
parent: parent,
child: child
});
} }
} }
return {nodes: nodes, edges: edges}; return {
nodes: nodes,
edges: edges
};
} }
function renderGraph(data, element) {
function renderGraph(data, element){
// Create a new directed graph // Create a new directed graph
var g = new dagreD3 var g = new dagreD3
.graphlib .graphlib
.Graph() .Graph()
.setGraph({rankdir: "LR"}); .setGraph({
rankdir: "LR"
// Automatically label each of the nodes });
//g.setNode("DB (sales)", { label: "Sales DB", width: 144, height: 100 })
//states.forEach(function(state) { g.setNode(state, { label: state }); }); // Automatically label each of the nodes
//g.setNode("DB (sales)", { label: "Sales DB", width: 144, height: 100 })
_.forEach(data.nodes, function (node) { //states.forEach(function(state) { g.setNode(state, { label: state }); });
g.setNode(node.guid, { label: node.label, shape: node.shape });
_.forEach(data.nodes, function(node) {
g.setNode(node.guid, {
label: node.label,
shape: node.shape
});
}); });
_.forEach(data.edges, function(edge) { _.forEach(data.edges, function(edge) {
g.setEdge(edge.parent, edge.child, {label: ""}); g.setEdge(edge.parent, edge.child, {
label: ""
});
}); });
// Set some general styles // Set some general styles
g.nodes().forEach(function(v) { g.nodes().forEach(function(v) {
var node = g.node(v); var node = g.node(v);
node.rx = node.ry = 5; node.rx = node.ry = 5;
...@@ -181,22 +117,20 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco ...@@ -181,22 +117,20 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
var inner = element.select("g"); var inner = element.select("g");
// Create the renderer // Create the renderer
var render = new dagreD3.render(); var render = new dagreD3.render();
// Run the renderer. This is what draws the final graph. // Run the renderer. This is what draws the final graph.
render(inner, g); render(inner, g);
// Center the graph // Center the graph
var initialScale = 0.75; var initialScale = 0.75;
zoom // zoom
.translate([(element.attr("width") - g.graph().width * initialScale) / 2, 20]) // .translate([(element.attr("width") - g.graph().width * initialScale) / 2, 20])
.scale(initialScale) // .scale(initialScale)
.event(element); // .event(element);
element.attr('height', g.graph().height * initialScale + 90); element.attr('height', g.graph().height * initialScale + 90);
} }
renderGraph(transformData(metaData), d3.select($element[0]).select('svg'));
} }
]); ]);
\ No newline at end of file
...@@ -19,8 +19,5 @@ ...@@ -19,8 +19,5 @@
'use strict'; 'use strict';
angular.module('dgc.lineage').factory('LineageResource', ['$resource', function($resource) { angular.module('dgc.lineage').factory('LineageResource', ['$resource', function($resource) {
return $resource('/api/metadata/discovery/search/relationships/:id', { return $resource('/api/metadata/lineage/hive/table/:tableName/:type/graph', {});
depth: 3,
edgesToFollow: 'HiveLineage.sourceTables.0,HiveLineage.sourceTables.1,HiveLineage.sourceTables.2,HiveLineage.tableName'
});
}]); }]);
<!--
~ 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 @@ ...@@ -21,6 +21,7 @@
angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource', angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource',
function($scope, NavigationResource) { function($scope, NavigationResource) {
$scope.leftnav= NavigationResource.get(); $scope.leftnav= NavigationResource.get();
$scope.updateVar = function(event) { $scope.updateVar = function(event) {
$scope.$$prevSibling.query = angular.element(event.target).text(); $scope.$$prevSibling.query = angular.element(event.target).text();
...@@ -28,4 +29,4 @@ angular.module('dgc.navigation').controller('NavigationController', ['$scope', ' ...@@ -28,4 +29,4 @@ angular.module('dgc.navigation').controller('NavigationController', ['$scope', '
}; };
} }
]); ]);
\ No newline at end of file
...@@ -17,5 +17,4 @@ ...@@ -17,5 +17,4 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.navigation',[]);
angular.module('dgc.navigation',[]);
\ No newline at end of file
...@@ -76,9 +76,9 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -76,9 +76,9 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.typeAvailable = function() { $scope.typeAvailable = function() {
if($scope.results.dataType) { if($scope.results.dataType) {
return $scope.types.indexOf($scope.results.dataType.typeName && $scope.results.dataType.typeName.toLowerCase()) > -1; return $scope.types.indexOf($scope.results.dataType.typeName && $scope.results.dataType.typeName.toLowerCase()) > -1;
} }
}; };
$scope.doToggle = function($event,el) { $scope.doToggle = function($event,el) {
this.isCollapsed = !el; this.isCollapsed = !el;
...@@ -103,4 +103,4 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -103,4 +103,4 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.search($scope.query); $scope.search($scope.query);
} }
} }
]); ]);
\ No newline at end of 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.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,16 +21,19 @@ ...@@ -21,16 +21,19 @@
//Setting up route //Setting up route
angular.module('dgc.search').config(['$stateProvider', angular.module('dgc.search').config(['$stateProvider',
function($stateProvider) { function($stateProvider) {
// states for my app // states for my app
$stateProvider.state('search', { $stateProvider.state('search', {
url: '/search', url: '/search',
templateUrl: '/modules/search/views/search.html', 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', { }).state('search.results', {
url: '?query', url: '?query',
templateUrl: '/modules/search/views/searchResult.html', templateUrl: '/modules/search/views/searchResult.html',
controller:'SearchController' controller:'SearchController'
}); });
} }
]); ]);
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div data-ng-include="'/modules/navigation/views/navigation.html'"></div> <div data-ng-include="'/modules/navigation/views/navigation.html'"></div>
<div class="col-lg-9" data-ui-view="" style="min-height: 1350px;"></div> <div class="col-lg-9" data-ui-view="" style="min-height: 1350px;"></div>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -24,25 +24,24 @@ ...@@ -24,25 +24,24 @@
<ul class="list-unstyled"> <ul class="list-unstyled">
<li ng-repeat="result in filteredResults" class="searchresults"> <li ng-repeat="result in filteredResults" class="searchresults">
<h4><a data-ui-sref="details({id:result['$id$'].id})">{{result.name}}</a></h4> <h4><a data-ui-sref="details({id:result['$id$'].id})">{{result.name}}</a></h4>
<p>{{result.description}}</p> <p>{{result.description}}</p>
<span ng-repeat="(key, value) in filterSearchResults(result)" > <span ng-repeat="(key, value) in filterSearchResults(result)" >
<span ng-show="$index < 4"><b>{{key}}: </b>{{value}}{{$index+1 === limit ? '' : ', '}}</span> <span ng-show="$index < 4"><b>{{key}}: </b>{{value}}{{$index+1 === limit ? '' : ', '}}</span>
</span> </span>
<div collapse="isCollapsed"> <div collapse="isCollapsed">
<span ng-repeat="(key, value) in filterSearchResults(result)" > <span ng-repeat="(key, value) in filterSearchResults(result)" >
<span ng-show="$index > 4"><b>{{key}}: </b>{{value}}{{$last ? '' : ', '}}</span> <span ng-show="$index > 4"><b>{{key}}: </b>{{value}}{{$last ? '' : ', '}}</span>
</span> </span>
</div> </div>
<a href ng-show="isCollapsed && (keyLength > 4)" ng-click="doToggle($event,isCollapsed)">..show more</a> <a href ng-show="isCollapsed && (keyLength > 4)" ng-click="doToggle($event,isCollapsed)">..show more</a>
<a href ng-show="!isCollapsed" ng-click="doToggle($event,isCollapsed)">..show less</a> <a href ng-show="!isCollapsed" ng-click="doToggle($event,isCollapsed)">..show less</a>
<h5>Tags : <a ng-repeat="(key, value) in result['$traits$']" data-ui-sref="search.results({query: key})">{{key}}</a> </h5> <h5>Tags : <a ng-repeat="(key, value) in result['$traits$']" data-ui-sref="search.results({query: key})">{{key}}</a> </h5>
<div data-ng-if="!searchTypesAvailable" data-ng-include="'/modules/search/views/types/guid.html'"></div> <div data-ng-if="!searchTypesAvailable" data-ng-include="'/modules/search/views/types/guid.html'"></div>
</li> </li>
</ul> </ul>
<div ng-show='results.rows.length > 0'> <div ng-show='results.rows.length > 0'>
<pagination total-items="totalItems" items-per-page="itemsPerPage" ng-model="currentPage" ng-change="pageChanged()"></pagination> <pagination total-items="totalItems" items-per-page="itemsPerPage" ng-model="currentPage" ng-change="pageChanged()"></pagination>
<p> <p>
</div> </div>
...@@ -15,11 +15,6 @@ ...@@ -15,11 +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.
--> -->
<script>
$(function () {
$('#myTab a:last').tab('show')
})
</script>
<!-- Angular JS --> <!-- Angular JS -->
<script type="text/javascript" src="/lib/angular/angular.min.js"></script> <script type="text/javascript" src="/lib/angular/angular.min.js"></script>
<script type="text/javascript" src="/lib/lodash/lodash.min.js"></script> <script type="text/javascript" src="/lib/lodash/lodash.min.js"></script>
...@@ -36,15 +31,8 @@ ...@@ -36,15 +31,8 @@
<script src="http://cpettitt.github.io/project/dagre-d3/latest/dagre-d3.js"></script> <script src="http://cpettitt.github.io/project/dagre-d3/latest/dagre-d3.js"></script>
<script type="text/javascript" src="dist/app.min.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') %} {% if (process.env.NODE_ENV == 'local') %}
<!-- Livereload script rendered --> <!-- Livereload script rendered -->
<script type="text/javascript" src="http://localhost:35730/livereload.js"></script> <script type="text/javascript" src="http://localhost:35730/livereload.js"></script>
{% endif %} {% endif %}
\ No newline at end of file
...@@ -17,44 +17,33 @@ ...@@ -17,44 +17,33 @@
--> -->
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{app.title}}</title> <title>{{app.title}}</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<link href="/img/favicon.ico" rel="shortcut icon" type="image/x-icon"> <link href="/img/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/sticky-footer-navbar.css"> <link rel="stylesheet" href="/css/sticky-footer-navbar.css">
<link rel="stylesheet" href="/css/common.css"> <link rel="stylesheet" href="/css/common.css">
<link rel="stylesheet" href="/css/lineage.css"> <link rel="stylesheet" href="/css/lineage.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <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="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 src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('#tabs').tab(); <!--[if lt IE 9]>
}); <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
</script> <![endif]-->
<style > {% block content %}
<script type="text/javascript">
window.user = {{JSON.stringify(user)}};
window.renderErrors = {{JSON.stringify(renderErrors)}};
</script>
{% endblock %}
</head>
</style> \ No newline at end of file
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
{% block content %}
<script type="text/javascript">
window.user = {{JSON.stringify(user)}};
window.renderErrors = {{JSON.stringify(renderErrors)}};
</script>
{% endblock %}
</head>
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