Przeglądaj źródła

HUE-3945 [core] Allow to disable the 'beeswax' app

Romain Rigaux 9 lat temu
rodzic
commit
79feae7

+ 0 - 3
desktop/core/src/desktop/templates/common_header.mako

@@ -465,9 +465,6 @@ if USE_NEW_EDITOR.get():
          <a title="${_('Query data')}" rel="navigator-tooltip" href="#" data-toggle="dropdown" class="dropdown-toggle">Query Editors <b class="caret"></b></a>
          <ul role="menu" class="dropdown-menu">
            % if 'beeswax' in apps:
-             <%
-               from desktop.conf import USE_NEW_EDITOR
-             %>
              % if USE_NEW_EDITOR.get():
              <li><a href="${ url('notebook:editor') }?type=hive"><img src="${ static(apps['beeswax'].icon_path) }" class="app-icon"/> ${_('Hive')}</a></li>
              % else:

+ 2 - 2
desktop/libs/notebook/src/notebook/connectors/hiveserver2.py

@@ -100,7 +100,7 @@ class HiveConfiguration(object):
       "key": "settings",
       "help_text": _("Hive and Hadoop configuration properties."),
       "type": "settings",
-      "options": [config.lower() for config in hive_settings.get()]
+      "options": [config.lower() for config in hive_settings.get()] if hasattr(hive_settings, 'get') else []
     }
   ]
 
@@ -118,7 +118,7 @@ class ImpalaConfiguration(object):
       "key": "settings",
       "help_text": _("Impala configuration properties."),
       "type": "settings",
-      "options": [config.lower() for config in impala_settings.get()] if impala_settings is not None else []
+      "options": [config.lower() for config in impala_settings.get()] if impala_settings else []
     }
   ]