mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
moving visualizations team owned paths to /internal (#157984)
This commit is contained in:
parent
f28b694e5a
commit
fb4946d0a5
10 changed files with 13 additions and 11 deletions
|
@ -86,7 +86,9 @@ function TimelionExpressionInput({ value, setValue }: TimelionExpressionInputPro
|
|||
const abortController = new AbortController();
|
||||
if (kibana.services.http) {
|
||||
kibana.services.http
|
||||
.get<ITimelionFunction[]>('../api/timelion/functions', { signal: abortController.signal })
|
||||
.get<ITimelionFunction[]>('../internal/timelion/functions', {
|
||||
signal: abortController.signal,
|
||||
})
|
||||
.then((data) => {
|
||||
functionList.current = data;
|
||||
});
|
||||
|
|
|
@ -105,7 +105,7 @@ export function getTimelionRequestHandler({
|
|||
const doSearch = async (
|
||||
searchOptions: ReturnType<typeof dataSearch.session.getSearchOptions>
|
||||
): Promise<TimelionSuccessResponse> => {
|
||||
return await http.post('/api/timelion/run', {
|
||||
return await http.post('/internal/timelion/run', {
|
||||
body: JSON.stringify({
|
||||
sheet: [expression],
|
||||
extended: {
|
||||
|
|
|
@ -13,7 +13,7 @@ import { LoadFunctions } from '../lib/load_functions';
|
|||
export function functionsRoute(router: IRouter, { functions }: { functions: LoadFunctions }) {
|
||||
router.get(
|
||||
{
|
||||
path: '/api/timelion/functions',
|
||||
path: '/internal/timelion/functions',
|
||||
validate: false,
|
||||
},
|
||||
async (context, request, response) => {
|
||||
|
|
|
@ -37,7 +37,7 @@ export function runRoute(
|
|||
) {
|
||||
router.post(
|
||||
{
|
||||
path: '/api/timelion/run',
|
||||
path: '/internal/timelion/run',
|
||||
validate: {
|
||||
body: schema.object({
|
||||
sheet: schema.arrayOf(schema.string()),
|
||||
|
|
|
@ -132,7 +132,7 @@ export function timelionFunctionFactory(initialize: InitializeArguments): () =>
|
|||
let result: any;
|
||||
|
||||
try {
|
||||
result = await fetch(initialize.prependBasePath(`/api/timelion/run`), {
|
||||
result = await fetch(initialize.prependBasePath(`/internal/timelion/run`), {
|
||||
method: 'POST',
|
||||
responseType: 'json',
|
||||
data: body,
|
||||
|
|
|
@ -101,7 +101,7 @@ export const useGraphLoader = ({ toastNotifications, coreStart }: UseGraphLoader
|
|||
inspectRequest.json(dsl);
|
||||
|
||||
return coreStart.http
|
||||
.post<{ resp: estypes.GraphExploreResponse }>('../api/graph/graphExplore', request)
|
||||
.post<{ resp: estypes.GraphExploreResponse }>('../internal/graph/graphExplore', request)
|
||||
.then(function (data) {
|
||||
const response = data.resp;
|
||||
|
||||
|
@ -136,7 +136,7 @@ export const useGraphLoader = ({ toastNotifications, coreStart }: UseGraphLoader
|
|||
inspectRequest.json(dsl);
|
||||
|
||||
coreStart.http
|
||||
.post<{ resp: estypes.GraphExploreResponse }>('../api/graph/searchProxy', request)
|
||||
.post<{ resp: estypes.GraphExploreResponse }>('../internal/graph/searchProxy', request)
|
||||
.then(function (data) {
|
||||
const response = data.resp;
|
||||
inspectRequest.stats({}).ok({ json: response });
|
||||
|
|
|
@ -33,7 +33,7 @@ describe('fetch_top_nodes', () => {
|
|||
aggregatable: true,
|
||||
},
|
||||
]);
|
||||
expect(postMock).toHaveBeenCalledWith('../api/graph/searchProxy', {
|
||||
expect(postMock).toHaveBeenCalledWith('../internal/graph/searchProxy', {
|
||||
body: JSON.stringify({
|
||||
index: 'test',
|
||||
body: {
|
||||
|
|
|
@ -97,7 +97,7 @@ export async function fetchTopNodes(
|
|||
const body = createSamplerSearchBody(aggs);
|
||||
|
||||
const response = (
|
||||
await post<{ resp: TopTermsAggResponse }>('../api/graph/searchProxy', {
|
||||
await post<{ resp: TopTermsAggResponse }>('../internal/graph/searchProxy', {
|
||||
body: JSON.stringify({ index, body }),
|
||||
})
|
||||
).resp;
|
||||
|
|
|
@ -26,7 +26,7 @@ export function registerExploreRoute({
|
|||
}) {
|
||||
router.post(
|
||||
{
|
||||
path: '/api/graph/graphExplore',
|
||||
path: '/internal/graph/graphExplore',
|
||||
validate: {
|
||||
body: schema.object({
|
||||
index: schema.string(),
|
||||
|
|
|
@ -19,7 +19,7 @@ export function registerSearchRoute({
|
|||
}) {
|
||||
router.post(
|
||||
{
|
||||
path: '/api/graph/searchProxy',
|
||||
path: '/internal/graph/searchProxy',
|
||||
validate: {
|
||||
body: schema.object({
|
||||
index: schema.string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue