Explorar el Código

HUE-8616 [cluster] getNamespaces for impala returns namespace with hive compute

Romain Rigaux hace 7 años
padre
commit
4b763ca
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      desktop/core/src/desktop/api2.py

+ 2 - 2
desktop/core/src/desktop/api2.py

@@ -88,7 +88,7 @@ def get_context_namespaces(request, interface):
       'name': cluster['name'],
       'status': 'CREATED',
       'computes': [cluster]
-    } for cluster in clusters if cluster.get('type') == 'direct'
+    } for cluster in clusters if cluster.get('type') == 'direct' and cluster['interface'] in (interface, 'all')
   ])
 
   if interface == 'hive' or interface == 'impala' or interface == 'report':
@@ -146,7 +146,7 @@ def get_context_computes(request, interface):
         'namespace': cluster['id'],
         'interface': interface,
         'type': cluster['type']
-      } for cluster in clusters if cluster.get('type') == 'direct'
+      } for cluster in clusters if cluster.get('type') == 'direct' and cluster['interface'] in (interface, 'all')
     ])
 
   if interface == 'impala' or interface == 'report':