-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ResponseOps][Connectors]Preconfigured connectors of disabled types show as disabled, but are actually enabled #198792
[ResponseOps][Connectors]Preconfigured connectors of disabled types show as disabled, but are actually enabled #198792
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a great reviewer for UX code, but this was my original issue, so thought I'd review.
LGTM, but expecting to see some tests in the peer *.test.ts
files.
I compared what we're doing server-side here, and looks like the new UX side processing is the same as server (note, we don't need to worry about system actions here):
https://github.com/cnasikas/kibana/blob/5ad2a2c8c44853da51919625506536dc064641c8/x-pack/plugins/actions/server/action_type_registry.ts#L86-L107
packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and looks ok but could you please add tests for the new logic in:
packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.test.ts
x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx
packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another place where checkActionTypeEnabled
is used.
x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_menu.tsx
I don't know exactly where this is but I think it is for the actions for the rule form.
We don't pass isPreconfiguredConnector
there so I think this logic will fail. Could you please confirm?
…_type_enabled.test.ts Co-authored-by: Antonio <[email protected]>
in this case isPreconfiguredConnector is defaulted to false |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
Starting backport for target branches: 8.x |
…how as disabled, but are actually enabled (elastic#198792) Closes elastic#190420 ## Summary - the preconfigured connectors should be displayed as enabled and not have the tooltip icon even if the xpack.actions.enabledActionTypes: [] setting is present in the kibana.yml (to disable all the connector types) ![Screenshot 2024-11-04 at 14 38 10](https://github.com/user-attachments/assets/ee817087-a079-481b-bf82-b7247f3ea923) --------- Co-authored-by: Antonio <[email protected]> (cherry picked from commit 56b0ac2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ypes show as disabled, but are actually enabled (#198792) (#199157) # Backport This will backport the following commits from `main` to `8.x`: - [[ResponseOps][Connectors]Preconfigured connectors of disabled types show as disabled, but are actually enabled (#198792)](#198792) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Georgiana-Andreea Onoleață","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T14:43:48Z","message":"[ResponseOps][Connectors]Preconfigured connectors of disabled types show as disabled, but are actually enabled (#198792)\n\nCloses https://github.com/elastic/kibana/issues/190420\r\n\r\n## Summary\r\n\r\n- the preconfigured connectors should be displayed as enabled and not\r\nhave the tooltip icon even if the xpack.actions.enabledActionTypes: []\r\nsetting is present in the kibana.yml (to disable all the connector\r\ntypes)\r\n\r\n![Screenshot 2024-11-04 at 14 38\r\n10](https://github.com/user-attachments/assets/ee817087-a079-481b-bf82-b7247f3ea923)\r\n\r\n---------\r\n\r\nCo-authored-by: Antonio <[email protected]>","sha":"56b0ac2eda55b0fe1a3dc0cd445d704320b69981","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.17.0"],"title":"[ResponseOps][Connectors]Preconfigured connectors of disabled types show as disabled, but are actually enabled","number":198792,"url":"https://github.com/elastic/kibana/pull/198792","mergeCommit":{"message":"[ResponseOps][Connectors]Preconfigured connectors of disabled types show as disabled, but are actually enabled (#198792)\n\nCloses https://github.com/elastic/kibana/issues/190420\r\n\r\n## Summary\r\n\r\n- the preconfigured connectors should be displayed as enabled and not\r\nhave the tooltip icon even if the xpack.actions.enabledActionTypes: []\r\nsetting is present in the kibana.yml (to disable all the connector\r\ntypes)\r\n\r\n![Screenshot 2024-11-04 at 14 38\r\n10](https://github.com/user-attachments/assets/ee817087-a079-481b-bf82-b7247f3ea923)\r\n\r\n---------\r\n\r\nCo-authored-by: Antonio <[email protected]>","sha":"56b0ac2eda55b0fe1a3dc0cd445d704320b69981"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198792","number":198792,"mergeCommit":{"message":"[ResponseOps][Connectors]Preconfigured connectors of disabled types show as disabled, but are actually enabled (#198792)\n\nCloses https://github.com/elastic/kibana/issues/190420\r\n\r\n## Summary\r\n\r\n- the preconfigured connectors should be displayed as enabled and not\r\nhave the tooltip icon even if the xpack.actions.enabledActionTypes: []\r\nsetting is present in the kibana.yml (to disable all the connector\r\ntypes)\r\n\r\n![Screenshot 2024-11-04 at 14 38\r\n10](https://github.com/user-attachments/assets/ee817087-a079-481b-bf82-b7247f3ea923)\r\n\r\n---------\r\n\r\nCo-authored-by: Antonio <[email protected]>","sha":"56b0ac2eda55b0fe1a3dc0cd445d704320b69981"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Georgiana-Andreea Onoleață <[email protected]>
…how as disabled, but are actually enabled (elastic#198792) Closes elastic#190420 ## Summary - the preconfigured connectors should be displayed as enabled and not have the tooltip icon even if the xpack.actions.enabledActionTypes: [] setting is present in the kibana.yml (to disable all the connector types) ![Screenshot 2024-11-04 at 14 38 10](https://github.com/user-attachments/assets/ee817087-a079-481b-bf82-b7247f3ea923) --------- Co-authored-by: Antonio <[email protected]>
Closes #190420
Summary