fix(screenshots): dashboard screenshots do not capture filter state (#29989)
This commit is contained in:
parent
cb23d6f1a8
commit
7db34b994e
|
|
@ -44,9 +44,19 @@ export default function DownloadScreenshot({
|
||||||
logEvent?: Function;
|
logEvent?: Function;
|
||||||
format: string;
|
format: string;
|
||||||
}) {
|
}) {
|
||||||
const anchor = useSelector(
|
const activeTabs = useSelector(
|
||||||
(state: RootState) => last(state.dashboardState.activeTabs) || undefined,
|
(state: RootState) => state.dashboardState.activeTabs || undefined,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const anchor = useSelector(
|
||||||
|
(state: RootState) =>
|
||||||
|
last(state.dashboardState.directPathToChild) || undefined,
|
||||||
|
);
|
||||||
|
|
||||||
|
const dataMask = useSelector(
|
||||||
|
(state: RootState) => state.dataMask || undefined,
|
||||||
|
);
|
||||||
|
|
||||||
const { addDangerToast, addSuccessToast, addInfoToast } = useToasts();
|
const { addDangerToast, addSuccessToast, addInfoToast } = useToasts();
|
||||||
|
|
||||||
const onDownloadScreenshot = () => {
|
const onDownloadScreenshot = () => {
|
||||||
|
|
@ -106,6 +116,8 @@ export default function DownloadScreenshot({
|
||||||
endpoint: `/api/v1/dashboard/${dashboardId}/cache_dashboard_screenshot`,
|
endpoint: `/api/v1/dashboard/${dashboardId}/cache_dashboard_screenshot`,
|
||||||
jsonPayload: {
|
jsonPayload: {
|
||||||
anchor,
|
anchor,
|
||||||
|
activeTabs,
|
||||||
|
dataMask,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(({ json }) => {
|
.then(({ json }) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue