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

[Security Solution][Resolver] Pill numbers in compact notation #80038

Merged
merged 8 commits into from
Oct 8, 2020
Merged

[Security Solution][Resolver] Pill numbers in compact notation #80038

merged 8 commits into from
Oct 8, 2020

Conversation

bkimmel
Copy link
Contributor

@bkimmel bkimmel commented Oct 8, 2020

Summary

We convert the number displays in Resolver node pills to "compact" form (e.g. 1,000,000 is displayed as "1M" and 1,000,001 is displayed as "1M+")

Screenshots:

Small numbers:
image

Thousands:
image

Millions:
image

Random large amounts:
image

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@bkimmel bkimmel marked this pull request as ready for review October 8, 2020 18:17
@bkimmel bkimmel requested review from a team as code owners October 8, 2020 18:17
@bkimmel bkimmel added v7.11.0 v8.0.0 Feature:Resolver Security Solution Resolver feature labels Oct 8, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/endpoint-app-team (Feature:Resolver)

@bkimmel bkimmel added Team:Threat Hunting Security Solution Threat Hunting Team release_note:enhancement labels Oct 8, 2020
Copy link
Contributor

@oatkiller oatkiller left a comment

Choose a reason for hiding this comment

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

very cool

scale *= 1000;
}

const scale = Math.pow(10, 3 * Math.min(Math.floor(Math.floor(Math.log10(num)) / 3), 4));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ h/t @jonathan-buttner on the math

Copy link
Contributor

Choose a reason for hiding this comment

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

image

@monina-n monina-n self-requested a review October 8, 2020 20:51
@bkimmel
Copy link
Contributor Author

bkimmel commented Oct 8, 2020

@elasticmachine merge upstream

@jonathan-buttner
Copy link
Contributor

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

@kbn/optimizer bundle module count

id before after diff
securitySolution 2038 2057 +19

async chunks size

id before after diff
securitySolution 10.5MB 10.6MB +83.4KB

History

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

@bkimmel bkimmel merged commit 6abda71 into elastic:master Oct 8, 2020
@bkimmel bkimmel deleted the resolver/pills-compact-notation branch October 8, 2020 23:41
bkimmel added a commit that referenced this pull request Oct 9, 2020
… (#80087)

* Add compact notation to pills

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Oct 12, 2020
* master: (23 commits)
  Table visualization renderer (elastic#79455)
  Migrate Jest JUnit reporter to TS (elastic#79919)
  store sorted bundleRefExportIds (elastic#80011)
  update chromedriver dependency to 86.0.0 (elastic#79972)
  [Security Solution][Case] Fix bug when changing connectors (elastic#80002)
  [kbn/std] add observable helpers to aid with rxjs 7 upgrade (elastic#79752)
  [Security Solution][Resolver] Pill numbers in compact notation (elastic#80038)
  [Logs UI] Sync logs timerange with wider Kibana (elastic#79444)
  [DOCS] Adds quick start (elastic#78822)
  [Ingest Manager]Fix ingest manager UI renaming (elastic#80036)
  [Monitoring] Fixed internal monitoring check (elastic#79241)
  [Security Solution][Exception Modal] Removes list operators in exception modal for EQL rules (elastic#79871)
  Update development documentation about REST API best practices (elastic#80009)
  [Monitoring] Improve indices loading against larger metricbeat-* indices (elastic#79190)
  [CI] Move kibana build dir outside of repo for functional tests (elastic#80018)
  [kbn/optimizer] bump low or add missing limits when updating automatically (elastic#80013)
  [Enterprise Search] Added a Credentials page to App Search (elastic#79749)
  [DOCS] Canvas refresh for 7.10 (elastic#80017)
  [TSVB] Add ignore global filters to series options (elastic#79337)
  Remove this check (elastic#79202)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Resolver Security Solution Resolver feature release_note:enhancement Team:Threat Hunting Security Solution Threat Hunting Team v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants