Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/common/lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const CANVAS_TYPE = 'canvas-workpad';
export const CANVAS_APP = 'canvas';
export const APP_ROUTE = '/app/canvas';
export const APP_ROUTE_WORKPAD = `${APP_ROUTE}#/workpad`;
export const API_ROUTE = '/api/interpreter';
export const API_ROUTE = '/api/canvas';
export const API_ROUTE_WORKPAD = `${API_ROUTE}/workpad`;
export const API_ROUTE_WORKPAD_ASSETS = `${API_ROUTE}/workpad-assets`;
export const API_ROUTE_WORKPAD_STRUCTURES = `${API_ROUTE}/workpad-structures`;
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/canvas/server/routes/es_fields/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
*/

import { partial } from 'lodash';
import { API_ROUTE } from '../../../common/lib/constants';
import { getESFieldTypes } from './get_es_field_types';

// TODO: Error handling, note: esErrors

export function esFields(server) {
const { callWithRequest } = server.plugins.elasticsearch.getCluster('data');

server.route({
method: 'GET',
path: '/api/canvas/es_fields',
path: `${API_ROUTE}/es_fields`,
handler: function(request, h) {
const { index, fields } = request.query;
if (!index) {
Expand Down