Skip to content

[SIEM] Fix AnomaliesNetworkTable and AnomaliesHostTable items count - #48634

Merged
patrykkopycinski merged 1 commit into
elastic:masterfrom
patrykkopycinski:fix/anomalies-table-items-count
Oct 18, 2019
Merged

patrykkopycinski merged 1 commit into
elastic:masterfrom
patrykkopycinski:fix/anomalies-table-items-count

Conversation

@patrykkopycinski

Copy link
Copy Markdown
Contributor

Summary

image (1)

  • totalItemCount was counted improperly, because the number of anomalies !== networks/hosts. For the pagination purpose let's use the size of the networks/hosts instead
  • updated tables pagination config, because pageIndex and pageSize are not supported, changed to the proper properties

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials
- [ ] Unit or functional tests were updated or added to match the most common scenarios
- [ ] This was checked for keyboard-only and screenreader accessibility

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/siem (Team:SIEM)

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

totalItemCount: getSizeFromAnomalies(tableData),
initialPageIndex: 0,
initialPageSize: 10,
totalItemCount: hosts.length,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the extra fixes, I did accidentally use the incorrect props.

I confirmed these you changed them to are correct from EUI code base:
https://github.com/elastic/eui/blob/master/src/components/basic_table/in_memory_table.js#L67

And their docs:

Screen Shot 2019-10-18 at 8 32 37 AM

You have a great 👁!

@FrankHassanabad

Copy link
Copy Markdown
Contributor

I added the label of 7.6.0 since we now have a 7.5 branch and a 7.x branch. Backport to those two and everything should be good.

@FrankHassanabad FrankHassanabad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice fix! Appreciate you finding the issue during testing and for looking deeper into the properties and fixing bugs associated with it.

@patrykkopycinski
patrykkopycinski merged commit 9ff6d86 into elastic:master Oct 18, 2019
@patrykkopycinski
patrykkopycinski deleted the fix/anomalies-table-items-count branch October 18, 2019 17:23
patrykkopycinski added a commit to patrykkopycinski/kibana that referenced this pull request Oct 19, 2019
patrykkopycinski added a commit to patrykkopycinski/kibana that referenced this pull request Oct 19, 2019
patrykkopycinski added a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
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.

3 participants