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

[RAM] Cases bulk actions & column improvements #151761

Merged
merged 60 commits into from
Mar 29, 2023

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Feb 21, 2023

Summary

This PR:

  • Moves the case bulk actions from the solutions to the alert table
  • Refetch when using the case row actions & the case bulk actions.
  • Renames the kibana.alert.case_ids label to Cases
  • Unskip the alerts_table.test.tsx test file and skip the individual flaky tests. I run the test file 60 times in the CI without any issues (9efed89)
  • Renames the cases flyout and modal hook from get* to use*

Fixes: #151688

Userflow

Testing

Alerts table

  • The alerts table does not show the Cases column by default
  • You can choose the case column from the fields modal. Type Case to find the cases column
  • The label of the column is Cases
  • The label of the field in the fields modal is Cases
  • You can bulk attach alerts to a new case
  • You can bulk attach alerts to an existing case
  • When bulk attaching alerts to a case the alerts table re-fetches the data
  • When attaching an alert to a case from the row actions the alerts table re-fetches the data

Case integrations outside the alerts table

  • Ensure that you can attach your data to a case (existing and new)

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cnasikas cnasikas added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.8.0 labels Feb 21, 2023
@cnasikas cnasikas self-assigned this Feb 21, 2023
@cnasikas cnasikas changed the title [RAM] Cases column improvements [RAM] Cases bulk actions & column improvements Feb 22, 2023
close: () => void;
};

export interface CasesService {
Copy link
Member Author

Choose a reason for hiding this comment

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

When a case package is created these types will be imported from the package.

@@ -0,0 +1,35 @@
/*
Copy link
Member Author

Choose a reason for hiding this comment

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

I created an issue to create a package with Cases mocks to remove this file and import the Case UI Service mock from the package.

@cnasikas cnasikas requested a review from a team March 27, 2023 15:41
@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

LGTM, tested locally and works fine!

@cnasikas cnasikas enabled auto-merge (squash) March 28, 2023 09:04
@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@patrykkopycinski
Copy link
Contributor

@elasticmachine run elasticsearch-ci/docs

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Threat Intelligence Tests #4 / Indicators Indicator page search should narrow the results to url indicators when respective KQL search is executed

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 515 514 -1
securitySolution 3799 3798 -1
total -2

Async chunks

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

id before after diff
cases 363.7KB 363.7KB -16.0B
infra 1.4MB 1.4MB -233.0B
ml 3.4MB 3.4MB -6.0B
observability 1.1MB 1.1MB -1.4KB
osquery 1.1MB 1.1MB -5.0B
securitySolution 15.8MB 15.8MB -673.0B
threatIntelligence 52.3KB 52.3KB -10.0B
triggersActionsUi 1.4MB 1.4MB +2.2KB
total -101.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
cases 30 31 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
cases 133.3KB 133.3KB -12.0B
triggersActionsUi 83.6KB 83.6KB -37.0B
total -49.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 435 +2

Total ESLint disabled count

id before after diff
securitySolution 513 515 +2

History

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

cc @cnasikas

@cnasikas cnasikas merged commit a47a3e1 into elastic:main Mar 29, 2023
@cnasikas cnasikas deleted the cases_column branch March 29, 2023 17:45
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Mar 29, 2023
jgowdyelastic pushed a commit to jgowdyelastic/kibana that referenced this pull request Mar 30, 2023
## Summary

This PR:
- Moves the case bulk actions from the solutions to the alert table
- Refetch when using the case row actions & the case bulk actions.
- Renames the `kibana.alert.case_ids` label to `Cases`
- Unskip the `alerts_table.test.tsx` test file and skip the individual
flaky tests. I run the test file 60 times in the CI without any issues
(elastic@9efed89)
- Renames the cases flyout and modal hook from `get*` to `use*`

Fixes: elastic#151688

## Userflow

## Testing

### Alerts table

- The alerts table does not show the Cases column by default
- You can choose the case column from the fields modal. Type `Case` to
find the cases column
- The label of the column is `Cases`
- The label of the field in the fields modal is `Cases`
- You can bulk attach alerts to a new case
- You can bulk attach alerts to an existing case
- When bulk attaching alerts to a case the alerts table re-fetches the
data
- When attaching an alert to a case from the row actions the alerts
table re-fetches the data

### Case integrations outside the alerts table
- Ensure that you can attach your data to a case (existing and new)

### Checklist

Delete any items that are not applicable to this PR.

- [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

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.8.0
Projects
None yet