Skip to content

Commit

Permalink
[Security Solution] Remove the word "custom" from bulk action modals (#…
Browse files Browse the repository at this point in the history
…204313)

**Resolves: #203149

## Summary

This PR updates the bulk action modal dialogs by removing the term
"custom." With prebuilt rules now being editable, the use of the word
"custom" is no longer accurate or appropriate.

## Screenshots
**Before**
<img width="805" alt="Scherm­afbeelding 2024-12-14 om 12 09 58"
src="https://github.com/user-attachments/assets/b354ee44-d565-486f-94d6-6851e9d6a7b2"
/>

**After**
<img width="728" alt="Scherm­afbeelding 2024-12-14 om 11 56 04"
src="https://github.com/user-attachments/assets/c9de12c3-8aca-4ee2-828c-71b05f3b451a"
/>

Work started on 14-Dec-2024
  • Loading branch information
nikitaindik authored Dec 18, 2024
1 parent 2e3a748 commit 65bc6bc
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37591,7 +37591,6 @@
"xpack.securitySolution.detectionEngine.body.summary.message": "La règle {ruleName} a généré {signalsCount} alertes",
"xpack.securitySolution.detectionEngine.buttonManageRules": "Gérer les règles",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkActionConfirmationCloseButtonLabel": "Fermer",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "Modifier {customRulesCount, plural, =1 {# règle personnalisée} other {# règles personnalisées}}",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "Annuler",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "Entrez le modèle des index Elasticsearch que vous souhaitez ajouter. Par défaut, le menu déroulant comprend des modèles d'indexation définis dans les paramètres avancés de la solution Security.",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "Ajouter des modèles d'indexation pour les règles sélectionnées",
Expand Down Expand Up @@ -37625,8 +37624,6 @@
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setInvestigationFieldsWarningCallout": "Vous êtes sur le point d'écraser des champs en surbrillance personnalisés pour {rulesCount, plural, one {la règle sélectionnée} other {les # règles sélectionnées}}. Pour appliquer et enregistrer les modifications, cliquez sur Enregistrer.",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setTagsWarningCallout": "Vous êtes sur le point d'écraser les balises pour {rulesCount, plural, one {# règle sélectionnée} other {# règles sélectionnées}}. Sélectionnez Enregistrer pour appliquer les modifications.",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.tagsComoboxRequiredErrorMessage": "Au moins une balise est requise.",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkExportConfirmation.confirmButtonLabel": "Exporter {customRulesCount, plural, =1 {# règle personnalisée} other {# règles personnalisées}}",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkManualRuleRunConfirmation.confirmButtonLabel": "Planifier {customRulesCount, plural, =1 {# règle personnalisée} other {# règles personnalisées}}",
"xpack.securitySolution.detectionEngine.components.allRules.bulkDeleteConfirmationTitle": "Confirmer la suppression groupée",
"xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationCancel": "Annuler",
"xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationConfirm": "Supprimer",
Expand Down Expand Up @@ -38848,7 +38845,6 @@
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addRuleActionsTitle": "Ajouter des actions sur les règles",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "Ajouter des balises",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "Appliquer le modèle de chronologie",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkActionConfirmationPartlyTitle": "L'action peut être appliquée uniquement à {customRulesCount, plural, =1 {# règle personnalisée} other {# règles personnalisées}}",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDeniedTitle": "Impossible de modifier {rulesCount, plural, =1 {# règle} other {# règles}}.",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, =1 {# règle est} other {# règles sont}} en cours de mise à jour.",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "M'envoyer une notification à la fin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37449,7 +37449,6 @@
"xpack.securitySolution.detectionEngine.body.summary.message": "ルール{ruleName}は{signalsCount}件のアラートを生成しました",
"xpack.securitySolution.detectionEngine.buttonManageRules": "ルールの管理",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkActionConfirmationCloseButtonLabel": "閉じる",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "{customRulesCount, plural, other {# 個のカスタムルール}}を編集",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "キャンセル",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "追加するElasticsearchインデックスのパターンを入力します。デフォルトでは、ドロップダウンには、セキュリティソリューション詳細設定で定義されたインデックスパターンが含まれます。",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "選択したルールのインデックスパターンを追加",
Expand Down Expand Up @@ -37483,8 +37482,6 @@
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setInvestigationFieldsWarningCallout": "選択した{rulesCount, plural, other {#個のルール}}のカスタムハイライトされたフィールドを上書きしようとしています。変更を適用して、保存するには、[保存]をクリックします。",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setTagsWarningCallout": "{rulesCount, plural, other {# 個の選択したルール}}のタグを上書きしようとしています。[保存]をクリックすると、変更が適用されます。\n",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.tagsComoboxRequiredErrorMessage": "1つ以上のタグが必要です。",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkExportConfirmation.confirmButtonLabel": "{customRulesCount, plural, other {# 個のカスタムルール}}をエクスポート",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkManualRuleRunConfirmation.confirmButtonLabel": "{customRulesCount, plural, other {# 個のカスタムルール}}をスケジュール",
"xpack.securitySolution.detectionEngine.components.allRules.bulkDeleteConfirmationTitle": "一括削除の確認",
"xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationCancel": "キャンセル",
"xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationConfirm": "削除",
Expand Down Expand Up @@ -38705,7 +38702,6 @@
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addRuleActionsTitle": "ルールアクションを追加",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "タグを追加",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "タイムラインテンプレートを適用",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkActionConfirmationPartlyTitle": "このアクションは、{customRulesCount, plural, other {#個のカスタムルール}}にのみ適用できます",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDeniedTitle": "{rulesCount, plural, other {# 個のルール}}を編集できません",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, other {#個のルール}}を更新しています。",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "完了時に通知",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36878,7 +36878,6 @@
"xpack.securitySolution.detectionEngine.body.summary.message": "规则 {ruleName} 生成了 {signalsCount} 个告警",
"xpack.securitySolution.detectionEngine.buttonManageRules": "管理规则",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkActionConfirmationCloseButtonLabel": "关闭",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "编辑 {customRulesCount, plural, other {# 个定制规则}}",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "取消",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "输入要添加的 Elasticsearch 索引的模式。默认情况下,下拉列表将包括 Security Solution 高级设置中定义的索引模式。",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "为选定规则添加索引模式",
Expand Down Expand Up @@ -36912,8 +36911,6 @@
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setInvestigationFieldsWarningCallout": "您即将覆盖选定的 {rulesCount, plural, other {# 个规则}}的突出显示的定制字段。要应用并保存更改,请单击'保存'。",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setTagsWarningCallout": "您即将覆盖 {rulesCount, plural, other {# 个选定规则}}的标签,按'保存'可应用更改。",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.tagsComoboxRequiredErrorMessage": "至少需要一个标签。",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkExportConfirmation.confirmButtonLabel": "导出 {customRulesCount, plural, other {# 个定制规则}}",
"xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkManualRuleRunConfirmation.confirmButtonLabel": "计划 {customRulesCount, plural, other {# 个定制规则}}",
"xpack.securitySolution.detectionEngine.components.allRules.bulkDeleteConfirmationTitle": "确认批量删除",
"xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationCancel": "取消",
"xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationConfirm": "删除",
Expand Down Expand Up @@ -38131,7 +38128,6 @@
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addRuleActionsTitle": "添加规则操作",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "添加标签",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "应用时间线模板",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkActionConfirmationPartlyTitle": "只能对 {customRulesCount, plural, other {# 个定制规则}}应用此操作",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDeniedTitle": "无法编辑 {rulesCount, plural, other {# 个规则}}",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, other {# 个规则}}正在更新。",
"xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "在完成时通知我",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function ComparisonSideHelpInfo({ options }: ComparisonSideHelpInfoProps)
<ul>
{optionsWithDescriptions.map(
({ title: displayName, description: explanation }) => (
<li>
<li key={displayName}>
<strong>{displayName}</strong> {'-'} {explanation}
</li>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ describe('Component BulkEditRuleErrorsList', () => {
],
[
BulkActionsDryRunErrCode.MACHINE_LEARNING_INDEX_PATTERN,
"2 custom machine learning rules (these rules don't have index patterns)",
"2 machine learning rules (these rules don't have index patterns)",
],
[
BulkActionsDryRunErrCode.ESQL_INDEX_PATTERN,
"2 custom ES|QL rules (these rules don't have index patterns)",
"2 ES|QL rules (these rules don't have index patterns)",
],
[
BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const BulkEditRuleErrorItem = ({
<li key={message}>
<FormattedMessage
id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.machineLearningRulesIndexEditDescription"
defaultMessage="{rulesCount, plural, =1 {# custom machine learning rule} other {# custom machine learning rules}} (these rules don't have index patterns)"
defaultMessage="{rulesCount, plural, =1 {# machine learning rule} other {# machine learning rules}} (these rules don't have index patterns)"
values={{ rulesCount }}
/>
</li>
Expand All @@ -61,7 +61,7 @@ const BulkEditRuleErrorItem = ({
<li key={message}>
<FormattedMessage
id="xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.esqlRulesIndexEditDescription"
defaultMessage="{rulesCount, plural, =1 {# custom ES|QL rule} other {# custom ES|QL rules}} (these rules don't have index patterns)"
defaultMessage="{rulesCount, plural, =1 {# ES|QL rule} other {# ES|QL rules}} (these rules don't have index patterns)"
values={{ rulesCount }}
/>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ export const BULK_EDIT_CONFIRMATION_REJECTED_TITLE = (rulesCount: number) =>
}
);

export const BULK_ACTION_CONFIRMATION_PARTLY_TITLE = (customRulesCount: number) =>
export const BULK_ACTION_CONFIRMATION_PARTLY_TITLE = (rulesCount: number) =>
i18n.translate(
'xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkActionConfirmationPartlyTitle',
{
values: { customRulesCount },
values: { rulesCount },
defaultMessage:
'This action can only be applied to {customRulesCount, plural, =1 {# custom rule} other {# custom rules}}',
'This action can only be applied to {rulesCount, plural, =1 {# rule} other {# rules}}',
}
);

Expand All @@ -289,32 +289,30 @@ export const BULK_ACTION_CONFIRMATION_CLOSE = i18n.translate(
}
);

export const BULK_EDIT_CONFIRMATION_CONFIRM = (customRulesCount: number) =>
export const BULK_EDIT_CONFIRMATION_CONFIRM = (rulesCount: number) =>
i18n.translate(
'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel',
{
values: { customRulesCount },
defaultMessage: 'Edit {customRulesCount, plural, =1 {# custom rule} other {# custom rules}}',
values: { rulesCount },
defaultMessage: 'Edit {rulesCount, plural, =1 {# rule} other {# rules}}',
}
);

export const BULK_EXPORT_CONFIRMATION_CONFIRM = (customRulesCount: number) =>
export const BULK_EXPORT_CONFIRMATION_CONFIRM = (rulesCount: number) =>
i18n.translate(
'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkExportConfirmation.confirmButtonLabel',
{
values: { customRulesCount },
defaultMessage:
'Export {customRulesCount, plural, =1 {# custom rule} other {# custom rules}}',
values: { rulesCount },
defaultMessage: 'Export {rulesCount, plural, =1 {# rule} other {# rules}}',
}
);

export const BULK_MANUAL_RULE_RUN_CONFIRMATION_CONFIRM = (customRulesCount: number) =>
export const BULK_MANUAL_RULE_RUN_CONFIRMATION_CONFIRM = (rulesCount: number) =>
i18n.translate(
'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkManualRuleRunConfirmation.confirmButtonLabel',
{
values: { customRulesCount },
defaultMessage:
'Schedule {customRulesCount, plural, =1 {# custom rule} other {# custom rules}}',
values: { rulesCount },
defaultMessage: 'Schedule {rulesCount, plural, =1 {# rule} other {# rules}}',
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ describe(

// user can proceed with custom rule editing
cy.get(MODAL_CONFIRMATION_BTN)
.should('have.text', `Edit ${existedRulesRows.length} custom rules`)
.should('have.text', `Edit ${existedRulesRows.length} rules`)
.click();

// action should finish
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe('Export rules', { tags: ['@ess', '@serverless', '@skipInServerlessMKI']

// proceed with exporting only custom rules
cy.get(MODAL_CONFIRMATION_BTN)
.should('have.text', `Export ${expectedNumberCustomRulesToBeExported} custom rule`)
.should('have.text', `Export ${expectedNumberCustomRulesToBeExported} rule`)
.click();

getAvailablePrebuiltRulesCount().then((availablePrebuiltRulesCount) => {
Expand Down Expand Up @@ -175,7 +175,7 @@ describe('Export rules', { tags: ['@ess', '@serverless', '@skipInServerlessMKI']

// should display correct number of custom rules when one of them has exceptions
cy.get(MODAL_CONFIRMATION_BTN)
.should('have.text', `Export ${expectedNumberCustomRulesToBeExported} custom rules`)
.should('have.text', `Export ${expectedNumberCustomRulesToBeExported} rules`)
.click();

cy.get(TOASTER_BODY).should(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,20 +417,20 @@ export const checkPrebuiltRulesCannotBeModified = (rulesCount: number) => {

export const checkMachineLearningRulesCannotBeModified = (rulesCount: number) => {
cy.get(MODAL_CONFIRMATION_BODY).contains(
`${rulesCount} custom machine learning rule (these rules don't have index patterns)`
`${rulesCount} machine learning rule (these rules don't have index patterns)`
);
};

export const checkEsqlRulesCannotBeModified = (rulesCount: number) => {
cy.get(MODAL_CONFIRMATION_BODY).contains(
`${rulesCount} custom ES|QL rule (these rules don't have index patterns)`
`${rulesCount} ES|QL rule (these rules don't have index patterns)`
);
};

export const waitForMixedRulesBulkEditModal = (customRulesCount: number) => {
export const waitForMixedRulesBulkEditModal = (rulesCount: number) => {
cy.get(MODAL_CONFIRMATION_TITLE).should(
'have.text',
`This action can only be applied to ${customRulesCount} custom rules`
`This action can only be applied to ${rulesCount} rules`
);
};

Expand All @@ -445,7 +445,7 @@ export const scheduleManualRuleRunForSelectedRules = (
if (disabledCount > 0) {
cy.get(BULK_MANUAL_RULE_RUN_WARNING_MODAL).should(
'have.text',
`This action can only be applied to ${enabledCount} custom rulesThis action can't be applied to the following rules in your selection:${disabledCount} rules (Cannot schedule manual rule run for disabled rules)CancelSchedule ${enabledCount} custom rules`
`This action can only be applied to ${enabledCount} rulesThis action can't be applied to the following rules in your selection:${disabledCount} rules (Cannot schedule manual rule run for disabled rules)CancelSchedule ${enabledCount} rules`
);
cy.get(CONFIRM_MANUAL_RULE_RUN_WARNING_BTN).click();
}
Expand Down

0 comments on commit 65bc6bc

Please sign in to comment.