Skip to content

Commit

Permalink
[SLO] add missing router to the slo burn down embeddable (#177709)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgiota authored Feb 23, 2024
1 parent 2005cef commit d3c927e
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { i18n } from '@kbn/i18n';

import { Router } from '@kbn/shared-ux-router';
import {
Embeddable as AbstractEmbeddable,
EmbeddableOutput,
IContainer,
} from '@kbn/embeddable-plugin/public';
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';

import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import {
type CoreStart,
Expand All @@ -23,6 +22,7 @@ import {
NotificationsStart,
} from '@kbn/core/public';
import { Subject } from 'rxjs';
import { createBrowserHistory } from 'history';
import type { SloErrorBudgetEmbeddableInput } from './types';
import { SloErrorBudget } from './slo_error_budget_burn_down';
export const SLO_ERROR_BUDGET_EMBEDDABLE = 'SLO_ERROR_BUDGET_EMBEDDABLE';
Expand Down Expand Up @@ -79,11 +79,13 @@ export class SLOErrorBudgetEmbeddable extends AbstractEmbeddable<
const I18nContext = this.deps.i18n.Context;
ReactDOM.render(
<I18nContext>
<KibanaContextProvider services={this.deps}>
<QueryClientProvider client={queryClient}>
<SloErrorBudget sloId={sloId} sloInstanceId={sloInstanceId} />
</QueryClientProvider>
</KibanaContextProvider>
<Router history={createBrowserHistory()}>
<KibanaContextProvider services={this.deps}>
<QueryClientProvider client={queryClient}>
<SloErrorBudget sloId={sloId} sloInstanceId={sloInstanceId} />
</QueryClientProvider>
</KibanaContextProvider>
</Router>
</I18nContext>,
node
);
Expand Down

0 comments on commit d3c927e

Please sign in to comment.