-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Explain Log Rate Spikes: add main chart sync on row hover at group level #141138
Conversation
Pinging @elastic/ml-ui (:ml) |
…-ref HEAD~1..HEAD --fix'
const groupFilter = []; | ||
if (selectedGroup) { | ||
for (const fieldName in selectedGroup.group) { | ||
if (selectedGroup.group.hasOwnProperty(fieldName)) { | ||
groupFilter.push({ term: { [fieldName]: selectedGroup.group[fieldName] } }); | ||
} | ||
} | ||
} |
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.
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] } });
}
}
}
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.
Updated in 655ffec
filterCriteria.push({ | ||
bool: { | ||
must_not: [...groupFilter], | ||
}, | ||
}); |
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.
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],
},
},
],
},
});
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.
Updated in 655ffec
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.
Latest changes 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.
Tested latest changes and LGTM
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Summary
This PR adds support for table hovering with main chart sync on group level
Checklist
Delete any items that are not applicable to this PR.