[Security Solution][Entity Analytics][PrivMon] Handle null/undefined values gracefully for tiles on Privmon dashboard#226387
Conversation
|
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
|
|
||
| const LENS_VISUALIZATION_HEIGHT = 126; | ||
| const LENS_VISUALIZATION_MIN_WIDTH = 160; | ||
| const LENS_VISUALIZATION_HEIGHT = 150; |
There was a problem hiding this comment.
Can you describe what the effect of this change to the height/weight is?
There was a problem hiding this comment.
jaredburgettelastic
left a comment
There was a problem hiding this comment.
Have not desk tested, but code looks straightforward and good to me!
| ) { | ||
| return ( | ||
| <EuiFlexItem grow={false} style={{ minWidth: LENS_VISUALIZATION_MIN_WIDTH }}> | ||
| <EuiPanel |
There was a problem hiding this comment.
Maybe not colored text I think that will look weird ignore that, but icon could be nice 😎
There was a problem hiding this comment.
Yeah or maybe big central icon with text below, one for
1. minWidht and minHeight remains 2. Subdued tile is removed 3. Title and "Data not available" similar to other tiles 4. Warning icon currently near "Data not available"
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
|
Starting backport for target branches: 9.1 https://github.com/elastic/kibana/actions/runs/16214876053 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…values gracefully for tiles on Privmon dashboard (elastic#226387) ## Summary What changed: Added error handling for PrivMon dashboard tiles when ES queries fail (like missing ML indices) Instead of showing broken visualizations, tiles now display a clean "Data not available" message The error tiles maintain consistent styling and layout with working tiles Added state tracking to detect when visualization loading completes - Check for missing [tables] property in visualization response to identify errors - Render a styled error state using EUI components that matches the design of working tiles - Made error message i18n compliant for proper localization Screenshot Ref :  With data :  Testing Steps : 1. Checkout this PR 2. Start the privmon engine : `POST kbn:/api/entity_analytics/monitoring/engine/init` 3. Add some privileged users either using a CSV file or from dev console. 4. Add relevant data for different indexes using the security-documents-generator. 6. Enable the risk score and Asset criticality. 7. Change filters for timerange or any KQL query to get the desired results. 8. The tile visualisations on the privmon dashboard should not display any errors. It should either display the Count or `Data not available`. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit df7732a) # Conflicts: # x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/privileged_user_monitoring/components/key_insights_panel/index.tsx
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
…fined values gracefully for tiles on Privmon dashboard (#226387) (#227577) # Backport This will backport the following commits from `main` to `9.1`: - [[Security Solution][Entity Analytics][PrivMon] Handle null/undefined values gracefully for tiles on Privmon dashboard (#226387)](#226387) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Abhishek Bhatia","email":"117628830+abhishekbhatia1710@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-11T07:55:23Z","message":"[Security Solution][Entity Analytics][PrivMon] Handle null/undefined values gracefully for tiles on Privmon dashboard (#226387)\n\n## Summary\n\nWhat changed:\n\nAdded error handling for PrivMon dashboard tiles when ES queries fail\n(like missing ML indices)\nInstead of showing broken visualizations, tiles now display a clean\n\"Data not available\" message\nThe error tiles maintain consistent styling and layout with working\ntiles\n\nAdded state tracking to detect when visualization loading completes\n- Check for missing [tables] property in visualization response to\nidentify errors\n- Render a styled error state using EUI components that matches the\ndesign of working tiles\n- Made error message i18n compliant for proper localization\n\nScreenshot Ref : \n\n\n\n\nWith data : \n\n\n\n\n\nTesting Steps : \n1. Checkout this PR\n2. Start the privmon engine : `POST\nkbn:/api/entity_analytics/monitoring/engine/init`\n3. Add some privileged users either using a CSV file or from dev\nconsole.\n4. Add relevant data for different indexes using the\nsecurity-documents-generator.\n6. Enable the risk score and Asset criticality.\n7. Change filters for timerange or any KQL query to get the desired\nresults.\n8. The tile visualisations on the privmon dashboard should not display\nany errors. It should either display the Count or `Data not available`.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"df7732aab8d3cb1ba494f9fea0445b2cb8d108bc","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Entity Analytics","backport:version","v9.1.0","v9.2.0"],"title":"[Security Solution][Entity Analytics][PrivMon] Handle null/undefined values gracefully for tiles on Privmon dashboard","number":226387,"url":"https://github.com/elastic/kibana/pull/226387","mergeCommit":{"message":"[Security Solution][Entity Analytics][PrivMon] Handle null/undefined values gracefully for tiles on Privmon dashboard (#226387)\n\n## Summary\n\nWhat changed:\n\nAdded error handling for PrivMon dashboard tiles when ES queries fail\n(like missing ML indices)\nInstead of showing broken visualizations, tiles now display a clean\n\"Data not available\" message\nThe error tiles maintain consistent styling and layout with working\ntiles\n\nAdded state tracking to detect when visualization loading completes\n- Check for missing [tables] property in visualization response to\nidentify errors\n- Render a styled error state using EUI components that matches the\ndesign of working tiles\n- Made error message i18n compliant for proper localization\n\nScreenshot Ref : \n\n\n\n\nWith data : \n\n\n\n\n\nTesting Steps : \n1. Checkout this PR\n2. Start the privmon engine : `POST\nkbn:/api/entity_analytics/monitoring/engine/init`\n3. Add some privileged users either using a CSV file or from dev\nconsole.\n4. Add relevant data for different indexes using the\nsecurity-documents-generator.\n6. Enable the risk score and Asset criticality.\n7. Change filters for timerange or any KQL query to get the desired\nresults.\n8. The tile visualisations on the privmon dashboard should not display\nany errors. It should either display the Count or `Data not available`.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"df7732aab8d3cb1ba494f9fea0445b2cb8d108bc"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226387","number":226387,"mergeCommit":{"message":"[Security Solution][Entity Analytics][PrivMon] Handle null/undefined values gracefully for tiles on Privmon dashboard (#226387)\n\n## Summary\n\nWhat changed:\n\nAdded error handling for PrivMon dashboard tiles when ES queries fail\n(like missing ML indices)\nInstead of showing broken visualizations, tiles now display a clean\n\"Data not available\" message\nThe error tiles maintain consistent styling and layout with working\ntiles\n\nAdded state tracking to detect when visualization loading completes\n- Check for missing [tables] property in visualization response to\nidentify errors\n- Render a styled error state using EUI components that matches the\ndesign of working tiles\n- Made error message i18n compliant for proper localization\n\nScreenshot Ref : \n\n\n\n\nWith data : \n\n\n\n\n\nTesting Steps : \n1. Checkout this PR\n2. Start the privmon engine : `POST\nkbn:/api/entity_analytics/monitoring/engine/init`\n3. Add some privileged users either using a CSV file or from dev\nconsole.\n4. Add relevant data for different indexes using the\nsecurity-documents-generator.\n6. Enable the risk score and Asset criticality.\n7. Change filters for timerange or any KQL query to get the desired\nresults.\n8. The tile visualisations on the privmon dashboard should not display\nany errors. It should either display the Count or `Data not available`.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"df7732aab8d3cb1ba494f9fea0445b2cb8d108bc"}}]}] BACKPORT-->
…values gracefully for tiles on Privmon dashboard (elastic#226387) ## Summary What changed: Added error handling for PrivMon dashboard tiles when ES queries fail (like missing ML indices) Instead of showing broken visualizations, tiles now display a clean "Data not available" message The error tiles maintain consistent styling and layout with working tiles Added state tracking to detect when visualization loading completes - Check for missing [tables] property in visualization response to identify errors - Render a styled error state using EUI components that matches the design of working tiles - Made error message i18n compliant for proper localization Screenshot Ref :  With data :  Testing Steps : 1. Checkout this PR 2. Start the privmon engine : `POST kbn:/api/entity_analytics/monitoring/engine/init` 3. Add some privileged users either using a CSV file or from dev console. 4. Add relevant data for different indexes using the security-documents-generator. 6. Enable the risk score and Asset criticality. 7. Change filters for timerange or any KQL query to get the desired results. 8. The tile visualisations on the privmon dashboard should not display any errors. It should either display the Count or `Data not available`. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>



Summary
What changed:
Added error handling for PrivMon dashboard tiles when ES queries fail (like missing ML indices)
Instead of showing broken visualizations, tiles now display a clean "Data not available" message
The error tiles maintain consistent styling and layout with working tiles
Added state tracking to detect when visualization loading completes
Screenshot Ref :
With data :
Testing Steps :
POST kbn:/api/entity_analytics/monitoring/engine/initData not available.Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:*label is applied per the guidelinesbackport:*labels.