mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] removed orphaned code (#152196)
Removes client side `getTimeFieldRange()` code within the data visualizer plugin. The code has been moved to the date picker package in `x-pack/packages/ml/date_picker/src/services/time_field_range.ts`and the duplicate is no longer necessary.
This commit is contained in:
parent
babe0339e3
commit
b3c3461fe1
1 changed files with 0 additions and 32 deletions
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { lazyLoadModules } from '../../../lazy_load_bundle';
|
||||
import { GetTimeFieldRangeResponse } from '../../../../common/types/time_field_request';
|
||||
|
||||
export async function getTimeFieldRange({
|
||||
index,
|
||||
timeFieldName,
|
||||
query,
|
||||
runtimeMappings,
|
||||
}: {
|
||||
index: string;
|
||||
timeFieldName?: string;
|
||||
query?: QueryDslQueryContainer;
|
||||
runtimeMappings?: estypes.MappingRuntimeFields;
|
||||
}) {
|
||||
const body = JSON.stringify({ index, timeFieldName, query, runtimeMappings });
|
||||
const fileUploadModules = await lazyLoadModules();
|
||||
|
||||
return await fileUploadModules.getHttp().fetch<GetTimeFieldRangeResponse>({
|
||||
path: `/internal/file_upload/time_field_range`,
|
||||
method: 'POST',
|
||||
body,
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue