From 7faf5ad2692e0f5276d0ff2627e63cd48bc7ce34 Mon Sep 17 00:00:00 2001 From: Keda Ruan Date: Tue, 15 May 2018 09:35:08 -0700 Subject: [PATCH] [HUE-8308] [dashboard] Add ability for user to disable dashboard This patch added ability for user to specify dashboard is_enabled=false to disable dashboard. --- desktop/core/src/desktop/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/core/src/desktop/models.py b/desktop/core/src/desktop/models.py index f3923e9e92cdc8280ecf6d0b576d464ab2f53b10..54893a8a4c195277f26067c3361f7186eab19455 100644 --- a/desktop/core/src/desktop/models.py +++ b/desktop/core/src/desktop/models.py @@ -44,6 +44,7 @@ from settings import HUE_DESKTOP_VERSION from aws.conf import is_enabled as is_s3_enabled, has_s3_access from azure.conf import is_adls_enabled, has_adls_access from dashboard.conf import get_engines, HAS_REPORT_ENABLED +from dashboard.conf import IS_ENABLED as IS_DASHBOARD_ENABLED from kafka.conf import has_kafka from notebook.conf import SHOW_NOTEBOOKS, get_ordered_interpreters @@ -1691,7 +1692,7 @@ class ClusterConfig(): def _get_dashboard(self): interpreters = get_engines(self.user) - if interpreters and (self.cluster_type not in (DATAENG, ANALYTIC_DB)): + if IS_DASHBOARD_ENABLED.get() and interpreters and (self.cluster_type not in (DATAENG, ANALYTIC_DB)): _interpreters = [{ 'type': interpreter['type'], 'displayName': interpreter['type'].title(), -- 2.10.1 (Apple Git-78)