Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] Adds 'Anomaly detection' settings page to create ML jobs per environment #70560

Merged
merged 15 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ export const AddEnvironments = ({
{ preservePreviousData: false }
);

const availableEnvironmentOptions = data.map((env) => ({
label: env,
const environments = [...data, ENVIRONMENT_NOT_DEFINED];
ogupte marked this conversation as resolved.
Show resolved Hide resolved
const environmentOptions = environments.map((env) => ({
label: env === ENVIRONMENT_NOT_DEFINED ? NOT_DEFINED_OPTION_LABEL : env,
value: env,
disabled: currentEnvironments.includes(env),
}));
Expand Down Expand Up @@ -74,7 +75,7 @@ export const AddEnvironments = ({
'xpack.apm.settings.anomalyDetection.addEnvironments.descriptionText',
{
defaultMessage:
'Choose the service environments that you want to enable anomaly detection for. Anomalies will surface for all the services and their transaction types.',
'Select the service environments that you want to enable anomaly detection in. Anomalies will surface for all services and transaction types within the selected environments.',
}
)}
</EuiText>
Expand All @@ -96,7 +97,7 @@ export const AddEnvironments = ({
defaultMessage: 'Select or add environments',
}
)}
options={[...availableEnvironmentOptions, NOT_DEFINED_OPTION]}
options={environmentOptions}
selectedOptions={selectedOptions}
onChange={(nextSelectedOptions) => {
setSelected(nextSelectedOptions);
Expand Down Expand Up @@ -156,9 +157,9 @@ export const AddEnvironments = ({
);
};

const NOT_DEFINED_OPTION = {
value: ENVIRONMENT_NOT_DEFINED,
label: i18n.translate('xpack.apm.filter.environment.notDefinedLabel', {
const NOT_DEFINED_OPTION_LABEL = i18n.translate(
'xpack.apm.filter.environment.notDefinedLabel',
{
defaultMessage: 'Not defined',
}),
};
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const AnomalyDetection = () => {
<EuiText>
{i18n.translate('xpack.apm.settings.anomalyDetection.descriptionText', {
defaultMessage:
'The Machine Learning integration enables you to see the health status of your applications in the Service map and identifies anomalies in your transaction duration to show unexpected increase in response time.',
'The Machine Learning anomaly detection integration enables application health status indicators in the Service map by identifying transaction duration anomalies.',
})}
</EuiText>
<EuiSpacer size="l" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,14 @@ export const JobsList = ({
<EuiText>
<FormattedMessage
id="xpack.apm.settings.anomalyDetection.jobList.mlDescriptionText"
defaultMessage="You can {mlJobsLink}."
defaultMessage="Manage existing anomaly detection jobs in {mlJobsLink}."
values={{
mlJobsLink: (
<MLLink path="jobs">
{i18n.translate(
'xpack.apm.settings.anomalyDetection.jobList.mlDescriptionText.mlJobsLinkText',
{
defaultMessage:
'manage the anomaly detection jobs in Machine Learning',
defaultMessage: 'Machine Learning',
}
)}
</MLLink>
Expand Down
30 changes: 15 additions & 15 deletions x-pack/plugins/apm/public/components/app/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ export const Settings: React.FC = (props) => {
),
},
{
name: i18n.translate('xpack.apm.settings.indices', {
defaultMessage: 'Indices',
}),
id: '2',
href: getAPMHref('/settings/apm-indices', search),
isSelected: pathname === '/settings/apm-indices',
name: i18n.translate(
'xpack.apm.settings.anomalyDetection',
{
defaultMessage: 'Anomaly detection',
}
),
id: '4',
href: getAPMHref('/settings/anomaly-detection', search),
isSelected: pathname === '/settings/anomaly-detection',
},
{
name: i18n.translate('xpack.apm.settings.customizeApp', {
Expand All @@ -65,15 +68,12 @@ export const Settings: React.FC = (props) => {
isSelected: pathname === '/settings/customize-ui',
},
{
name: i18n.translate(
'xpack.apm.settings.anomalyDetection',
{
defaultMessage: 'Anomaly detection',
}
),
id: '4',
href: getAPMHref('/settings/anomaly-detection', search),
isSelected: pathname === '/settings/anomaly-detection',
name: i18n.translate('xpack.apm.settings.indices', {
defaultMessage: 'Indices',
}),
id: '2',
href: getAPMHref('/settings/apm-indices', search),
isSelected: pathname === '/settings/apm-indices',
},
],
},
Expand Down