浏览代码

HUE-8758 [connectors] Add connector dialect to get_config editor

Romain 6 年之前
父节点
当前提交
ad67850045
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/lib/connectors/api.py
  2. 2 0
      desktop/core/src/desktop/models.py

+ 1 - 1
desktop/core/src/desktop/lib/connectors/api.py

@@ -123,7 +123,7 @@ CONNECTOR_INSTANCES = [{
     'dialect': Hive().TYPE, 'interface': Hive().INTERFACE, 'settings': Hive().PROPERTIES, 'is_sql': True, 'id': 3, 'category': 'editor', 'description': ''
   }, {
     'nice_name': 'MySQL', 'name': 'mysql-1',
-    'dialect': 'sql-alchemy', 'interface': 'sqlalchemy', 'settings': [], 'is_sql': True, 'id': 4, 'category': 'editor', 'description': ''
+    'dialect': 'mysql', 'interface': 'sqlalchemy', 'settings': [], 'is_sql': True, 'id': 4, 'category': 'editor', 'description': ''
   },
 ]
 

+ 2 - 0
desktop/core/src/desktop/models.py

@@ -1671,6 +1671,7 @@ class ClusterConfig():
           'tooltip': _('%s Query') % interpreter['type'].title(),
           'page': '/editor/?type=%(type)s' % interpreter,
           'is_sql': interpreter['is_sql'],
+          'dialect': interpreter['dialect'],
         })
 
     if SHOW_NOTEBOOKS.get() and ANALYTIC_DB not in self.cluster_type:
@@ -1686,6 +1687,7 @@ class ClusterConfig():
         'tooltip': _('Notebook'),
         'page': '/notebook',
         'is_sql': False,
+        'dialect': 'notebook'
       })
 
     if interpreters: