mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Security Solution] ML rule preview results button is disabled when ML job is running (#137878) (#138078)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 6e1cac8dad
)
Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>
This commit is contained in:
parent
e9a2150547
commit
73cd3a4fc5
1 changed files with 3 additions and 2 deletions
|
@ -140,9 +140,10 @@ const RulePreviewComponent: React.FC<RulePreviewProps> = ({
|
|||
return true; // Don't do the expensive logic if we don't need it
|
||||
}
|
||||
if (isMlLoading) {
|
||||
const selectedJobs = jobs.filter(({ id }) => machineLearningJobId.includes(id));
|
||||
return selectedJobs.every((job) => isJobStarted(job.jobState, job.datafeedState));
|
||||
return false;
|
||||
}
|
||||
const selectedJobs = jobs.filter(({ id }) => machineLearningJobId.includes(id));
|
||||
return selectedJobs.every((job) => isJobStarted(job.jobState, job.datafeedState));
|
||||
}, [jobs, machineLearningJobId, ruleType, isMlLoading]);
|
||||
|
||||
const [queryPreviewIdSelected, setQueryPreviewRadioIdSelected] = useState(QUICK_QUERY_SELECT_ID);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue