You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2022/08/22 18:00:12 UTC
[superset] 08/19: Disable option in chart menu unless feature flag is set.
This is an automated email from the ASF dual-hosted git repository.
diegopucci pushed a commit to branch chore/e2e-tests-drilltodetail-modal
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 5980017c534557a585ce53b7e4de8a59dd20e959
Author: Cody Leff <co...@preset.io>
AuthorDate: Fri Aug 5 19:35:05 2022 -0400
Disable option in chart menu unless feature flag is set.
---
.../components/SliceHeaderControls/index.tsx | 39 +++++++++++-----------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
index 77d80199c1..fa246a8429 100644
--- a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
+++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
@@ -437,25 +437,26 @@ class SliceHeaderControls extends React.PureComponent<
</Menu.Item>
)}
- {this.props.supersetCanExplore && (
- <Menu.Item key={MENU_KEYS.DRILL_TO_DETAIL}>
- <DashboardChartModalTrigger
- exploreUrl={this.props.exploreUrl}
- triggerNode={
- <span data-test="view-query-menu-item">
- {t('Drill to detail')}
- </span>
- }
- modalTitle={t('Drill to detail: %s', slice.slice_name)}
- modalBody={
- <DrillDetailPane
- datasource={this.props.slice.datasource}
- queryFormData={this.props.formData}
- />
- }
- />
- </Menu.Item>
- )}
+ {isFeatureEnabled(FeatureFlag.DRILL_TO_DETAIL) &&
+ this.props.supersetCanExplore && (
+ <Menu.Item key={MENU_KEYS.DRILL_TO_DETAIL}>
+ <DashboardChartModalTrigger
+ exploreUrl={this.props.exploreUrl}
+ triggerNode={
+ <span data-test="view-query-menu-item">
+ {t('Drill to detail')}
+ </span>
+ }
+ modalTitle={t('Drill to detail: %s', slice.slice_name)}
+ modalBody={
+ <DrillDetailPane
+ datasource={this.props.slice.datasource}
+ queryFormData={this.props.formData}
+ />
+ }
+ />
+ </Menu.Item>
+ )}
{(slice.description || this.props.supersetCanExplore) && (
<Menu.Divider />