-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Hide Top Influencers list if job has no influencers #18819
[ML] Hide Top Influencers list if job has no influencers #18819
Conversation
Pinging @elastic/ml-ui |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added one comment about a potential crash
} | ||
|
||
const influencers = mlJobService.getJob(id).analysis_config.influencers || []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be defensive, it might be best not to assume getJob
will aways return a job.
splitting this line into
const tempJob = mlJobService.getJob(id);
const influencers = (tempJob === undefined) ? [] : tempJob.analysis_config.influencers;
💚 Build Succeeded |
* [ML] Hide Top Influencers list if job has no influencers * [ML] Add check for undefined job when hiding influencers list
Hides the Top Influencers list from the Anomaly Explorer if the selected job(s) have no influencers configured.
When viewing a job with no influencers, an info icon is shown in the top left corner of the view to clarify why the list is hidden.
Fixes #18456