mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
Fixed iframe filtering by not re-creating embed settings on URL change (#95997)
This commit is contained in:
parent
37e2aa3b9c
commit
3b3ad0ecaf
1 changed files with 5 additions and 5 deletions
|
@ -84,6 +84,7 @@ export async function mountApp({
|
|||
|
||||
const spacesApi = pluginsStart.spacesOss?.isSpacesAvailable ? pluginsStart.spacesOss : undefined;
|
||||
const activeSpaceId = spacesApi && (await spacesApi.activeSpace$.pipe(first()).toPromise())?.id;
|
||||
let globalEmbedSettings: DashboardEmbedSettings | undefined;
|
||||
|
||||
const dashboardServices: DashboardAppServices = {
|
||||
navigation,
|
||||
|
@ -149,9 +150,6 @@ export async function mountApp({
|
|||
const getDashboardEmbedSettings = (
|
||||
routeParams: ParsedQuery<string>
|
||||
): DashboardEmbedSettings | undefined => {
|
||||
if (!routeParams.embed) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
forceShowTopNavMenu: Boolean(routeParams[dashboardUrlParams.showTopMenu]),
|
||||
forceShowQueryInput: Boolean(routeParams[dashboardUrlParams.showQueryInput]),
|
||||
|
@ -162,11 +160,13 @@ export async function mountApp({
|
|||
|
||||
const renderDashboard = (routeProps: RouteComponentProps<{ id?: string }>) => {
|
||||
const routeParams = parse(routeProps.history.location.search);
|
||||
const embedSettings = getDashboardEmbedSettings(routeParams);
|
||||
if (routeParams.embed && !globalEmbedSettings) {
|
||||
globalEmbedSettings = getDashboardEmbedSettings(routeParams);
|
||||
}
|
||||
return (
|
||||
<DashboardApp
|
||||
history={routeProps.history}
|
||||
embedSettings={embedSettings}
|
||||
embedSettings={globalEmbedSettings}
|
||||
savedDashboardId={routeProps.match.params.id}
|
||||
redirectTo={(props: RedirectToProps) => redirect(routeProps, props)}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue