diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/compatibility_check.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/compatibility_check.ts deleted file mode 100644 index 04c92aec327db..0000000000000 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/compatibility_check.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { apiIsPresentationContainer, PresentationContainer } from '@kbn/presentation-containers'; -import { EmbeddableApiContext } from '@kbn/presentation-publishing'; - -export const compatibilityCheck = ( - api: EmbeddableApiContext['embeddable'] -): api is PresentationContainer => { - return apiIsPresentationContainer(api); -}; \ No newline at end of file diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx index 79c6a6c1195a9..8397131fddc43 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx @@ -33,12 +33,12 @@ export function createStatusOverviewPanelAction(): UiActionsActionDefinition 'online', isCompatible: async ({ embeddable }) => { - const { compatibilityCheck } = await import('./compatibility_check'); - return compatibilityCheck(embeddable); + const { apiIsPresentationContainer } = await import('@kbn/presentation-containers'); + return apiIsPresentationContainer(embeddable); }, execute: async ({ embeddable }) => { - const { compatibilityCheck } = await import('./compatibility_check'); - if (!compatibilityCheck(embeddable)) throw new IncompatibleActionError(); + const { apiIsPresentationContainer } = await import('@kbn/presentation-containers'); + if (!apiIsPresentationContainer(embeddable)) throw new IncompatibleActionError(); try { embeddable.addNewPanel({ panelType: SYNTHETICS_OVERVIEW_EMBEDDABLE,