fix(Dashboard): Exclude edit param in async screenshot (#30962)

This commit is contained in:
Geido 2024-11-18 16:34:23 +02:00 committed by GitHub
parent e528cb48c4
commit 1b63b8f3c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -156,7 +156,7 @@ export default function DownloadScreenshot({
anchor,
activeTabs,
dataMask,
urlParams: getDashboardUrlParams(),
urlParams: getDashboardUrlParams(['edit']),
},
})
.then(({ json }) => {

View File

@ -123,8 +123,13 @@ function getChartUrlParams(excludedUrlParams?: string[]): UrlParamEntries {
return getUrlParamEntries(urlParams);
}
export function getDashboardUrlParams(): UrlParamEntries {
const urlParams = getUrlParams(RESERVED_DASHBOARD_URL_PARAMS);
export function getDashboardUrlParams(
extraExcludedParams: string[] = [],
): UrlParamEntries {
const urlParams = getUrlParams([
...RESERVED_DASHBOARD_URL_PARAMS,
...extraExcludedParams,
]);
const filterBoxFilters = getActiveFilters();
if (!isEmpty(filterBoxFilters))
urlParams.append(