فهرست منبع

HUE-8685 [importer] DB importer always shows DB already exists

jdesjean 6 سال پیش
والد
کامیت
8d66b0b
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      desktop/libs/indexer/src/indexer/templates/importer.mako

+ 3 - 3
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -2135,7 +2135,7 @@ ${ assist.assistPanel() }
 
     var Destination = function (vm, wizard) {
       var self = this;
-      self.sourceType = vm.sourceType;
+      self.apiHelperType = self.sourceType = vm.sourceType;
 
       self.name = ko.observable('').extend({ throttle: 500 });
       self.nameChanged = function(name) {
@@ -2147,10 +2147,10 @@ ${ assist.assistPanel() }
               sourceType: self.sourceType,
               compute: wizard.compute(),
               namespace: wizard.namespace(),
-              path: self.outputFormat() === 'table' ? [self.databaseName(), self.tableName()] : [self.databaseName()],
+              path: self.outputFormat() === 'table' ? [self.databaseName(), self.tableName()] : [],
             }).done(function (catalogEntry) {
               catalogEntry.getSourceMeta({ silenceErrors: true }).done(function (sourceMeta) {
-                self.isTargetExisting(!sourceMeta.notFound);
+                self.isTargetExisting((sourceMeta.databases || []).indexOf(self.databaseName()) >= 0);
                 self.isTargetChecking(false);
               }).fail(function () {
                 self.isTargetExisting(false);