Skip to content

Commit

Permalink
fixing types after merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Sep 1, 2020
1 parent 7d0b7d3 commit dc344c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ export function registerTransactionDurationAnomalyAlertType({
return;
}
const alertParams = params as TypeOf<typeof paramsSchema>;
const mlClient = services.getLegacyScopedClusterClient(ml.mlClient);
const request = { params: 'DummyKibanaRequest' } as KibanaRequest;
const { mlAnomalySearch } = ml.mlSystemProvider(mlClient, request);
const anomalyDetectors = ml.anomalyDetectorsProvider(mlClient, request);
const request = {} as KibanaRequest;
const { mlAnomalySearch } = ml.mlSystemProvider(request);
const anomalyDetectors = ml.anomalyDetectorsProvider(request);

const mlJobIds = await getMLJobIds(
anomalyDetectors,
Expand Down
5 changes: 1 addition & 4 deletions x-pack/plugins/apm/server/lib/helpers/setup_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,9 @@ function getMlSetup(
return;
}

const ml = context.plugins.ml;
const client = context.core.elasticsearch.client;
return {
mlSystem: ml.mlSystemProvider(request),
anomalyDetectors: ml.anomalyDetectorsProvider(request),
modules: ml.modulesProvider(request, context.core.savedObjects.client),
client,
modules: ml.modulesProvider(request, savedObjectsClient),
};
}

0 comments on commit dc344c4

Please sign in to comment.