mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.7`: - [[DOCS] Automate rule-types-index-threshold-example-alerts.png (#152618)](https://github.com/elastic/kibana/pull/152618) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Lisa Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-03-07T16:43:49Z","message":"[DOCS] Automate rule-types-index-threshold-example-alerts.png (#152618)","sha":"b6cff1ad72586549e70afc99cd5dfb7ac51b58f7","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Alerting/RuleTypes","v8.8.0","v8.7.1"],"number":152618,"url":"https://github.com/elastic/kibana/pull/152618","mergeCommit":{"message":"[DOCS] Automate rule-types-index-threshold-example-alerts.png (#152618)","sha":"b6cff1ad72586549e70afc99cd5dfb7ac51b58f7"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152618","number":152618,"mergeCommit":{"message":"[DOCS] Automate rule-types-index-threshold-example-alerts.png (#152618)","sha":"b6cff1ad72586549e70afc99cd5dfb7ac51b58f7"}},{"branch":"8.7","label":"v8.7.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
parent
e7242593f9
commit
26c8ad7b45
5 changed files with 24 additions and 6 deletions
Binary file not shown.
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 231 KiB |
|
@ -109,6 +109,7 @@ The unique action variables that you can use in the notification are listed in <
|
|||
+
|
||||
[role="screenshot"]
|
||||
image::user/alerting/images/rule-types-index-threshold-example-alerts.png[View the list of alerts for the rule]
|
||||
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
|
||||
|
||||
. Delete or disable this example rule when it's no longer useful. In the detailed rule view, select *Delete rule* from the actions menu.
|
||||
|
||||
|
|
|
@ -19,13 +19,15 @@ export function RulesAPIServiceProvider({ getService }: FtrProviderContext) {
|
|||
params,
|
||||
ruleTypeId,
|
||||
schedule,
|
||||
actions = [],
|
||||
}: {
|
||||
consumer: string;
|
||||
name: string;
|
||||
notifyWhen: string;
|
||||
notifyWhen?: string;
|
||||
params: Record<string, unknown>;
|
||||
ruleTypeId: string;
|
||||
schedule: Record<string, unknown>;
|
||||
actions?: any[];
|
||||
}) {
|
||||
log.debug(`Create basic rule...`);
|
||||
const { body: createdRule } = await kbnSupertest
|
||||
|
@ -38,6 +40,7 @@ export function RulesAPIServiceProvider({ getService }: FtrProviderContext) {
|
|||
params,
|
||||
rule_type_id: ruleTypeId,
|
||||
schedule,
|
||||
actions,
|
||||
})
|
||||
.expect(200);
|
||||
return createdRule;
|
||||
|
|
|
@ -16,13 +16,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const testSubjects = getService('testSubjects');
|
||||
const pageObjects = getPageObjects(['common', 'header']);
|
||||
const screenshotDirectories = ['response_ops_docs', 'stack_alerting'];
|
||||
const ruleName = 'kibana sites - high egress';
|
||||
|
||||
describe('index threshold rule', function () {
|
||||
it('create rule screenshot', async () => {
|
||||
await pageObjects.common.navigateToApp('triggersActions');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await rules.common.clickCreateAlertButton();
|
||||
await testSubjects.setValue('ruleNameInput', 'kibana sites - high egress');
|
||||
await testSubjects.setValue('ruleNameInput', ruleName);
|
||||
await testSubjects.click('tagsComboBox');
|
||||
await testSubjects.setValue('tagsComboBox', 'sample-data');
|
||||
await testSubjects.click('solutionsFilterButton');
|
||||
|
@ -130,12 +131,24 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
1400,
|
||||
1024
|
||||
);
|
||||
/*
|
||||
* const saveButton = await testSubjects.find('saveRuleButton');
|
||||
* await saveButton.click();
|
||||
*/
|
||||
|
||||
const saveButton = await testSubjects.find('saveRuleButton');
|
||||
await saveButton.click();
|
||||
const flyOutCancelButton = await testSubjects.find('euiFlyoutCloseButton');
|
||||
await flyOutCancelButton.click();
|
||||
await pageObjects.common.navigateToApp('triggersActions');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await testSubjects.setValue('ruleSearchField', ruleName);
|
||||
const rulesList = await testSubjects.find('rulesList');
|
||||
const alertRule = await rulesList.findByCssSelector(`[title="${ruleName}"]`);
|
||||
await alertRule.click();
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await commonScreenshots.takeScreenshot(
|
||||
'rule-types-index-threshold-example-alerts',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1024
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
ruleTypeId: '.index-threshold',
|
||||
schedule: { interval: '1m' },
|
||||
tags: [],
|
||||
actions: [],
|
||||
};
|
||||
|
||||
before(async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue