Преглед изворни кода

HUE-6540 [importer] Create database errors and does not land on the new db page

Romain Rigaux пре 8 година
родитељ
комит
69e46f7

+ 1 - 1
desktop/libs/indexer/src/indexer/api3.py

@@ -198,7 +198,7 @@ def create_database(request, source, destination, start_time):
   on_success_url = reverse('metastore:show_tables', kwargs={'database': database})
 
   notebook = make_notebook(
-      name='Execute and watch',
+      name=_('Creating database %(name)s') % destination,
       editor_type=editor_type,
       statement=sql,
       status='ready',

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

@@ -509,7 +509,7 @@ ${ assist.assistPanel() }
               <i class="fa fa-spinner fa-spin"></i>
             </span>
             <span class="help-inline muted" data-bind="visible: ! $parent.createWizard.isValidDestination()">
-              <i class="fa fa-warning" style="color: #c09853"></i> ${ _('Invalid characters') }
+              <i class="fa fa-warning" style="color: #c09853"></i> ${ _('Empty name or invalid characters') }
             </span>
             <span class="help-inline muted" data-bind="visible: isTargetExisting()">
               <!-- ko if: outputFormat() == 'index' -->
@@ -1713,7 +1713,7 @@ ${ assist.assistPanel() }
           "start_time": ko.mapping.toJSON((new Date()).getTime())
         }, function (resp) {
           if (resp.history_uuid) {
-            $.jHueNotify.info("${ _('Task ') }" + resp.history_uuid + "${_(' submitted.') }");
+            $.jHueNotify.info("${ _('Task submitted.') }");
             huePubSub.publish('notebook.task.submitted', resp.history_uuid);
           } else {
             $(document).trigger("error", resp && resp.message ? resp.message : '${ _("Error importing") }');

+ 1 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -343,7 +343,7 @@ var EditorViewModel = (function() {
     };
 
     huePubSub.subscribe('assist.db.refresh', function (options) {
-      if (options.sourceTypes.indexOf(self.type()) !== -1) {
+      if (['hive', 'impala'].indexOf(self.type()) !== -1) {
         updateDatabases();
       }
     }, 'editor');