Browse Source

HUE-8758 [connectors] Prevent kojs error on add new connector page

Romain 6 năm trước cách đây
mục cha
commit
6f41dff63b

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

@@ -1632,6 +1632,7 @@ USE_NEW_CHARTS = Config(
   help=_('Choose whether to use new charting library across the whole Hue.')
 )
 
+# Deprecated
 IS_MULTICLUSTER_ONLY = Config(
   key='is_multicluster_only',
   default=False,
@@ -1639,6 +1640,7 @@ IS_MULTICLUSTER_ONLY = Config(
   help=_('Choose whether to pick configs only from [desktop] [[cluster]]')
 )
 
+# Deprecated
 IS_K8S_ONLY = Config(
   key='is_k8s_only',
   default=False,

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

@@ -163,7 +163,7 @@ def get_installed_connectors(request):
 def new_connector(request, dialect):
   instance = _get_connector_by_type(dialect)
 
-  instance['nice_name'] = ''
+  instance['nice_name'] = dialect.title()
 
   return JsonResponse({'connector': instance})
 

+ 1 - 1
desktop/core/src/desktop/templates/connectors.mako

@@ -175,7 +175,7 @@ ${ layout.menubar(section='connectors') }
     <div data-bind="template: { name: 'add-connector-page' }"></div>
   <!-- /ko -->
 
-  <!-- ko if: section() == 'connector-page' -->
+  <!-- ko if: section() == 'connector-page' && $root.instance() -->
     <div data-bind="template: { name: 'connector-page', data: $root.instance() }"></div>
   <!-- /ko -->
 </div>