Skip to content

Commit

Permalink
renamed index apis to data apis
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Nov 10, 2020
1 parent f3ca392 commit b6df73b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
getMatchingIndices,
getESIndexFields,
getSavedObjectsClient,
} from '../lib/indices_and_field_apis';
} from '../lib/data_apis';

export interface IOption {
label: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit b6df73b

Please sign in to comment.