Skip to content

Commit

Permalink
Merge branch 'master' into eui/26.1
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jul 9, 2020
2 parents e47edb6 + b25b690 commit 40a30f4
Show file tree
Hide file tree
Showing 270 changed files with 353 additions and 182 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions docs/developer/testing/interpreting-ci-failures.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Clicking the link next to the check in the conversation tab of a pull request wi

To view the results of a job execution in Jenkins, either click the link in the comment left by `@elasticmachine` or search for the `kibana-ci` check in the list at the bottom of the PR. This link will take you to the top-level page for the specific job execution that failed.

image::images/jenkins/job_view.png[]
image::images/job_view.png[]

1. *Git Changes:* the list of commits that were in this build which weren't in the previous build. For Pull Requests this list is calculated by comparing against the most recent Pull Request which was tested, it is not limited to build for this specific Pull Request, so it's not very useful.
2. *Test Results:* A link to the test results screen, and shortcuts to the failed tests. Functional tests capture and store the log output from each specific test, and make it visible at these links. For other test runners only the error message is visible and log output must be tracked down in the *Pipeline Steps*.
Expand All @@ -29,6 +29,6 @@ image::images/jenkins/job_view.png[]

To view the logs for a failed specific ciGroup, jest, mocha, type checkers, linters, etc., click on the *Pipeline Steps* link in from the Job page.

image::images/jenkins/pipeline_steps_view.png[]
image::images/pipeline_steps_view.png[]

Scroll down the page until you find a failed step *(1)*, and then look up a few lines for the `Branch:` step to see which specific job this is. If this is the job you're looking for click the little terminal icon next to the failed step *(1)* to view the logs for that specific step in the Pipeline.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed docs/images/AddFieldButton.jpg
Diff not rendered.
Binary file removed docs/images/CollapseButton.jpg
Diff not rendered.
Binary file removed docs/images/Dashboard_Resize_Menu.png
Diff not rendered.
Binary file removed docs/images/Dashboard_visualization_data.png
Diff not rendered.
Binary file removed docs/images/Discover-ContextView-FilterMontage.png
Diff not rendered.
Binary file removed docs/images/Discover-FieldStats.jpg
Diff not rendered.
Binary file removed docs/images/Discover-MoveColumn.jpg
Diff not rendered.
Binary file removed docs/images/EditVis.png
Diff not rendered.
Binary file removed docs/images/ExistsButton.jpg
Diff not rendered.
Binary file removed docs/images/ExpandButton.jpg
Diff not rendered.
Binary file removed docs/images/NYCTA-Table.jpg
Diff not rendered.
Binary file removed docs/images/NewDashboard.png
Diff not rendered.
Binary file removed docs/images/RemoveFieldButton.jpg
Diff not rendered.
Binary file removed docs/images/Start-Page.png
Diff not rendered.
Binary file removed docs/images/TimeFilter.jpg
Diff not rendered.
Binary file removed docs/images/VizEditor.jpg
Diff not rendered.
Binary file removed docs/images/add-column-button.png
Diff not rendered.
Binary file removed docs/images/add_filter_field.png
Diff not rendered.
Binary file removed docs/images/add_filter_operator.png
Diff not rendered.
Binary file removed docs/images/add_filter_value.png
Diff not rendered.
Binary file removed docs/images/auto_format_after.png
Diff not rendered.
Binary file removed docs/images/auto_format_before.png
Diff not rendered.
Binary file removed docs/images/auto_format_bulk.png
Diff not rendered.
Binary file removed docs/images/autorefresh-intervals.png
Diff not rendered.
Binary file removed docs/images/autorefresh-pause.png
Diff not rendered.
Binary file removed docs/images/autorefresh.png
Diff not rendered.
Binary file removed docs/images/bar-terms-agg.png
Diff not rendered.
Binary file removed docs/images/bar-terms-subagg.png
Diff not rendered.
Binary file removed docs/images/canvas-align-elements.gif
Diff not rendered.
Binary file removed docs/images/canvas-background-color-picker.gif
Diff not rendered.
Binary file removed docs/images/canvas-click-drag-element.gif
Diff not rendered.
Binary file removed docs/images/canvas-distribute-elements.gif
Diff not rendered.
Binary file removed docs/images/canvas-download-json.gif
Diff not rendered.
Binary file removed docs/images/canvas-ecommerce.png
Diff not rendered.
Binary file removed docs/images/canvas-element-order.gif
Diff not rendered.
Binary file removed docs/images/canvas-embed_workpad.gif
Diff not rendered.
Binary file removed docs/images/canvas-fullscreen.gif
Diff not rendered.
Binary file removed docs/images/canvas-move-pixel.gif
Diff not rendered.
Binary file removed docs/images/canvas-resize-element.gif
Diff not rendered.
Binary file removed docs/images/canvas-zoom.gif
Diff not rendered.
Binary file removed docs/images/canvas_create_image.png
Diff not rendered.
Binary file removed docs/images/canvas_map-time-filter.gif
Diff not rendered.
Binary file removed docs/images/canvas_share_autoplay_480.gif
Diff not rendered.
Binary file removed docs/images/canvas_share_hidetoolbar_480.gif
Diff not rendered.
Binary file removed docs/images/canvas_workpad_3_page.png
Diff not rendered.
Binary file removed docs/images/canvas_workpad_edit_style.png
Diff not rendered.
Binary file removed docs/images/canvas_workpad_weblog.png
Diff not rendered.
Binary file removed docs/images/controls/controls_options.png
Diff not rendered.
Binary file removed docs/images/controls/dropdown_control_editor.png
Diff not rendered.
Binary file removed docs/images/controls/range_slider_editor.png
Diff not rendered.
Binary file removed docs/images/discover-compass.png
Diff not rendered.
Binary file removed docs/images/edit_filter_query.png
Diff not rendered.
Binary file removed docs/images/filter-actions.png
Diff not rendered.
Binary file removed docs/images/filter-allbuttons.png
Diff not rendered.
Binary file removed docs/images/filter-sample.png
Diff not rendered.
Binary file removed docs/images/goal.png
Diff not rendered.
Binary file removed docs/images/history.png
Diff not rendered.
Binary file removed docs/images/labelbutton.png
Diff not rendered.
Binary file removed docs/images/lens_remove_layer.png
Diff not rendered.
Binary file removed docs/images/management-index-management.png
Diff not rendered.
Binary file removed docs/images/management-upgrade-assistant-8.0.png
Diff not rendered.
Binary file removed docs/images/management-watcher-buttons.png
Diff not rendered.
Binary file removed docs/images/management_rolled_dashboard.png
Diff not rendered.
Binary file removed docs/images/management_rollups_visualization.png
Diff not rendered.
Binary file removed docs/images/markdown-example.png
Diff not rendered.
Binary file removed docs/images/multiple_requests.png
Diff not rendered.
Binary file removed docs/images/regionmap.png
Diff not rendered.
Binary file removed docs/images/search-button.jpg
Diff not rendered.
Binary file removed docs/images/security_base_all.png
Diff not rendered.
Binary file removed docs/images/share-short-link.png
Diff not rendered.
Binary file removed docs/images/time-filter-absolute.jpg
Diff not rendered.
Binary file removed docs/images/time-filter-relative.jpg
Diff not rendered.
Binary file removed docs/images/time-filter.jpg
Diff not rendered.
Binary file removed docs/images/time-picker-step.jpg
Diff not rendered.
Binary file removed docs/images/time-picker.jpg
Diff not rendered.
Binary file removed docs/images/timelion-arg-help.jpg
Diff not rendered.
Binary file removed docs/images/timelion-read-only-badge.png
Diff not rendered.
Binary file removed docs/images/timelion-save01.png
Diff not rendered.
Binary file removed docs/images/timelion-save02.png
Diff not rendered.
Binary file removed docs/images/tsvb-annotations.png
Diff not rendered.
Binary file removed docs/images/tsvb-data-tab-derivative-example.png
Diff not rendered.
Binary file removed docs/images/tsvb-data-tab-label.png
Diff not rendered.
Diff not rendered.
Binary file removed docs/images/tsvb-data-tab-series-options.png
Diff not rendered.
Binary file removed docs/images/tutorial-full-inspect2.png
Diff not rendered.
Binary file removed docs/images/tutorial-sample-discover-2.png
Diff not rendered.
Binary file removed docs/images/tutorial-sample-inspect2.png
Diff not rendered.
Binary file removed docs/images/tutorial-visualize-pie-1.png
Diff not rendered.
Binary file removed docs/images/visualize-flow.png
Diff not rendered.
Binary file removed docs/images/visualize-icon.png
Diff not rendered.
Binary file removed docs/images/visualize_coordinate_map_example.png
Diff not rendered.
Binary file removed docs/images/visualize_region_map_example.png
Diff not rendered.
Binary file removed docs/images/viz-fit-bounds.png
Diff not rendered.
Binary file removed docs/images/viz-lat-long-filter.png
Diff not rendered.
Binary file removed docs/images/viz-zoom.png
Diff not rendered.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions docs/user/alerting/action-types/pagerduty.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ Then, select the *Integrations* tab and click the *New Integration* button.
* If you are creating a new service for your integration,
go to
https://support.pagerduty.com/docs/services-and-integrations#section-configuring-services-and-integrations[Configuring Services and Integrations]
and follow the steps outlined in the *Create a New Service* section, selecting *Elastic* as the *Integration Type* in step 4.
and follow the steps outlined in the *Create a New Service* section, selecting *Elastic Alerts* as the *Integration Type* in step 4.
Continue with the <<pagerduty-in-elastic, In Elastic>> section once you have finished these steps.

. Enter an *Integration Name* in the format Elastic-service-name (for example, Elastic-Alerting or Kibana-APM-Alerting)
and select Elastic from the *Integration Type* menu.
and select *Elastic Alerts* from the *Integration Type* menu.
. Click *Add Integration* to save your new integration.
+
You will be redirected to the *Integrations* tab for your service. An Integration Key is generated on this screen.
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const setup = async (overridingDependencies: any = {}): Promise<DataStrea

export const createDataStreamPayload = (name: string): DataStream => ({
name,
timeStampField: { name: '@timestamp', mapping: { type: 'date' } },
timeStampField: { name: '@timestamp' },
indices: [
{
name: 'indexName',
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/index_management/common/types/data_streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

interface TimestampFieldFromEs {
name: string;
mapping: {
type: string;
};
}

type TimestampField = TimestampFieldFromEs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export function registerGetAllRoute({ router, license, lib: { isEsError } }: Rou
const { callAsCurrentUser } = ctx.dataManagement!.client;

try {
const dataStreams = await callAsCurrentUser('dataManagement.getDataStreams');
const { data_streams: dataStreams } = await callAsCurrentUser(
'dataManagement.getDataStreams'
);
const body = deserializeDataStreamList(dataStreams);

return res.ok({ body });
Expand Down Expand Up @@ -50,7 +52,10 @@ export function registerGetOneRoute({ router, license, lib: { isEsError } }: Rou
const { callAsCurrentUser } = ctx.dataManagement!.client;

try {
const dataStream = await callAsCurrentUser('dataManagement.getDataStream', { name });
const { data_streams: dataStream } = await callAsCurrentUser(
'dataManagement.getDataStream',
{ name }
);

if (dataStream[0]) {
const body = deserializeDataStream(dataStream[0]);
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugins/ml/common/constants/field_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ export enum ML_JOB_FIELD_TYPES {

export const MLCATEGORY = 'mlcategory';
export const DOC_COUNT = 'doc_count';

// List of system fields we don't want to display.
export const OMIT_FIELDS: string[] = ['_source', '_type', '_index', '_id', '_version', '_score'];
4 changes: 2 additions & 2 deletions x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export interface Detector {
function: string;
over_field_name?: string;
partition_field_name?: string;
use_null?: string;
use_null?: boolean;
custom_rules?: CustomRule[];
}
export interface AnalysisLimits {
Expand All @@ -80,7 +80,7 @@ export interface DataDescription {
}

export interface ModelPlotConfig {
enabled: boolean;
enabled?: boolean;
annotations_enabled?: boolean;
terms?: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import { BASIC_NUMERICAL_TYPES, EXTENDED_NUMERICAL_TYPES } from '../../../../com

export const CATEGORICAL_TYPES = new Set(['ip', 'keyword']);

// List of system fields we want to ignore for the numeric field check.
export const OMIT_FIELDS: string[] = ['_source', '_type', '_index', '_id', '_version', '_score'];

// Regression supports numeric fields. Classification supports categorical, numeric, and boolean.
export const shouldAddAsDepVarOption = (field: Field, jobType: AnalyticsJobType) => {
if (field.id === EVENT_RATE_FIELD_ID) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { AnalyticsJobType } from '../../../analytics_management/hooks/use_create_analytics_form/state';
import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics';
import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../../common/types/fields';
import { OMIT_FIELDS } from '../../../../../../../common/constants/field_types';
import { BASIC_NUMERICAL_TYPES, EXTENDED_NUMERICAL_TYPES } from '../../../../common/fields';
import { OMIT_FIELDS, CATEGORICAL_TYPES } from './form_options_validation';
import { CATEGORICAL_TYPES } from './form_options_validation';
import { ES_FIELD_TYPES } from '../../../../../../../../../../src/plugins/data/public';
import { newJobCapsService } from '../../../../../services/new_job_capabilities_service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
import { getAnalyticsFactory } from '../../services/analytics_service';
import { getTaskStateBadge, getJobTypeBadge, useColumns } from './use_columns';
import { ExpandedRow } from './expanded_row';
import { stringMatch } from '../../../../../util/string_utils';
import {
ProgressBar,
mlInMemoryTableFactory,
Expand All @@ -65,14 +66,6 @@ function getItemIdToExpandedRowMap(
}, {} as ItemIdToExpandedRowMap);
}

function stringMatch(str: string | undefined, substr: any) {
return (
typeof str === 'string' &&
typeof substr === 'string' &&
(str.toLowerCase().match(substr.toLowerCase()) === null) === false
);
}

const MlInMemoryTable = mlInMemoryTableFactory<DataFrameAnalyticsListRow>();

interface Props {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ import { getToastNotifications } from '../../../util/dependency_cache';
import { IndexPattern } from '../../../../../../../../src/plugins/data/public';

import { SavedSearchQuery } from '../../../contexts/ml';
import { OMIT_FIELDS } from '../../../../../common/constants/field_types';
import { IndexPatternTitle } from '../../../../../common/types/kibana';

import { ml } from '../../../services/ml_api_service';
import { FieldRequestConfig } from '../common';

// List of system fields we don't want to display.
const OMIT_FIELDS: string[] = ['_source', '_type', '_index', '_id', '_version', '_score'];
// Maximum number of examples to obtain for text type fields.
const MAX_EXAMPLES_DEFAULT: number = 10;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import rison from 'rison-node';
import { mlJobService } from '../../../services/job_service';
import { ml } from '../../../services/ml_api_service';
import { getToastNotifications } from '../../../util/dependency_cache';
import { stringMatch } from '../../../util/string_utils';
import { JOB_STATE, DATAFEED_STATE } from '../../../../../common/constants/states';
import { parseInterval } from '../../../../../common/util/parse_interval';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -350,14 +351,6 @@ export function checkForAutoStartDatafeed() {
}
}

function stringMatch(str, substr) {
return (
typeof str === 'string' &&
typeof substr === 'string' &&
(str.toLowerCase().match(substr.toLowerCase()) === null) === false
);
}

function jobProperty(job, prop) {
const propMap = {
job_state: 'jobState',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,23 +226,39 @@ export class JobCreator {
this._calendars = calendars;
}

public set modelPlot(enable: boolean) {
if (enable) {
this._job_config.model_plot_config = {
enabled: true,
};
} else {
delete this._job_config.model_plot_config;
private _initModelPlotConfig() {
// initialize configs to false if they are missing
if (this._job_config.model_plot_config === undefined) {
this._job_config.model_plot_config = {};
}
if (this._job_config.model_plot_config.enabled === undefined) {
this._job_config.model_plot_config.enabled = false;
}
if (this._job_config.model_plot_config.annotations_enabled === undefined) {
this._job_config.model_plot_config.annotations_enabled = false;
}
}

public set modelPlot(enable: boolean) {
this._initModelPlotConfig();
this._job_config.model_plot_config!.enabled = enable;
}
public get modelPlot() {
return (
this._job_config.model_plot_config !== undefined &&
this._job_config.model_plot_config.enabled === true
);
}

public set modelChangeAnnotations(enable: boolean) {
this._initModelPlotConfig();
this._job_config.model_plot_config!.annotations_enabled = enable;
}

public get modelChangeAnnotations() {
return this._job_config.model_plot_config?.annotations_enabled === true;
}

public set useDedicatedIndex(enable: boolean) {
this._useDedicatedIndex = enable;
if (enable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
EuiHorizontalRule,
} from '@elastic/eui';
import { ModelPlotSwitch } from './components/model_plot';
import { AnnotationsSwitch } from './components/annotations';
import { DedicatedIndexSwitch } from './components/dedicated_index';
import { ModelMemoryLimitInput } from '../../../common/model_memory_limit';
import { JobCreatorContext } from '../../../job_creator_context';
Expand Down Expand Up @@ -41,6 +42,7 @@ export const AdvancedSection: FC<Props> = ({ advancedExpanded, setAdvancedExpand
<EuiFlexGroup gutterSize="xl">
<EuiFlexItem>
<ModelPlotSwitch />
<AnnotationsSwitch />
</EuiFlexItem>
<EuiFlexItem>
<DedicatedIndexSwitch />
Expand Down Expand Up @@ -68,6 +70,7 @@ export const AdvancedSection: FC<Props> = ({ advancedExpanded, setAdvancedExpand
>
<EuiFlexItem>
<ModelPlotSwitch />
<AnnotationsSwitch />
<ModelMemoryLimitInput />
</EuiFlexItem>
<EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React, { FC, useState, useContext, useEffect } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiCallOut, EuiSpacer, EuiSwitch } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { JobCreatorContext } from '../../../../../job_creator_context';
import { Description } from './description';

export const AnnotationsSwitch: FC = () => {
const { jobCreator, jobCreatorUpdate, jobCreatorUpdated } = useContext(JobCreatorContext);
const [annotationsEnabled, setAnnotationsEnabled] = useState(jobCreator.modelChangeAnnotations);
const [showCallOut, setShowCallout] = useState(
jobCreator.modelPlot && !jobCreator.modelChangeAnnotations
);

useEffect(() => {
jobCreator.modelChangeAnnotations = annotationsEnabled;
jobCreatorUpdate();
}, [annotationsEnabled]);

useEffect(() => {
setShowCallout(jobCreator.modelPlot && !annotationsEnabled);
}, [jobCreatorUpdated, annotationsEnabled]);

function toggleAnnotations() {
setAnnotationsEnabled(!annotationsEnabled);
}

return (
<>
<Description>
<EuiSwitch
name="switch"
checked={annotationsEnabled}
onChange={toggleAnnotations}
data-test-subj="mlJobWizardSwitchAnnotations"
label={i18n.translate(
'xpack.ml.newJob.wizard.jobDetailsStep.advancedSection.enableModelPlotAnnotations.title',
{
defaultMessage: 'Enable model change annotations',
}
)}
/>
</Description>
{showCallOut && (
<EuiCallOut
title={
<FormattedMessage
id="xpack.ml.newJob.wizard.jobDetailsStep.advancedSection.annotationsSwitchCallout.title"
defaultMessage="If you enable model plot with this configuration, we recommend you also enable annotations."
/>
}
color="primary"
iconType="help"
/>
)}
<EuiSpacer />
</>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React, { memo, FC } from 'react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiDescribedFormGroup, EuiFormRow } from '@elastic/eui';

export const Description: FC = memo(({ children }) => {
const title = i18n.translate(
'xpack.ml.newJob.wizard.jobDetailsStep.advancedSection.enableModelPlotAnnotations.title',
{
defaultMessage: 'Enable model change annotations',
}
);
return (
<EuiDescribedFormGroup
title={<h3>{title}</h3>}
description={
<FormattedMessage
id="xpack.ml.newJob.wizard.jobDetailsStep.advancedSection.enableModelPlotAnnotations.description"
defaultMessage="Select to generate annotations when the model changes significantly. For example, when step changes, periodicity or trends are detected."
/>
}
>
<EuiFormRow label={title}>
<>{children}</>
</EuiFormRow>
</EuiDescribedFormGroup>
);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export { AnnotationsSwitch } from './annotations_switch';
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const Page: FC<PageProps> = ({ existingJobsAndGroups, jobType }) => {

if (jobCreator.type === JOB_TYPE.SINGLE_METRIC) {
jobCreator.modelPlot = true;
jobCreator.modelChangeAnnotations = true;
}

if (mlContext.currentSavedSearch !== null) {
Expand Down
21 changes: 0 additions & 21 deletions x-pack/plugins/ml/public/application/util/string_utils.d.ts

This file was deleted.

Loading

0 comments on commit 40a30f4

Please sign in to comment.