Skip to content

Commit 436f39a

Browse files
updates after conflict resolution
1 parent 5fb02c5 commit 436f39a

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_form/create_analytics_form.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { i18n } from '@kbn/i18n';
2222
import { FormattedMessage } from '@kbn/i18n/react';
2323

2424
import { metadata } from 'ui/metadata';
25-
import { IndexPattern, INDEX_PATTERN_ILLEGAL_CHARACTERS } from 'ui/index_patterns';
2625
import { ES_FIELD_TYPES } from '../../../../../../../../../../../src/plugins/data/public';
2726
import { ml } from '../../../../../services/ml_api_service';
2827
import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../../common/types/fields';
@@ -45,11 +44,6 @@ import {
4544
} from '../../../../../../../../../../../src/plugins/data/public';
4645
import { DfAnalyticsExplainResponse, FieldSelectionItem } from '../../../../common/analytics';
4746

48-
// based on code used by `ui/index_patterns` internally
49-
// remove the space character from the list of illegal characters
50-
INDEX_PATTERN_ILLEGAL_CHARACTERS.pop();
51-
const characterList = INDEX_PATTERN_ILLEGAL_CHARACTERS.join(', ');
52-
5347
const BASIC_NUMERICAL_TYPES = new Set([
5448
ES_FIELD_TYPES.LONG,
5549
ES_FIELD_TYPES.INTEGER,
@@ -166,7 +160,8 @@ export const CreateAnalyticsForm: FC<CreateAnalyticsFormProps> = ({ actions, sta
166160
// Create the option if it doesn't exist.
167161
if (
168162
flattenedOptions.some(
169-
(option: { label: string }) => option.label.trim().toLowerCase() === normalizedSearchValue
163+
(option: EuiComboBoxOptionProps) =>
164+
option.label.trim().toLowerCase() === normalizedSearchValue
170165
)
171166
) {
172167
excludesOptions.push(newOption);
@@ -194,7 +189,7 @@ export const CreateAnalyticsForm: FC<CreateAnalyticsFormProps> = ({ actions, sta
194189

195190
// If sourceIndex has changed load analysis field options again
196191
if (previousSourceIndex !== sourceIndex || previousJobType !== jobType) {
197-
const analyzedFieldsOptions: Array<{ label: string }> = [];
192+
const analyzedFieldsOptions: EuiComboBoxOptionProps[] = [];
198193

199194
if (resp.field_selection) {
200195
resp.field_selection.forEach((selectedField: FieldSelectionItem) => {
@@ -257,7 +252,7 @@ export const CreateAnalyticsForm: FC<CreateAnalyticsFormProps> = ({ actions, sta
257252
// Get fields and filter for supported types for job type
258253
const { fields } = newJobCapsService;
259254

260-
const depVarOptions: Array<{ label: string }> = [];
255+
const depVarOptions: EuiComboBoxOptionProps[] = [];
261256

262257
fields.forEach((field: Field) => {
263258
if (shouldAddAsDepVarOption(field)) {

x-pack/legacy/plugins/ml/server/routes/data_frame_analytics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function dataFrameAnalyticsRoutes({ xpackMainPlugin, router }: RouteIniti
164164
licensePreRoutingFactory(xpackMainPlugin, async (context, request, response) => {
165165
try {
166166
const results = await context.ml!.mlClient.callAsCurrentUser(
167-
'ml.estimateDataFrameAnalyticsMemoryUsage',
167+
'ml.explainDataFrameAnalytics',
168168
{
169169
body: request.body,
170170
}

0 commit comments

Comments
 (0)