You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by kg...@apache.org on 2022/04/19 15:47:53 UTC
[superset] branch master updated: fix(explore): Double divider if no permissions for adding reports (#19777)
This is an automated email from the ASF dual-hosted git repository.
kgabryje pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 3663a33f14 fix(explore): Double divider if no permissions for adding reports (#19777)
3663a33f14 is described below
commit 3663a33f14ef4bc3792e0a4089c3edd244f158ff
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Tue Apr 19 17:47:35 2022 +0200
fix(explore): Double divider if no permissions for adding reports (#19777)
---
.../ExploreAdditionalActionsMenu/index.jsx | 52 ++++++++++++----------
1 file changed, 28 insertions(+), 24 deletions(-)
diff --git a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx
index f02ab01622..fa9b54acf5 100644
--- a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx
+++ b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx
@@ -370,31 +370,35 @@ const ExploreAdditionalActionsMenu = ({
</Menu.Item>
</Menu.SubMenu>
<Menu.Divider />
- {canAddReports &&
- (report ? (
- <Menu.SubMenu
- title={t('Manage email report')}
- key={MENU_KEYS.REPORT_SUBMENU}
- >
- <Menu.Item key={MENU_KEYS.SET_REPORT_ACTIVE}>
- <MenuItemWithCheckboxContainer>
- <Checkbox checked={isReportActive} onChange={noOp} />
- {t('Email reports active')}
- </MenuItemWithCheckboxContainer>
- </Menu.Item>
- <Menu.Item key={MENU_KEYS.EDIT_REPORT}>
- {t('Edit email report')}
- </Menu.Item>
- <Menu.Item key={MENU_KEYS.DELETE_REPORT}>
- {t('Delete email report')}
+ {canAddReports && (
+ <>
+ {report ? (
+ <Menu.SubMenu
+ title={t('Manage email report')}
+ key={MENU_KEYS.REPORT_SUBMENU}
+ >
+ <Menu.Item key={MENU_KEYS.SET_REPORT_ACTIVE}>
+ <MenuItemWithCheckboxContainer>
+ <Checkbox checked={isReportActive} onChange={noOp} />
+ {t('Email reports active')}
+ </MenuItemWithCheckboxContainer>
+ </Menu.Item>
+ <Menu.Item key={MENU_KEYS.EDIT_REPORT}>
+ {t('Edit email report')}
+ </Menu.Item>
+ <Menu.Item key={MENU_KEYS.DELETE_REPORT}>
+ {t('Delete email report')}
+ </Menu.Item>
+ </Menu.SubMenu>
+ ) : (
+ <Menu.Item key={MENU_KEYS.SET_UP_REPORT}>
+ {t('Set up an email report')}
</Menu.Item>
- </Menu.SubMenu>
- ) : (
- <Menu.Item key={MENU_KEYS.SET_UP_REPORT}>
- {t('Set up an email report')}
- </Menu.Item>
- ))}
- <Menu.Divider />
+ )}
+ <Menu.Divider />
+ </>
+ )}
+
<Menu.Item key={MENU_KEYS.VIEW_QUERY}>
<ModalTrigger
triggerNode={