2020-10-11 11:40:32 -07:00
|
|
|
{{#if @schemas.length}}
|
2019-08-31 20:51:14 -07:00
|
|
|
<div class="row dataset-schema__header">
|
2017-02-13 14:55:51 -08:00
|
|
|
<div class="col-xs-12">
|
2020-08-26 15:44:50 -07:00
|
|
|
<div class="btn-group">
|
2020-10-20 10:26:02 -07:00
|
|
|
<NachoButton::NachoToggle
|
2020-08-26 15:44:50 -07:00
|
|
|
aria-label="Toggle Table / JSON Schema View"
|
|
|
|
|
@value={{this.isShowingTable}}
|
|
|
|
|
@leftOptionValue={{true}}
|
|
|
|
|
@leftOptionText="Table"
|
|
|
|
|
@rightOptionValue={{false}}
|
2021-03-04 09:21:50 +05:30
|
|
|
@rightOptionText="Raw"
|
2020-10-11 11:40:32 -07:00
|
|
|
@onChange={{fn this.onToggleSchemaViewTypeTask}}
|
2020-08-26 15:44:50 -07:00
|
|
|
/>
|
2017-02-13 14:55:51 -08:00
|
|
|
</div>
|
2019-08-31 20:51:14 -07:00
|
|
|
<div
|
|
|
|
|
class="schemas-modified-time"
|
2020-08-26 15:44:50 -07:00
|
|
|
aria-label="Last time the Dataset Schema was modified"
|
2019-08-31 20:51:14 -07:00
|
|
|
>
|
2020-10-11 11:40:32 -07:00
|
|
|
Last modified: {{@lastModified}}
|
2018-03-29 15:27:24 -07:00
|
|
|
</div>
|
2017-02-13 14:55:51 -08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2017-10-24 00:11:23 -07:00
|
|
|
|
2020-08-26 15:44:50 -07:00
|
|
|
{{#if this.isShowingTable}}
|
2020-11-09 12:17:51 -08:00
|
|
|
<NachoTable::NachoTable @tableClass="nacho-table nacho-table--dynamic nacho-table--striped dataset-detail-table" as |Table|>
|
2020-08-26 15:44:50 -07:00
|
|
|
<Table.head @class="results-header" as |Head|>
|
|
|
|
|
<Head.title @class="dataset-detail-table__th-field-name col-xs-2">
|
|
|
|
|
Column
|
|
|
|
|
</Head.title>
|
|
|
|
|
<Head.title @class="col-xs-1">
|
|
|
|
|
Data Type
|
|
|
|
|
</Head.title>
|
|
|
|
|
<Head.title @class="dataset-detail-table__th-comments">
|
|
|
|
|
Default Comments
|
|
|
|
|
</Head.title>
|
|
|
|
|
</Table.head>
|
|
|
|
|
<Table.body as |Body|>
|
2020-10-11 11:40:32 -07:00
|
|
|
{{#each @schemas as |schema|}}
|
2020-08-26 15:44:50 -07:00
|
|
|
<Body.row as |Row|>
|
|
|
|
|
<Row.cell>
|
|
|
|
|
<div class="dataset-detail-table__field-name">
|
2020-10-11 11:40:32 -07:00
|
|
|
{{schema.fieldName}}
|
2020-08-26 15:44:50 -07:00
|
|
|
{{#if schema.nullable}}
|
|
|
|
|
<span class="schema-property-indicator schema-property-indicator--nullable">
|
|
|
|
|
N
|
2020-09-29 16:04:25 -07:00
|
|
|
<EmberTooltip @text="Is Nullable" />
|
2020-08-26 15:44:50 -07:00
|
|
|
</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{#if schema.indexed}}
|
|
|
|
|
<span class="schema-property-indicator schema-property-indicator--indexed">
|
|
|
|
|
I
|
2020-09-29 16:04:25 -07:00
|
|
|
<EmberTooltip @text="Is Indexed" />
|
2020-08-26 15:44:50 -07:00
|
|
|
</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{#if schema.partitioned}}
|
|
|
|
|
<span class="schema-property-indicator schema-property-indicator--partitioned">
|
|
|
|
|
P
|
2020-09-29 16:04:25 -07:00
|
|
|
<EmberTooltip @text="Is Partitioned" />
|
2020-08-26 15:44:50 -07:00
|
|
|
</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{#if schema.distributed}}
|
|
|
|
|
<span class="schema-property-indicator schema-property-indicator--distributed">
|
|
|
|
|
D
|
2020-09-29 16:04:25 -07:00
|
|
|
<EmberTooltip @text="Is Distributed" />
|
2020-08-26 15:44:50 -07:00
|
|
|
</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2018-03-13 16:51:45 -07:00
|
|
|
|
2020-08-26 15:44:50 -07:00
|
|
|
</Row.cell>
|
|
|
|
|
<Row.cell>
|
|
|
|
|
{{schema.dataType}}
|
|
|
|
|
</Row.cell>
|
|
|
|
|
<Row.cell @class="commentsArea">
|
|
|
|
|
<div class="commentsArea dataset-detail-table__comments">
|
|
|
|
|
<p>
|
|
|
|
|
{{schema.commentHtml}}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</Row.cell>
|
|
|
|
|
</Body.row>
|
|
|
|
|
{{/each}}
|
|
|
|
|
</Table.body>
|
2020-11-09 12:17:51 -08:00
|
|
|
</NachoTable::NachoTable>
|
2020-08-26 15:44:50 -07:00
|
|
|
{{else}}
|
|
|
|
|
<EmberAce
|
|
|
|
|
@class="dataset-compliance__editor"
|
|
|
|
|
@minLines={{10}}
|
|
|
|
|
@maxLines={{500}}
|
|
|
|
|
@readOnly={{true}}
|
|
|
|
|
@showLineNumbers={{true}}
|
|
|
|
|
@useWrapMode={{true}}
|
|
|
|
|
@showPrintMargin={{false}}
|
|
|
|
|
@mode={{this.aceMode}}
|
|
|
|
|
@worker={{concat this.aceMode "_worker"}}
|
|
|
|
|
@value={{this.possibleJsonOutput}}
|
|
|
|
|
/>
|
|
|
|
|
{{/if}}
|
2017-02-13 14:55:51 -08:00
|
|
|
{{else}}
|
2020-08-26 15:44:50 -07:00
|
|
|
<EmptyState @heading={{"There was an error retrieving the Schema for this Dataset"}}/>
|
2017-09-19 13:32:04 -07:00
|
|
|
{{/if}}
|