Skip to content
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

Merged

Conversation

peteharverson
Copy link
Contributor

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.

image

image

Fixes #18456

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jgowdyelastic jgowdyelastic left a 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 || [];
Copy link
Member

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;

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@peteharverson peteharverson merged commit 59fb742 into elastic:master May 8, 2018
@peteharverson peteharverson deleted the ml-explorer-no-influencers branch May 8, 2018 12:28
peteharverson added a commit to peteharverson/kibana that referenced this pull request May 8, 2018
* [ML] Hide Top Influencers list if job has no influencers

* [ML] Add check for undefined job when hiding influencers list
peteharverson added a commit that referenced this pull request May 8, 2018
…8908)

* [ML] Hide Top Influencers list if job has no influencers

* [ML] Add check for undefined job when hiding influencers list
@sophiec20 sophiec20 added the Feature:Anomaly Detection ML anomaly detection label Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Improve Anomaly Explorer display when "no influencers"
5 participants