Commit ccccd861 by DarshanKumar Committed by Vishal Kadam

HDPDGI32-1

Details and schema tab refactored
parent c0e1e99a
...@@ -25,6 +25,20 @@ angular.module('dgc.details').controller('DetailsController', ['$scope', '$state ...@@ -25,6 +25,20 @@ angular.module('dgc.details').controller('DetailsController', ['$scope', '$state
id: $stateParams.id id: $stateParams.id
}); });
$scope.isString = angular.isString; $scope.isString = angular.isString;
//schema
$scope.schemas = DetailsResource.get({
id: $stateParams.id
});
} }
]); ]);
File mode changed from 100755 to 100644
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
'use strict'; 'use strict';
angular.module('dgc.details').factory('DetailsResource', ['$resource', function($resource) { angular.module('dgc.details').factory('DetailsResource', ['$resource', function($resource) {
return $resource('/api/metadata/entities/definition/:id', {}, { return $resource('/api/metadata/entities/:id', {}, {
get: { get: {
method: 'GET', method: 'GET',
transformResponse: function(data) { transformResponse: function(data) {
if (data) { if (data) {
return angular.fromJson(data.definition); return angular.fromJson(data.results);
} }
}, },
responseType: 'json' responseType: 'json'
......
File mode changed from 100755 to 100644
...@@ -16,5 +16,24 @@ ...@@ -16,5 +16,24 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<h4>{{key}}:</h4> <!--<div>-->
<p>{{value | date:'medium'}}</p> <!--{{key}}:-->
\ No newline at end of file
<!--{{value}}-->
<!--</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>
...@@ -18,10 +18,23 @@ ...@@ -18,10 +18,23 @@
<div class="container details" data-ng-controller="DetailsController"> <div class="container details" data-ng-controller="DetailsController">
<div class="col-lg-12"> <div class="col-lg-12">
<h3>{{details.$id$.id}}</h3> <h4>Name : {{details.name}}</h4>
<div class="lineage" data-ng-include="'/modules/lineage/views/lineage.html'"></div> <h5>Description : {{details.description}}</h5>
<div class="wiki">
<section data-ng-repeat="(key,value) in details" data-ng-if="isString(value)" data-ng-include="'/modules/details/views/attribute.html'"></section> <tabset>
</div> <tab heading="Details">
<section data-ng-repeat="(key,value) in details" data-ng-if="isString(value)" data-ng-include="'/modules/details/views/attribute.html'"></section>
</tab>
<tab heading="Schema" >
<section data-ng-include="'/modules/details/views/schema.html'"></section>
</tab>
<tab heading="Outputs" ng-if="details['$typeName$']==='Table'">
<div class="lineage" data-ng-include="'/modules/lineage/views/lineage.html'"></div>
</tab>
<tab heading="Inputs" ng-if="details['$typeName$']==='Table'">
<div class="lineage" data-ng-include="'/modules/lineage/views/lineage.html'"></div>
</tab>
</tabset>
</div> </div>
</div> </div>
\ No newline at end of file
<div>
<table class="table table-bordered">
<thead>
<tr >
<th>Name</th>
<th>Comment</th>
<th>DataType</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="s in schemas.columns track by $index">
<td> {{s.name}}</td>
<td>{{s.comment}}</td>
<td> {{s.dataType}}</td>
</tr>
</tbody>
</table>
</div>
\ No newline at end of file
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