This is an automated email from the ASF dual-hosted git repository.

vavila pushed a commit to branch fix/include-urlParam-dashboard-download
in repository https://gitbox.apache.org/repos/asf/superset.git

commit e7ed799700c4b3319486597dee10e273377baabf
Author: Vitor Avila <[email protected]>
AuthorDate: Tue Oct 22 13:46:12 2024 -0300

    fix(dashboard): Include  in the screenshot generation
---
 .../dashboard/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 88e333abf9..85f3e1d2c4 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 2858d65a7d..49fab2dd1f 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))

Reply via email to