|
@@ -360,7 +360,7 @@ ${ assist.assistPanel() }
|
|
|
</label>
|
|
</label>
|
|
|
|
|
|
|
|
<label class="control-label"><div>${ _('Password') }</div>
|
|
<label class="control-label"><div>${ _('Password') }</div>
|
|
|
- <input type="text" class="input-xxlarge" data-bind="value: createWizard.source.publicStreamsPassword">
|
|
|
|
|
|
|
+ <input type="password" class="input-xxlarge" data-bind="value: createWizard.source.publicStreamsPassword">
|
|
|
</label>
|
|
</label>
|
|
|
|
|
|
|
|
<label class="control-label"><div>${ _('Token') }</div>
|
|
<label class="control-label"><div>${ _('Token') }</div>
|
|
@@ -375,6 +375,12 @@ ${ assist.assistPanel() }
|
|
|
<input type="text" class="input-xxlarge" data-bind="value: createWizard.source.publicStreamsObject">
|
|
<input type="text" class="input-xxlarge" data-bind="value: createWizard.source.publicStreamsObject">
|
|
|
</label>
|
|
</label>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="control-group">
|
|
|
|
|
+ <button class="btn" data-bind="click: createWizard.source.publicStreamsCheckConnection">
|
|
|
|
|
+ ${_('Test')}
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
|
|
@@ -1499,10 +1505,10 @@ ${ assist.assistPanel() }
|
|
|
$.post("${ url('indexer:get_db_component') }", {
|
|
$.post("${ url('indexer:get_db_component') }", {
|
|
|
"source": ko.mapping.toJSON(self)
|
|
"source": ko.mapping.toJSON(self)
|
|
|
}, function (resp) {
|
|
}, function (resp) {
|
|
|
- if(resp.status == 0 && resp.data) {
|
|
|
|
|
|
|
+ if (resp.status == 0 && resp.data) {
|
|
|
self.rdbmsDbIsValid(true);
|
|
self.rdbmsDbIsValid(true);
|
|
|
self.rdbmsDatabaseNames(resp.data);
|
|
self.rdbmsDatabaseNames(resp.data);
|
|
|
- } else if(resp.status == 1) {
|
|
|
|
|
|
|
+ } else if (resp.status == 1) {
|
|
|
$(document).trigger("error", "${ _('Connection Failed: ') }" + resp.message);
|
|
$(document).trigger("error", "${ _('Connection Failed: ') }" + resp.message);
|
|
|
self.rdbmsDbIsValid(false);
|
|
self.rdbmsDbIsValid(false);
|
|
|
}
|
|
}
|
|
@@ -1560,6 +1566,18 @@ ${ assist.assistPanel() }
|
|
|
self.publicStreamsToken = ko.observable('');
|
|
self.publicStreamsToken = ko.observable('');
|
|
|
self.publicStreamsEndpointUrl = ko.observable('');
|
|
self.publicStreamsEndpointUrl = ko.observable('');
|
|
|
self.publicStreamsObject = ko.observable('');
|
|
self.publicStreamsObject = ko.observable('');
|
|
|
|
|
+ self.publicStreamsCheckConnection = function() {
|
|
|
|
|
+ $.post("${ url('indexer:get_db_component') }", {
|
|
|
|
|
+ "source": ko.mapping.toJSON(self)
|
|
|
|
|
+ }, function (resp) {
|
|
|
|
|
+ if (resp.status == 0 && resp.data) {
|
|
|
|
|
+ huePubSub.publish('notebook.task.submitted', resp.history_uuid);
|
|
|
|
|
+ } else if (resp.status == 1) {
|
|
|
|
|
+ $(document).trigger("error", "${ _('Connection Failed: ') }" + resp.message);
|
|
|
|
|
+ self.rdbmsDbIsValid(false);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
|
|
|
|
|
self.format = ko.observable();
|
|
self.format = ko.observable();
|
|
@@ -1826,11 +1844,6 @@ ${ assist.assistPanel() }
|
|
|
return self.outputFormat() == 'table' && self.name().indexOf('.') > 0 ? self.name().split('.', 2)[0] : (self.name() !== '' ? self.name() : 'default');
|
|
return self.outputFormat() == 'table' && self.name().indexOf('.') > 0 ? self.name().split('.', 2)[0] : (self.name() !== '' ? self.name() : 'default');
|
|
|
});
|
|
});
|
|
|
self.tableFormat = ko.observable('text');
|
|
self.tableFormat = ko.observable('text');
|
|
|
- self.tableFormat.subscribe(function(newVal) {
|
|
|
|
|
- if (newVal == 'kudu' && self.kuduPartitionColumns().length == 0) {
|
|
|
|
|
- self.kuduPartitionColumns.push(ko.mapping.fromJS(self.KUDU_DEFAULT_PARTITION_COLUMN));
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
self.KUDU_DEFAULT_RANGE_PARTITION_COLUMN = {values: [{value: ''}], name: 'VALUES', lower_val: 0, include_lower_val: '<=', upper_val: 1, include_upper_val: '<='};
|
|
self.KUDU_DEFAULT_RANGE_PARTITION_COLUMN = {values: [{value: ''}], name: 'VALUES', lower_val: 0, include_lower_val: '<=', upper_val: 1, include_upper_val: '<='};
|
|
|
self.KUDU_DEFAULT_PARTITION_COLUMN = {columns: [], range_partitions: [self.KUDU_DEFAULT_RANGE_PARTITION_COLUMN], name: 'HASH', int_val: 16};
|
|
self.KUDU_DEFAULT_PARTITION_COLUMN = {columns: [], range_partitions: [self.KUDU_DEFAULT_RANGE_PARTITION_COLUMN], name: 'HASH', int_val: 16};
|
|
|
|
|
|
|
@@ -1981,7 +1994,7 @@ ${ assist.assistPanel() }
|
|
|
);
|
|
);
|
|
|
var isTargetAlreadyExisting = ! self.destination.isTargetExisting() || self.destination.outputFormat() == 'index';
|
|
var isTargetAlreadyExisting = ! self.destination.isTargetExisting() || self.destination.outputFormat() == 'index';
|
|
|
var isValidTable = self.destination.outputFormat() != 'table' || (
|
|
var isValidTable = self.destination.outputFormat() != 'table' || (
|
|
|
- self.destination.tableFormat() != 'kudu' || (self.destination.kuduPartitionColumns().length > 0 &&
|
|
|
|
|
|
|
+ self.destination.tableFormat() != 'kudu' || (
|
|
|
$.grep(self.destination.kuduPartitionColumns(), function(partition) { return partition.columns().length > 0 }).length == self.destination.kuduPartitionColumns().length && self.destination.primaryKeys().length > 0)
|
|
$.grep(self.destination.kuduPartitionColumns(), function(partition) { return partition.columns().length > 0 }).length == self.destination.kuduPartitionColumns().length && self.destination.primaryKeys().length > 0)
|
|
|
);
|
|
);
|
|
|
var validIndexFields = self.destination.outputFormat() != 'index' || ($.grep(self.destination.columns(), function(column) {
|
|
var validIndexFields = self.destination.outputFormat() != 'index' || ($.grep(self.destination.columns(), function(column) {
|