Эх сурвалжийг харах

HUE-8758 [connectors] Make optional the interface used in connector configuration

As it is the same as the one defined in the connector type properties.
Romain 5 жил өмнө
parent
commit
2814e1ed02

+ 1 - 1
desktop/core/src/desktop/conf.py

@@ -1941,7 +1941,7 @@ CONNECTORS = UnspecifiedConfigSection(
       ),
       INTERFACE=Config(
           "interface",
-          help=_("The class of connector to use to connect to the service."),
+          help=_("The class of connector to use to connect to the service (optional)."),
           default=None,
           type=str,
       ),

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

@@ -96,7 +96,7 @@ def _get_installed_connectors(category=None, categories=None, dialect=None, inte
           'nice_name': config_connectors[i].NICE_NAME.get() or i,
           'name': i,
           'dialect': config_connectors[i].DIALECT.get(),
-          'interface': config_connectors[i].INTERFACE.get(),
+          'interface': config_connectors[i].INTERFACE.get() or connector_type.get('interface'),
           'settings': config_connectors[i].SETTINGS.get(),
           'id': CONNECTOR_IDS,
           'category': connector_type['category'],