|
@@ -17,6 +17,7 @@
|
|
|
|
|
|
|
|
from django.utils.translation import ugettext as _, ugettext_lazy as _t
|
|
from django.utils.translation import ugettext as _, ugettext_lazy as _t
|
|
|
|
|
|
|
|
|
|
+from desktop.conf import is_hue4
|
|
|
from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection, coerce_bool
|
|
from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection, coerce_bool
|
|
|
from desktop.appmanager import get_apps_dict
|
|
from desktop.appmanager import get_apps_dict
|
|
|
from notebook.conf import get_ordered_interpreters
|
|
from notebook.conf import get_ordered_interpreters
|
|
@@ -25,8 +26,14 @@ from notebook.conf import get_ordered_interpreters
|
|
|
IS_ENABLED = Config(
|
|
IS_ENABLED = Config(
|
|
|
key="is_enabled",
|
|
key="is_enabled",
|
|
|
help=_t("Activate the Dashboard link in the menu."),
|
|
help=_t("Activate the Dashboard link in the menu."),
|
|
|
- default=True,
|
|
|
|
|
- private=True,
|
|
|
|
|
|
|
+ dynamic_default=is_hue4,
|
|
|
|
|
+ type=coerce_bool
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+HAS_SQL_ENABLED = Config(
|
|
|
|
|
+ key="has_sql_enabled",
|
|
|
|
|
+ help=_t("Activate the SQL Dashboard (beta)."),
|
|
|
|
|
+ dynamic_default=is_hue4,
|
|
|
type=coerce_bool
|
|
type=coerce_bool
|
|
|
)
|
|
)
|
|
|
|
|
|
|
@@ -65,7 +72,7 @@ def get_engines(user):
|
|
|
'nesting': settings.get('solr') and settings['solr'].get('nesting'),
|
|
'nesting': settings.get('solr') and settings['solr'].get('nesting'),
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- if 'beeswax' in apps or 'rdbms' in apps:
|
|
|
|
|
|
|
+ if HAS_SQL_ENABLED.get() and ('beeswax' in apps or 'rdbms' in apps):
|
|
|
engines += [{
|
|
engines += [{
|
|
|
'name': _('table (%s)') % interpreter['name'],
|
|
'name': _('table (%s)') % interpreter['name'],
|
|
|
'type': interpreter['type'],
|
|
'type': interpreter['type'],
|