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

vavila 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 16981d6316 fix(dashboard): Include `urlParams` in the screenshot 
generation (#30675)
16981d6316 is described below

commit 16981d63169507b39615ca9037f3b36baafba3c0
Author: Vitor Avila <[email protected]>
AuthorDate: Wed Oct 23 16:30:34 2024 -0300

    fix(dashboard): Include `urlParams` in the screenshot generation (#30675)
---
 .../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