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] Explain Log Rate Spikes: add main chart sync on row hover at group level #141138

Merged

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Sep 20, 2022

Summary

This PR adds support for table hovering with main chart sync on group level

image

Checklist

Delete any items that are not applicable to this PR.

  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
  • Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)
  • This was checked for cross-browser compatibility

@alvarezmelissa87 alvarezmelissa87 added release_note:enhancement :ml v8.5.0 Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis labels Sep 20, 2022
@alvarezmelissa87 alvarezmelissa87 self-assigned this Sep 20, 2022
@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner September 20, 2022 16:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Comment on lines 53 to 60
const groupFilter = [];
if (selectedGroup) {
for (const fieldName in selectedGroup.group) {
if (selectedGroup.group.hasOwnProperty(fieldName)) {
groupFilter.push({ term: { [fieldName]: selectedGroup.group[fieldName] } });
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to consider repeatedValues like this:

const groupFilter = [];
  if (selectedGroup) {
    const allItems = { ...selectedGroup.group, ...selectedGroup.repeatedValues };
    for (const fieldName in allItems) {
      if (allItems.hasOwnProperty(fieldName)) {
        groupFilter.push({ term: { [fieldName]: allItems[fieldName] } });
      }
    }
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 655ffec

Comment on lines 81 to 85
filterCriteria.push({
bool: {
must_not: [...groupFilter],
},
});
Copy link
Contributor

Choose a reason for hiding this comment

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

must_not is OR by default, to get groupFilter treated with AND it needs to be nested in a bool filter again:

filterCriteria.push({
      bool: {
        must_not: [
          {
            bool: {
              filter: [...groupFilter],
            },
          },
        ],
      },
    });

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 655ffec

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.

Latest changes LGTM!

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested latest changes and LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiops 759.0KB 759.4KB +450.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @alvarezmelissa87

@alvarezmelissa87 alvarezmelissa87 merged commit 4acc6e5 into elastic:main Sep 20, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 20, 2022
@alvarezmelissa87 alvarezmelissa87 deleted the ml-aiops-group-level-chart-sync branch September 20, 2022 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:enhancement v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants