diff --git a/x-pack/plugins/endpoint/public/embeddables/resolver/embeddable.tsx b/x-pack/plugins/endpoint/public/embeddables/resolver/embeddable.tsx index 35b995848a69a8f..814efc50bfb9786 100644 --- a/x-pack/plugins/endpoint/public/embeddables/resolver/embeddable.tsx +++ b/x-pack/plugins/endpoint/public/embeddables/resolver/embeddable.tsx @@ -13,17 +13,13 @@ import { IContainer, Embeddable, } from '../../../../../../src/plugins/embeddable/public'; -import { HttpServiceBase } from '../../../../../../src/core/public'; +import { HttpSetup } from '../../../../../../src/core/public'; export class ResolverEmbeddable extends Embeddable { public readonly type = 'resolver'; - private httpServiceBase: HttpServiceBase; + private httpService: HttpSetup; private lastRenderTarget?: Element; - constructor( - initialInput: EmbeddableInput, - httpServiceBase: HttpServiceBase, - parent?: IContainer - ) { + constructor(initialInput: EmbeddableInput, httpService: HttpSetup, parent?: IContainer) { super( // Input state is irrelevant to this embeddable, just pass it along. initialInput, @@ -33,7 +29,7 @@ export class ResolverEmbeddable extends Embeddable { // Optional parent component, this embeddable can optionally be rendered inside a container. parent ); - this.httpServiceBase = httpServiceBase; + this.httpService = httpService; } public render(node: HTMLElement) { @@ -42,7 +38,7 @@ export class ResolverEmbeddable extends Embeddable { } this.lastRenderTarget = node; // TODO, figure out how to destroy middleware - const { store } = storeFactory({ httpServiceBase: this.httpServiceBase }); + const { store } = storeFactory({ httpServiceBase: this.httpService }); ReactDOM.render(, node); } diff --git a/x-pack/plugins/endpoint/public/embeddables/resolver/factory.ts b/x-pack/plugins/endpoint/public/embeddables/resolver/factory.ts index 63a0a2021758a49..5a4f33f3fbf7e72 100644 --- a/x-pack/plugins/endpoint/public/embeddables/resolver/factory.ts +++ b/x-pack/plugins/endpoint/public/embeddables/resolver/factory.ts @@ -5,21 +5,17 @@ */ import { i18n } from '@kbn/i18n'; -import { HttpServiceBase } from 'kibana/public'; -import { - EmbeddableFactory, - EmbeddableInput, - IContainer, -} from '../../../../../../src/plugins/embeddable/public'; +import { EmbeddableFactory, EmbeddableInput, IContainer } from 'src/plugins/embeddable/public'; +import { HttpSetup } from 'kibana/public'; import { ResolverEmbeddable } from './'; export class ResolverEmbeddableFactory extends EmbeddableFactory { public readonly type = 'resolver'; - private httpServiceBase: HttpServiceBase; + private httpService: HttpSetup; - constructor(httpServiceBase: HttpServiceBase) { + constructor(httpService: HttpSetup) { super(); - this.httpServiceBase = httpServiceBase; + this.httpService = httpService; } public isEditable() { @@ -27,7 +23,7 @@ export class ResolverEmbeddableFactory extends EmbeddableFactory { } public async create(initialInput: EmbeddableInput, parent?: IContainer) { - return new ResolverEmbeddable(initialInput, this.httpServiceBase, parent); + return new ResolverEmbeddable(initialInput, this.httpService, parent); } public getDisplayName() {