Skip to content

Commit d78bfba

Browse files
[SIEM][Detection Engine] Adds release notes link and updates one UI section (#62145)
## Summary Based on feed back from two users within our community slack channel of SIEM we are adding a release notes link to the product for when rules are updated. Also, because new rules can show up we are changing the words of the "Reload X deleted Elastic prebuilt rule" to "Install X Elastic prebuilt rule" as it is misleading to imply the user has deleted rules when really they have either deleted rules or new rules are available to be installed. The screen shot with the link of "release notes". Previously the link of "release notes" did not exist: This new link right now goes to: https://www.elastic.co/guide/en/siem/guide/master/prebuilt-rules.html where in the link `master` is replaced with the version of the product that is deployed. I think we want to replace that link with a new one which will have release notes of rules for each new version of the rules. <img width="688" alt="Screen Shot 2020-03-20 at 2 29 47 PM" src="https://user-images.githubusercontent.com/1151048/77207801-ef0b1480-6abf-11ea-8ad7-771b0f3334d6.png"> Screen shot of the new text for Install Elastic Rules: <img width="679" alt="Screen Shot 2020-03-20 at 3 20 44 PM" src="https://user-images.githubusercontent.com/1151048/77207875-1b269580-6ac0-11ea-908d-6ec1694df62f.png"> Screen shot of the existing Reload Elastic Rules the above screen shot is replacing: <img width="817" alt="Screen Shot 2020-03-20 at 2 36 52 PM" src="https://user-images.githubusercontent.com/1151048/77207833-03e7a800-6ac0-11ea-92f8-7bb065775122.png"> ### 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/master/packages/kbn-i18n/README.md) - [x] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials
1 parent 620f304 commit d78bfba

File tree

4 files changed

+33
-12
lines changed

4 files changed

+33
-12
lines changed

x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ describe('Deleting prebuilt rules', () => {
114114
cy.get(RELOAD_PREBUILT_RULES_BTN).should('exist');
115115
cy.get(RELOAD_PREBUILT_RULES_BTN)
116116
.invoke('text')
117-
.should('eql', 'Reload 1 deleted Elastic prebuilt rule ');
117+
.should('eql', 'Install 1 Elastic prebuilt rule ');
118118

119119
reloadDeletedRules();
120120

@@ -146,7 +146,7 @@ describe('Deleting prebuilt rules', () => {
146146
cy.get(RELOAD_PREBUILT_RULES_BTN).should('exist');
147147
cy.get(RELOAD_PREBUILT_RULES_BTN)
148148
.invoke('text')
149-
.should('eql', `Reload ${numberOfRulesToBeSelected} deleted Elastic prebuilt rules `);
149+
.should('eql', `Install ${numberOfRulesToBeSelected} Elastic prebuilt rules `);
150150
cy.get(ELASTIC_RULES_BTN)
151151
.invoke('text')
152152
.should('eql', `Elastic rules (${expectedNumberOfRulesAfterDeletion})`);

x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,10 @@ export const UPDATE_PREPACKAGED_RULES = (updateRules: number) =>
5555
defaultMessage:
5656
'Update {updateRules} Elastic prebuilt {updateRules, plural, =1 {rule} other {rules}} ',
5757
});
58+
59+
export const RELEASE_NOTES_HELP = i18n.translate(
60+
'xpack.siem.detectionEngine.rules.releaseNotesHelp',
61+
{
62+
defaultMessage: 'Release notes',
63+
}
64+
);

x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
import React, { memo } from 'react';
88

9-
import { EuiCallOut, EuiButton } from '@elastic/eui';
9+
import { EuiCallOut, EuiButton, EuiLink } from '@elastic/eui';
10+
11+
import { useKibana } from '../../../../../lib/kibana';
1012
import * as i18n from './translations';
1113

1214
interface UpdatePrePackagedRulesCallOutProps {
@@ -19,13 +21,25 @@ const UpdatePrePackagedRulesCallOutComponent: React.FC<UpdatePrePackagedRulesCal
1921
loading,
2022
numberOfUpdatedRules,
2123
updateRules,
22-
}) => (
23-
<EuiCallOut title={i18n.UPDATE_PREPACKAGED_RULES_TITLE}>
24-
<p>{i18n.UPDATE_PREPACKAGED_RULES_MSG(numberOfUpdatedRules)}</p>
25-
<EuiButton onClick={updateRules} size="s" isLoading={loading}>
26-
{i18n.UPDATE_PREPACKAGED_RULES(numberOfUpdatedRules)}
27-
</EuiButton>
28-
</EuiCallOut>
29-
);
24+
}) => {
25+
const { services } = useKibana();
26+
return (
27+
<EuiCallOut title={i18n.UPDATE_PREPACKAGED_RULES_TITLE}>
28+
<p>
29+
{i18n.UPDATE_PREPACKAGED_RULES_MSG(numberOfUpdatedRules)}
30+
<br />
31+
<EuiLink
32+
href={`${services.docLinks.ELASTIC_WEBSITE_URL}guide/en/siem/guide/${services.docLinks.DOC_LINK_VERSION}/prebuilt-rules-changelog.html`}
33+
target="_blank"
34+
>
35+
{i18n.RELEASE_NOTES_HELP}
36+
</EuiLink>
37+
</p>
38+
<EuiButton onClick={updateRules} size="s" isLoading={loading}>
39+
{i18n.UPDATE_PREPACKAGED_RULES(numberOfUpdatedRules)}
40+
</EuiButton>
41+
</EuiCallOut>
42+
);
43+
};
3044

3145
export const UpdatePrePackagedRulesCallOut = memo(UpdatePrePackagedRulesCallOutComponent);

x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export const RELOAD_MISSING_PREPACKAGED_RULES = (missingRules: number) =>
406406
i18n.translate('xpack.siem.detectionEngine.rules.reloadMissingPrePackagedRulesButton', {
407407
values: { missingRules },
408408
defaultMessage:
409-
'Reload {missingRules} deleted Elastic prebuilt {missingRules, plural, =1 {rule} other {rules}} ',
409+
'Install {missingRules} Elastic prebuilt {missingRules, plural, =1 {rule} other {rules}} ',
410410
});
411411

412412
export const IMPORT_RULE_BTN_TITLE = i18n.translate(

0 commit comments

Comments
 (0)