-
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
[Lens] Fix default formatter for gauge charts #179473
[Lens] Fix default formatter for gauge charts #179473
Conversation
The chart ids used to be cast as unique strings (https://github.com/markov00/elastic-charts/blame/8afa62afc4206d8ce3876aa5ccd9c69a8c20518a/src/utils/ids.ts) but this was changed in elastic/elastic-charts#281 and fully removed in elastic/elastic-charts#554.
/ci |
src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx
Show resolved
Hide resolved
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.
Code only review from explore, lgtm!
src/plugins/visualizations/common/expression_functions/vis_dimension.ts
Outdated
Show resolved
Hide resolved
@dej611 Could you take another look at this? |
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 locally with all gauge types and it works fine now 👍
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/security-threat-hunting-explore for codeowner review |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…astic#173200) # Backport This will backport the following commits from `main` to `8.12`: - [[SLO] Reset UI for updating outdated SLOs (elastic#172883)](elastic#172883) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Chris Cowan","email":"chris@elastic.co"},"sourceCommit":{"committedDate":"2023-12-12T19:36:20Z","message":"[SLO] Reset UI for updating outdated SLOs (elastic#172883)\n\n## Summary\r\n\r\nThis PR is a follow up to elastic#172224, it adds a UI for resetting the SLO\r\ndefinitions from the previous model. Once elastic#179473 is merged I will\r\nrebase this against `main` and convert it from a \"draft\" PR to \"ready to\r\nreview\".\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/daf0591c-272f-40c2-9831-658d7b9b1378)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/d385396d-d840-4574-942a-b8e51ce66066)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/729df2a0-61e6-41b3-aaa5-8501e7aa7797)\r\n\r\n\r\n### Testing\r\n\r\n1. Start by loading `main`\r\n2. Ingest some data\r\n3. Create some SLOs\r\n4. Change Kibana from `main` to this PR\r\n5. Visit the SLO page, you should see a banner similar to the screen\r\nshot above.\r\n6. Do your best to break this\r\n\r\n---------\r\n\r\nCo-authored-by: shahzad31 <shahzad31comp@gmail.com>\r\nCo-authored-by: Dominique Clarke <doclarke71@gmail.com>","sha":"c2003d9f83f6d437ec9ce46943a402b38c07ece5","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","backport:prev-minor","Feature:SLO","v8.12.0","Team:obs-ux-management","v8.13.0"],"number":172883,"url":"https://github.com/elastic/kibana/pull/172883","mergeCommit":{"message":"[SLO] Reset UI for updating outdated SLOs (elastic#172883)\n\n## Summary\r\n\r\nThis PR is a follow up to elastic#172224, it adds a UI for resetting the SLO\r\ndefinitions from the previous model. Once elastic#179473 is merged I will\r\nrebase this against `main` and convert it from a \"draft\" PR to \"ready to\r\nreview\".\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/daf0591c-272f-40c2-9831-658d7b9b1378)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/d385396d-d840-4574-942a-b8e51ce66066)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/729df2a0-61e6-41b3-aaa5-8501e7aa7797)\r\n\r\n\r\n### Testing\r\n\r\n1. Start by loading `main`\r\n2. Ingest some data\r\n3. Create some SLOs\r\n4. Change Kibana from `main` to this PR\r\n5. Visit the SLO page, you should see a banner similar to the screen\r\nshot above.\r\n6. Do your best to break this\r\n\r\n---------\r\n\r\nCo-authored-by: shahzad31 <shahzad31comp@gmail.com>\r\nCo-authored-by: Dominique Clarke <doclarke71@gmail.com>","sha":"c2003d9f83f6d437ec9ce46943a402b38c07ece5"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172883","number":172883,"mergeCommit":{"message":"[SLO] Reset UI for updating outdated SLOs (elastic#172883)\n\n## Summary\r\n\r\nThis PR is a follow up to elastic#172224, it adds a UI for resetting the SLO\r\ndefinitions from the previous model. Once elastic#179473 is merged I will\r\nrebase this against `main` and convert it from a \"draft\" PR to \"ready to\r\nreview\".\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/daf0591c-272f-40c2-9831-658d7b9b1378)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/d385396d-d840-4574-942a-b8e51ce66066)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/41702/729df2a0-61e6-41b3-aaa5-8501e7aa7797)\r\n\r\n\r\n### Testing\r\n\r\n1. Start by loading `main`\r\n2. Ingest some data\r\n3. Create some SLOs\r\n4. Change Kibana from `main` to this PR\r\n5. Visit the SLO page, you should see a banner similar to the screen\r\nshot above.\r\n6. Do your best to break this\r\n\r\n---------\r\n\r\nCo-authored-by: shahzad31 <shahzad31comp@gmail.com>\r\nCo-authored-by: Dominique Clarke <doclarke71@gmail.com>","sha":"c2003d9f83f6d437ec9ce46943a402b38c07ece5"}}]}] BACKPORT--> Co-authored-by: Chris Cowan <chris@elastic.co> Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
Summary
Fix gauge field formatter to pull default formatter defined on the dataview field.
fixes #179439
Details
Bug originally from #126048 when Goal/Gauge was replaced in Aggs-Based with
@elastic/charts
.Also removes old and now superfluous mocking of
getSpecId
chart export, see #179473 (comment).Checklist