mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `8.12`: - [[RAM] Fix edit fly-out (#172737)](https://github.com/elastic/kibana/pull/172737) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Xavier Mouligneau","email":"xavier.mouligneau@elastic.co"},"sourceCommit":{"committedDate":"2023-12-07T15:13:00Z","message":"[RAM] Fix edit fly-out (#172737)\n\nEdit Rule fly-out to be wrapped in its own React Query QueryClient\r\nprovider","sha":"f487c7d9a651334518a707daaf3760897dd56107","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","critical","release_note:skip","Team:ResponseOps","v8.12.0","Team:uptime","v8.13.0"],"number":172737,"url":"https://github.com/elastic/kibana/pull/172737","mergeCommit":{"message":"[RAM] Fix edit fly-out (#172737)\n\nEdit Rule fly-out to be wrapped in its own React Query QueryClient\r\nprovider","sha":"f487c7d9a651334518a707daaf3760897dd56107"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172737","number":172737,"mergeCommit":{"message":"[RAM] Fix edit fly-out (#172737)\n\nEdit Rule fly-out to be wrapped in its own React Query QueryClient\r\nprovider","sha":"f487c7d9a651334518a707daaf3760897dd56107"}}]}] BACKPORT--> Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
This commit is contained in:
parent
92024dd340
commit
ee99073370
2 changed files with 53 additions and 54 deletions
|
@ -15,7 +15,6 @@ import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
|
|||
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
|
||||
import { InspectorContextProvider } from '@kbn/observability-shared-plugin/public';
|
||||
import { ObservabilityAIAssistantProvider } from '@kbn/observability-ai-assistant-plugin/public';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { SyntheticsDataViewContextProvider } from './contexts/synthetics_data_view_context';
|
||||
import { SyntheticsAppProps } from './contexts';
|
||||
|
||||
|
@ -69,8 +68,6 @@ const Application = (props: SyntheticsAppProps) => {
|
|||
|
||||
store.dispatch(setBasePath(basePath));
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
return (
|
||||
<EuiErrorBoundary>
|
||||
<i18nCore.Context>
|
||||
|
@ -84,56 +81,54 @@ const Application = (props: SyntheticsAppProps) => {
|
|||
}}
|
||||
>
|
||||
<ReduxProvider store={store}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<KibanaContextProvider
|
||||
services={{
|
||||
...core,
|
||||
...plugins,
|
||||
storage,
|
||||
data: startPlugins.data,
|
||||
inspector: startPlugins.inspector,
|
||||
triggersActionsUi: startPlugins.triggersActionsUi,
|
||||
observability: startPlugins.observability,
|
||||
observabilityShared: startPlugins.observabilityShared,
|
||||
exploratoryView: startPlugins.exploratoryView,
|
||||
cases: startPlugins.cases,
|
||||
spaces: startPlugins.spaces,
|
||||
fleet: startPlugins.fleet,
|
||||
}}
|
||||
>
|
||||
<SyntheticsDataViewContextProvider dataViews={startPlugins.dataViews}>
|
||||
<ObservabilityAIAssistantProvider
|
||||
value={startPlugins.observabilityAIAssistant.service}
|
||||
>
|
||||
<Router history={appMountParameters.history}>
|
||||
<EuiThemeProvider darkMode={darkMode}>
|
||||
<SyntheticsRefreshContextProvider>
|
||||
<SyntheticsSettingsContextProvider {...props}>
|
||||
<SyntheticsThemeContextProvider darkMode={darkMode}>
|
||||
<SyntheticsStartupPluginsContextProvider {...startPlugins}>
|
||||
<div className={APP_WRAPPER_CLASS} data-test-subj="syntheticsApp">
|
||||
<RedirectAppLinks
|
||||
coreStart={{
|
||||
application: core.application,
|
||||
}}
|
||||
>
|
||||
<InspectorContextProvider>
|
||||
<PageRouter />
|
||||
<ActionMenu appMountParameters={appMountParameters} />
|
||||
<TestNowModeFlyoutContainer />
|
||||
</InspectorContextProvider>
|
||||
</RedirectAppLinks>
|
||||
</div>
|
||||
</SyntheticsStartupPluginsContextProvider>
|
||||
</SyntheticsThemeContextProvider>
|
||||
</SyntheticsSettingsContextProvider>
|
||||
</SyntheticsRefreshContextProvider>
|
||||
</EuiThemeProvider>
|
||||
</Router>
|
||||
</ObservabilityAIAssistantProvider>
|
||||
</SyntheticsDataViewContextProvider>
|
||||
</KibanaContextProvider>
|
||||
</QueryClientProvider>
|
||||
<KibanaContextProvider
|
||||
services={{
|
||||
...core,
|
||||
...plugins,
|
||||
storage,
|
||||
data: startPlugins.data,
|
||||
inspector: startPlugins.inspector,
|
||||
triggersActionsUi: startPlugins.triggersActionsUi,
|
||||
observability: startPlugins.observability,
|
||||
observabilityShared: startPlugins.observabilityShared,
|
||||
exploratoryView: startPlugins.exploratoryView,
|
||||
cases: startPlugins.cases,
|
||||
spaces: startPlugins.spaces,
|
||||
fleet: startPlugins.fleet,
|
||||
}}
|
||||
>
|
||||
<SyntheticsDataViewContextProvider dataViews={startPlugins.dataViews}>
|
||||
<ObservabilityAIAssistantProvider
|
||||
value={startPlugins.observabilityAIAssistant.service}
|
||||
>
|
||||
<Router history={appMountParameters.history}>
|
||||
<EuiThemeProvider darkMode={darkMode}>
|
||||
<SyntheticsRefreshContextProvider>
|
||||
<SyntheticsSettingsContextProvider {...props}>
|
||||
<SyntheticsThemeContextProvider darkMode={darkMode}>
|
||||
<SyntheticsStartupPluginsContextProvider {...startPlugins}>
|
||||
<div className={APP_WRAPPER_CLASS} data-test-subj="syntheticsApp">
|
||||
<RedirectAppLinks
|
||||
coreStart={{
|
||||
application: core.application,
|
||||
}}
|
||||
>
|
||||
<InspectorContextProvider>
|
||||
<PageRouter />
|
||||
<ActionMenu appMountParameters={appMountParameters} />
|
||||
<TestNowModeFlyoutContainer />
|
||||
</InspectorContextProvider>
|
||||
</RedirectAppLinks>
|
||||
</div>
|
||||
</SyntheticsStartupPluginsContextProvider>
|
||||
</SyntheticsThemeContextProvider>
|
||||
</SyntheticsSettingsContextProvider>
|
||||
</SyntheticsRefreshContextProvider>
|
||||
</EuiThemeProvider>
|
||||
</Router>
|
||||
</ObservabilityAIAssistantProvider>
|
||||
</SyntheticsDataViewContextProvider>
|
||||
</KibanaContextProvider>
|
||||
</ReduxProvider>
|
||||
</KibanaThemeProvider>
|
||||
</i18nCore.Context>
|
||||
|
|
|
@ -6,16 +6,20 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { QueryClientProvider } from '@tanstack/react-query';
|
||||
import { ConnectorProvider } from '../application/context/connector_context';
|
||||
import { RuleEdit } from '../application/sections/rule_form';
|
||||
import type { ConnectorServices, RuleEditProps as AlertEditProps } from '../types';
|
||||
import { queryClient } from '../application/query_client';
|
||||
|
||||
export const getEditRuleFlyoutLazy = (
|
||||
props: AlertEditProps & { connectorServices: ConnectorServices }
|
||||
) => {
|
||||
return (
|
||||
<ConnectorProvider value={{ services: props.connectorServices }}>
|
||||
<RuleEdit {...props} />
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<RuleEdit {...props} />
|
||||
</QueryClientProvider>
|
||||
</ConnectorProvider>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue