diff --git a/x-pack/plugins/uptime/public/components/monitor/ml/__tests__/__snapshots__/license_info.test.tsx.snap b/x-pack/plugins/uptime/public/components/monitor/ml/__tests__/__snapshots__/license_info.test.tsx.snap index 2ba4eda82a391c..09c58b6336871c 100644 --- a/x-pack/plugins/uptime/public/components/monitor/ml/__tests__/__snapshots__/license_info.test.tsx.snap +++ b/x-pack/plugins/uptime/public/components/monitor/ml/__tests__/__snapshots__/license_info.test.tsx.snap @@ -26,22 +26,24 @@ Array [
In order to access duration anomaly detection, you have to be subscribed to an Elastic Platinum license.
- - + - Start free 14-day trial + + Start free 14-day trial + - - + + ,
Here you can create a machine learning job to calculate anomaly scores on
@@ -67,7 +66,7 @@ exports[`ML Flyout component renders without errors 1`] = `
>
{labels.START_TRAIL_DESC}
-{labels.CREAT_ML_JOB_DESC}
@@ -80,7 +82,7 @@ export function MLFlyoutView({ isCreatingJob, onClickCreate, onClose, canCreateM
onClick={() => onClickCreate()}
fill
isLoading={isCreatingJob}
- disabled={isCreatingJob || isLoadingMLJob || !hasPlatinumLicense || !canCreateMLJob}
+ disabled={isCreatingJob || isLoadingMLJob || !hasMlFeature || !canCreateMLJob}
>
{labels.CREATE_NEW_JOB}
diff --git a/x-pack/plugins/uptime/public/components/monitor/ml/ml_integeration.tsx b/x-pack/plugins/uptime/public/components/monitor/ml/ml_integeration.tsx
index e66808f76d24a2..1de19dda3b88f4 100644
--- a/x-pack/plugins/uptime/public/components/monitor/ml/ml_integeration.tsx
+++ b/x-pack/plugins/uptime/public/components/monitor/ml/ml_integeration.tsx
@@ -8,7 +8,7 @@ import React, { useContext, useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { MachineLearningFlyout } from './ml_flyout_container';
import {
- hasMLFeatureAvailable,
+ hasMLFeatureSelector,
hasMLJobSelector,
isMLJobDeletedSelector,
isMLJobDeletingSelector,
@@ -35,7 +35,7 @@ export const MLIntegrationComponent = () => {
const dispatch = useDispatch();
- const isMLAvailable = useSelector(hasMLFeatureAvailable);
+ const isMLAvailable = useSelector(hasMLFeatureSelector);
const deleteMLJob = () => dispatch(deleteMLJobAction.get({ monitorId: monitorId as string }));
const isMLJobDeleting = useSelector(isMLJobDeletingSelector);
diff --git a/x-pack/plugins/uptime/public/components/monitor/monitor_duration/monitor_duration_container.tsx b/x-pack/plugins/uptime/public/components/monitor/monitor_duration/monitor_duration_container.tsx
index b586c1241290bc..df8ceed76b7968 100644
--- a/x-pack/plugins/uptime/public/components/monitor/monitor_duration/monitor_duration_container.tsx
+++ b/x-pack/plugins/uptime/public/components/monitor/monitor_duration/monitor_duration_container.tsx
@@ -14,7 +14,7 @@ import {
} from '../../../state/actions';
import {
anomaliesSelector,
- hasMLFeatureAvailable,
+ hasMLFeatureSelector,
hasMLJobSelector,
selectDurationLines,
} from '../../../state/selectors';
@@ -34,7 +34,7 @@ export const MonitorDuration: React.FC