From b0c5e8f4f9b3d8960a3c8f68daed9b2598ab1c4f Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Thu, 6 Oct 2022 11:22:13 -0300 Subject: [PATCH] Uses CROSS_REFERENCES feature flag --- .../components/ExploreChartHeader/index.jsx | 5 ++++- .../useExploreAdditionalActionsMenu/index.jsx | 20 ++++++++++--------- .../integration_tests/superset_test_config.py | 1 + 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx index e441a585e3e66..ab917ae6697f7 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx @@ -24,6 +24,8 @@ import { Tooltip } from 'src/components/Tooltip'; import { CategoricalColorNamespace, css, + FeatureFlag, + isFeatureEnabled, logging, SupersetClient, t, @@ -164,7 +166,8 @@ export const ExploreChartHeader = ({ ? t('Added to %s dashboard(s)', metadata.dashboards.length) : t('Not added to any dashboard'), description: - metadata.dashboards.length > 0 + metadata.dashboards.length > 0 && + isFeatureEnabled(FeatureFlag.CROSS_REFERENCES) ? t( 'To preview the list of dashboards go to "more" settings on the right.', ) diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx index fa794e871ce57..da66c609577b9 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx @@ -255,15 +255,17 @@ export const useExploreAdditionalActionsMenu = ( {t('Edit chart properties')} )} - - - + {isFeatureEnabled(FeatureFlag.CROSS_REFERENCES) && ( + + + + )} diff --git a/tests/integration_tests/superset_test_config.py b/tests/integration_tests/superset_test_config.py index 8f1ef27f2c396..b93e5cc15f033 100644 --- a/tests/integration_tests/superset_test_config.py +++ b/tests/integration_tests/superset_test_config.py @@ -71,6 +71,7 @@ "ALERT_REPORTS": True, "DASHBOARD_NATIVE_FILTERS": True, "DRILL_TO_DETAIL": True, + "CROSS_REFERENCES": True, } WEBDRIVER_BASEURL = "http://0.0.0.0:8081/"