diff --git a/x-pack/plugins/ml/public/application/app.tsx b/x-pack/plugins/ml/public/application/app.tsx index d2bc17ab210b9..67ddcbdca2e2b 100644 --- a/x-pack/plugins/ml/public/application/app.tsx +++ b/x-pack/plugins/ml/public/application/app.tsx @@ -28,6 +28,8 @@ import type { PageDependencies } from './routing/router'; import { EnabledFeaturesContextProvider, MlServerInfoContextProvider } from './contexts/ml'; import type { StartServices } from './contexts/kibana'; import { getMlGlobalServices } from './util/get_services'; +import type { MlResultsService } from './services/results_service'; +import type { TimeSeriesExplorerService } from './util/time_series_explorer_service'; export type MlDependencies = Omit< MlSetupDependencies, @@ -51,7 +53,10 @@ export interface MlServicesContext { mlServices: MlGlobalServices; } -export type MlGlobalServices = ReturnType; +export type MlGlobalServices = ReturnType & { + mlResultsService?: MlResultsService; + mlTimeSeriesExplorerService?: TimeSeriesExplorerService; +}; const App: FC = ({ coreStart, diff --git a/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table.js b/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table.js index 4429a3022122e..82d20e0bb87e4 100644 --- a/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table.js +++ b/x-pack/plugins/ml/public/application/components/anomalies_table/anomalies_table.js @@ -287,6 +287,6 @@ AnomaliesTableInternal.propTypes = { influencerFilter: PropTypes.func, tableState: PropTypes.object.isRequired, updateTableState: PropTypes.func.isRequired, - sourceIndicesWithGeoFields: PropTypes.object.isRequired, + sourceIndicesWithGeoFields: PropTypes.object, selectedJobs: PropTypes.array.isRequired, }; diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecast_button.tsx b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecast_button.tsx index c989bb6ebd38d..968f3df1844be 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecast_button.tsx +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecast_button.tsx @@ -13,11 +13,11 @@ import { FormattedMessage } from '@kbn/i18n-react'; interface Props { isDisabled: boolean; onClick: () => void; - mode: 'full' | 'empty'; + emptyMode: boolean; } -export const ForecastButton: FC = ({ isDisabled, onClick, mode = 'full' }) => { - const Button = mode === 'full' ? EuiButton : EuiButtonEmpty; +export const ForecastButton: FC = ({ isDisabled, onClick, emptyMode }) => { + const Button = emptyMode ? EuiButtonEmpty : EuiButton; return (