[8.0] Reverse parent child context relationship (#125486) (#125670)

* Reverse parent child context relationship (#125486)

* reverse parent child context relationship

* bad merge

* ts

* ts

* fix jest

* try unblocking flaky test

* doc

(cherry picked from commit 724e3b2ebf)

# Conflicts:
#	docs/user/troubleshooting/trace-query.asciidoc
#	src/plugins/discover/public/embeddable/saved_search_embeddable.tsx
#	src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx
#	x-pack/plugins/lens/public/embeddable/embeddable.tsx

* backport fixes

* ts

* skip

* es
This commit is contained in:
Liza Katz 2022-02-16 13:14:52 +02:00 committed by GitHub
parent c728309cb6
commit 38c6c85855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 261 additions and 221 deletions

View file

@ -13,8 +13,8 @@ export declare type KibanaExecutionContext = {
readonly type: string;
readonly name: string;
readonly id: string;
readonly description: string;
readonly description?: string;
readonly url?: string;
parent?: KibanaExecutionContext;
child?: KibanaExecutionContext;
};
```

View file

@ -13,8 +13,8 @@ export declare type KibanaExecutionContext = {
readonly type: string;
readonly name: string;
readonly id: string;
readonly description: string;
readonly description?: string;
readonly url?: string;
parent?: KibanaExecutionContext;
child?: KibanaExecutionContext;
};
```

View file

@ -29,26 +29,26 @@ describe('KibanaExecutionContext', () => {
`);
});
it('includes a parent context to string representation', () => {
const parentContext: KibanaExecutionContext = {
type: 'parent-type',
name: 'parent-name',
id: '41',
description: 'parent-descripton',
it('includes a child context to string representation', () => {
const childContext: KibanaExecutionContext = {
type: 'child-test-type',
name: 'child-test-name',
id: '42',
description: 'child-test-descripton',
};
const context: KibanaExecutionContext = {
type: 'test-type',
name: 'test-name',
id: '42',
description: 'test-descripton',
parent: parentContext,
type: 'type',
name: 'name',
id: '41',
description: 'descripton',
child: childContext,
};
const value = new ExecutionContextContainer(context).toHeader();
expect(value).toMatchInlineSnapshot(`
Object {
"x-kbn-context": "%7B%22type%22%3A%22test-type%22%2C%22name%22%3A%22test-name%22%2C%22id%22%3A%2242%22%2C%22description%22%3A%22test-descripton%22%2C%22parent%22%3A%7B%22type%22%3A%22parent-type%22%2C%22name%22%3A%22parent-name%22%2C%22id%22%3A%2241%22%2C%22description%22%3A%22parent-descripton%22%7D%7D",
"x-kbn-context": "%7B%22type%22%3A%22type%22%2C%22name%22%3A%22name%22%2C%22id%22%3A%2241%22%2C%22description%22%3A%22descripton%22%2C%22child%22%3A%7B%22type%22%3A%22child-test-type%22%2C%22name%22%3A%22child-test-name%22%2C%22id%22%3A%2242%22%2C%22description%22%3A%22child-test-descripton%22%7D%7D",
}
`);
});
@ -103,35 +103,35 @@ describe('KibanaExecutionContext', () => {
});
it('returns JSON representation when the parent context if provided', () => {
const parentAContext: KibanaExecutionContext = {
type: 'parent-a-type',
name: 'parent-a-name',
id: '40',
description: 'parent-a-descripton',
const childBContext: KibanaExecutionContext = {
type: 'child-b-type',
name: 'child-b-name',
id: '42',
description: 'child-b-descripton',
};
const parentBContext: KibanaExecutionContext = {
type: 'parent-b-type',
name: 'parent-b-name',
const childAContext: KibanaExecutionContext = {
type: 'child-a-type',
name: 'child-a-name',
id: '41',
description: 'parent-b-descripton',
parent: parentAContext,
description: 'child-a-descripton',
child: childBContext,
};
const context: KibanaExecutionContext = {
type: 'test-type',
name: 'test-name',
id: '42',
description: 'test-descripton',
parent: parentBContext,
type: 'type',
name: 'name',
id: '40',
description: 'descripton',
child: childAContext,
};
const value = new ExecutionContextContainer(context).toJSON();
expect(value).toEqual({
...context,
parent: {
...parentBContext,
parent: parentAContext,
child: {
...childAContext,
child: childBContext,
},
});
});

View file

@ -1073,9 +1073,9 @@ export type KibanaExecutionContext = {
readonly type: string;
readonly name: string;
readonly id: string;
readonly description: string;
readonly description?: string;
readonly url?: string;
parent?: KibanaExecutionContext;
child?: KibanaExecutionContext;
};
// @public

View file

@ -16,11 +16,24 @@ import {
describe('KibanaExecutionContext', () => {
describe('constructor', () => {
it('allows context to define parent explicitly', () => {
it('allows context be defined without a parent', () => {
const parentContext: KibanaExecutionContext = {
type: 'parent-type',
name: 'parent-name',
id: '44',
type: 'test-type',
name: 'test-name',
id: '42',
description: 'parent-descripton',
};
const container = new ExecutionContextContainer(parentContext);
const value = container.toJSON();
expect(value.child).toBeUndefined();
});
it('allows context to be called with parent explicitly', () => {
const parentContext: KibanaExecutionContext = {
type: 'test-type',
name: 'test-name',
id: '42',
description: 'parent-descripton',
};
const parentContainer = new ExecutionContextContainer(parentContext);
@ -30,16 +43,17 @@ describe('KibanaExecutionContext', () => {
name: 'test-name',
id: '42',
description: 'test-descripton',
parent: {
type: 'custom-parent-type',
name: 'custom-parent-name',
child: {
type: 'custom-child-type',
name: 'custom-child-name',
id: '41',
description: 'custom-parent-descripton',
description: 'custom-child-descripton',
},
};
const value = new ExecutionContextContainer(context, parentContainer).toJSON();
expect(value).toEqual(context);
expect(value.id).toEqual(parentContext.id);
expect(value.child).toEqual(context);
});
});
@ -56,24 +70,25 @@ describe('KibanaExecutionContext', () => {
expect(value).toBe('test-type:test-name:42');
});
it('includes a parent context to string representation', () => {
const parentContext: KibanaExecutionContext = {
type: 'parent-type',
name: 'parent-name',
id: '41',
description: 'parent-descripton',
};
const parentContainer = new ExecutionContextContainer(parentContext);
it('includes a child context to string representation', () => {
const context: KibanaExecutionContext = {
type: 'test-type',
name: 'test-name',
type: 'type',
name: 'name',
id: '41',
description: 'descripton',
};
const childContext: KibanaExecutionContext = {
type: 'child-test-type',
name: 'child-test-name',
id: '42',
description: 'test-descripton',
};
const value = new ExecutionContextContainer(context, parentContainer).toString();
expect(value).toBe('parent-type:parent-name:41;test-type:test-name:42');
const contextContainer = new ExecutionContextContainer(context);
const value = new ExecutionContextContainer(childContext, contextContainer).toString();
expect(value).toBe('type:name:41;child-test-type:child-test-name:42');
});
it('returns an escaped string representation of provided execution contextStringified', () => {
@ -115,24 +130,24 @@ describe('KibanaExecutionContext', () => {
expect(value).toEqual(context);
});
it('returns a context object with registered parent object', () => {
const parentContext: KibanaExecutionContext = {
type: 'parent-type',
name: 'parent-name',
id: '41',
description: 'parent-descripton',
};
const parentContainer = new ExecutionContextContainer(parentContext);
it('returns a context object with registered context object', () => {
const context: KibanaExecutionContext = {
type: 'test-type',
name: 'test-name',
type: 'type',
name: 'name',
id: '41',
description: 'descripton',
};
const childContext: KibanaExecutionContext = {
type: 'child-test-type',
name: 'child-test-name',
id: '42',
description: 'test-descripton',
};
const contextContainer = new ExecutionContextContainer(context);
const value = new ExecutionContextContainer(context, parentContainer).toJSON();
expect(value).toEqual({ ...context, parent: parentContext });
const value = new ExecutionContextContainer(childContext, contextContainer).toJSON();
expect(value).toEqual({ child: childContext, ...context });
});
});
});

View file

@ -50,14 +50,14 @@ export interface IExecutionContextContainer {
}
function stringify(ctx: KibanaExecutionContext): string {
const stringifiedCtx = `${ctx.type}:${ctx.name}:${encodeURIComponent(ctx.id)}`;
return ctx.parent ? `${stringify(ctx.parent)};${stringifiedCtx}` : stringifiedCtx;
const stringifiedCtx = `${ctx.type}:${ctx.name}:${encodeURIComponent(ctx.id!)}`;
return ctx.child ? `${stringifiedCtx};${stringify(ctx.child)}` : stringifiedCtx;
}
export class ExecutionContextContainer implements IExecutionContextContainer {
readonly #context: Readonly<KibanaExecutionContext>;
constructor(context: KibanaExecutionContext, parent?: IExecutionContextContainer) {
this.#context = { parent: parent?.toJSON(), ...context };
this.#context = parent ? { ...parent.toJSON(), child: context } : context;
}
toString(): string {
return enforceMaxLength(stringify(this.#context));

View file

@ -59,7 +59,7 @@ describe('ExecutionContextService', () => {
name: 'name-a',
id: 'id-a',
description: 'description-a',
parent: undefined,
child: undefined,
},
{
@ -67,7 +67,7 @@ describe('ExecutionContextService', () => {
name: 'name-b',
id: 'id-b',
description: 'description-b',
parent: undefined,
child: undefined,
},
]);
});
@ -271,17 +271,17 @@ describe('ExecutionContextService', () => {
);
expect(result?.toJSON()).toEqual({
type: 'type-b',
name: 'name-b',
id: 'id-b',
description: 'description-b',
parent: {
type: 'type-a',
name: 'name-a',
id: 'id-a',
description: 'description-a',
parent: undefined,
child: {
child: undefined,
type: 'type-b',
name: 'name-b',
id: 'id-b',
description: 'description-b',
},
type: 'type-a',
name: 'name-a',
id: 'id-a',
description: 'description-a',
});
});
@ -306,16 +306,16 @@ describe('ExecutionContextService', () => {
);
expect(result?.toJSON()).toEqual({
type: 'type-b',
name: 'name-b',
id: 'id-b',
description: 'description-b',
parent: {
type: 'type-a',
name: 'name-a',
id: 'id-a',
description: 'description-a',
parent: undefined,
type: 'type-a',
name: 'name-a',
id: 'id-a',
description: 'description-a',
child: {
child: undefined,
type: 'type-b',
name: 'name-b',
id: 'id-b',
description: 'description-b',
},
});
});

View file

@ -552,7 +552,7 @@ describe('trace', () => {
expect(response.body).toEqual(parentContext);
});
it('set execution context inerits a parent if presented', async () => {
it('set execution context becomes child if parent context is presented', async () => {
const { executionContext, http } = await root.setup();
const { createRouter } = http;
@ -575,7 +575,7 @@ describe('trace', () => {
await root.start();
const response = await kbnTestServer.request.get(root, '/execution-context').expect(200);
expect(response.body).toEqual({ ...nestedContext, parent: parentContext });
expect(response.body).toEqual({ child: nestedContext, ...parentContext });
});
it('extends the execution context passed from the client-side', async () => {

View file

@ -1313,9 +1313,9 @@ export type KibanaExecutionContext = {
readonly type: string;
readonly name: string;
readonly id: string;
readonly description: string;
readonly description?: string;
readonly url?: string;
parent?: KibanaExecutionContext;
child?: KibanaExecutionContext;
};
// @public

View file

@ -22,9 +22,9 @@ export type KibanaExecutionContext = {
/** unique value to identify the source */
readonly id: string;
/** human readable description. For example, a vis title, action name */
readonly description: string;
readonly description?: string;
/** in browser - url to navigate to a current page, on server - endpoint path, for task: task SO url */
readonly url?: string;
/** a context that spawned the current context. */
parent?: KibanaExecutionContext;
/** an inner context spawned from the current context. */
child?: KibanaExecutionContext;
};

View file

@ -11,6 +11,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { i18n } from '@kbn/i18n';
import { isEqual } from 'lodash';
import { KibanaExecutionContext } from 'kibana/public';
import { Container, Embeddable } from '../../../../embeddable/public';
import { ISearchEmbeddable, SearchInput, SearchOutput } from './types';
import { SavedSearch } from '../../saved_searches';
@ -165,15 +166,23 @@ export class SavedSearchEmbeddable
this.searchProps!.isLoading = true;
this.updateOutput({ loading: true, error: undefined });
const executionContext = {
const parentContext = this.input.executionContext;
const child: KibanaExecutionContext = {
type: this.type,
name: 'discover',
id: this.savedSearch.id!,
description: this.output.title || this.output.defaultTitle || '',
url: this.output.editUrl,
parent: this.input.executionContext,
};
const executionContext = parentContext
? {
...parentContext,
child,
}
: child;
try {
// Make the request
const { rawResponse: resp } = await searchSource

View file

@ -12,13 +12,14 @@ import { i18n } from '@kbn/i18n';
import React from 'react';
import { render } from 'react-dom';
import { EuiLoadingChart } from '@elastic/eui';
import { Filter } from '@kbn/es-query';
import type { SavedObjectAttributes, KibanaExecutionContext } from 'kibana/public';
import { VISUALIZE_EMBEDDABLE_TYPE } from './constants';
import {
IndexPattern,
TimeRange,
Query,
esFilters,
Filter,
TimefilterContract,
} from '../../../../plugins/data/public';
import {
@ -41,7 +42,6 @@ import { Vis, SerializedVis } from '../vis';
import { getExpressions, getUiActions } from '../services';
import { VIS_EVENT_TO_TRIGGER } from './events';
import { VisualizeEmbeddableFactoryDeps } from './visualize_embeddable_factory';
import { SavedObjectAttributes } from '../../../../core/types';
import { getSavedVisualization } from '../utils/saved_visualize_utils';
import { VisSavedObject } from '../types';
import { toExpressionAst } from './to_ast';
@ -386,14 +386,20 @@ export class VisualizeEmbeddable
};
private async updateHandler() {
const context = {
const parentContext = this.parent?.getInput().executionContext;
const child: KibanaExecutionContext = {
type: 'visualization',
name: this.vis.type.title,
id: this.vis.id ?? 'an_unsaved_vis',
description: this.vis.title || this.input.title || this.vis.type.name,
url: this.output.editUrl,
parent: this.parent?.getInput().executionContext,
};
const context = parentContext
? {
...parentContext,
child,
}
: child;
const expressionParams: IExpressionLoaderParams = {
searchContext: {

View file

@ -55,7 +55,7 @@ import {
import { IndexPatternsContract } from '../../../../../src/plugins/data/public';
import { getEditPath, DOC_TYPE, PLUGIN_ID } from '../../common';
import { IBasePath } from '../../../../../src/core/public';
import type { IBasePath, KibanaExecutionContext } from '../../../../../src/core/public';
import { LensAttributeService } from '../lens_attribute_service';
import type { ErrorMessage } from '../editor_frame_service/types';
import { getLensInspectorService, LensInspector } from '../lens_inspector_service';
@ -364,14 +364,24 @@ export class Embeddable
this.input.onLoad(true);
}
const executionContext = {
this.domNode.setAttribute('data-shared-item', '');
this.renderComplete.dispatchInProgress();
const parentContext = this.input.executionContext;
const child: KibanaExecutionContext = {
type: 'lens',
name: this.savedVis.visualizationType ?? '',
id: this.id,
description: this.savedVis.title || this.input.title || '',
url: this.output.editUrl,
parent: this.input.executionContext,
};
const executionContext = parentContext
? {
...parentContext,
child,
}
: child;
const input = this.getInput();

View file

@ -98,18 +98,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'lens',
name: 'lnsXY',
id: '086ac2e9-dd16-4b45-92b8-1e43ff7e3f65',
description: '[Flights] Flight count',
url: '/app/lens#/edit_by_value',
},
type: 'lens',
name: 'lnsXY',
id: '086ac2e9-dd16-4b45-92b8-1e43ff7e3f65',
description: '[Flights] Flight count',
url: '/app/lens#/edit_by_value',
}),
retry,
});
@ -131,18 +131,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'lens',
name: 'lnsMetric',
id: '2e33ade5-96e5-40b4-b460-493e5d4fa834',
description: '',
url: '/app/lens#/edit_by_value',
},
type: 'lens',
name: 'lnsMetric',
id: '2e33ade5-96e5-40b4-b460-493e5d4fa834',
description: '',
url: '/app/lens#/edit_by_value',
}),
retry,
});
@ -164,18 +164,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'lens',
name: 'lnsDatatable',
id: 'fb86b32f-fb7a-45cf-9511-f366fef51bbd',
description: 'Cities by delay, cancellation',
url: '/app/lens#/edit_by_value',
},
type: 'lens',
name: 'lnsDatatable',
id: 'fb86b32f-fb7a-45cf-9511-f366fef51bbd',
description: 'Cities by delay, cancellation',
url: '/app/lens#/edit_by_value',
}),
retry,
});
@ -196,18 +196,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'lens',
name: 'lnsPie',
id: '5d53db36-2d5a-4adc-af7b-cec4c1a294e0',
description: '[Flights] Delay Type',
url: '/app/lens#/edit_by_value',
},
type: 'lens',
name: 'lnsPie',
id: '5d53db36-2d5a-4adc-af7b-cec4c1a294e0',
description: '[Flights] Delay Type',
url: '/app/lens#/edit_by_value',
}),
retry,
});
@ -229,18 +229,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'search',
name: 'discover',
id: '571aaf70-4c88-11e8-b3d7-01146121b73d',
description: '[Flights] Flight Log',
url: '/app/discover#/view/571aaf70-4c88-11e8-b3d7-01146121b73d',
},
type: 'search',
name: 'discover',
id: '571aaf70-4c88-11e8-b3d7-01146121b73d',
description: '[Flights] Flight Log',
url: '/app/discover#/view/571aaf70-4c88-11e8-b3d7-01146121b73d',
}),
retry,
});
@ -262,18 +262,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'visualization',
name: 'TSVB',
id: 'bcb63b50-4c89-11e8-b3d7-01146121b73d',
description: '[Flights] Delays & Cancellations',
url: '/app/visualize#/edit/bcb63b50-4c89-11e8-b3d7-01146121b73d',
},
type: 'visualization',
name: 'TSVB',
id: 'bcb63b50-4c89-11e8-b3d7-01146121b73d',
description: '[Flights] Delays & Cancellations',
url: '/app/visualize#/edit/bcb63b50-4c89-11e8-b3d7-01146121b73d',
}),
retry,
});
@ -295,18 +295,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'visualization',
name: 'Vega',
id: 'ed78a660-53a0-11e8-acbd-0be0ad9d822b',
description: '[Flights] Airport Connections (Hover Over Airport)',
url: '/app/visualize#/edit/ed78a660-53a0-11e8-acbd-0be0ad9d822b',
},
type: 'visualization',
name: 'Vega',
id: 'ed78a660-53a0-11e8-acbd-0be0ad9d822b',
description: '[Flights] Airport Connections (Hover Over Airport)',
url: '/app/visualize#/edit/ed78a660-53a0-11e8-acbd-0be0ad9d822b',
}),
retry,
});
@ -328,18 +328,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'visualization',
name: 'Tag cloud',
id: '293b5a30-4c8f-11e8-b3d7-01146121b73d',
description: '[Flights] Destination Weather',
url: '/app/visualize#/edit/293b5a30-4c8f-11e8-b3d7-01146121b73d',
},
type: 'visualization',
name: 'Tag cloud',
id: '293b5a30-4c8f-11e8-b3d7-01146121b73d',
description: '[Flights] Destination Weather',
url: '/app/visualize#/edit/293b5a30-4c8f-11e8-b3d7-01146121b73d',
}),
retry,
});
@ -361,18 +361,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'application',
name: 'dashboard',
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
description: '[Flights] Global Flight Dashboard',
url: '/view/7adfa750-4c81-11e8-b3d7-01146121b73d',
child: {
type: 'visualization',
name: 'Vertical bar',
id: '9886b410-4c8b-11e8-b3d7-01146121b73d',
description: '[Flights] Delay Buckets',
url: '/app/visualize#/edit/9886b410-4c8b-11e8-b3d7-01146121b73d',
},
type: 'visualization',
name: 'Vertical bar',
id: '9886b410-4c8b-11e8-b3d7-01146121b73d',
description: '[Flights] Delay Buckets',
url: '/app/visualize#/edit/9886b410-4c8b-11e8-b3d7-01146121b73d',
}),
retry,
});

View file

@ -93,17 +93,17 @@ export default function ({ getService }: FtrProviderContext) {
description: 'execution context propagates to Kibana logs',
predicate: (record) =>
isExecutionContextLog(record?.message, {
parent: {
type: 'task manager',
name: 'run alerting:test.executionContext',
// @ts-expect-error. it accepts strings only
id: ANY,
description: 'run task',
type: 'task manager',
name: 'run alerting:test.executionContext',
// @ts-expect-error. it accepts strings only
id: ANY,
description: 'run task',
child: {
type: 'alert',
name: 'execute test.executionContext',
id: alertId,
description: 'execute [test.executionContext] with name [abc] in [default] namespace',
},
type: 'alert',
name: 'execute test.executionContext',
id: alertId,
description: 'execute [test.executionContext] with name [abc] in [default] namespace',
}),
retry,
});