mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 09:58:14 +00:00
DSS-3964, update teradata sample data display method
This commit is contained in:
parent
bae310e715
commit
c763f45878
@ -983,9 +983,7 @@
|
||||
|
||||
<script type="text/x-handlebars" data-template-name="sample">
|
||||
{{#if hasSamples}}
|
||||
{{#if isHDFS}}
|
||||
<div id="datasetSampleData-json-human" class="table-responsive"></div>
|
||||
{{else}}
|
||||
{{#if isPinot}}
|
||||
<table id="pinotsampletreegrid" class="tree table table-bordered dataset-detail-table">
|
||||
<thead>
|
||||
<tr class="results-header">
|
||||
@ -1004,6 +1002,8 @@
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<div id="datasetSampleData-json-human" class="table-responsive"></div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<p>Sample data is not available</p>
|
||||
|
||||
@ -329,32 +329,7 @@ App.DatasetRoute = Ember.Route.extend({
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (source.toLowerCase() == 'teradata')
|
||||
{
|
||||
sampleUrl = 'api/v1/datasets/' + id + "/sample";
|
||||
$.get(sampleUrl, function(data) {
|
||||
if (data && data.status == "ok")
|
||||
{
|
||||
|
||||
if (data.sampleData && data.sampleData.sample && data.sampleData.sample.columnNames
|
||||
&& (data.sampleData.sample.columnNames.length > 0))
|
||||
{
|
||||
controller.set("hasSamples", true);
|
||||
controller.set("samples", data.sampleData.sample.data);
|
||||
controller.set("columns", data.sampleData.sample.columnNames);
|
||||
}
|
||||
else
|
||||
{
|
||||
controller.set("hasSamples", false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
controller.set("hasSamples", false);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (urn && urn.substring(0,7) == 'hdfs://')
|
||||
else
|
||||
{
|
||||
sampleUrl = 'api/v1/datasets/' + id + "/sample";
|
||||
$.get(sampleUrl, function(data) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user