Skip to content

[Entity Analytics][Entity Store] Refactor enablement UI#199762

Merged
tiansivive merged 12 commits intoelastic:mainfrom
tiansivive:ea-store-refactor-enablement-ui
Nov 28, 2024
Merged

[Entity Analytics][Entity Store] Refactor enablement UI#199762
tiansivive merged 12 commits intoelastic:mainfrom
tiansivive:ea-store-refactor-enablement-ui

Conversation

@tiansivive
Copy link
Copy Markdown
Contributor

@tiansivive tiansivive commented Nov 12, 2024

Summary

This PR reworks the client side enablement flow for the Entity Store. It's the final piece for the work tracked in https://github.com/elastic/security-team/issues/10846, https://github.com/elastic/security-team/issues/10847 and https://github.com/elastic/security-team/issues/10947

enablement.mov

How to test

Optionally

On a fresh kibana and es cluster instance:

  1. Load up some entity analytics data via the https://github.com/elastic/security-documents-generator
    • Running yarn start entity-resolution-demo --mini is enough
  2. Navigate to Security > Dashboards > Entity Analytics
  3. Click the Enable entity store button
  4. Both Risk Score and Entity Store toggles should be checked.
    • This state represents the engines we will install, NOT the current state
  5. Click Enable
  6. The modal should close and Risk Scoring should initialize first
  7. As soon as risk score initialization finished, the entity store initialization should start
    • Risk score related panels should show up while the store is initializing
  8. Finally, the Entities List panel should appear

  • added cypress tests to verify the correct enablement flow

@tiansivive tiansivive added the ci:cloud-deploy Create or update a Cloud deployment label Nov 14, 2024
@tiansivive tiansivive force-pushed the ea-store-refactor-enablement-ui branch from bc6e0b1 to 96464fc Compare November 18, 2024 14:03
@tiansivive tiansivive force-pushed the ea-store-refactor-enablement-ui branch from daa1371 to 2c8485f Compare November 20, 2024 10:11
@tiansivive tiansivive marked this pull request as ready for review November 20, 2024 10:27
@tiansivive tiansivive requested review from a team as code owners November 20, 2024 10:27
@tiansivive tiansivive added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Theme: entity_analytics Team:Entity Analytics Security Entity Analytics Team backport:version Backport to applied version labels v8.17.0 labels Nov 20, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

@tiansivive tiansivive added the technical debt Improvement of the software architecture and operational architecture label Nov 20, 2024
Copy link
Copy Markdown
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

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

Tested locally, working great. Nice work 👍

Left a few comments, nothing blocking.

Copy link
Copy Markdown
Contributor

@MadameSheema MadameSheema left a comment

Choose a reason for hiding this comment

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

security engineering productivity changes LGTM!

Copy link
Copy Markdown
Contributor

@dhurley14 dhurley14 left a comment

Choose a reason for hiding this comment

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

DE change LGTM

export const FLEET_URL = '/app/fleet';

// Entity Analytics
export const ENTITY_ANALYTICS_DASHBOARD_URL = '/app/security/entity_analytics';
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.

this appears to be the only detection engine team related change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hmm, is the codeownders correct? This looked like a more general directory, for shared utilities 🤔

Copy link
Copy Markdown
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

LGTM for the Threat Hunting Investigations team

@tiansivive tiansivive enabled auto-merge (squash) November 26, 2024 12:23
@machadoum machadoum force-pushed the ea-store-refactor-enablement-ui branch from ce7b3e8 to fdde799 Compare November 28, 2024 10:15
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Nov 28, 2024

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 13.4MB 13.4MB -720.0B

History

@tiansivive tiansivive merged commit 722900e into elastic:main Nov 28, 2024
machadoum added a commit that referenced this pull request Nov 29, 2024
## Summary

* Add two tabs to the Entity Store page
  * The import entities tab has all the bulk upload content
  * The status tab has the new content created on this PR
* Move the "clear entity store data" button to the header according to
design mockups.
* Delete unused stats route
* Rename `enablement` API docs to `enable`
* Add a new parameter to the status API (`withComponents`)
  * Should I make it snake cased?

### import entities tab
![Screenshot 2024-11-27 at 15 07
01](https://github.com/user-attachments/assets/c433e217-781e-4792-8695-2ee609efa654)


### status tab
![Screenshot 2024-11-27 at 15 07
20](https://github.com/user-attachments/assets/8970c023-22b3-4e83-a444-fa3ccf78ea42)


## How to test it
- Open security solution app with data
- Go to entity store page
- You shouldn't see the new tab because the engine is disabled
- Enable the engine and wait
- Click on the new tab that showed up
- It should list user and host engine components, and everything should
be installed
- Delete or misconfigure some of the resources, the new status should be
reflected on the tab.


## TODO:
- [x] Rebase main after #199762 is
merged
  - [x] Remove temporary status hook
- [x] Fix the"clear entity data" button. It should re-fetch the status
API.







### Checklist

Reviewers should verify this PR satisfies this list as well.

- [x] 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/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@tiansivive
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

tiansivive added a commit to tiansivive/kibana that referenced this pull request Dec 2, 2024
## Summary

This PR reworks the client side enablement flow for the Entity Store.
It's the final piece for the work tracked in
elastic/security-team#10846,
elastic/security-team#10847 and
elastic/security-team#10947

https://github.com/user-attachments/assets/bb919c3c-b8dc-4e6b-a14b-4d413f8da13f

## How to test

Optionally

On a fresh kibana and es cluster instance:
1. Load up some entity analytics data via the
https://github.com/elastic/security-documents-generator
    * Running `yarn start entity-resolution-demo --mini` is enough
1. Navigate to `Security > Dashboards > Entity Analytics`
3. Click the `Enable` entity store button
4. Both Risk Score and Entity Store toggles should be checked.
* This state represents the engines we will install, _NOT_ the current
state
5. Click `Enable`
6. The modal should close and Risk Scoring should initialize first
7. As soon as risk score initialization finished, the entity store
initialization should start
* Risk score related panels should show up while the store is
initializing
8. Finally, the Entities List panel should appear

##

- [x] added cypress tests to verify the correct enablement flow

(cherry picked from commit 722900e)
tiansivive added a commit that referenced this pull request Dec 2, 2024
… (#202404)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Entity Analytics][Entity Store] Refactor enablement UI
(#199762)](#199762)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tiago Vila
Verde","email":"tiago.vilaverde@elastic.co"},"sourceCommit":{"committedDate":"2024-11-28T12:01:56Z","message":"[Entity
Analytics][Entity Store] Refactor enablement UI (#199762)\n\n##
Summary\r\n\r\nThis PR reworks the client side enablement flow for the
Entity Store.\r\nIt's the final piece for the work tracked
in\r\nhttps://github.com/elastic/security-team/issues/10846,\r\nhttps://github.com/elastic/security-team/issues/10847
and\r\nhttps://github.com/elastic/security-team/issues/10947\r\n\r\n\r\nhttps://github.com/user-attachments/assets/bb919c3c-b8dc-4e6b-a14b-4d413f8da13f\r\n\r\n##
How to test\r\n\r\nOptionally \r\n\r\nOn a fresh kibana and es cluster
instance:\r\n1. Load up some entity analytics data via
the\r\nhttps://github.com/elastic/security-documents-generator\r\n *
Running `yarn start entity-resolution-demo --mini` is enough \r\n1.
Navigate to `Security > Dashboards > Entity Analytics`\r\n3. Click the
`Enable` entity store button\r\n4. Both Risk Score and Entity Store
toggles should be checked.\r\n* This state represents the engines we
will install, _NOT_ the current\r\nstate\r\n5. Click `Enable`\r\n6. The
modal should close and Risk Scoring should initialize first\r\n7. As
soon as risk score initialization finished, the entity
store\r\ninitialization should start\r\n* Risk score related panels
should show up while the store is\r\ninitializing\r\n8. Finally, the
Entities List panel should appear \r\n\r\n\r\n##\r\n \r\n- [x] added
cypress tests to verify the correct enablement
flow","sha":"722900e6def904ac8dbdd20f0a04b5f418393617","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["technical
debt","release_note:skip","v9.0.0","ci:cloud-deploy","Theme:
entity_analytics","Team:Entity
Analytics","backport:version","v8.18.0"],"number":199762,"url":"https://github.com/elastic/kibana/pull/199762","mergeCommit":{"message":"[Entity
Analytics][Entity Store] Refactor enablement UI (#199762)\n\n##
Summary\r\n\r\nThis PR reworks the client side enablement flow for the
Entity Store.\r\nIt's the final piece for the work tracked
in\r\nhttps://github.com/elastic/security-team/issues/10846,\r\nhttps://github.com/elastic/security-team/issues/10847
and\r\nhttps://github.com/elastic/security-team/issues/10947\r\n\r\n\r\nhttps://github.com/user-attachments/assets/bb919c3c-b8dc-4e6b-a14b-4d413f8da13f\r\n\r\n##
How to test\r\n\r\nOptionally \r\n\r\nOn a fresh kibana and es cluster
instance:\r\n1. Load up some entity analytics data via
the\r\nhttps://github.com/elastic/security-documents-generator\r\n *
Running `yarn start entity-resolution-demo --mini` is enough \r\n1.
Navigate to `Security > Dashboards > Entity Analytics`\r\n3. Click the
`Enable` entity store button\r\n4. Both Risk Score and Entity Store
toggles should be checked.\r\n* This state represents the engines we
will install, _NOT_ the current\r\nstate\r\n5. Click `Enable`\r\n6. The
modal should close and Risk Scoring should initialize first\r\n7. As
soon as risk score initialization finished, the entity
store\r\ninitialization should start\r\n* Risk score related panels
should show up while the store is\r\ninitializing\r\n8. Finally, the
Entities List panel should appear \r\n\r\n\r\n##\r\n \r\n- [x] added
cypress tests to verify the correct enablement
flow","sha":"722900e6def904ac8dbdd20f0a04b5f418393617"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199762","number":199762,"mergeCommit":{"message":"[Entity
Analytics][Entity Store] Refactor enablement UI (#199762)\n\n##
Summary\r\n\r\nThis PR reworks the client side enablement flow for the
Entity Store.\r\nIt's the final piece for the work tracked
in\r\nhttps://github.com/elastic/security-team/issues/10846,\r\nhttps://github.com/elastic/security-team/issues/10847
and\r\nhttps://github.com/elastic/security-team/issues/10947\r\n\r\n\r\nhttps://github.com/user-attachments/assets/bb919c3c-b8dc-4e6b-a14b-4d413f8da13f\r\n\r\n##
How to test\r\n\r\nOptionally \r\n\r\nOn a fresh kibana and es cluster
instance:\r\n1. Load up some entity analytics data via
the\r\nhttps://github.com/elastic/security-documents-generator\r\n *
Running `yarn start entity-resolution-demo --mini` is enough \r\n1.
Navigate to `Security > Dashboards > Entity Analytics`\r\n3. Click the
`Enable` entity store button\r\n4. Both Risk Score and Entity Store
toggles should be checked.\r\n* This state represents the engines we
will install, _NOT_ the current\r\nstate\r\n5. Click `Enable`\r\n6. The
modal should close and Risk Scoring should initialize first\r\n7. As
soon as risk score initialization finished, the entity
store\r\ninitialization should start\r\n* Risk score related panels
should show up while the store is\r\ninitializing\r\n8. Finally, the
Entities List panel should appear \r\n\r\n\r\n##\r\n \r\n- [x] added
cypress tests to verify the correct enablement
flow","sha":"722900e6def904ac8dbdd20f0a04b5f418393617"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
machadoum added a commit to machadoum/kibana that referenced this pull request Dec 3, 2024
## Summary

* Add two tabs to the Entity Store page
  * The import entities tab has all the bulk upload content
  * The status tab has the new content created on this PR
* Move the "clear entity store data" button to the header according to
design mockups.
* Delete unused stats route
* Rename `enablement` API docs to `enable`
* Add a new parameter to the status API (`withComponents`)
  * Should I make it snake cased?

### import entities tab
![Screenshot 2024-11-27 at 15 07
01](https://github.com/user-attachments/assets/c433e217-781e-4792-8695-2ee609efa654)

### status tab
![Screenshot 2024-11-27 at 15 07
20](https://github.com/user-attachments/assets/8970c023-22b3-4e83-a444-fa3ccf78ea42)

## How to test it
- Open security solution app with data
- Go to entity store page
- You shouldn't see the new tab because the engine is disabled
- Enable the engine and wait
- Click on the new tab that showed up
- It should list user and host engine components, and everything should
be installed
- Delete or misconfigure some of the resources, the new status should be
reflected on the tab.

## TODO:
- [x] Rebase main after elastic#199762 is
merged
  - [x] Remove temporary status hook
- [x] Fix the"clear entity data" button. It should re-fetch the status
API.

### Checklist

Reviewers should verify this PR satisfies this list as well.

- [x] 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/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 06b7993)

# Conflicts:
#	oas_docs/output/kibana.serverless.yaml
#	x-pack/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml
#	x-pack/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml
#	x-pack/test/api_integration/services/security_solution_api.gen.ts
machadoum added a commit that referenced this pull request Dec 3, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[SecuritySolution] Entity Engine status tab
(#201235)](#201235)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Pablo
Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2024-11-29T15:29:04Z","message":"[SecuritySolution]
Entity Engine status tab (#201235)\n\n## Summary\r\n\r\n* Add two tabs
to the Entity Store page\r\n * The import entities tab has all the bulk
upload content\r\n * The status tab has the new content created on this
PR\r\n* Move the \"clear entity store data\" button to the header
according to\r\ndesign mockups.\r\n* Delete unused stats route\r\n*
Rename `enablement` API docs to `enable`\r\n* Add a new parameter to the
status API (`withComponents`)\r\n * Should I make it snake
cased?\r\n\r\n### import entities tab\r\n![Screenshot 2024-11-27 at 15
07\r\n01](https://github.com/user-attachments/assets/c433e217-781e-4792-8695-2ee609efa654)\r\n\r\n\r\n###
status tab\r\n![Screenshot 2024-11-27 at 15
07\r\n20](https://github.com/user-attachments/assets/8970c023-22b3-4e83-a444-fa3ccf78ea42)\r\n\r\n\r\n##
How to test it\r\n- Open security solution app with data\r\n- Go to
entity store page\r\n- You shouldn't see the new tab because the engine
is disabled\r\n- Enable the engine and wait\r\n- Click on the new tab
that showed up\r\n- It should list user and host engine components, and
everything should\r\nbe installed\r\n- Delete or misconfigure some of
the resources, the new status should be\r\nreflected on the
tab.\r\n\r\n\r\n## TODO:\r\n- [x] Rebase main after
#199762 is\r\nmerged\r\n - [x]
Remove temporary status hook\r\n- [x] Fix the\"clear entity data\"
button. It should re-fetch the
status\r\nAPI.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"06b7993bd90cf84f87a99668c4425fb4dd6d6b5e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","Team:
SecuritySolution","release_note:feature","Theme:
entity_analytics","Feature:Entity Analytics","Team:Entity
Analytics","backport:version","v8.18.0"],"number":201235,"url":"https://github.com/elastic/kibana/pull/201235","mergeCommit":{"message":"[SecuritySolution]
Entity Engine status tab (#201235)\n\n## Summary\r\n\r\n* Add two tabs
to the Entity Store page\r\n * The import entities tab has all the bulk
upload content\r\n * The status tab has the new content created on this
PR\r\n* Move the \"clear entity store data\" button to the header
according to\r\ndesign mockups.\r\n* Delete unused stats route\r\n*
Rename `enablement` API docs to `enable`\r\n* Add a new parameter to the
status API (`withComponents`)\r\n * Should I make it snake
cased?\r\n\r\n### import entities tab\r\n![Screenshot 2024-11-27 at 15
07\r\n01](https://github.com/user-attachments/assets/c433e217-781e-4792-8695-2ee609efa654)\r\n\r\n\r\n###
status tab\r\n![Screenshot 2024-11-27 at 15
07\r\n20](https://github.com/user-attachments/assets/8970c023-22b3-4e83-a444-fa3ccf78ea42)\r\n\r\n\r\n##
How to test it\r\n- Open security solution app with data\r\n- Go to
entity store page\r\n- You shouldn't see the new tab because the engine
is disabled\r\n- Enable the engine and wait\r\n- Click on the new tab
that showed up\r\n- It should list user and host engine components, and
everything should\r\nbe installed\r\n- Delete or misconfigure some of
the resources, the new status should be\r\nreflected on the
tab.\r\n\r\n\r\n## TODO:\r\n- [x] Rebase main after
#199762 is\r\nmerged\r\n - [x]
Remove temporary status hook\r\n- [x] Fix the\"clear entity data\"
button. It should re-fetch the
status\r\nAPI.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"06b7993bd90cf84f87a99668c4425fb4dd6d6b5e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201235","number":201235,"mergeCommit":{"message":"[SecuritySolution]
Entity Engine status tab (#201235)\n\n## Summary\r\n\r\n* Add two tabs
to the Entity Store page\r\n * The import entities tab has all the bulk
upload content\r\n * The status tab has the new content created on this
PR\r\n* Move the \"clear entity store data\" button to the header
according to\r\ndesign mockups.\r\n* Delete unused stats route\r\n*
Rename `enablement` API docs to `enable`\r\n* Add a new parameter to the
status API (`withComponents`)\r\n * Should I make it snake
cased?\r\n\r\n### import entities tab\r\n![Screenshot 2024-11-27 at 15
07\r\n01](https://github.com/user-attachments/assets/c433e217-781e-4792-8695-2ee609efa654)\r\n\r\n\r\n###
status tab\r\n![Screenshot 2024-11-27 at 15
07\r\n20](https://github.com/user-attachments/assets/8970c023-22b3-4e83-a444-fa3ccf78ea42)\r\n\r\n\r\n##
How to test it\r\n- Open security solution app with data\r\n- Go to
entity store page\r\n- You shouldn't see the new tab because the engine
is disabled\r\n- Enable the engine and wait\r\n- Click on the new tab
that showed up\r\n- It should list user and host engine components, and
everything should\r\nbe installed\r\n- Delete or misconfigure some of
the resources, the new status should be\r\nreflected on the
tab.\r\n\r\n\r\n## TODO:\r\n- [x] Rebase main after
#199762 is\r\nmerged\r\n - [x]
Remove temporary status hook\r\n- [x] Fix the\"clear entity data\"
button. It should re-fetch the
status\r\nAPI.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"06b7993bd90cf84f87a99668c4425fb4dd6d6b5e"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## Summary

This PR reworks the client side enablement flow for the Entity Store.
It's the final piece for the work tracked in
elastic/security-team#10846,
elastic/security-team#10847 and
elastic/security-team#10947


https://github.com/user-attachments/assets/bb919c3c-b8dc-4e6b-a14b-4d413f8da13f

## How to test

Optionally 

On a fresh kibana and es cluster instance:
1. Load up some entity analytics data via the
https://github.com/elastic/security-documents-generator
    * Running `yarn start entity-resolution-demo --mini` is enough 
1. Navigate to `Security > Dashboards > Entity Analytics`
3. Click the `Enable` entity store button
4. Both Risk Score and Entity Store toggles should be checked.
* This state represents the engines we will install, _NOT_ the current
state
5. Click `Enable`
6. The modal should close and Risk Scoring should initialize first
7. As soon as risk score initialization finished, the entity store
initialization should start
* Risk score related panels should show up while the store is
initializing
8. Finally, the Entities List panel should appear   


##
 
- [x] added cypress tests to verify the correct enablement flow
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## Summary

* Add two tabs to the Entity Store page
  * The import entities tab has all the bulk upload content
  * The status tab has the new content created on this PR
* Move the "clear entity store data" button to the header according to
design mockups.
* Delete unused stats route
* Rename `enablement` API docs to `enable`
* Add a new parameter to the status API (`withComponents`)
  * Should I make it snake cased?

### import entities tab
![Screenshot 2024-11-27 at 15 07
01](https://github.com/user-attachments/assets/c433e217-781e-4792-8695-2ee609efa654)


### status tab
![Screenshot 2024-11-27 at 15 07
20](https://github.com/user-attachments/assets/8970c023-22b3-4e83-a444-fa3ccf78ea42)


## How to test it
- Open security solution app with data
- Go to entity store page
- You shouldn't see the new tab because the engine is disabled
- Enable the engine and wait
- Click on the new tab that showed up
- It should list user and host engine components, and everything should
be installed
- Delete or misconfigure some of the resources, the new status should be
reflected on the tab.


## TODO:
- [x] Rebase main after elastic#199762 is
merged
  - [x] Remove temporary status hook
- [x] Fix the"clear entity data" button. It should re-fetch the status
API.







### Checklist

Reviewers should verify this PR satisfies this list as well.

- [x] 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/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels ci:cloud-deploy Create or update a Cloud deployment release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team technical debt Improvement of the software architecture and operational architecture Theme: entity_analytics v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants