mirror of https://github.com/buster-so/buster.git
update
This commit is contained in:
parent
7f7ddbe097
commit
33a119f29b
|
@ -77,6 +77,7 @@ export const useListVersionHistories = ({
|
||||||
metricId: assetId
|
metricId: assetId
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
onCloseVersionHistory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type === 'dashboard') {
|
if (type === 'dashboard') {
|
||||||
|
@ -88,6 +89,7 @@ export const useListVersionHistories = ({
|
||||||
dashboardId: assetId
|
dashboardId: assetId
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
onCloseVersionHistory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ export const useAppLayout = () => {
|
||||||
|
|
||||||
// Start the navigation
|
// Start the navigation
|
||||||
push(targetPath);
|
push(targetPath);
|
||||||
|
console.log('pushed', targetPath);
|
||||||
|
|
||||||
// Start checking for path changes
|
// Start checking for path changes
|
||||||
checkPathChange();
|
checkPathChange();
|
||||||
|
|
|
@ -23,7 +23,7 @@ export const VersionHistoryHeaderButtons: React.FC<{}> = ({}) => {
|
||||||
|
|
||||||
const onClickRestoreVersionPreflight = useMemoizedFn(async () => {
|
const onClickRestoreVersionPreflight = useMemoizedFn(async () => {
|
||||||
if (selectedQueryVersion) {
|
if (selectedQueryVersion) {
|
||||||
await onClickRestoreVersion(selectedQueryVersion, true);
|
await onClickRestoreVersion(selectedQueryVersion);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { useMemo } from 'react';
|
||||||
|
|
||||||
export const useCloseVersionHistory = () => {
|
export const useCloseVersionHistory = () => {
|
||||||
const onChangePage = useAppLayoutContextSelector((x) => x.onChangePage);
|
const onChangePage = useAppLayoutContextSelector((x) => x.onChangePage);
|
||||||
|
const closeSecondaryView = useChatLayoutContextSelector((x) => x.closeSecondaryView);
|
||||||
const chatId = useChatLayoutContextSelector((x) => x.chatId);
|
const chatId = useChatLayoutContextSelector((x) => x.chatId);
|
||||||
const metricId = useChatLayoutContextSelector((x) => x.metricId);
|
const metricId = useChatLayoutContextSelector((x) => x.metricId);
|
||||||
const dashboardId = useChatLayoutContextSelector((x) => x.dashboardId);
|
const dashboardId = useChatLayoutContextSelector((x) => x.dashboardId);
|
||||||
|
@ -36,6 +37,7 @@ export const useCloseVersionHistory = () => {
|
||||||
|
|
||||||
const onCloseVersionHistory = useMemoizedFn(() => {
|
const onCloseVersionHistory = useMemoizedFn(() => {
|
||||||
onChangePage(href);
|
onChangePage(href);
|
||||||
|
closeSecondaryView();
|
||||||
});
|
});
|
||||||
|
|
||||||
return { href, onCloseVersionHistory };
|
return { href, onCloseVersionHistory };
|
||||||
|
|
Loading…
Reference in New Issue