diff --git a/src/core_plugins/kibana/public/dashboard/top_nav/clone_modal.js b/src/core_plugins/kibana/public/dashboard/top_nav/clone_modal.js index cc04147f42951..0afdcfe3041c1 100644 --- a/src/core_plugins/kibana/public/dashboard/top_nav/clone_modal.js +++ b/src/core_plugins/kibana/public/dashboard/top_nav/clone_modal.js @@ -65,14 +65,14 @@ export class DashboardCloneModal extends React.Component { Cancel diff --git a/src/core_plugins/kibana/server/routes/api/scripts/register_languages.js b/src/core_plugins/kibana/server/routes/api/scripts/register_languages.js index 125e4b7734ce8..f61be07bf6d58 100644 --- a/src/core_plugins/kibana/server/routes/api/scripts/register_languages.js +++ b/src/core_plugins/kibana/server/routes/api/scripts/register_languages.js @@ -1,27 +1,9 @@ -import _ from 'lodash'; -import handleESError from '../../../lib/handle_es_error'; - export function registerLanguages(server) { server.route({ path: '/api/kibana/scripts/languages', method: 'GET', handler: function (request, reply) { - const { callWithRequest } = server.plugins.elasticsearch.getCluster('data'); - - return callWithRequest(request, 'cluster.getSettings', { - include_defaults: true, - filter_path: '**.script.engine.*.inline' - }) - .then((esResponse) => { - const langs = _.get(esResponse, 'defaults.script.engine', {}); - const inlineLangs = _.pick(langs, (lang) => lang.inline === 'true'); - const supportedLangs = _.omit(inlineLangs, 'mustache'); - return _.keys(supportedLangs); - }) - .then(reply) - .catch((error) => { - reply(handleESError(error)); - }); + reply(['painless', 'expression']); } }); }