Skip to content

Commit

Permalink
fix(dashboard): Include urlParams in the screenshot generation (#30675
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Vitor-Avila authored Oct 23, 2024
1 parent 34131c2 commit 16981d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -127,6 +128,7 @@ export default function DownloadScreenshot({
anchor,
activeTabs,
dataMask,
urlParams: getDashboardUrlParams(),
},
})
.then(({ json }) => {
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/utils/urlUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 16981d6

Please sign in to comment.