From e7ed799700c4b3319486597dee10e273377baabf Mon Sep 17 00:00:00 2001 From: Vitor Avila Date: Tue, 22 Oct 2024 13:46:12 -0300 Subject: [PATCH] fix(dashboard): Include in the screenshot generation --- .../components/menu/DownloadMenuItems/DownloadScreenshot.tsx | 2 ++ superset-frontend/src/utils/urlUtils.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx index 88e333abf9e7d..85f3e1d2c4962 100644 --- a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx +++ b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx @@ -32,6 +32,7 @@ import { RootState } from 'src/dashboard/types'; import { useSelector } from 'react-redux'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { last } from 'lodash'; +import { getDashboardUrlParams } from 'src/utils/urlUtils'; import { DownloadScreenshotFormat } from './types'; const RETRY_INTERVAL = 3000; @@ -127,6 +128,7 @@ export default function DownloadScreenshot({ anchor, activeTabs, dataMask, + urlParams: getDashboardUrlParams(), }, }) .then(({ json }) => { diff --git a/superset-frontend/src/utils/urlUtils.ts b/superset-frontend/src/utils/urlUtils.ts index 2858d65a7de1c..49fab2dd1f109 100644 --- a/superset-frontend/src/utils/urlUtils.ts +++ b/superset-frontend/src/utils/urlUtils.ts @@ -123,7 +123,7 @@ function getChartUrlParams(excludedUrlParams?: string[]): UrlParamEntries { return getUrlParamEntries(urlParams); } -function getDashboardUrlParams(): UrlParamEntries { +export function getDashboardUrlParams(): UrlParamEntries { const urlParams = getUrlParams(RESERVED_DASHBOARD_URL_PARAMS); const filterBoxFilters = getActiveFilters(); if (!isEmpty(filterBoxFilters))