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

[Cases] severity field in the cases list and allow to filter by it #131694

Merged
merged 73 commits into from
May 9, 2022

Conversation

academo
Copy link
Contributor

@academo academo commented May 6, 2022

Summary

Introduces

  • The severity field in the cases list table
  • The severity filter
  • API modifications to allow filtering by severity field
  • API integration tests
  • Related unit tests

list field

Checklist

Delete any items that are not applicable to this PR.

Esteban Beltran and others added 30 commits May 3, 2022 14:18
… "long" in Elasticsearch) (elastic#130819)

* Convert event.duration to string in TypeScript, keep as long in Elasticsearch

* Fix jest test

* Fix functional tests

* Add ecsStringOrNumber to event log schema

* Fix jest test

* Add utility functions to event log plugin

* Use new event log utility functions

* PR fixes

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

* Add fix license link

* fix localization

* fix CI error

* fix more translation issues

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

* turn off experiment

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Status filter API call

* Fix tests

* rename state to status, added tests

* Address comments and fix tests

* Revert experiment flag

* Remove unused translations

* Addressed comments

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* [storybook] Watch for changes in packages

* Update default_config.ts
* adjust vega doc

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@@ -300,30 +302,6 @@ export const useCasesColumns = ({
return getEmptyTagValue();
},
},
...(isSelectorView
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This section was merely moved down to allow the severity field to show before the status.

@@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n';
export * from '../../common/translations';

export const ALL = i18n.translate('xpack.cases.status.all', {
defaultMessage: 'All',
defaultMessage: 'All status',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy change required to clarify the "All" in the status filter dropdown now that the severity field was added.

Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

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

Code LGTM. I tested locally and everything is working as expected.

I noticed that the "All severity" item is on the bottom when you open the dropdown. Could you please move it to the top? Same as the "All statuses".

Screenshot 2022-05-09 at 11 35 07 AM

@academo academo requested a review from cnasikas May 9, 2022 09:15
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cases 425 426 +1

Async chunks

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

id before after diff
cases 293.7KB 296.7KB +3.0KB

Page load bundle

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

id before after diff
cases 112.1KB 112.2KB +77.0B

History

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

cc @academo

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM.

Created a separate enhancement request #131806 to persist / restore the filter settings, including the severity,to the URL

@academo academo merged commit 190ed55 into elastic:main May 9, 2022
@academo academo deleted the feature/cases-severity-field-list-table branch May 9, 2022 13:47
@cnasikas cnasikas added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:feature Makes this part of the condensed release notes labels May 27, 2022
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.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.