Skip to content

Commit

Permalink
[SIEM] Update ML incompatible jobs callout text (elastic#49668) (elas…
Browse files Browse the repository at this point in the history
…tic#49673)

## Summary

Updates the placeholder text within the ML Anomaly Detection UI for when certain jobs are incompatible. To test, remove all `siem:defaultIndex` patterns -- this will not send any indices to the recognize API, and all jobs will be _incompatible_.

Resolves elastic#49200

![image](https://user-images.githubusercontent.com/2946766/67798171-a4252d80-fa48-11e9-83a6-643302935ae5.png)


### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

- [ ] ~This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~
- [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)
- [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~
- [ ] ~[Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~
- [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~

### For maintainers

- [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
- [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
  • Loading branch information
spong authored Oct 29, 2019
1 parent f3076c0 commit d3ef096
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { EuiButton, EuiCallOut, EuiPopover, EuiPopoverTitle, EuiSpacer } from '@
import React, { useContext, useReducer, useState } from 'react';
import styled from 'styled-components';
import moment from 'moment';
import { FormattedMessage } from '@kbn/i18n/react';
import { DOC_LINK_VERSION, ELASTIC_WEBSITE_URL } from 'ui/documentation_links';
import * as i18n from './translations';
import { JobsFilters, JobSummary, SiemJob } from './types';
import { hasMlAdminPermissions } from '../ml/permissions/has_ml_admin_permissions';
Expand Down Expand Up @@ -216,7 +218,23 @@ export const MlPopover = React.memo(() => {
iconType="alert"
size="s"
>
<p>{i18n.MODULE_NOT_COMPATIBLE_DESCRIPTION}</p>
<p>
<FormattedMessage
defaultMessage="We could not find any data, see {mlDocs} for more information on Machine Learning job requirements."
id="xpack.siem.components.mlPopup.moduleNotCompatibleDescription"
values={{
mlDocs: (
<a
href={`${ELASTIC_WEBSITE_URL}guide/en/siem/guide/${DOC_LINK_VERSION}/machine-learning.html`}
rel="noopener noreferrer"
target="_blank"
>
{'Anomaly Detection with Machine Learning'}
</a>
),
}}
/>
</p>
</EuiCallOut>

<EuiSpacer size="m" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ export const MODULE_NOT_COMPATIBLE_TITLE = (incompatibleJobCount: number) =>
'{incompatibleJobCount} {incompatibleJobCount, plural, =1 {job} other {jobs}} are currently unavailable',
});

export const MODULE_NOT_COMPATIBLE_DESCRIPTION = i18n.translate(
'xpack.siem.components.mlPopup.moduleNotCompatibleDescription',
{
defaultMessage:
'You may be missing the required index patterns. Learn more in our documentation.',
}
);

export const START_JOB_FAILURE = i18n.translate(
'xpack.siem.components.mlPopup.errors.startJobFailureTitle',
{
Expand Down

0 comments on commit d3ef096

Please sign in to comment.