|
@@ -421,7 +421,7 @@ ${ commonheader(_("Importer"), "indexer", user, request, "60px") | n,unicode }
|
|
|
<div>
|
|
<div>
|
|
|
<label class="control-label">
|
|
<label class="control-label">
|
|
|
<div><!-- ko if: $index() === 0 -->${ _('Table') }<!-- /ko --></div>
|
|
<div><!-- ko if: $index() === 0 -->${ _('Table') }<!-- /ko --></div>
|
|
|
- <input type="text" class="input-xlarge" data-bind="hiveChooser: name, skipInvalids:true, pathChangeLevel: 'table', skipColumns: true, apiHelperUser: '${ user }', namespace: $root.createWizard.source.namespace, compute: $root.createWizard.source.compute, apiHelperType: $root.createWizard.source.sourceType, mainScrollable: $(MAIN_SCROLLABLE)" placeholder="${ _('Table name or <database>.<table>') }">
|
|
|
|
|
|
|
+ <input type="text" class="input-xlarge" data-bind="hiveChooser: name, skipInvalids:true, pathChangeLevel: 'table', skipColumns: true, apiHelperUser: '${ user }', namespace: $root.createWizard.source.namespace, compute: $root.createWizard.source.compute, apiHelperType: $root.createWizard.source.sourceType(), mainScrollable: $(MAIN_SCROLLABLE)" placeholder="${ _('Table name or <database>.<table>') }">
|
|
|
<a class="pointer pull-right margin-left-5" style="margin-top: 7px" data-bind="click: function() { $root.createWizard.source.tables.remove(this); }, visible: $root.createWizard.source.tables().length > 1"><i class="fa fa-minus"></i></a>
|
|
<a class="pointer pull-right margin-left-5" style="margin-top: 7px" data-bind="click: function() { $root.createWizard.source.tables.remove(this); }, visible: $root.createWizard.source.tables().length > 1"><i class="fa fa-minus"></i></a>
|
|
|
</label>
|
|
</label>
|
|
|
</div>
|
|
</div>
|
|
@@ -556,7 +556,7 @@ ${ commonheader(_("Importer"), "indexer", user, request, "60px") | n,unicode }
|
|
|
</label>
|
|
</label>
|
|
|
</div>
|
|
</div>
|
|
|
<label for="collectionName" class="control-label "><div>${ _('Name') }</div></label>
|
|
<label for="collectionName" class="control-label "><div>${ _('Name') }</div></label>
|
|
|
- <input type="text" class="input-xxlarge" data-bind="value: name, hiveChooser: name, namespace: namespace, compute: compute, skipColumns: true, skipTables: outputFormat() == 'database', valueUpdate: 'afterkeydown', apiHelperUser: '${ user }', apiHelperType: sourceType, mainScrollable: $(MAIN_SCROLLABLE), attr: { 'placeholder': outputFormat() == 'table' ? '${ _ko('Table name or <database>.<table>') }' : '${ _ko('Database name') }' }" pattern="^([a-zA-Z0-9_]+\.)?[a-zA-Z0-9_]*$" title="${ _('Only alphanumeric and underscore characters') }">
|
|
|
|
|
|
|
+ <input type="text" class="input-xxlarge" data-bind="value: name, hiveChooser: name, namespace: namespace, compute: compute, skipColumns: true, skipTables: outputFormat() == 'database', valueUpdate: 'afterkeydown', apiHelperUser: '${ user }', apiHelperType: sourceType(), mainScrollable: $(MAIN_SCROLLABLE), attr: { 'placeholder': outputFormat() == 'table' ? '${ _ko('Table name or <database>.<table>') }' : '${ _ko('Database name') }' }" pattern="^([a-zA-Z0-9_]+\.)?[a-zA-Z0-9_]*$" title="${ _('Only alphanumeric and underscore characters') }">
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
|
|
|
<!-- ko if: outputFormat() == 'altus' -->
|
|
<!-- ko if: outputFormat() == 'altus' -->
|
|
@@ -569,7 +569,7 @@ ${ commonheader(_("Importer"), "indexer", user, request, "60px") | n,unicode }
|
|
|
|
|
|
|
|
<label class="control-label "><div>${ _('Database') }</div></label>
|
|
<label class="control-label "><div>${ _('Database') }</div></label>
|
|
|
<input type="text" class="form-control input-xlarge" data-bind="value: name" placeholder="${ _('Database') }">
|
|
<input type="text" class="form-control input-xlarge" data-bind="value: name" placeholder="${ _('Database') }">
|
|
|
- <a href="javascript:void(0);" data-bind="sqlContextPopover: { sourceType: $root.createWizard.source.sourceType, namespace: namespace, compute: compute, path: 'default', offset: { top: -3, left: 3 }}">
|
|
|
|
|
|
|
+ <a href="javascript:void(0);" data-bind="sqlContextPopover: { sourceType: $root.createWizard.source.sourceType(), namespace: namespace, compute: compute, path: 'default', offset: { top: -3, left: 3 }}">
|
|
|
<i class="fa fa-info"></i>
|
|
<i class="fa fa-info"></i>
|
|
|
</a>
|
|
</a>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
@@ -995,7 +995,7 @@ ${ commonheader(_("Importer"), "indexer", user, request, "60px") | n,unicode }
|
|
|
<div data-bind="component: { name: 'hue-simple-ace-editor-multi', params: {
|
|
<div data-bind="component: { name: 'hue-simple-ace-editor-multi', params: {
|
|
|
value: fieldEditorValue,
|
|
value: fieldEditorValue,
|
|
|
placeHolder: fieldEditorPlaceHolder,
|
|
placeHolder: fieldEditorPlaceHolder,
|
|
|
- autocomplete: { type: sourceType },
|
|
|
|
|
|
|
+ autocomplete: { type: sourceType() },
|
|
|
lines: 5,
|
|
lines: 5,
|
|
|
aceOptions: {
|
|
aceOptions: {
|
|
|
minLines: 10,
|
|
minLines: 10,
|
|
@@ -1005,7 +1005,7 @@ ${ commonheader(_("Importer"), "indexer", user, request, "60px") | n,unicode }
|
|
|
namespace: namespace,
|
|
namespace: namespace,
|
|
|
compute: compute,
|
|
compute: compute,
|
|
|
temporaryOnly: true,
|
|
temporaryOnly: true,
|
|
|
- mode: sourceType
|
|
|
|
|
|
|
+ mode: sourceType()
|
|
|
}}"></div>
|
|
}}"></div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
|
|
@@ -1683,7 +1683,7 @@ ${ commonheader(_("Importer"), "indexer", user, request, "60px") | n,unicode }
|
|
|
sampleCols.forEach(function (sampleCol) {
|
|
sampleCols.forEach(function (sampleCol) {
|
|
|
var deferred = $.Deferred();
|
|
var deferred = $.Deferred();
|
|
|
deferreds.push(deferred);
|
|
deferreds.push(deferred);
|
|
|
- sqlUtils.backTickIfNeeded({ id: self.sourceType, dialect: self.sourceType }, sampleCol.name()).then(function (value) {
|
|
|
|
|
|
|
+ sqlUtils.backTickIfNeeded({ id: self.sourceType(), dialect: self.sourceType() }, sampleCol.name()).then(function (value) {
|
|
|
statementCols.push(value);
|
|
statementCols.push(value);
|
|
|
var col = {
|
|
var col = {
|
|
|
name: sampleCol.name(),
|
|
name: sampleCol.name(),
|
|
@@ -1707,17 +1707,17 @@ ${ commonheader(_("Importer"), "indexer", user, request, "60px") | n,unicode }
|
|
|
$.when.apply($, deferreds).done(function () {
|
|
$.when.apply($, deferreds).done(function () {
|
|
|
var statement = 'SELECT ';
|
|
var statement = 'SELECT ';
|
|
|
statement += statementCols.join(',\n ');
|
|
statement += statementCols.join(',\n ');
|
|
|
- statement += '\n FROM ' + sqlUtils.backTickIfNeeded({ id: self.sourceType, dialect: self.sourceType }, tableName) + ';';
|
|
|
|
|
|
|
+ statement += '\n FROM ' + sqlUtils.backTickIfNeeded({ id: self.sourceType(), dialect: self.sourceType() }, tableName) + ';';
|
|
|
if (!wizard.destination.fieldEditorValue() || wizard.destination.fieldEditorValue() === lastStatement) {
|
|
if (!wizard.destination.fieldEditorValue() || wizard.destination.fieldEditorValue() === lastStatement) {
|
|
|
wizard.destination.fieldEditorValue(statement);
|
|
wizard.destination.fieldEditorValue(statement);
|
|
|
}
|
|
}
|
|
|
lastStatement = statement;
|
|
lastStatement = statement;
|
|
|
- wizard.destination.fieldEditorPlaceHolder('${ _('Example: SELECT') }' + ' * FROM ' + sqlUtils.backTickIfNeeded({ id: self.sourceType, dialect: self.sourceType }, tableName));
|
|
|
|
|
|
|
+ wizard.destination.fieldEditorPlaceHolder('${ _('Example: SELECT') }' + ' * FROM ' + sqlUtils.backTickIfNeeded({ id: self.sourceType(), dialect: self.sourceType() }, tableName));
|
|
|
|
|
|
|
|
var handle = dataCatalog.addTemporaryTable({
|
|
var handle = dataCatalog.addTemporaryTable({
|
|
|
namespace: self.namespace(),
|
|
namespace: self.namespace(),
|
|
|
compute: self.compute(),
|
|
compute: self.compute(),
|
|
|
- connector: { id: self.sourceType }, // TODO: Migrate importer to connectors
|
|
|
|
|
|
|
+ connector: { id: self.sourceType() }, // TODO: Migrate importer to connectors
|
|
|
name: tableName,
|
|
name: tableName,
|
|
|
columns: temporaryColumns,
|
|
columns: temporaryColumns,
|
|
|
sample: self.sample()
|
|
sample: self.sample()
|