From 87760ee8fcb25902d3fbd69a1ba9be2c3302d0e2 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Mon, 17 Apr 2023 09:22:51 +0200 Subject: [PATCH] [ML] AIOps: Fix comment/prop type for lazy component for change point detection (#154893) Fix comment and prop type for lazy component for change point detection. --- x-pack/plugins/aiops/common/index.ts | 4 ++++ x-pack/plugins/aiops/public/index.ts | 5 +++++ x-pack/plugins/aiops/public/shared_lazy_components.tsx | 7 ++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/aiops/common/index.ts b/x-pack/plugins/aiops/common/index.ts index b4ec6c287b22d..e4ef3c5a10af0 100755 --- a/x-pack/plugins/aiops/common/index.ts +++ b/x-pack/plugins/aiops/common/index.ts @@ -21,4 +21,8 @@ export const PLUGIN_NAME = 'AIOps'; */ export const AIOPS_ENABLED = true; +/** + * This is an internal hard coded feature flag so we can easily turn on/off the + * "Change Point Detection UI" during development until the first release. + */ export const CHANGE_POINT_DETECTION_ENABLED = true; diff --git a/x-pack/plugins/aiops/public/index.ts b/x-pack/plugins/aiops/public/index.ts index 74a70f0acfd27..04b640c362878 100755 --- a/x-pack/plugins/aiops/public/index.ts +++ b/x-pack/plugins/aiops/public/index.ts @@ -13,6 +13,11 @@ export function plugin() { return new AiopsPlugin(); } +export type { AiopsAppDependencies } from './hooks/use_aiops_app_context'; +export type { ExplainLogRateSpikesAppStateProps } from './components/explain_log_rate_spikes'; +export type { LogCategorizationAppStateProps } from './components/log_categorization'; +export type { ChangePointDetectionAppStateProps } from './components/change_point_detection'; + export { ExplainLogRateSpikes, LogCategorization, diff --git a/x-pack/plugins/aiops/public/shared_lazy_components.tsx b/x-pack/plugins/aiops/public/shared_lazy_components.tsx index a5ad80bd7587e..4f9ade98d4dc0 100644 --- a/x-pack/plugins/aiops/public/shared_lazy_components.tsx +++ b/x-pack/plugins/aiops/public/shared_lazy_components.tsx @@ -10,6 +10,7 @@ import React, { FC, Suspense } from 'react'; import { EuiErrorBoundary, EuiLoadingContent } from '@elastic/eui'; import type { ExplainLogRateSpikesAppStateProps } from './components/explain_log_rate_spikes'; import type { LogCategorizationAppStateProps } from './components/log_categorization'; +import type { ChangePointDetectionAppStateProps } from './components/change_point_detection'; const ExplainLogRateSpikesAppStateLazy = React.lazy( () => import('./components/explain_log_rate_spikes') @@ -45,10 +46,10 @@ export const LogCategorization: FC = (props) => const ChangePointDetectionLazy = React.lazy(() => import('./components/change_point_detection')); /** - * Lazy-wrapped LogCategorizationAppStateProps React component - * @param {LogCategorizationAppStateProps} props - properties specifying the data on which to run the analysis. + * Lazy-wrapped ChangePointDetectionAppStateProps React component + * @param {ChangePointDetectionAppStateProps} props - properties specifying the data on which to run the analysis. */ -export const ChangePointDetection: FC = (props) => ( +export const ChangePointDetection: FC = (props) => (