mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Security Solution][Detections] Replaces remaining occurrences of activated
with enabled
(#126554)
## Summary Resolves https://github.com/elastic/kibana/issues/125465, and updates any remaining occurrences of `activate`/`deactivate` with `enable`/`disable` throughout the Security Solution code when relating to Rules. <p align="center"> <img width="700" src="https://user-images.githubusercontent.com/2946766/156097427-967021fc-5eaf-4f29-b949-a181be104743.png" /> </p>
This commit is contained in:
parent
49ad5846ae
commit
e5591543d0
44 changed files with 126 additions and 162 deletions
|
@ -9,7 +9,7 @@ import { JSON_TEXT } from '../../screens/alerts_details';
|
|||
|
||||
import { expandFirstAlert, waitForAlertsPanelToBeLoaded } from '../../tasks/alerts';
|
||||
import { openJsonView } from '../../tasks/alerts_details';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { esArchiverCCSLoad } from '../../tasks/es_archiver';
|
||||
import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login';
|
||||
|
@ -23,7 +23,7 @@ describe('Alert details with unmapped fields', () => {
|
|||
cleanKibana();
|
||||
esArchiverCCSLoad('unmapped_fields');
|
||||
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
|
||||
createCustomRuleActivated(getUnmappedCCSRule());
|
||||
createCustomRuleEnabled(getUnmappedCCSRule());
|
||||
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
|
||||
waitForAlertsPanelToBeLoaded();
|
||||
expandFirstAlert();
|
||||
|
|
|
@ -13,7 +13,7 @@ import { openTimelineFieldsBrowser, populateTimeline } from '../../tasks/timelin
|
|||
|
||||
import { HOSTS_URL, ALERTS_URL } from '../../urls/navigation';
|
||||
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
|
||||
import { getNewRule } from '../../objects/rule';
|
||||
import { refreshPage } from '../../tasks/security_header';
|
||||
|
@ -29,7 +29,7 @@ describe('Create DataView runtime field', () => {
|
|||
it.skip('adds field to alert table', () => {
|
||||
const fieldName = 'field.name.alert.page';
|
||||
loginAndWaitForPage(ALERTS_URL);
|
||||
createCustomRuleActivated(getNewRule());
|
||||
createCustomRuleEnabled(getNewRule());
|
||||
refreshPage();
|
||||
waitForAlertsToPopulate(500);
|
||||
openEventsViewerFieldsBrowser();
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
markAcknowledgedFirstAlert,
|
||||
goToAcknowledgedAlerts,
|
||||
} from '../../tasks/alerts';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { loginAndWaitForPage } from '../../tasks/login';
|
||||
|
@ -30,7 +30,7 @@ describe.skip('Marking alerts as acknowledged', () => {
|
|||
beforeEach(() => {
|
||||
cleanKibana();
|
||||
loginAndWaitForPage(ALERTS_URL);
|
||||
createCustomRuleActivated(getNewRule());
|
||||
createCustomRuleEnabled(getNewRule());
|
||||
refreshPage();
|
||||
waitForAlertsToPopulate(500);
|
||||
});
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
|
||||
import { expandFirstAlert } from '../../tasks/alerts';
|
||||
import { openJsonView, openTable } from '../../tasks/alerts_details';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { esArchiverLoad } from '../../tasks/es_archiver';
|
||||
|
@ -31,7 +31,7 @@ describe.skip('Alert details with unmapped fields', () => {
|
|||
cleanKibana();
|
||||
esArchiverLoad('unmapped_fields');
|
||||
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
|
||||
createCustomRuleActivated(getUnmappedRule());
|
||||
createCustomRuleEnabled(getUnmappedRule());
|
||||
refreshPage();
|
||||
waitForAlertsToPopulate();
|
||||
expandFirstAlert();
|
||||
|
|
|
@ -9,7 +9,7 @@ import { getNewRule } from '../../objects/rule';
|
|||
import { ROLES } from '../../../common/test';
|
||||
|
||||
import { expandFirstAlertActions } from '../../tasks/alerts';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { login, loginAndWaitForPage, waitForPageWithoutDateRange } from '../../tasks/login';
|
||||
|
@ -28,7 +28,7 @@ describe.skip('Alerts timeline', () => {
|
|||
// First we login as a privileged user to create alerts.
|
||||
cleanKibana();
|
||||
loginAndWaitForPage(ALERTS_URL, ROLES.platform_engineer);
|
||||
createCustomRuleActivated(getNewRule());
|
||||
createCustomRuleEnabled(getNewRule());
|
||||
refreshPage();
|
||||
waitForAlertsToPopulate(500);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { getBuildingBlockRule } from '../../objects/rule';
|
|||
import { OVERVIEW_ALERTS_HISTOGRAM } from '../../screens/overview';
|
||||
import { OVERVIEW } from '../../screens/security_header';
|
||||
import { goToRuleDetails } from '../../tasks/alerts_detection_rules';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate, waitForTheRuleToBeExecuted } from '../../tasks/create_new_rule';
|
||||
import { loginAndWaitForPage, loginAndWaitForPageWithoutDateRange } from '../../tasks/login';
|
||||
|
@ -25,7 +25,7 @@ describe.skip('Alerts generated by building block rules', () => {
|
|||
});
|
||||
|
||||
it('Alerts should be visible on the Rule Detail page and not visible on the Overview page', () => {
|
||||
createCustomRuleActivated(getBuildingBlockRule());
|
||||
createCustomRuleEnabled(getBuildingBlockRule());
|
||||
loginAndWaitForPage(DETECTIONS_RULE_MANAGEMENT_URL);
|
||||
goToRuleDetails();
|
||||
waitForTheRuleToBeExecuted();
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
selectNumberOfAlerts,
|
||||
waitForAlerts,
|
||||
} from '../../tasks/alerts';
|
||||
import { createCustomRuleActivated, deleteCustomRule } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled, deleteCustomRule } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { loginAndWaitForPage } from '../../tasks/login';
|
||||
|
@ -35,7 +35,7 @@ describe.skip('Closing alerts', () => {
|
|||
beforeEach(() => {
|
||||
cleanKibana();
|
||||
loginAndWaitForPage(ALERTS_URL);
|
||||
createCustomRuleActivated(getNewRule(), '1', '100m', 100);
|
||||
createCustomRuleEnabled(getNewRule(), '1', '100m', 100);
|
||||
refreshPage();
|
||||
waitForAlertsToPopulate(100);
|
||||
deleteCustomRule();
|
||||
|
|
|
@ -9,7 +9,7 @@ import { getNewRule } from '../../objects/rule';
|
|||
import { PROVIDER_BADGE } from '../../screens/timeline';
|
||||
|
||||
import { investigateFirstAlertInTimeline } from '../../tasks/alerts';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { loginAndWaitForPage } from '../../tasks/login';
|
||||
|
@ -21,7 +21,7 @@ describe.skip('Alerts timeline', () => {
|
|||
beforeEach(() => {
|
||||
cleanKibana();
|
||||
loginAndWaitForPage(ALERTS_URL);
|
||||
createCustomRuleActivated(getNewRule());
|
||||
createCustomRuleEnabled(getNewRule());
|
||||
refreshPage();
|
||||
waitForAlertsToPopulate(500);
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ import {
|
|||
selectNumberOfAlerts,
|
||||
waitForAlerts,
|
||||
} from '../../tasks/alerts';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { loginAndWaitForPage } from '../../tasks/login';
|
||||
|
@ -33,7 +33,7 @@ describe.skip('Opening alerts', () => {
|
|||
beforeEach(() => {
|
||||
cleanKibana();
|
||||
loginAndWaitForPage(ALERTS_URL);
|
||||
createCustomRuleActivated(getNewRule());
|
||||
createCustomRuleEnabled(getNewRule());
|
||||
refreshPage();
|
||||
waitForAlertsToPopulate(500);
|
||||
selectNumberOfAlerts(5);
|
||||
|
|
|
@ -83,11 +83,11 @@ import {
|
|||
selectNumberOfRules,
|
||||
waitForRulesTableToBeRefreshed,
|
||||
} from '../../tasks/alerts_detection_rules';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { createTimeline } from '../../tasks/api_calls/timelines';
|
||||
import { cleanKibana, reload } from '../../tasks/common';
|
||||
import {
|
||||
createAndActivateRule,
|
||||
createAndEnableRule,
|
||||
fillAboutRule,
|
||||
fillAboutRuleAndContinue,
|
||||
fillDefineCustomRuleWithImportedQueryAndContinue,
|
||||
|
@ -101,7 +101,7 @@ import {
|
|||
} from '../../tasks/create_new_rule';
|
||||
import { saveEditedRule, waitForKibana } from '../../tasks/edit_rule';
|
||||
import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login';
|
||||
import { activatesRule, getDetails } from '../../tasks/rule_details';
|
||||
import { enablesRule, getDetails } from '../../tasks/rule_details';
|
||||
|
||||
import { RULE_CREATION, DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation';
|
||||
|
||||
|
@ -125,7 +125,7 @@ describe.skip('Custom detection rules creation', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('Creates and activates a new rule', function () {
|
||||
it('Creates and enables a new rule', function () {
|
||||
loginAndWaitForPageWithoutDateRange(RULE_CREATION);
|
||||
fillDefineCustomRuleWithImportedQueryAndContinue(this.rule);
|
||||
fillAboutRuleAndContinue(this.rule);
|
||||
|
@ -143,7 +143,7 @@ describe.skip('Custom detection rules creation', () => {
|
|||
cy.get(ABOUT_CONTINUE_BTN).should('exist').click({ force: true });
|
||||
cy.get(ABOUT_CONTINUE_BTN).should('not.exist');
|
||||
|
||||
createAndActivateRule();
|
||||
createAndEnableRule();
|
||||
|
||||
cy.get(CUSTOM_RULES_BTN).should('have.text', 'Custom rules (1)');
|
||||
|
||||
|
@ -209,10 +209,10 @@ describe('Custom detection rules deletion and edition', () => {
|
|||
beforeEach(() => {
|
||||
cleanKibana();
|
||||
loginAndWaitForPageWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL);
|
||||
createCustomRuleActivated(getNewRule(), 'rule1');
|
||||
createCustomRuleEnabled(getNewRule(), 'rule1');
|
||||
|
||||
createCustomRuleActivated(getNewOverrideRule(), 'rule2');
|
||||
createCustomRuleActivated(getExistingRule(), 'rule3');
|
||||
createCustomRuleEnabled(getNewOverrideRule(), 'rule2');
|
||||
createCustomRuleEnabled(getExistingRule(), 'rule3');
|
||||
reload();
|
||||
});
|
||||
|
||||
|
@ -309,12 +309,12 @@ describe('Custom detection rules deletion and edition', () => {
|
|||
beforeEach(() => {
|
||||
cleanKibana();
|
||||
loginAndWaitForPageWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL);
|
||||
createCustomRuleActivated(getExistingRule(), 'rule1');
|
||||
createCustomRuleEnabled(getExistingRule(), 'rule1');
|
||||
reload();
|
||||
});
|
||||
|
||||
it('Only modifies rule active status on enable/disable', () => {
|
||||
activatesRule();
|
||||
enablesRule();
|
||||
|
||||
cy.intercept('GET', `/api/detection_engine/rules?id=*`).as('fetchRuleDetails');
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ import {
|
|||
import { createTimeline } from '../../tasks/api_calls/timelines';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import {
|
||||
createAndActivateRule,
|
||||
createAndEnableRule,
|
||||
fillAboutRuleAndContinue,
|
||||
fillDefineEqlRuleAndContinue,
|
||||
fillScheduleRuleAndContinue,
|
||||
|
@ -84,13 +84,13 @@ describe.skip('Detection rules, EQL', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('Creates and activates a new EQL rule', function () {
|
||||
it('Creates and enables a new EQL rule', function () {
|
||||
loginAndWaitForPageWithoutDateRange(RULE_CREATION);
|
||||
selectEqlRuleType();
|
||||
fillDefineEqlRuleAndContinue(this.rule);
|
||||
fillAboutRuleAndContinue(this.rule);
|
||||
fillScheduleRuleAndContinue(this.rule);
|
||||
createAndActivateRule();
|
||||
createAndEnableRule();
|
||||
|
||||
cy.get(CUSTOM_RULES_BTN).should('have.text', 'Custom rules (1)');
|
||||
|
||||
|
@ -176,13 +176,13 @@ describe.skip('Detection rules, sequence EQL', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('Creates and activates a new EQL rule with a sequence', function () {
|
||||
it('Creates and enables a new EQL rule with a sequence', function () {
|
||||
loginAndWaitForPageWithoutDateRange(RULE_CREATION);
|
||||
selectEqlRuleType();
|
||||
fillDefineEqlRuleAndContinue(this.rule);
|
||||
fillAboutRuleAndContinue(this.rule);
|
||||
fillScheduleRuleAndContinue(this.rule);
|
||||
createAndActivateRule();
|
||||
createAndEnableRule();
|
||||
|
||||
cy.get(CUSTOM_RULES_BTN).should('have.text', 'Custom rules (1)');
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ import { createCustomIndicatorRule } from '../../tasks/api_calls/rules';
|
|||
import { loadPrepackagedTimelineTemplates } from '../../tasks/api_calls/timelines';
|
||||
import { cleanKibana, reload } from '../../tasks/common';
|
||||
import {
|
||||
createAndActivateRule,
|
||||
createAndEnableRule,
|
||||
fillAboutRuleAndContinue,
|
||||
fillDefineIndicatorMatchRuleAndContinue,
|
||||
fillIndexAndIndicatorIndexPattern,
|
||||
|
@ -408,7 +408,7 @@ describe.skip('indicator match', () => {
|
|||
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
|
||||
});
|
||||
|
||||
it('Creates and activates a new Indicator Match rule', () => {
|
||||
it('Creates and enables a new Indicator Match rule', () => {
|
||||
goToManageAlertsDetectionRules();
|
||||
waitForRulesTableToBeLoaded();
|
||||
goToCreateNewRule();
|
||||
|
@ -416,7 +416,7 @@ describe.skip('indicator match', () => {
|
|||
fillDefineIndicatorMatchRuleAndContinue(getNewThreatIndicatorRule());
|
||||
fillAboutRuleAndContinue(getNewThreatIndicatorRule());
|
||||
fillScheduleRuleAndContinue(getNewThreatIndicatorRule());
|
||||
createAndActivateRule();
|
||||
createAndEnableRule();
|
||||
|
||||
cy.get(CUSTOM_RULES_BTN).should('have.text', 'Custom rules (1)');
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { getNewRule } from '../../objects/rule';
|
||||
import { RULES_MONITORING_TABLE, RULE_NAME } from '../../screens/alerts_detection_rules';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana, reload } from '../../tasks/common';
|
||||
import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login';
|
||||
import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation';
|
||||
|
@ -16,7 +16,7 @@ describe('Rules talbes links', () => {
|
|||
beforeEach(() => {
|
||||
cleanKibana();
|
||||
loginAndWaitForPageWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL);
|
||||
createCustomRuleActivated(getNewRule(), 'rule1');
|
||||
createCustomRuleEnabled(getNewRule(), 'rule1');
|
||||
reload();
|
||||
});
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ import {
|
|||
} from '../../tasks/alerts_detection_rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import {
|
||||
createAndActivateRule,
|
||||
createAndEnableRule,
|
||||
fillAboutRuleAndContinue,
|
||||
fillDefineMachineLearningRuleAndContinue,
|
||||
fillScheduleRuleAndContinue,
|
||||
|
@ -68,13 +68,13 @@ describe.skip('Detection rules, machine learning', () => {
|
|||
cleanKibana();
|
||||
});
|
||||
|
||||
it('Creates and activates a new ml rule', () => {
|
||||
it('Creates and enables a new ml rule', () => {
|
||||
loginAndWaitForPageWithoutDateRange(RULE_CREATION);
|
||||
selectMachineLearningRuleType();
|
||||
fillDefineMachineLearningRuleAndContinue(getMachineLearningRule());
|
||||
fillAboutRuleAndContinue(getMachineLearningRule());
|
||||
fillScheduleRuleAndContinue(getMachineLearningRule());
|
||||
createAndActivateRule();
|
||||
createAndEnableRule();
|
||||
|
||||
cy.get(CUSTOM_RULES_BTN).should('have.text', 'Custom rules (1)');
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ import {
|
|||
import { createTimeline } from '../../tasks/api_calls/timelines';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import {
|
||||
createAndActivateRule,
|
||||
createAndEnableRule,
|
||||
fillAboutRuleWithOverrideAndContinue,
|
||||
fillDefineCustomRuleWithImportedQueryAndContinue,
|
||||
fillScheduleRuleAndContinue,
|
||||
|
@ -92,12 +92,12 @@ describe.skip('Detection rules, override', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('Creates and activates a new custom rule with override option', function () {
|
||||
it('Creates and enables a new custom rule with override option', function () {
|
||||
loginAndWaitForPageWithoutDateRange(RULE_CREATION);
|
||||
fillDefineCustomRuleWithImportedQueryAndContinue(this.rule);
|
||||
fillAboutRuleWithOverrideAndContinue(this.rule);
|
||||
fillScheduleRuleAndContinue(this.rule);
|
||||
createAndActivateRule();
|
||||
createAndEnableRule();
|
||||
|
||||
cy.get(CUSTOM_RULES_BTN).should('have.text', 'Custom rules (1)');
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@ import {
|
|||
waitForPrebuiltDetectionRulesToBeLoaded,
|
||||
selectAllRules,
|
||||
confirmRulesDelete,
|
||||
activateSelectedRules,
|
||||
enableSelectedRules,
|
||||
waitForRuleToChangeStatus,
|
||||
deactivateSelectedRules,
|
||||
disableSelectedRules,
|
||||
changeRowsPerPageTo,
|
||||
} from '../../tasks/alerts_detection_rules';
|
||||
import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login';
|
||||
|
@ -77,14 +77,14 @@ describe('Actions with prebuilt rules', () => {
|
|||
});
|
||||
|
||||
context('Rules table', () => {
|
||||
it('Allows to activate/deactivate all rules at once', () => {
|
||||
it('Allows to enable/disable all rules at once', () => {
|
||||
selectAllRules();
|
||||
activateSelectedRules();
|
||||
enableSelectedRules();
|
||||
waitForRuleToChangeStatus();
|
||||
cy.get(RULE_SWITCH).should('have.attr', 'aria-checked', 'true');
|
||||
|
||||
selectAllRules();
|
||||
deactivateSelectedRules();
|
||||
disableSelectedRules();
|
||||
waitForRuleToChangeStatus();
|
||||
cy.get(RULE_SWITCH).should('have.attr', 'aria-checked', 'false');
|
||||
});
|
||||
|
@ -174,16 +174,16 @@ describe('Actions with prebuilt rules', () => {
|
|||
});
|
||||
|
||||
context('Rule monitoring table', () => {
|
||||
it('Allows to activate/deactivate all rules at once', () => {
|
||||
it('Allows to enable/disable all rules at once', () => {
|
||||
cy.get(RULES_MONITORING_TABLE).click();
|
||||
|
||||
cy.get(SELECT_ALL_RULES_ON_PAGE_CHECKBOX).click();
|
||||
activateSelectedRules();
|
||||
enableSelectedRules();
|
||||
waitForRuleToChangeStatus();
|
||||
cy.get(RULE_SWITCH).should('have.attr', 'aria-checked', 'true');
|
||||
|
||||
selectAllRules();
|
||||
deactivateSelectedRules();
|
||||
disableSelectedRules();
|
||||
waitForRuleToChangeStatus();
|
||||
cy.get(RULE_SWITCH).should('have.attr', 'aria-checked', 'false');
|
||||
});
|
||||
|
|
|
@ -59,11 +59,11 @@ import {
|
|||
goToRuleDetails,
|
||||
waitForRulesTableToBeLoaded,
|
||||
} from '../../tasks/alerts_detection_rules';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { createTimeline } from '../../tasks/api_calls/timelines';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import {
|
||||
createAndActivateRule,
|
||||
createAndEnableRule,
|
||||
fillAboutRuleAndContinue,
|
||||
fillDefineThresholdRuleAndContinue,
|
||||
fillDefineThresholdRule,
|
||||
|
@ -93,12 +93,12 @@ describe.skip('Detection rules, threshold', () => {
|
|||
loginAndWaitForPageWithoutDateRange(RULE_CREATION);
|
||||
});
|
||||
|
||||
it('Creates and activates a new threshold rule', () => {
|
||||
it('Creates and enables a new threshold rule', () => {
|
||||
selectThresholdRuleType();
|
||||
fillDefineThresholdRuleAndContinue(rule);
|
||||
fillAboutRuleAndContinue(rule);
|
||||
fillScheduleRuleAndContinue(rule);
|
||||
createAndActivateRule();
|
||||
createAndEnableRule();
|
||||
|
||||
cy.get(CUSTOM_RULES_BTN).should('have.text', 'Custom rules (1)');
|
||||
|
||||
|
@ -168,7 +168,7 @@ describe.skip('Detection rules, threshold', () => {
|
|||
it.skip('Preview results of keyword using "host.name"', () => {
|
||||
rule.index = [...rule.index, '.siem-signals*'];
|
||||
|
||||
createCustomRuleActivated(getNewRule());
|
||||
createCustomRuleEnabled(getNewRule());
|
||||
goToManageAlertsDetectionRules();
|
||||
waitForRulesTableToBeLoaded();
|
||||
goToCreateNewRule();
|
||||
|
@ -187,7 +187,7 @@ describe.skip('Detection rules, threshold', () => {
|
|||
};
|
||||
previewRule.index = [...previewRule.index, '.siem-signals*'];
|
||||
|
||||
createCustomRuleActivated(getNewRule());
|
||||
createCustomRuleEnabled(getNewRule());
|
||||
goToManageAlertsDetectionRules();
|
||||
waitForRulesTableToBeLoaded();
|
||||
goToCreateNewRule();
|
||||
|
|
|
@ -18,7 +18,7 @@ import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
|||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login';
|
||||
import {
|
||||
activatesRule,
|
||||
enablesRule,
|
||||
addsException,
|
||||
goToAlertsTab,
|
||||
goToExceptionsTab,
|
||||
|
@ -42,7 +42,7 @@ describe.skip('From alert', () => {
|
|||
cy.get(RULE_STATUS).should('have.text', '—');
|
||||
|
||||
esArchiverLoad('auditbeat_for_exceptions');
|
||||
activatesRule();
|
||||
enablesRule();
|
||||
waitForTheRuleToBeExecuted();
|
||||
waitForAlertsToPopulate();
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
|||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login';
|
||||
import {
|
||||
activatesRule,
|
||||
enablesRule,
|
||||
addsExceptionFromRuleSettings,
|
||||
goToAlertsTab,
|
||||
goToExceptionsTab,
|
||||
|
@ -42,7 +42,7 @@ describe.skip('From rule', () => {
|
|||
cy.get(RULE_STATUS).should('have.text', '—');
|
||||
|
||||
esArchiverLoad('auditbeat_for_exceptions');
|
||||
activatesRule();
|
||||
enablesRule();
|
||||
waitForTheRuleToBeExecuted();
|
||||
waitForAlertsToPopulate();
|
||||
refreshPage();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { ALERT_FLYOUT } from '../../screens/alerts_details';
|
||||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
|
||||
import { createCustomRuleEnabled } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login';
|
||||
|
@ -24,7 +24,7 @@ describe.skip('user details flyout', () => {
|
|||
beforeEach(() => {
|
||||
cleanKibana();
|
||||
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
|
||||
createCustomRuleActivated(getNewRule());
|
||||
createCustomRuleEnabled(getNewRule());
|
||||
refreshPage();
|
||||
waitForAlertsToPopulate();
|
||||
});
|
||||
|
|
|
@ -23,9 +23,9 @@ export const DUPLICATE_RULE_ACTION_BTN = '[data-test-subj="duplicateRuleAction"]
|
|||
|
||||
export const DUPLICATE_RULE_MENU_PANEL_BTN = '[data-test-subj="rules-details-duplicate-rule"]';
|
||||
|
||||
export const ACTIVATE_RULE_BULK_BTN = '[data-test-subj="activateRuleBulk"]';
|
||||
export const ENABLE_RULE_BULK_BTN = '[data-test-subj="enableRuleBulk"]';
|
||||
|
||||
export const DEACTIVATE_RULE_BULK_BTN = '[data-test-subj="deactivateRuleBulk"]';
|
||||
export const DISABLE_RULE_BULK_BTN = '[data-test-subj="disableRuleBulk"]';
|
||||
|
||||
export const DELETE_RULE_BULK_BTN = '[data-test-subj="deleteRuleBulk"]';
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ export const COMBO_BOX_CLEAR_BTN = '[data-test-subj="comboBoxClearButton"]';
|
|||
|
||||
export const COMBO_BOX_INPUT = '[data-test-subj="comboBoxInput"]';
|
||||
|
||||
export const CREATE_AND_ACTIVATE_BTN = '[data-test-subj="create-activate"]';
|
||||
export const CREATE_AND_ENABLE_BTN = '[data-test-subj="create-enable"]';
|
||||
|
||||
export const CUSTOM_QUERY_INPUT = '[data-test-subj="queryInput"]';
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ import {
|
|||
SELECT_ALL_RULES_BTN,
|
||||
MODAL_CONFIRMATION_BTN,
|
||||
RULES_DELETE_CONFIRMATION_MODAL,
|
||||
ACTIVATE_RULE_BULK_BTN,
|
||||
DEACTIVATE_RULE_BULK_BTN,
|
||||
ENABLE_RULE_BULK_BTN,
|
||||
DISABLE_RULE_BULK_BTN,
|
||||
RULE_DETAILS_DELETE_BTN,
|
||||
RULE_IMPORT_MODAL_BUTTON,
|
||||
RULE_IMPORT_MODAL,
|
||||
|
@ -87,7 +87,7 @@ export const duplicateRuleFromMenu = () => {
|
|||
|
||||
/**
|
||||
* Check that the duplicated rule is on the table
|
||||
* and it is deactivated (default)
|
||||
* and it is disabled (default)
|
||||
*/
|
||||
export const checkDuplicatedRule = () => {
|
||||
cy.contains(RULE_NAME, duplicatedRuleName)
|
||||
|
@ -126,14 +126,14 @@ export const duplicateSelectedRules = () => {
|
|||
cy.get(DUPLICATE_RULE_BULK_BTN).click();
|
||||
};
|
||||
|
||||
export const activateSelectedRules = () => {
|
||||
export const enableSelectedRules = () => {
|
||||
cy.get(BULK_ACTIONS_BTN).click({ force: true });
|
||||
cy.get(ACTIVATE_RULE_BULK_BTN).click();
|
||||
cy.get(ENABLE_RULE_BULK_BTN).click();
|
||||
};
|
||||
|
||||
export const deactivateSelectedRules = () => {
|
||||
export const disableSelectedRules = () => {
|
||||
cy.get(BULK_ACTIONS_BTN).click({ force: true });
|
||||
cy.get(DEACTIVATE_RULE_BULK_BTN).click();
|
||||
cy.get(DISABLE_RULE_BULK_BTN).click();
|
||||
};
|
||||
|
||||
export const exportFirstRule = () => {
|
||||
|
|
|
@ -90,7 +90,7 @@ export const createCustomIndicatorRule = (rule: ThreatIndicatorRule, ruleId = 'r
|
|||
failOnStatusCode: false,
|
||||
});
|
||||
|
||||
export const createCustomRuleActivated = (
|
||||
export const createCustomRuleEnabled = (
|
||||
rule: CustomRule,
|
||||
ruleId = '1',
|
||||
interval = '100m',
|
||||
|
|
|
@ -27,7 +27,7 @@ import {
|
|||
BACK_TO_ALL_RULES_LINK,
|
||||
COMBO_BOX_CLEAR_BTN,
|
||||
COMBO_BOX_INPUT,
|
||||
CREATE_AND_ACTIVATE_BTN,
|
||||
CREATE_AND_ENABLE_BTN,
|
||||
CUSTOM_QUERY_INPUT,
|
||||
CUSTOM_QUERY_REQUIRED,
|
||||
DEFAULT_RISK_SCORE_INPUT,
|
||||
|
@ -98,10 +98,10 @@ import { SERVER_SIDE_EVENT_COUNT } from '../screens/timeline';
|
|||
import { TIMELINE } from '../screens/timelines';
|
||||
import { refreshPage } from './security_header';
|
||||
|
||||
export const createAndActivateRule = () => {
|
||||
export const createAndEnableRule = () => {
|
||||
cy.get(SCHEDULE_CONTINUE_BUTTON).click({ force: true });
|
||||
cy.get(CREATE_AND_ACTIVATE_BTN).click({ force: true });
|
||||
cy.get(CREATE_AND_ACTIVATE_BTN).should('not.exist');
|
||||
cy.get(CREATE_AND_ENABLE_BTN).click({ force: true });
|
||||
cy.get(CREATE_AND_ENABLE_BTN).should('not.exist');
|
||||
cy.get(BACK_TO_ALL_RULES_LINK).click({ force: true });
|
||||
cy.get(BACK_TO_ALL_RULES_LINK).should('not.exist');
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@ import {
|
|||
} from '../screens/rule_details';
|
||||
import { addsFields, closeFieldsBrowser, filterFieldsBrowser } from './fields_browser';
|
||||
|
||||
export const activatesRule = () => {
|
||||
export const enablesRule = () => {
|
||||
cy.intercept('PATCH', '/api/detection_engine/rules/_bulk_update').as('bulk_update');
|
||||
cy.get(RULE_SWITCH).should('be.visible');
|
||||
cy.get(RULE_SWITCH).click();
|
||||
|
|
|
@ -11,7 +11,7 @@ import { HOSTS_URL } from '../urls/navigation';
|
|||
import { waitForPage } from './login';
|
||||
import { openTimelineUsingToggle } from './security_main';
|
||||
import { DEFAULT_ALERTS_INDEX } from '../../common/constants';
|
||||
import { createCustomRuleActivated } from './api_calls/rules';
|
||||
import { createCustomRuleEnabled } from './api_calls/rules';
|
||||
import { getNewRule } from '../objects/rule';
|
||||
|
||||
export const openSourcerer = (sourcererScope?: string) => {
|
||||
|
@ -176,6 +176,6 @@ export const refreshUntilAlertsIndexExists = async () => {
|
|||
};
|
||||
|
||||
export const waitForAlertsIndexToExist = () => {
|
||||
createCustomRuleActivated(getNewRule(), '1', '100m', 100);
|
||||
createCustomRuleEnabled(getNewRule(), '1', '100m', 100);
|
||||
refreshUntilAlertsIndexExists();
|
||||
};
|
||||
|
|
|
@ -42,7 +42,7 @@ const HelpTextComponent: React.FC<{ href: string; notRunningJobIds: string[] }>
|
|||
{notRunningJobIds.length === 1 ? (
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlEnableJobSingle"
|
||||
defaultMessage="The selected ML job, {jobName}, is not currently running. Please set {jobName} to run via 'ML job settings' before activating this rule."
|
||||
defaultMessage="The selected ML job, {jobName}, is not currently running. Please set {jobName} to run via 'ML job settings' before enabling this rule."
|
||||
values={{
|
||||
jobName: notRunningJobIds[0],
|
||||
}}
|
||||
|
@ -50,7 +50,7 @@ const HelpTextComponent: React.FC<{ href: string; notRunningJobIds: string[] }>
|
|||
) : (
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlEnableJobMulti"
|
||||
defaultMessage="The selected ML jobs, {jobNames}, are not currently running. Please set all of these jobs to run via 'ML job settings' before activating this rule."
|
||||
defaultMessage="The selected ML jobs, {jobNames}, are not currently running. Please set all of these jobs to run via 'ML job settings' before enabling this rule."
|
||||
values={{
|
||||
jobNames: notRunningJobIds.reduce(
|
||||
(acc, value, i, array) => acc + (i < array.length - 1 ? ', ' : ', and ') + value
|
||||
|
|
|
@ -18,7 +18,7 @@ export const PRE_BUILT_MSG = i18n.translate(
|
|||
'xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptMessage',
|
||||
{
|
||||
defaultMessage:
|
||||
'Elastic Security comes with prebuilt detection rules that run in the background and create alerts when their conditions are met. By default, all prebuilt rules except the Endpoint Security rule are disabled. You can select additional rules you want to activate.',
|
||||
'Elastic Security comes with prebuilt detection rules that run in the background and create alerts when their conditions are met. By default, all prebuilt rules except the Endpoint Security rule are disabled. You can select additional rules you want to enable.',
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ const StepRuleActionsComponent: FC<StepRuleActionsProps> = ({
|
|||
isLoading={isLoading}
|
||||
onClick={() => handleSubmit(false)}
|
||||
>
|
||||
{I18n.COMPLETE_WITHOUT_ACTIVATING}
|
||||
{I18n.COMPLETE_WITHOUT_ENABLING}
|
||||
</EuiButton>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
|
@ -239,9 +239,9 @@ const StepRuleActionsComponent: FC<StepRuleActionsProps> = ({
|
|||
isDisabled={isLoading}
|
||||
isLoading={isLoading}
|
||||
onClick={() => handleSubmit(true)}
|
||||
data-test-subj="create-activate"
|
||||
data-test-subj="create-enable"
|
||||
>
|
||||
{I18n.COMPLETE_WITH_ACTIVATING}
|
||||
{I18n.COMPLETE_WITH_ENABLING}
|
||||
</EuiButton>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { startCase } from 'lodash/fp';
|
||||
|
||||
export const COMPLETE_WITHOUT_ACTIVATING = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithoutActivatingTitle',
|
||||
export const COMPLETE_WITHOUT_ENABLING = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithoutEnablingTitle',
|
||||
{
|
||||
defaultMessage: 'Create rule without activating it',
|
||||
defaultMessage: 'Create rule without enabling it',
|
||||
}
|
||||
);
|
||||
|
||||
export const COMPLETE_WITH_ACTIVATING = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithActivatingTitle',
|
||||
export const COMPLETE_WITH_ENABLING = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithEnablingTitle',
|
||||
{
|
||||
defaultMessage: 'Create & activate rule',
|
||||
defaultMessage: 'Create & enable rule',
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const COMPLETE_WITHOUT_ACTIVATING = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle',
|
||||
{
|
||||
defaultMessage: 'Create rule without activating it',
|
||||
}
|
||||
);
|
||||
|
||||
export const COMPLETE_WITH_ACTIVATING = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle',
|
||||
{
|
||||
defaultMessage: 'Create & activate rule',
|
||||
}
|
||||
);
|
|
@ -87,7 +87,7 @@ export const useInvalidateRules = () => {
|
|||
/**
|
||||
* We should use this hook to update the rules cache when modifying rules
|
||||
* without changing the rules collection size. Use it with the new rules data
|
||||
* after operations like bulk or single rule edit or rule activation, but not
|
||||
* after operations like bulk or single rule edit or rule enabling, but not
|
||||
* when adding or removing rules. When adding/removing rules, we should
|
||||
* invalidate the cache instead.
|
||||
*
|
||||
|
|
|
@ -138,8 +138,8 @@ export const enableRulesAction = async (
|
|||
setLoadingRules?: RulesTableActions['setLoadingRules']
|
||||
) => {
|
||||
const errorTitle = enabled
|
||||
? i18n.BATCH_ACTION_ACTIVATE_SELECTED_ERROR(ids.length)
|
||||
: i18n.BATCH_ACTION_DEACTIVATE_SELECTED_ERROR(ids.length);
|
||||
? i18n.BATCH_ACTION_ENABLE_SELECTED_ERROR(ids.length)
|
||||
: i18n.BATCH_ACTION_DISABLE_SELECTED_ERROR(ids.length);
|
||||
|
||||
try {
|
||||
setLoadingRules?.({ ids, action: enabled ? 'enable' : 'disable' });
|
||||
|
|
|
@ -110,19 +110,19 @@ export const useBulkActions = ({
|
|||
!hasActionsPrivileges &&
|
||||
selectedRules.some((rule) => !canEditRuleWithActions(rule, hasActionsPrivileges));
|
||||
|
||||
const handleActivateAction = async () => {
|
||||
const handleEnableAction = async () => {
|
||||
closePopover();
|
||||
const deactivatedRules = selectedRules.filter(({ enabled }) => !enabled);
|
||||
const deactivatedRulesNoML = deactivatedRules.filter(({ type }) => !isMlRule(type));
|
||||
const disabledRules = selectedRules.filter(({ enabled }) => !enabled);
|
||||
const disabledRulesNoML = disabledRules.filter(({ type }) => !isMlRule(type));
|
||||
|
||||
const mlRuleCount = deactivatedRules.length - deactivatedRulesNoML.length;
|
||||
const mlRuleCount = disabledRules.length - disabledRulesNoML.length;
|
||||
if (!hasMlPermissions && mlRuleCount > 0) {
|
||||
displayWarningToast(detectionI18n.ML_RULES_UNAVAILABLE(mlRuleCount), dispatchToaster);
|
||||
}
|
||||
|
||||
const ruleIds = hasMlPermissions
|
||||
? deactivatedRules.map(({ id }) => id)
|
||||
: deactivatedRulesNoML.map(({ id }) => id);
|
||||
? disabledRules.map(({ id }) => id)
|
||||
: disabledRulesNoML.map(({ id }) => id);
|
||||
|
||||
if (isAllSelected) {
|
||||
const rulesBulkAction = initRulesBulkAction({
|
||||
|
@ -139,12 +139,12 @@ export const useBulkActions = ({
|
|||
invalidateRules();
|
||||
};
|
||||
|
||||
const handleDeactivateActions = async () => {
|
||||
const handleDisableActions = async () => {
|
||||
closePopover();
|
||||
const activatedIds = selectedRules.filter(({ enabled }) => enabled).map(({ id }) => id);
|
||||
const enabledIds = selectedRules.filter(({ enabled }) => enabled).map(({ id }) => id);
|
||||
if (isAllSelected) {
|
||||
const rulesBulkAction = initRulesBulkAction({
|
||||
visibleRuleIds: activatedIds,
|
||||
visibleRuleIds: enabledIds,
|
||||
action: BulkAction.disable,
|
||||
setLoadingRules,
|
||||
toasts,
|
||||
|
@ -152,7 +152,7 @@ export const useBulkActions = ({
|
|||
|
||||
await rulesBulkAction.byQuery(filterQuery);
|
||||
} else {
|
||||
await enableRulesAction(activatedIds, false, dispatchToaster, setLoadingRules);
|
||||
await enableRulesAction(enabledIds, false, dispatchToaster, setLoadingRules);
|
||||
}
|
||||
invalidateRules();
|
||||
};
|
||||
|
@ -345,10 +345,10 @@ export const useBulkActions = ({
|
|||
{
|
||||
key: i18n.BULK_ACTION_ENABLE,
|
||||
name: i18n.BULK_ACTION_ENABLE,
|
||||
'data-test-subj': 'activateRuleBulk',
|
||||
'data-test-subj': 'enableRuleBulk',
|
||||
disabled:
|
||||
missingActionPrivileges || containsLoading || (!containsDisabled && !isAllSelected),
|
||||
onClick: handleActivateAction,
|
||||
onClick: handleEnableAction,
|
||||
toolTipContent: missingActionPrivileges ? i18n.EDIT_RULE_SETTINGS_TOOLTIP : undefined,
|
||||
toolTipPosition: 'right',
|
||||
icon: undefined,
|
||||
|
@ -391,10 +391,10 @@ export const useBulkActions = ({
|
|||
{
|
||||
key: i18n.BULK_ACTION_DISABLE,
|
||||
name: i18n.BULK_ACTION_DISABLE,
|
||||
'data-test-subj': 'deactivateRuleBulk',
|
||||
'data-test-subj': 'disableRuleBulk',
|
||||
disabled:
|
||||
missingActionPrivileges || containsLoading || (!containsEnabled && !isAllSelected),
|
||||
onClick: handleDeactivateActions,
|
||||
onClick: handleDisableActions,
|
||||
toolTipContent: missingActionPrivileges ? i18n.EDIT_RULE_SETTINGS_TOOLTIP : undefined,
|
||||
toolTipPosition: 'right',
|
||||
icon: undefined,
|
||||
|
|
|
@ -677,7 +677,7 @@ const RuleDetailsPageComponent: React.FC<DetectionEngineComponentProps> = ({
|
|||
enabled={isExistingRule && (rule?.enabled ?? false)}
|
||||
onChange={handleOnChangeEnabledRule}
|
||||
/>
|
||||
<EuiFlexItem>{i18n.ACTIVATE_RULE}</EuiFlexItem>
|
||||
<EuiFlexItem>{i18n.ENABLE_RULE}</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
</EuiToolTip>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -28,10 +28,10 @@ export const EXPERIMENTAL = i18n.translate(
|
|||
}
|
||||
);
|
||||
|
||||
export const ACTIVATE_RULE = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.ruleDetails.activateRuleLabel',
|
||||
export const ENABLE_RULE = i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.ruleDetails.enableRuleLabel',
|
||||
{
|
||||
defaultMessage: 'Activate',
|
||||
defaultMessage: 'Enable',
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -454,18 +454,18 @@ export const BULK_EDIT_FLYOUT_FORM_DELETE_TAGS_TITLE = i18n.translate(
|
|||
}
|
||||
);
|
||||
|
||||
export const BATCH_ACTION_ACTIVATE_SELECTED_ERROR = (totalRules: number) =>
|
||||
export const BATCH_ACTION_ENABLE_SELECTED_ERROR = (totalRules: number) =>
|
||||
i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle',
|
||||
'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.enableSelectedErrorTitle',
|
||||
{
|
||||
values: { totalRules },
|
||||
defaultMessage: 'Error enabling {totalRules, plural, =1 {rule} other {rules}}',
|
||||
}
|
||||
);
|
||||
|
||||
export const BATCH_ACTION_DEACTIVATE_SELECTED_ERROR = (totalRules: number) =>
|
||||
export const BATCH_ACTION_DISABLE_SELECTED_ERROR = (totalRules: number) =>
|
||||
i18n.translate(
|
||||
'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle',
|
||||
'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.disableSelectedErrorTitle',
|
||||
{
|
||||
values: { totalRules },
|
||||
defaultMessage: 'Error disabling {totalRules, plural, =1 {rule} other {rules}}',
|
||||
|
|
|
@ -10,7 +10,7 @@ until we have all users moved away from the legacy system.
|
|||
|
||||
## How to create a legacy notification
|
||||
|
||||
* Create a rule and activate it normally within security_solution
|
||||
* Create a rule and enable it normally within security_solution
|
||||
* Do not add actions to the rule at this point as we are exercising the older legacy system. However, you want at least one action configured such as a slack notification.
|
||||
* Within dev tools do a query for all your actions and grab one of the `_id` of them without their prefix:
|
||||
|
||||
|
|
|
@ -757,12 +757,12 @@ describe('utils', () => {
|
|||
|
||||
expect(res).toBeTruthy();
|
||||
expect(mockLogger.warn).toHaveBeenCalledWith(
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["logs-endpoint.alerts-*"] was found. This warning will continue to appear until a matching index is created or this rule is de-activated. If you have recently enrolled agents enabled with Endpoint Security through Fleet, this warning should stop once an alert is sent from an agent. name: "fake name" id: "fake id" rule id: "fake rule id" signals index: "fakeindex"'
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["logs-endpoint.alerts-*"] was found. This warning will continue to appear until a matching index is created or this rule is disabled. If you have recently enrolled agents enabled with Endpoint Security through Fleet, this warning should stop once an alert is sent from an agent. name: "fake name" id: "fake id" rule id: "fake rule id" signals index: "fakeindex"'
|
||||
);
|
||||
expect(ruleExecutionLogger.logStatusChange).toHaveBeenCalledWith({
|
||||
newStatus: RuleExecutionStatus['partial failure'],
|
||||
message:
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["logs-endpoint.alerts-*"] was found. This warning will continue to appear until a matching index is created or this rule is de-activated. If you have recently enrolled agents enabled with Endpoint Security through Fleet, this warning should stop once an alert is sent from an agent.',
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["logs-endpoint.alerts-*"] was found. This warning will continue to appear until a matching index is created or this rule is disabled. If you have recently enrolled agents enabled with Endpoint Security through Fleet, this warning should stop once an alert is sent from an agent.',
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -797,12 +797,12 @@ describe('utils', () => {
|
|||
|
||||
expect(res).toBeTruthy();
|
||||
expect(mockLogger.warn).toHaveBeenCalledWith(
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["logs-endpoint.alerts-*"] was found. This warning will continue to appear until a matching index is created or this rule is de-activated. name: "fake name" id: "fake id" rule id: "fake rule id" signals index: "fakeindex"'
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["logs-endpoint.alerts-*"] was found. This warning will continue to appear until a matching index is created or this rule is disabled. name: "fake name" id: "fake id" rule id: "fake rule id" signals index: "fakeindex"'
|
||||
);
|
||||
expect(ruleExecutionLogger.logStatusChange).toHaveBeenCalledWith({
|
||||
newStatus: RuleExecutionStatus['partial failure'],
|
||||
message:
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["logs-endpoint.alerts-*"] was found. This warning will continue to appear until a matching index is created or this rule is de-activated.',
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["logs-endpoint.alerts-*"] was found. This warning will continue to appear until a matching index is created or this rule is disabled.',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -143,7 +143,7 @@ export const hasTimestampFields = async (args: {
|
|||
if (isEmpty(timestampFieldCapsResponse.body.indices)) {
|
||||
const errorString = `This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ${JSON.stringify(
|
||||
inputIndices
|
||||
)} was found. This warning will continue to appear until a matching index is created or this rule is de-activated. ${
|
||||
)} was found. This warning will continue to appear until a matching index is created or this rule is disabled. ${
|
||||
ruleName === 'Endpoint Security'
|
||||
? 'If you have recently enrolled agents enabled with Endpoint Security through Fleet, this warning should stop once an alert is sent from an agent.'
|
||||
: ''
|
||||
|
|
|
@ -23116,8 +23116,6 @@
|
|||
"xpack.securitySolution.detectionEngine.components.importRuleModal.overwriteExceptionLabel": "競合する「list_id」で既存の例外リストを上書き",
|
||||
"xpack.securitySolution.detectionEngine.components.importRuleModal.selectRuleDescription": "インポートするルールを選択します。関連付けられたルールアクションと例外を含めることができます。",
|
||||
"xpack.securitySolution.detectionEngine.components.importRuleModal.successfullyImportedRulesTitle": "{totalRules} {totalRules, plural, other {ルール}}を正常にインポートしました",
|
||||
"xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle": "ルールの作成と有効化",
|
||||
"xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle": "有効化せずにルールを作成",
|
||||
"xpack.securitySolution.detectionEngine.createRule.backToRulesButton": "ルール",
|
||||
"xpack.securitySolution.detectionEngine.createRule.editRuleButton": "編集",
|
||||
"xpack.securitySolution.detectionEngine.createRule.eqlRuleTypeDescription": "イベント相関関係",
|
||||
|
@ -23219,8 +23217,6 @@
|
|||
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.invalidMustacheTemplateErrorMessage": "{key}は有効なmustacheテンプレートではありません",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.noConnectorSelectedErrorMessage": "コネクターを選択していません",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.noReadActionsPrivileges": "ルールアクションを作成できません。「Actions」プラグインの「読み取り」アクセス権がありません。",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithActivatingTitle": "ルールの作成と有効化",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithoutActivatingTitle": "有効化せずにルールを作成",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackHelpText": "ルックバック期間に時間を追加してアラートの見落としを防ぎます。",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackLabel": "追加のルックバック時間",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldIntervalHelpText": "ルールを定期的に実行し、指定の時間枠内でアラートを検出します。",
|
||||
|
@ -23902,7 +23898,6 @@
|
|||
"xpack.securitySolution.detectionEngine.ruleDescription.mlJobStoppedDescription": "停止",
|
||||
"xpack.securitySolution.detectionEngine.ruleDescription.thresholdResultsAggregatedByDescription": "結果集約条件",
|
||||
"xpack.securitySolution.detectionEngine.ruleDescription.thresholdResultsAllDescription": "すべての結果",
|
||||
"xpack.securitySolution.detectionEngine.ruleDetails.activateRuleLabel": "有効化",
|
||||
"xpack.securitySolution.detectionEngine.ruleDetails.backToRulesButton": "ルール",
|
||||
"xpack.securitySolution.detectionEngine.ruleDetails.deletedRule": "削除されたルール",
|
||||
"xpack.securitySolution.detectionEngine.ruleDetails.exceptionsTab": "例外",
|
||||
|
@ -23945,8 +23940,6 @@
|
|||
"xpack.securitySolution.detectionEngine.rules.allRules.actions.editRuleSettingsToolTip": "Kibana アクション特権がありません",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.actions.exportRuleDescription": "ルールのエクスポート",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.activeRuleDescription": "アクティブ",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle": "{totalRules, plural, other {個のルール}}の有効化エラー",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle": "{totalRules, plural, other {個のルール}}の無効化エラー",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedErrorTitle": "{totalRules, plural, other {ルール}}の削除エラー",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "選択には削除できないイミュータブルルールがあります",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActionsTitle": "一斉アクション",
|
||||
|
|
|
@ -23145,8 +23145,6 @@
|
|||
"xpack.securitySolution.detectionEngine.components.importRuleModal.overwriteExceptionLabel": "覆盖具有冲突“list_id”的现有例外列表",
|
||||
"xpack.securitySolution.detectionEngine.components.importRuleModal.selectRuleDescription": "选择要导入的规则。可以包括关联的规则操作和例外。",
|
||||
"xpack.securitySolution.detectionEngine.components.importRuleModal.successfullyImportedRulesTitle": "已成功导入 {totalRules} 个{totalRules, plural, other {规则}}",
|
||||
"xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle": "创建并激活规则",
|
||||
"xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle": "创建规则但不激活",
|
||||
"xpack.securitySolution.detectionEngine.createRule.backToRulesButton": "规则",
|
||||
"xpack.securitySolution.detectionEngine.createRule.editRuleButton": "编辑",
|
||||
"xpack.securitySolution.detectionEngine.createRule.eqlRuleTypeDescription": "事件关联",
|
||||
|
@ -23248,8 +23246,6 @@
|
|||
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.invalidMustacheTemplateErrorMessage": "{key} 不是有效的 Mustache 模板",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.noConnectorSelectedErrorMessage": "未选择任何连接器",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.noReadActionsPrivileges": "无法创建规则操作。您对“操作”插件没有“读”权限。",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithActivatingTitle": "创建并激活规则",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithoutActivatingTitle": "创建规则但不激活",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackHelpText": "增加回查时段的时间以防止错过告警。",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackLabel": "更多回查时间",
|
||||
"xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldIntervalHelpText": "规则定期运行并检测指定时间范围内的告警。",
|
||||
|
@ -23931,7 +23927,6 @@
|
|||
"xpack.securitySolution.detectionEngine.ruleDescription.mlJobStoppedDescription": "已停止",
|
||||
"xpack.securitySolution.detectionEngine.ruleDescription.thresholdResultsAggregatedByDescription": "结果聚合依据",
|
||||
"xpack.securitySolution.detectionEngine.ruleDescription.thresholdResultsAllDescription": "所有结果",
|
||||
"xpack.securitySolution.detectionEngine.ruleDetails.activateRuleLabel": "激活",
|
||||
"xpack.securitySolution.detectionEngine.ruleDetails.backToRulesButton": "规则",
|
||||
"xpack.securitySolution.detectionEngine.ruleDetails.deletedRule": "已删除规则",
|
||||
"xpack.securitySolution.detectionEngine.ruleDetails.exceptionsTab": "例外",
|
||||
|
@ -23974,8 +23969,6 @@
|
|||
"xpack.securitySolution.detectionEngine.rules.allRules.actions.editRuleSettingsToolTip": "您没有 Kibana 操作权限",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.actions.exportRuleDescription": "导出规则",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.activeRuleDescription": "活动",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle": "启用{totalRules, plural, other {规则}}时出错",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle": "禁用{totalRules, plural, other {规则}}时出错",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedErrorTitle": "删除{totalRules, plural, other {规则}}时出错",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "选择内容包含无法删除的不可变规则",
|
||||
"xpack.securitySolution.detectionEngine.rules.allRules.batchActionsTitle": "批处理操作",
|
||||
|
|
|
@ -131,7 +131,7 @@ export default ({ getService }: FtrProviderContext) => {
|
|||
// TODO: https://github.com/elastic/kibana/pull/121644 clean up, make type-safe
|
||||
expect(rule?.execution_summary?.last_execution.status).to.eql('partial failure');
|
||||
expect(rule?.execution_summary?.last_execution.message).to.eql(
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["does-not-exist-*"] was found. This warning will continue to appear until a matching index is created or this rule is de-activated.'
|
||||
'This rule is attempting to query data from Elasticsearch indices listed in the "Index pattern" section of the rule definition, however no index matching: ["does-not-exist-*"] was found. This warning will continue to appear until a matching index is created or this rule is disabled.'
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue