mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Cases] Fix cases label in bulk actions in the alerts table when they are disabled (#156828)
## Summary Fixes: https://github.com/elastic/kibana/issues/156469 ### 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) ### 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)
This commit is contained in:
parent
61dcaff9a3
commit
7db4f278a0
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',
|
||||
{
|
||||
|
|
|
@ -28540,7 +28540,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",
|
||||
|
|
|
@ -28519,7 +28519,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": "タイムラインで調査",
|
||||
|
|
|
@ -28536,7 +28536,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