|
|
@@ -93,12 +93,11 @@ def get_context_namespaces(request, interface):
|
|
|
'name': cluster['name'],
|
|
|
'status': 'CREATED',
|
|
|
'computes': [cluster]
|
|
|
- } for cluster in clusters if cluster.get('type') == 'direct' and cluster['interface'] in (interface, 'all')
|
|
|
+ } for cluster in clusters if cluster.get('type') == 'direct'
|
|
|
])
|
|
|
|
|
|
if interface == 'hive' or interface == 'impala' or interface == 'report':
|
|
|
- # From Altus SDX
|
|
|
- if [cluster for cluster in clusters if 'altus' in cluster['type']]:
|
|
|
+ if get_cluster_config(request.user)['has_computes']:
|
|
|
# Note: attaching computes to namespaces might be done via the frontend in the future
|
|
|
if interface == 'impala':
|
|
|
if IS_K8S_ONLY.get():
|
|
|
@@ -146,7 +145,6 @@ def get_context_computes(request, interface):
|
|
|
computes = []
|
|
|
|
|
|
clusters = get_clusters(request.user).values()
|
|
|
- has_altus_clusters = [cluster for cluster in clusters if 'altus' in cluster['type'] or 'snowball' in cluster['type']]
|
|
|
|
|
|
# Currently broken if not sent
|
|
|
computes.extend([{
|
|
|
@@ -155,10 +153,10 @@ def get_context_computes(request, interface):
|
|
|
'namespace': cluster['id'],
|
|
|
'interface': interface,
|
|
|
'type': cluster['type']
|
|
|
- } for cluster in clusters if cluster.get('type') == 'direct' and cluster['interface'] in (interface, 'all')
|
|
|
+ } for cluster in clusters if cluster.get('type') == 'direct'
|
|
|
])
|
|
|
|
|
|
- if has_altus_clusters:
|
|
|
+ if get_cluster_config(request.user)['has_computes']:
|
|
|
if interface == 'impala' or interface == 'report':
|
|
|
if IS_K8S_ONLY.get():
|
|
|
dw_clusters = DataWarehouse2Api(request.user).list_clusters()['clusters']
|