diff --git a/x-pack/plugins/observability/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx b/x-pack/plugins/observability/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx index a9ccea2f92099..4e17a9e89a31f 100644 --- a/x-pack/plugins/observability/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx +++ b/x-pack/plugins/observability/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx @@ -5,6 +5,8 @@ * 2.0. */ import React from 'react'; +import { AlertConsumers } from '@kbn/rule-data-utils'; + import ReactDOM from 'react-dom'; import { Subscription } from 'rxjs'; import { i18n } from '@kbn/i18n'; @@ -18,6 +20,8 @@ import { import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { type CoreStart, IUiSettingsClient, ApplicationStart } from '@kbn/core/public'; +import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; +import { ALL_VALUE } from '@kbn/slo-schema'; export const SLO_ALERTS_EMBEDDABLE = 'SLO_ALERTS_EMBEDDABLE'; @@ -26,8 +30,12 @@ interface SloEmbeddableDeps { http: CoreStart['http']; i18n: CoreStart['i18n']; application: ApplicationStart; + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; } +const ALERTS_PER_PAGE = 10; +const ALERTS_TABLE_ID = 'xpack.observability.sloEmbeddable.alert.table'; + export class SLOAlertsEmbeddable extends AbstractEmbeddable { public readonly type = SLO_ALERTS_EMBEDDABLE; private subscription: Subscription; @@ -39,6 +47,7 @@ export class SLOAlertsEmbeddable extends AbstractEmbeddable this.reload())); @@ -58,29 +67,37 @@ export class SLOAlertsEmbeddable extends AbstractEmbeddable , diff --git a/x-pack/plugins/observability/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts b/x-pack/plugins/observability/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts index 4ec50792308cf..6f4680229c65f 100644 --- a/x-pack/plugins/observability/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts +++ b/x-pack/plugins/observability/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts @@ -51,9 +51,12 @@ export class SloAlertsEmbeddableFactoryDefinition implements EmbeddableFactoryDe public async create(initialInput: EmbeddableInput, parent?: IContainer) { try { - const [{ uiSettings, application, http, i18n: i18nService }] = await this.getStartServices(); + const [ + { uiSettings, application, http, i18n: i18nService, notifications }, + { triggersActionsUi }, + ] = await this.getStartServices(); return new SLOAlertsEmbeddable( - { uiSettings, application, http, i18n: i18nService }, + { uiSettings, application, http, i18n: i18nService, triggersActionsUi, notifications }, initialInput, parent );