Browse Source

HUE-8330 [cluster] Add a flag in namespace API when there are [[clusters]]

Romain Rigaux 7 years ago
parent
commit
ffae85c8e1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      desktop/core/src/desktop/api2.py

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

@@ -79,7 +79,7 @@ def get_config(request):
 
 
 @api_error_handler
 @api_error_handler
 def get_context_namespaces(request, interface):
 def get_context_namespaces(request, interface):
-  response = {}
+  response = {'hasMulticluser': False}
   namespaces = []
   namespaces = []
 
 
   clusters = get_clusters(request.user).values()
   clusters = get_clusters(request.user).values()
@@ -99,6 +99,7 @@ def get_context_namespaces(request, interface):
           'status': namespace.get('status'),
           'status': namespace.get('status'),
         } for namespace in SdxApi(request.user).list_namespaces()]
         } for namespace in SdxApi(request.user).list_namespaces()]
       )
       )
+      response['hasMulticluser'] = True
 
 
   response[interface] = namespaces
   response[interface] = namespaces
   response['status'] = 0
   response['status'] = 0