diff --git a/x-pack/plugins/triggers_actions_ui/public/application/boot.tsx b/x-pack/plugins/triggers_actions_ui/public/application/boot.tsx index fc12e01e2a131..bb46fd02a98a9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/boot.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/boot.tsx @@ -9,7 +9,7 @@ import { render, unmountComponentAtNode } from 'react-dom'; import { SavedObjectsClientContract } from 'src/core/public'; import { App, AppDeps } from './app'; -import { setSavedObjectsClient } from '../common/lib/indices_and_field_apis'; +import { setSavedObjectsClient } from '../common/lib/data_apis'; interface BootDeps extends AppDeps { element: HTMLElement; diff --git a/x-pack/plugins/triggers_actions_ui/public/common/index_controls/index.ts b/x-pack/plugins/triggers_actions_ui/public/common/index_controls/index.ts index 87f217cbceca0..54b69705637d4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/index_controls/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/common/index_controls/index.ts @@ -12,7 +12,7 @@ import { getMatchingIndices, getESIndexFields, getSavedObjectsClient, -} from '../lib/indices_and_field_apis'; +} from '../lib/data_apis'; export interface IOption { label: string; diff --git a/x-pack/plugins/triggers_actions_ui/public/common/lib/indices_and_field_apis.ts b/x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts similarity index 85% rename from x-pack/plugins/triggers_actions_ui/public/common/lib/indices_and_field_apis.ts rename to x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts index 14bf417585ede..573d306ae5550 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/lib/indices_and_field_apis.ts +++ b/x-pack/plugins/triggers_actions_ui/public/common/lib/data_apis.ts @@ -5,7 +5,7 @@ */ import { HttpSetup } from 'kibana/public'; -const INDEX_THRESHOLD_DATA_API_ROOT = '/api/triggers_actions_ui/data'; +const DATA_API_ROOT = '/api/triggers_actions_ui/data'; export async function getMatchingIndices({ pattern, @@ -20,7 +20,7 @@ export async function getMatchingIndices({ if (!pattern.endsWith('*')) { pattern = `${pattern}*`; } - const { indices } = await http.post(`${INDEX_THRESHOLD_DATA_API_ROOT}/_indices`, { + const { indices } = await http.post(`${DATA_API_ROOT}/_indices`, { body: JSON.stringify({ pattern }), }); return indices; @@ -41,7 +41,7 @@ export async function getESIndexFields({ aggregatable: boolean; }> > { - const { fields } = await http.post(`${INDEX_THRESHOLD_DATA_API_ROOT}/_fields`, { + const { fields } = await http.post(`${DATA_API_ROOT}/_fields`, { body: JSON.stringify({ indexPatterns: indexes }), }); return fields;