Reverse parent child context relationship (#125486)

* reverse parent child context relationship

* bad merge

* ts

* ts

* fix jest

* try unblocking flaky test

* doc
This commit is contained in:
Liza Katz 2022-02-15 16:21:37 +02:00 committed by GitHub
parent 7934cd543e
commit 724e3b2ebf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 270 additions and 232 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,16 +29,16 @@ Now, you can see the request to {es} has been initiated by the `[Logs] Unique Vi
[source,text]
----
[DEBUG][execution_context] stored the execution context: {
"parent": {
"type": "application",
"name": "dashboard",
"id": "edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b",
"description": "[Logs] Web Traffic","url":"/view/edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b"
"type": "application",
"name": "dashboard",
"id": "edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b",
"description": "[Logs] Web Traffic","url":"/view/edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b"
"child": {
"type": "visualization",
"name": "Vega",
"id": "cb099a20-ea66-11eb-9425-113343a037e3",
"description": "[Logs] Unique Visitor Heatmap",
"url": "/app/visualize#/edit/cb099a20-ea66-11eb-9425-113343a037e3"
},
"type": "visualization",
"name": "Vega",
"id": "cb099a20-ea66-11eb-9425-113343a037e3",
"description": "[Logs] Unique Visitor Heatmap",
"url": "/app/visualize#/edit/cb099a20-ea66-11eb-9425-113343a037e3"
}
----

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

@ -754,9 +754,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

@ -589,7 +589,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;
@ -612,7 +612,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

@ -1322,9 +1322,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

@ -12,6 +12,7 @@ import ReactDOM from 'react-dom';
import { i18n } from '@kbn/i18n';
import { isEqual } from 'lodash';
import { I18nProvider } from '@kbn/i18n-react';
import type { KibanaExecutionContext } from 'kibana/public';
import { Container, Embeddable } from '../../../embeddable/public';
import { ISearchEmbeddable, SearchInput, SearchOutput } from './types';
import { SavedSearch } from '../services/saved_searches';
@ -168,14 +169,21 @@ 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

View file

@ -13,6 +13,7 @@ import React from 'react';
import { render } from 'react-dom';
import { EuiLoadingChart } from '@elastic/eui';
import { Filter, onlyDisabledFiltersChanged } from '@kbn/es-query';
import type { SavedObjectAttributes, KibanaExecutionContext } from 'kibana/public';
import { KibanaThemeProvider } from '../../../kibana_react/public';
import { VISUALIZE_EMBEDDABLE_TYPE } from './constants';
import {
@ -41,7 +42,6 @@ import { Vis, SerializedVis } from '../vis';
import { getExpressions, getTheme, 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';
@ -398,14 +398,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

@ -60,7 +60,11 @@ import {
import { IndexPatternsContract } from '../../../../../src/plugins/data/public';
import { getEditPath, DOC_TYPE, PLUGIN_ID } from '../../common';
import { IBasePath, ThemeServiceStart } from '../../../../../src/core/public';
import type {
IBasePath,
KibanaExecutionContext,
ThemeServiceStart,
} 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';
@ -413,14 +417,20 @@ export class Embeddable
this.renderComplete.dispatchInProgress();
const executionContext = {
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

@ -12,8 +12,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'home']);
const retry = getService('retry');
// Failing: See https://github.com/elastic/kibana/issues/112102
describe.skip('Browser apps', () => {
describe('Browser apps', () => {
before(async () => {
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
useActualUrl: true,
@ -98,18 +97,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 +130,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 +163,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 +195,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 +228,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 +261,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 +294,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 +327,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 +360,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,
});