Преглед изворни кода

HUE-6176 [frontend] Load the left menu properly from the cluster config

Romain Rigaux пре 8 година
родитељ
комит
0a5e45f

+ 0 - 3
apps/jobbrowser/src/jobbrowser/apis/base_api.py

@@ -30,7 +30,6 @@ def get_api(user, interface):
   from jobbrowser.apis.bundle_api import BundleApi
   from jobbrowser.apis.job_api import JobApi
   from jobbrowser.apis.schedule_api import ScheduleApi
-  from jobbrowser.apis.slas_api import SlaApi
   from jobbrowser.apis.workflow_api import WorkflowApi
 
   if interface == 'jobs':
@@ -41,8 +40,6 @@ def get_api(user, interface):
     return ScheduleApi(user)
   elif interface == 'bundles':
     return BundleApi(user)
-  elif interface == 'slas':
-    return SlaApi(user)
   else:
     raise PopupException(_('Interface %s is unknown') % interface)
 

+ 3 - 2
desktop/core/src/desktop/templates/hue.mako

@@ -1146,12 +1146,13 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
             }
           });
 
-          var clusterConfig = topNavViewModel.clusterConfig();
 
-          if (! clusterConfig) {
+          if (! topNavViewModel.clusterConfig()) {
             return items;
           }
 
+          var clusterConfig = topNavViewModel.clusterConfig()['app_config'];
+
           var appsItems = [];
           $.each(['editor', 'dashboard', 'scheduler'], function(index, appName) {
             if (clusterConfig[appName]) {