eschutho commented on code in PR #29096: URL: https://github.com/apache/superset/pull/29096#discussion_r1678593041
########## superset-frontend/src/features/alerts/AlertReportModal.tsx: ########## @@ -774,6 +798,28 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({ [], ); + const dashboard = currentAlert?.dashboard; + useEffect(() => { + if (!tabsEnabled) return; + + if (dashboard?.value) { + SupersetClient.get({ + endpoint: `/api/v1/dashboard/${dashboard.value}/tabs`, + }).then(response => { + const tabTree = response.json.result.tab_tree; + const allTabs = response.json.result.all_tabs; + + setTabOptions(tabTree); + const currentAnchor = currentAlert?.extra?.dashboard?.anchor; + if (currentAnchor) { + if (!(currentAnchor in allTabs)) { Review Comment: can you combine these two lines into one if statement? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org