mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[8.8] [Cases] Fix cases label in bulk actions in the alerts table when they are disabled (#156828) (#156945)
# Backport This will backport the following commits from `main` to `8.8`: - [[Cases] Fix cases label in bulk actions in the alerts table when they are disabled (#156828)](https://github.com/elastic/kibana/pull/156828) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2023-05-06T07:49:50Z","message":"[Cases] Fix cases label in bulk actions in the alerts table when they are disabled (#156828)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/156469\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"7db4f278a0fdd02f6cd6092662cbfe90f77a0345","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:ResponseOps","Feature:Cases","v8.8.0","v8.9.0"],"number":156828,"url":"https://github.com/elastic/kibana/pull/156828","mergeCommit":{"message":"[Cases] Fix cases label in bulk actions in the alerts table when they are disabled (#156828)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/156469\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"7db4f278a0fdd02f6cd6092662cbfe90f77a0345"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156828","number":156828,"mergeCommit":{"message":"[Cases] Fix cases label in bulk actions in the alerts table when they are disabled (#156828)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/156469\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"7db4f278a0fdd02f6cd6092662cbfe90f77a0345"}}]}] BACKPORT--> Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
This commit is contained in:
parent
9c5a5038bc
commit
aaf1efe905
7 changed files with 4 additions and 22 deletions
|
@ -281,13 +281,6 @@ export const ADD_TO_NEW_CASE = i18n.translate(
|
|||
}
|
||||
);
|
||||
|
||||
export const ADD_TO_CASE_DISABLED = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.alerts.actions.addToCaseDisabled',
|
||||
{
|
||||
defaultMessage: 'Add to case is not supported for this selection',
|
||||
}
|
||||
);
|
||||
|
||||
export const INVESTIGATE_BULK_IN_TIMELINE = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.alerts.actions.addBulkToTimeline',
|
||||
{
|
||||
|
|
|
@ -28580,7 +28580,6 @@
|
|||
"xpack.securitySolution.detectionEngine.alerts.actions.addEventFilter.disabled.tooltip": "Les filtres d'événements de point de terminaison peuvent être créés dans la section Événements sur la page Hôtes.",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addException": "Ajouter une exception à une règle",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToCase": "Ajouter à un cas existant",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToCaseDisabled": "L'ajout au cas n'est pas pris en charge pour cette sélection",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToNewCase": "Ajouter au nouveau cas",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.investigateInTimelineAriaLabel": "Envoyer une alerte à la chronologie",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.investigateInTimelineTitle": "Investiguer dans la chronologie",
|
||||
|
|
|
@ -28559,7 +28559,6 @@
|
|||
"xpack.securitySolution.detectionEngine.alerts.actions.addEventFilter.disabled.tooltip": "エンドポイントイベントフィルターは、[ホスト]ページの[イベント]セクションから作成できます。",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addException": "ルール例外の追加",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToCase": "既存のケースに追加",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToCaseDisabled": "この選択では、[ケースに追加]を使用できません",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToNewCase": "新しいケースに追加",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.investigateInTimelineAriaLabel": "アラートをタイムラインに送信",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.investigateInTimelineTitle": "タイムラインで調査",
|
||||
|
|
|
@ -28576,7 +28576,6 @@
|
|||
"xpack.securitySolution.detectionEngine.alerts.actions.addEventFilter.disabled.tooltip": "可以从主机页面的“事件”部分创建终端事件筛选。",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addException": "添加规则例外",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToCase": "添加到现有案例",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToCaseDisabled": "此选择不支持添加到案例",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.addToNewCase": "添加到新案例",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.investigateInTimelineAriaLabel": "将告警发送到时间线",
|
||||
"xpack.securitySolution.detectionEngine.alerts.actions.investigateInTimelineTitle": "在时间线中调查",
|
||||
|
|
|
@ -35,13 +35,6 @@ export const ADD_TO_NEW_CASE = i18n.translate(
|
|||
}
|
||||
);
|
||||
|
||||
export const ADD_TO_CASE_DISABLED = i18n.translate(
|
||||
'xpack.triggersActionsUI.alerts.table.actions.addToCaseDisabled',
|
||||
{
|
||||
defaultMessage: 'Add to case is not supported for this selection',
|
||||
}
|
||||
);
|
||||
|
||||
export const NO_ALERTS_ADDED_TO_CASE = i18n.translate(
|
||||
'xpack.triggersActionsUI.alerts.table.actions.noAlertsAddedToCaseTitle',
|
||||
{
|
||||
|
|
|
@ -264,7 +264,7 @@ describe('bulk action hooks', () => {
|
|||
Object {
|
||||
"data-test-subj": "attach-new-case",
|
||||
"disableOnQuery": true,
|
||||
"disabledLabel": "Add to case is not supported for this selection",
|
||||
"disabledLabel": "Add to new case",
|
||||
"key": "attach-new-case",
|
||||
"label": "Add to new case",
|
||||
"onClick": [Function],
|
||||
|
@ -272,7 +272,7 @@ describe('bulk action hooks', () => {
|
|||
Object {
|
||||
"data-test-subj": "attach-existing-case",
|
||||
"disableOnQuery": true,
|
||||
"disabledLabel": "Add to case is not supported for this selection",
|
||||
"disabledLabel": "Add to existing case",
|
||||
"key": "attach-existing-case",
|
||||
"label": "Add to existing case",
|
||||
"onClick": [Function],
|
||||
|
|
|
@ -23,7 +23,6 @@ import {
|
|||
} from '../bulk_actions/get_leading_control_column';
|
||||
import { CasesService } from '../types';
|
||||
import {
|
||||
ADD_TO_CASE_DISABLED,
|
||||
ADD_TO_EXISTING_CASE,
|
||||
ADD_TO_NEW_CASE,
|
||||
ALERTS_ALREADY_ATTACHED_TO_CASE,
|
||||
|
@ -109,7 +108,7 @@ export const useBulkAddToCaseActions = ({
|
|||
key: 'attach-new-case',
|
||||
'data-test-subj': 'attach-new-case',
|
||||
disableOnQuery: true,
|
||||
disabledLabel: ADD_TO_CASE_DISABLED,
|
||||
disabledLabel: ADD_TO_NEW_CASE,
|
||||
onClick: (alerts?: TimelineItem[]) => {
|
||||
const caseAttachments = alerts
|
||||
? casesService?.helpers.groupAlertsByRule(alerts) ?? []
|
||||
|
@ -124,7 +123,7 @@ export const useBulkAddToCaseActions = ({
|
|||
label: ADD_TO_EXISTING_CASE,
|
||||
key: 'attach-existing-case',
|
||||
disableOnQuery: true,
|
||||
disabledLabel: ADD_TO_CASE_DISABLED,
|
||||
disabledLabel: ADD_TO_EXISTING_CASE,
|
||||
'data-test-subj': 'attach-existing-case',
|
||||
onClick: (alerts?: TimelineItem[]) => {
|
||||
selectCaseModal.open({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue