fix(dashboard): Include `urlParams` in the screenshot generation (#30675)

This commit is contained in:
Vitor Avila 2024-10-23 16:30:34 -03:00 committed by GitHub
parent 34131c2948
commit 16981d6316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -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 }) => {

View File

@ -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))