Commit 93a16d2b by DarshanKumar

HDPDGI32-1

Details and schema tab refactored
parent a4d62eb7
......@@ -25,6 +25,20 @@ angular.module('dgc.details').controller('DetailsController', ['$scope', '$state
id: $stateParams.id
});
$scope.isString = angular.isString;
//schema
$scope.schemas = DetailsResource.get({
id: $stateParams.id
});
}
]);
File mode changed from 100755 to 100644
......@@ -19,12 +19,12 @@
'use strict';
angular.module('dgc.details').factory('DetailsResource', ['$resource', function($resource) {
return $resource('/api/metadata/entities/definition/:id', {}, {
return $resource('/api/metadata/entities/:id', {}, {
get: {
method: 'GET',
transformResponse: function(data) {
if (data) {
return angular.fromJson(data.definition);
return angular.fromJson(data.results);
}
},
responseType: 'json'
......
File mode changed from 100755 to 100644
......@@ -16,5 +16,24 @@
~ limitations under the License.
-->
<h4>{{key}}:</h4>
<p>{{value | date:'medium'}}</p>
\ No newline at end of file
<!--<div>-->
<!--{{key}}:-->
<!--{{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 @@
<div class="container details" data-ng-controller="DetailsController">
<div class="col-lg-12">
<h3>{{details.$id$.id}}</h3>
<div class="lineage" data-ng-include="'/modules/lineage/views/lineage.html'"></div>
<div class="wiki">
<h4>Name : {{details.name}}</h4>
<h5>Description : {{details.description}}</h5>
<tabset>
<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>
</div>
</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>
\ 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