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

Disable selection of filter status 'All' on AddToCaseAction #99757

Merged
merged 6 commits into from
May 14, 2021

Conversation

machadoum
Copy link
Member

@machadoum machadoum commented May 11, 2021

Closes #98742 "User not able to select "Closed" from drop-down on adding alert to existing case modal"

Summary

Hide status "all" and "closed" from the dropdown.

Expected Result
User should not be able to add an alert to a closed case

Before:

initial state
Screenshot 2021-05-11 at 16 43 41

dropdown
Screenshot 2021-05-11 at 16 44 40

After

Initial state
Screenshot 2021-05-11 at 15 49 04

dropdown
Screenshot 2021-05-12 at 11 02 56

Checklist

Delete any items that are not applicable to this PR.

@machadoum machadoum added enhancement New value added to drive a business result Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.14.0 labels May 11, 2021
@machadoum machadoum requested a review from cnasikas May 11, 2021 08:52
@machadoum machadoum self-assigned this May 11, 2021
@machadoum machadoum requested a review from a team as a code owner May 11, 2021 08:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@machadoum machadoum added release_note:skip Skip the PR/issue when compiling release notes v8.0.0 labels May 11, 2021
@machadoum machadoum changed the title Remove 'closed' from disabledStatuses on AddToCaseActionComponent Draft: Remove 'closed' from disabledStatuses on AddToCaseActionComponent May 11, 2021
@machadoum machadoum marked this pull request as draft May 11, 2021 11:19
@machadoum machadoum changed the title Draft: Remove 'closed' from disabledStatuses on AddToCaseActionComponent Remove 'closed' from disabledStatuses on AddToCaseActionComponent May 11, 2021
@machadoum machadoum force-pushed the siem-detection-issue-98742 branch from 2f8b3ad to d400452 Compare May 11, 2021 14:19
@machadoum machadoum changed the title Remove 'closed' from disabledStatuses on AddToCaseActionComponent Disable selection of filter status 'All' on AddToCaseAction May 11, 2021
@machadoum machadoum marked this pull request as ready for review May 11, 2021 14:51
@machadoum machadoum force-pushed the siem-detection-issue-98742 branch from d400452 to e28ac78 Compare May 12, 2021 09:01
@machadoum machadoum force-pushed the siem-detection-issue-98742 branch from e28ac78 to 80cb340 Compare May 12, 2021 10:16
@jonathan-buttner jonathan-buttner self-requested a review May 12, 2021 12:28
machadoum added 2 commits May 12, 2021 16:31
Previously it was always picking 'open', but it wouldn't work when hiddenStatuses contains "open".
Copy link
Contributor

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

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

nice work! I tested and it's working great. Thanks for the fix!

x-pack/plugins/cases/README.md Show resolved Hide resolved
@jonathan-buttner
Copy link
Contributor

@machadoum any idea if the flaky test is related to the PR?

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.

LGTM!

@machadoum
Copy link
Member Author

machadoum commented May 14, 2021

@elasticmachine merge upstream

@machadoum
Copy link
Member Author

machadoum commented May 14, 2021

@machadoum any idea if the flaky test is related to the PR?

@jonathan-buttner It doesn't look related because it failed before executing the code on my changes. The command that failed was "waitForAlertsPanelToBeLoaded". I did run cypress locally, and I could reproduce the flakiness both on my branch and on master. It seems that on some ocations the alert panel takes a very long time to load. Here you can see the console log in at the exact moment when the test fails:

     │ proc [cypress] GET /api/fleet/check-permissions 200 19.934 ms - -
     │ proc [cypress] POST /api/detection_engine/signals/search 200 41.550 ms - -
     │ proc [cypress] POST /api/detection_engine/signals/search 200 51.047 ms - -
     │ proc [cypress] GET /api/detection_engine/privileges 200 69.122 ms - -
     │ proc [cypress] GET /api/lists/privileges 200 110.861 ms - -
     │ proc [cypress] GET /api/ml/ml_capabilities 200 124.161 ms - -
     │ proc [cypress] POST /internal/bsearch 200 73.244 ms - -
     │ proc [cypress] GET /v1/pages/ChRDaHJvbWUvOTAuMC40NDMwLjIxMhIXCSY9dpwabVaEEgUNvYWDDxIFDZSQkvo=?alt=proto 200 26.190 ms - -
     │ proc [cypress] GET /api/detection_engine/index 200 29.554 ms - -
     │ proc [cypress] GET /api/lists/index 200 25.553 ms - -
     │ proc [cypress] POST /api/ml/jobs/jobs_summary 200 82.801 ms - -
     │ proc [cypress] GET /9007199254740991/bundles/plugin/data/kibana/data.chunk.6.js 304 26.732 ms - -
     │ proc [cypress] GET /api/ml/modules/recognize/apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,logs-*,packetbeat-*,winlogbeat-* 200 87.028 ms - -
     │ proc [cypress] GET /api/ml/modules/get_module/ 200 335.586 ms - -
     │ proc [cypress] POST /api/detection_engine/signals/search 200 20.392 ms - -
     │ proc [cypress] GET /v1/pages/ChRDaHJvbWUvOTAuMC40NDMwLjIxMhIzCTXHBmhl8lqwEgUNvYWDDxIFDa5VyV0SBQ1VIiXJEgUNkWGVThIFDQbtu_8SBQ2UkJL6?alt=proto 200 26.079 ms - -
     │ proc [cypress] POST /internal/bsearch 200 36.037 ms - -
     │ info [o.e.x.i.a.TransportPutLifecycleAction] [Pablos-MBP.home] updating index lifecycle policy [logs-endpoint.collection-diagnostic]
     │ proc [cypress] POST /api/fleet/epm/packages/_bulk 200 11337.906 ms - -
     │ proc [cypress] GET /v4/threatListUpdates:fetch?$req=Ch0KDGdvb2dsZWNocm9tZRINOTAuMC40NDMwLjIxMhopCAUQBBobCg0IBRAGGAEiAzAwMTABEJ-gCxoCGAWme-irIgQgASACKAEaKQgBEAQaGwoNCAEQBhgBIgMwMDEwARDt7QgaAhgFFrZRbyIEIAEgAigBGicIChAIGhkKDQgKEAgYASIDMDAxMAEQBhoCGAUrFDWWIgQgASACKAEaKQgHEAQaGwoNCAcQBhgBIgMwMDEwARCDqQkaAhgFh-OrySIEIAEgAigBGicIARAEGhkKDQgBEAYYASIDMDAxMAMQFBoCGAW0gZovIgQgASACKAMaKQgNEAQaGwoNCA0QBhgBIgMwMDEwARD8iAEaAhgFPEVFhiIEIAEgAigBGigIARAIGhoKDQgBEAgYASIDMDAxMAQQjiAaAhgF4RpJ0SIEIAEgAigEGicICRAEGhkKDQgJEAYYASIDMDAxMAYQAxoCGAX81dJ_IgQgASACKAYaKAgPEAQaGgoNCA8QBhgBIgMwMDEwARCBZhoCGAUIVVHjIgQgASACKAEaKAgIEAQaGgoNCAgQBhgBIgMwMDEwARCPDBoCGAVop6Q3IgQgASACKAEaJwgJEAQaGQoNCAkQBhgBIgMwMDEwARAfGgIYBZJ8iVciBCABIAIoARopCAMQBBobCg0IAxAGGAEiAzAwMTABEKDdCBoCGAU1OdFTIgQgASACKAEaKQgOEAQaGwoNCA4QBhgBIgMwMDEwARC8wgUaAhgFxzxyqiIEIAEgAigBGigIEBAEGhoKDQgQEAYYASIDMDAxMAEQ1woaAhgFpbXsCiIEIAEgAigBIgIIAQ==&$ct=application/x-protobuf&key=AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw 200 60.237 ms - -
     │ proc [cypress] POST /api/ui_counters/_report 200 661.319 ms - -```

@kibanamachine
Copy link
Contributor

💚 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
cases 494.0KB 494.3KB +302.0B
securitySolution 6.7MB 6.7MB +16.0B
total +318.0B
Unknown metric groups

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 4 2 -2
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 5 3 -2
licensing 18 15 -3
monitoring 109 56 -53
total -73

History

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

cc @machadoum

@jonathan-buttner
Copy link
Contributor

@machadoum any idea if the flaky test is related to the PR?

@jonathan-buttner It doesn't look related because it failed before executing the code on my changes. The command that failed was "waitForAlertsPanelToBeLoaded". I did run cypress locally, and I could reproduce the flakiness both on my branch and on master. It seems that on some ocations the alert panel takes a very long time to load. Here you can see the console log in at the exact moment when the test fails:

Thanks for looking! Sounds good, feel free to merge, we can address the flaky test at a different time 👍

@machadoum machadoum merged commit fab9605 into elastic:master May 14, 2021
machadoum added a commit to machadoum/kibana that referenced this pull request May 14, 2021
…99757)

* Fix: Disable selection of filter status 'All' on AddToCaseAction

* UI: Hide disabled statuses on AddToCaseAction

* Refactor: Rename disabledStatuses to hiddenStatuses

* Fix: Pick the first valid status for initialFilterOptions

Previously it was always picking 'open', but it wouldn't work when hiddenStatuses contains "open".

* Add missing test

Co-authored-by: Kibana Machine <[email protected]>
machadoum added a commit that referenced this pull request May 14, 2021
…100123)

* Fix: Disable selection of filter status 'All' on AddToCaseAction

* UI: Hide disabled statuses on AddToCaseAction

* Refactor: Rename disabledStatuses to hiddenStatuses

* Fix: Pick the first valid status for initialFilterOptions

Previously it was always picking 'open', but it wouldn't work when hiddenStatuses contains "open".

* Add missing test

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
yctercero pushed a commit to yctercero/kibana that referenced this pull request May 25, 2021
…99757)

* Fix: Disable selection of filter status 'All' on AddToCaseAction

* UI: Hide disabled statuses on AddToCaseAction

* Refactor: Rename disabledStatuses to hiddenStatuses

* Fix: Pick the first valid status for initialFilterOptions

Previously it was always picking 'open', but it wouldn't work when hiddenStatuses contains "open".

* Add missing test

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
enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution]User not able to select "Closed" from drop-down on adding alert to existing case modal
5 participants