From 103314c1b1e2f8b3f3d7a23ffead39227357e7b2 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 13 Feb 2020 01:46:23 -0800 Subject: [PATCH] Rename Painless Playground -> Painless Lab. --- x-pack/index.js | 4 +-- .../common/constants.ts | 6 ++--- .../index.ts | 17 +++++------- .../public/common/constants.tsx | 6 ++--- .../public/common/types.ts | 0 .../public/components/editor.tsx | 0 .../public/components/main.tsx} | 22 +++++++--------- .../public/components/main_controls.tsx | 18 ++++++------- .../components/output_pane/context_tab.tsx | 17 +++++------- .../public/components/output_pane/index.ts | 0 .../components/output_pane/output_pane.tsx | 10 +++---- .../components/output_pane/output_tab.tsx | 0 .../components/output_pane/parameters_tab.tsx | 8 +++--- .../public/components/request_flyout.tsx | 6 ++--- .../public/index.scss | 8 +++--- .../public/lib/execute_code.ts | 0 .../public/lib/helpers.ts | 0 .../public/register.tsx | 26 +++++++++---------- .../public/register_painless.ts | 0 .../public/render_app.tsx | 4 +-- .../server/lib/check_license.ts | 8 +++--- .../server/lib/license_pre_routing_factory.ts | 0 .../server/register_execute_route.ts | 0 .../server/register_license_checker.ts | 0 24 files changed, 75 insertions(+), 85 deletions(-) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/common/constants.ts (69%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/index.ts (73%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/common/constants.tsx (85%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/common/types.ts (100%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/components/editor.tsx (100%) rename x-pack/legacy/plugins/{painless_playground/public/components/painless_playground.tsx => painless_lab/public/components/main.tsx} (89%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/components/main_controls.tsx (84%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/components/output_pane/context_tab.tsx (85%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/components/output_pane/index.ts (100%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/components/output_pane/output_pane.tsx (87%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/components/output_pane/output_tab.tsx (100%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/components/output_pane/parameters_tab.tsx (88%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/components/request_flyout.tsx (91%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/index.scss (77%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/lib/execute_code.ts (100%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/lib/helpers.ts (100%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/register.tsx (68%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/register_painless.ts (100%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/public/render_app.tsx (85%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/server/lib/check_license.ts (73%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/server/lib/license_pre_routing_factory.ts (100%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/server/register_execute_route.ts (100%) rename x-pack/legacy/plugins/{painless_playground => painless_lab}/server/register_license_checker.ts (100%) diff --git a/x-pack/index.js b/x-pack/index.js index 789009eb9b5c6..7d6dd2c13c0ff 100644 --- a/x-pack/index.js +++ b/x-pack/index.js @@ -12,7 +12,7 @@ import { security } from './legacy/plugins/security'; import { ml } from './legacy/plugins/ml'; import { tilemap } from './legacy/plugins/tilemap'; import { grokdebugger } from './legacy/plugins/grokdebugger'; -import { painlessPlayground } from './legacy/plugins/painless_playground'; +import { painlessLab } from './legacy/plugins/painless_lab'; import { dashboardMode } from './legacy/plugins/dashboard_mode'; import { logstash } from './legacy/plugins/logstash'; import { beats } from './legacy/plugins/beats_management'; @@ -51,7 +51,7 @@ module.exports = function(kibana) { ml(kibana), tilemap(kibana), grokdebugger(kibana), - painlessPlayground(kibana), + painlessLab(kibana), dashboardMode(kibana), logstash(kibana), beats(kibana), diff --git a/x-pack/legacy/plugins/painless_playground/common/constants.ts b/x-pack/legacy/plugins/painless_lab/common/constants.ts similarity index 69% rename from x-pack/legacy/plugins/painless_playground/common/constants.ts rename to x-pack/legacy/plugins/painless_lab/common/constants.ts index d8807fcccccf0..771d4979143fd 100644 --- a/x-pack/legacy/plugins/painless_playground/common/constants.ts +++ b/x-pack/legacy/plugins/painless_lab/common/constants.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -export const PLUGIN_ID = 'painless_playground'; +export const PLUGIN_ID = 'painlessLab'; -export const API_ROUTE_EXECUTE = '/api/painless_playground/execute'; +export const API_ROUTE_EXECUTE = '/api/painless_lab/execute'; -export const ADVANCED_SETTINGS_FLAG_NAME = 'devTools:enablePainlessPlayground'; +export const ADVANCED_SETTINGS_FLAG_NAME = 'devTools:enablePainlessLab'; diff --git a/x-pack/legacy/plugins/painless_playground/index.ts b/x-pack/legacy/plugins/painless_lab/index.ts similarity index 73% rename from x-pack/legacy/plugins/painless_playground/index.ts rename to x-pack/legacy/plugins/painless_lab/index.ts index caa2cff4eb826..3be4a25508bad 100644 --- a/x-pack/legacy/plugins/painless_playground/index.ts +++ b/x-pack/legacy/plugins/painless_lab/index.ts @@ -11,12 +11,12 @@ import { registerLicenseChecker } from './server/register_license_checker'; import { registerExecuteRoute } from './server/register_execute_route'; import { Legacy } from '../../../../kibana'; -export const painlessPlayground = (kibana: any) => +export const painlessLab = (kibana: any) => new kibana.Plugin({ id: PLUGIN_ID, publicDir: resolve(__dirname, 'public'), require: ['kibana', 'elasticsearch', 'xpack_main'], - configPrefix: 'xpack.painless_playground', + configPrefix: 'xpack.painless_lab', config(Joi: any) { return Joi.object({ enabled: Joi.boolean().default(true), @@ -30,15 +30,12 @@ export const painlessPlayground = (kibana: any) => // Register feature flag server.newPlatform.setup.core.uiSettings.register({ [ADVANCED_SETTINGS_FLAG_NAME]: { - name: i18n.translate('xpack.painless_playground.devTools.painlessPlaygroundTitle', { - defaultMessage: 'Painless Playground', + name: i18n.translate('xpack.painlessLab.devTools.painlessLabTitle', { + defaultMessage: 'Painless Lab', + }), + description: i18n.translate('xpack.painlessLab.devTools.painlessLabDescription', { + defaultMessage: 'Enable experimental Painless Lab.', }), - description: i18n.translate( - 'xpack.painless_playground.devTools.painlessPlaygroundDescription', - { - defaultMessage: 'Enable experimental Painless Playground.', - } - ), value: false, category: ['Dev Tools'], }, diff --git a/x-pack/legacy/plugins/painless_playground/public/common/constants.tsx b/x-pack/legacy/plugins/painless_lab/public/common/constants.tsx similarity index 85% rename from x-pack/legacy/plugins/painless_playground/public/common/constants.tsx rename to x-pack/legacy/plugins/painless_lab/public/common/constants.tsx index ef3feb1738118..4ff1f9fe340bf 100644 --- a/x-pack/legacy/plugins/painless_playground/public/common/constants.tsx +++ b/x-pack/legacy/plugins/painless_lab/public/common/constants.tsx @@ -9,15 +9,15 @@ import React from 'react'; import { EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -const defaultLabel = i18n.translate('xpack.painless_playground.contextDefaultLabel', { +const defaultLabel = i18n.translate('xpack.painlessLab.contextDefaultLabel', { defaultMessage: 'Basic', }); -const filterLabel = i18n.translate('xpack.painless_playground.contextFilterLabel', { +const filterLabel = i18n.translate('xpack.painlessLab.contextFilterLabel', { defaultMessage: 'Filter', }); -const scoreLabel = i18n.translate('xpack.painless_playground.contextScoreLabel', { +const scoreLabel = i18n.translate('xpack.painlessLab.contextScoreLabel', { defaultMessage: 'Score', }); diff --git a/x-pack/legacy/plugins/painless_playground/public/common/types.ts b/x-pack/legacy/plugins/painless_lab/public/common/types.ts similarity index 100% rename from x-pack/legacy/plugins/painless_playground/public/common/types.ts rename to x-pack/legacy/plugins/painless_lab/public/common/types.ts diff --git a/x-pack/legacy/plugins/painless_playground/public/components/editor.tsx b/x-pack/legacy/plugins/painless_lab/public/components/editor.tsx similarity index 100% rename from x-pack/legacy/plugins/painless_playground/public/components/editor.tsx rename to x-pack/legacy/plugins/painless_lab/public/components/editor.tsx diff --git a/x-pack/legacy/plugins/painless_playground/public/components/painless_playground.tsx b/x-pack/legacy/plugins/painless_lab/public/components/main.tsx similarity index 89% rename from x-pack/legacy/plugins/painless_playground/public/components/painless_playground.tsx rename to x-pack/legacy/plugins/painless_lab/public/components/main.tsx index b927637cb0418..f1cdf8820c2b7 100644 --- a/x-pack/legacy/plugins/painless_playground/public/components/painless_playground.tsx +++ b/x-pack/legacy/plugins/painless_lab/public/components/main.tsx @@ -33,9 +33,9 @@ const submit = async (code, context, contextSetup, executeCode, setResponse, set setIsLoading(true); try { - localStorage.setItem('painlessPlaygroundCode', code); - localStorage.setItem('painlessPlaygroundContext', context); - localStorage.setItem('painlessPlaygroundContextSetup', JSON.stringify(contextSetup)); + localStorage.setItem('painlessLabCode', code); + localStorage.setItem('painlessLabContext', context); + localStorage.setItem('painlessLabContextSetup', JSON.stringify(contextSetup)); const response = await executeCode(buildRequestPayload(code, context, contextSetup)); if (_mostRecentRequestId === requestId) { @@ -118,22 +118,18 @@ for (int y = 0; y < height; y++) { return result; `; -export function PainlessPlayground({ - executeCode, -}: { - executeCode: (payload: Request) => Promise; -}) { - const [code, setCode] = useState(getFromLocalStorage('painlessPlaygroundCode', exampleScript)); +export function Main({ executeCode }: { executeCode: (payload: Request) => Promise }) { + const [code, setCode] = useState(getFromLocalStorage('painlessLabCode', exampleScript)); const [response, setResponse] = useState({ error: undefined, success: undefined }); const [isRequestFlyoutOpen, setRequestFlyoutOpen] = useState(false); const [isLoading, setIsLoading] = useState(false); const [context, setContext] = useState( - getFromLocalStorage('painlessPlaygroundContext', 'painless_test_without_params') + getFromLocalStorage('painlessLabContext', 'painless_test_without_params') ); const [contextSetup, setContextSetup] = useState( - getFromLocalStorage('painlessPlaygroundContextSetup', {}, true) + getFromLocalStorage('painlessLabContextSetup', {}, true) ); // Live-update the output as the user changes the input code. @@ -151,8 +147,8 @@ export function PainlessPlayground({

- {i18n.translate('xpack.painless_playground.title', { - defaultMessage: 'Painless Playground', + {i18n.translate('xpack.painlessLab.title', { + defaultMessage: 'Painless Lab', })}

diff --git a/x-pack/legacy/plugins/painless_playground/public/components/main_controls.tsx b/x-pack/legacy/plugins/painless_lab/public/components/main_controls.tsx similarity index 84% rename from x-pack/legacy/plugins/painless_playground/public/components/main_controls.tsx rename to x-pack/legacy/plugins/painless_lab/public/components/main_controls.tsx index 98e8f25f171b1..31348dcd31076 100644 --- a/x-pack/legacy/plugins/painless_playground/public/components/main_controls.tsx +++ b/x-pack/legacy/plugins/painless_lab/public/components/main_controls.tsx @@ -40,7 +40,7 @@ export function MainControls({ target="_blank" onClick={() => setIsHelpOpen(false)} > - {i18n.translate('xpack.painless_playground.walkthroughButtonLabel', { + {i18n.translate('xpack.painlessLab.walkthroughButtonLabel', { defaultMessage: 'Walkthrough', })} , @@ -52,7 +52,7 @@ export function MainControls({ target="_blank" onClick={() => setIsHelpOpen(false)} > - {i18n.translate('xpack.painless_playground.apiReferenceButtonLabel', { + {i18n.translate('xpack.painlessLab.apiReferenceButtonLabel', { defaultMessage: 'API reference', })} , @@ -64,7 +64,7 @@ export function MainControls({ target="_blank" onClick={() => setIsHelpOpen(false)} > - {i18n.translate('xpack.painless_playground.languageSpecButtonLabel', { + {i18n.translate('xpack.painlessLab.languageSpecButtonLabel', { defaultMessage: 'Language spec', })} , @@ -77,7 +77,7 @@ export function MainControls({ setIsHelpOpen(false); }} > - {i18n.translate('xpack.painless_playground.resetButtonLabel', { + {i18n.translate('xpack.painlessLab.resetButtonLabel', { defaultMessage: 'Reset script', })} , @@ -85,7 +85,7 @@ export function MainControls({ return ( <> -
+
@@ -93,7 +93,7 @@ export function MainControls({ setIsHelpOpen(!isHelpOpen)} > - {i18n.translate('xpack.painless_playground.helpButtonLabel', { + {i18n.translate('xpack.painlessLab.helpButtonLabel', { defaultMessage: 'Help', })} @@ -126,10 +126,10 @@ export function MainControls({ data-test-subj="btnViewRequest" > {isRequestFlyoutOpen - ? i18n.translate('xpack.painless_playground.hideRequestButtonLabel', { + ? i18n.translate('xpack.painlessLab.hideRequestButtonLabel', { defaultMessage: 'Hide API request', }) - : i18n.translate('xpack.painless_playground.showRequestButtonLabel', { + : i18n.translate('xpack.painlessLab.showRequestButtonLabel', { defaultMessage: 'Show API request', })} diff --git a/x-pack/legacy/plugins/painless_playground/public/components/output_pane/context_tab.tsx b/x-pack/legacy/plugins/painless_lab/public/components/output_pane/context_tab.tsx similarity index 85% rename from x-pack/legacy/plugins/painless_playground/public/components/output_pane/context_tab.tsx rename to x-pack/legacy/plugins/painless_lab/public/components/output_pane/context_tab.tsx index ec0f27c005b96..12c56577b8db6 100644 --- a/x-pack/legacy/plugins/painless_playground/public/components/output_pane/context_tab.tsx +++ b/x-pack/legacy/plugins/painless_lab/public/components/output_pane/context_tab.tsx @@ -37,13 +37,13 @@ export function ContextTab({ context, contextSetup, setContext, setContextSetup {' '} @@ -56,7 +56,7 @@ export function ContextTab({ context, contextSetup, setContext, setContextSetup href="https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html" target="_blank" > - {i18n.translate('xpack.painless_playground.contextFieldDocLinkText', { + {i18n.translate('xpack.painlessLab.contextFieldDocLinkText', { defaultMessage: 'Context docs', })} @@ -78,16 +78,13 @@ export function ContextTab({ context, contextSetup, setContext, setContextSetup - {' '} + {' '} @@ -107,13 +104,13 @@ export function ContextTab({ context, contextSetup, setContext, setContextSetup {' '} diff --git a/x-pack/legacy/plugins/painless_playground/public/components/output_pane/index.ts b/x-pack/legacy/plugins/painless_lab/public/components/output_pane/index.ts similarity index 100% rename from x-pack/legacy/plugins/painless_playground/public/components/output_pane/index.ts rename to x-pack/legacy/plugins/painless_lab/public/components/output_pane/index.ts diff --git a/x-pack/legacy/plugins/painless_playground/public/components/output_pane/output_pane.tsx b/x-pack/legacy/plugins/painless_lab/public/components/output_pane/output_pane.tsx similarity index 87% rename from x-pack/legacy/plugins/painless_playground/public/components/output_pane/output_pane.tsx rename to x-pack/legacy/plugins/painless_lab/public/components/output_pane/output_pane.tsx index 69393ca47a66c..55aa8f5b220e8 100644 --- a/x-pack/legacy/plugins/painless_playground/public/components/output_pane/output_pane.tsx +++ b/x-pack/legacy/plugins/painless_lab/public/components/output_pane/output_pane.tsx @@ -44,7 +44,7 @@ export function OutputPane({ - {i18n.translate('xpack.painless_playground.outputTabLabel', { + {i18n.translate('xpack.painlessLab.outputTabLabel', { defaultMessage: 'Output', })} @@ -52,9 +52,9 @@ export function OutputPane({ ); return ( - + {' '} @@ -53,13 +53,13 @@ export function ParametersTab({ context, contextSetup, setContext, setContextSet href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting-using.html#prefer-params" target="_blank" > - {i18n.translate('xpack.painless_playground.parametersFieldDocLinkText', { + {i18n.translate('xpack.painlessLab.parametersFieldDocLinkText', { defaultMessage: 'Parameters docs', })} } - helpText={i18n.translate('xpack.painless_playground.helpIconAriaLabel', { + helpText={i18n.translate('xpack.painlessLab.helpIconAriaLabel', { defaultMessage: 'Use JSON format', })} > diff --git a/x-pack/legacy/plugins/painless_playground/public/components/request_flyout.tsx b/x-pack/legacy/plugins/painless_lab/public/components/request_flyout.tsx similarity index 91% rename from x-pack/legacy/plugins/painless_playground/public/components/request_flyout.tsx rename to x-pack/legacy/plugins/painless_lab/public/components/request_flyout.tsx index 60ecdd5d4799b..def4ae2876bb6 100644 --- a/x-pack/legacy/plugins/painless_playground/public/components/request_flyout.tsx +++ b/x-pack/legacy/plugins/painless_lab/public/components/request_flyout.tsx @@ -36,7 +36,7 @@ export function RequestFlyout({

- {i18n.translate('xpack.painless_playground.flyoutTitle', { + {i18n.translate('xpack.painlessLab.flyoutTitle', { defaultMessage: 'API request', })}

@@ -52,7 +52,7 @@ export function RequestFlyout({ target="_blank" iconType="help" > - {i18n.translate('xpack.painless_playground.flyoutDocLink', { + {i18n.translate('xpack.painlessLab.flyoutDocLink', { defaultMessage: 'API documentation', })} @@ -86,7 +86,7 @@ export function RequestFlyout({ ]} /> -
+
); diff --git a/x-pack/legacy/plugins/painless_playground/public/index.scss b/x-pack/legacy/plugins/painless_lab/public/index.scss similarity index 77% rename from x-pack/legacy/plugins/painless_playground/public/index.scss rename to x-pack/legacy/plugins/painless_lab/public/index.scss index 46b834c83786c..5c86be1832ff7 100644 --- a/x-pack/legacy/plugins/painless_playground/public/index.scss +++ b/x-pack/legacy/plugins/painless_lab/public/index.scss @@ -5,11 +5,11 @@ * 1. This is a very brittle way of preventing the editor and other content from disappearing * behind the bottom bar. */ -.painlessPlaygroundBottomBarPlaceholder { +.painlessLabBottomBarPlaceholder { height: $euiSize * 2; /* [1] */ } -.painlessPlaygroundRightPane { +.painlessLabRightPane { border-right: none; border-top: none; border-bottom: none; @@ -18,7 +18,7 @@ height: 100%; } -.painlessPlaygroundRightPane__tabs { +.painlessLabRightPane__tabs { display: flex; flex-direction: column; height: 100%; @@ -28,6 +28,6 @@ } } -.painlessPlayground__betaLabelContainer { +.painlessLab__betaLabelContainer { line-height: 0; } diff --git a/x-pack/legacy/plugins/painless_playground/public/lib/execute_code.ts b/x-pack/legacy/plugins/painless_lab/public/lib/execute_code.ts similarity index 100% rename from x-pack/legacy/plugins/painless_playground/public/lib/execute_code.ts rename to x-pack/legacy/plugins/painless_lab/public/lib/execute_code.ts diff --git a/x-pack/legacy/plugins/painless_playground/public/lib/helpers.ts b/x-pack/legacy/plugins/painless_lab/public/lib/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/painless_playground/public/lib/helpers.ts rename to x-pack/legacy/plugins/painless_lab/public/lib/helpers.ts diff --git a/x-pack/legacy/plugins/painless_playground/public/register.tsx b/x-pack/legacy/plugins/painless_lab/public/register.tsx similarity index 68% rename from x-pack/legacy/plugins/painless_playground/public/register.tsx rename to x-pack/legacy/plugins/painless_lab/public/register.tsx index 4908eeb758114..3f3561e1f52bb 100644 --- a/x-pack/legacy/plugins/painless_playground/public/register.tsx +++ b/x-pack/legacy/plugins/painless_lab/public/register.tsx @@ -15,15 +15,15 @@ import { FeatureCatalogueCategory } from '../../../../../src/plugins/home/public import { ADVANCED_SETTINGS_FLAG_NAME } from '../common/constants'; npSetup.plugins.home.featureCatalogue.register({ - id: 'painless_playground', - title: i18n.translate('xpack.painless_playground.registryProviderTitle', { - defaultMessage: 'Painless Playground (beta)', + id: 'painlessLab', + title: i18n.translate('xpack.painlessLab.registryProviderTitle', { + defaultMessage: 'Painless Lab (beta)', }), - description: i18n.translate('xpack.painless_playground.registryProviderDescription', { + description: i18n.translate('xpack.painlessLab.registryProviderDescription', { defaultMessage: 'Simulate and debug painless code', }), icon: '', - path: '/app/kibana#/dev_tools/painless_playground', + path: '/app/kibana#/dev_tools/painless_lab', showOnHomePage: false, category: FeatureCatalogueCategory.ADMIN, }); @@ -38,17 +38,17 @@ npSetup.plugins.devTools.register({ title: ( - {i18n.translate('xpack.painless_playground.displayName', { - defaultMessage: 'Painless Playground', + {i18n.translate('xpack.painlessLab.displayName', { + defaultMessage: 'Painless Lab', })} - + @@ -57,13 +57,13 @@ npSetup.plugins.devTools.register({ ), enableRouting: false, disabled: false, - tooltipContent: xpackInfo.get('features.painlessPlayground.message'), + tooltipContent: xpackInfo.get('features.painlessLab.message'), async mount(context, { element }) { registerPainless(); const licenseCheck = { - showPage: xpackInfo.get('features.painlessPlayground.enableLink'), - message: xpackInfo.get('features.painlessPlayground.message'), + showPage: xpackInfo.get('features.painlessLab.enableLink'), + message: xpackInfo.get('features.painlessLab.message'), }; if (!licenseCheck.showPage) { diff --git a/x-pack/legacy/plugins/painless_playground/public/register_painless.ts b/x-pack/legacy/plugins/painless_lab/public/register_painless.ts similarity index 100% rename from x-pack/legacy/plugins/painless_playground/public/register_painless.ts rename to x-pack/legacy/plugins/painless_lab/public/register_painless.ts diff --git a/x-pack/legacy/plugins/painless_playground/public/render_app.tsx b/x-pack/legacy/plugins/painless_lab/public/render_app.tsx similarity index 85% rename from x-pack/legacy/plugins/painless_playground/public/render_app.tsx rename to x-pack/legacy/plugins/painless_lab/public/render_app.tsx index 75adb3bbc382a..f6c0a5b6069b0 100644 --- a/x-pack/legacy/plugins/painless_playground/public/render_app.tsx +++ b/x-pack/legacy/plugins/painless_lab/public/render_app.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { CoreStart } from 'kibana/public'; import { render, unmountComponentAtNode } from 'react-dom'; -import { PainlessPlayground } from './components/painless_playground'; +import { Main } from './components/main'; import { createKibanaReactContext } from '../../../../../src/plugins/kibana_react/public'; import { executeCode } from './lib/execute_code'; @@ -18,7 +18,7 @@ export function renderApp(element: any, { http, i18n, uiSettings }: CoreStart) { render( - executeCode(http, payload)} /> +
executeCode(http, payload)} /> , element diff --git a/x-pack/legacy/plugins/painless_playground/server/lib/check_license.ts b/x-pack/legacy/plugins/painless_lab/server/lib/check_license.ts similarity index 73% rename from x-pack/legacy/plugins/painless_playground/server/lib/check_license.ts rename to x-pack/legacy/plugins/painless_lab/server/lib/check_license.ts index f6a815abe9a47..5cbed532ca56a 100644 --- a/x-pack/legacy/plugins/painless_playground/server/lib/check_license.ts +++ b/x-pack/legacy/plugins/painless_lab/server/lib/check_license.ts @@ -13,9 +13,9 @@ export function checkLicense(xpackLicenseInfo: any) { return { enableLink: false, enableAPIRoute: false, - message: i18n.translate('xpack.painless_playground.unavailableLicenseInformationMessage', { + message: i18n.translate('xpack.painlessLab.unavailableLicenseInformationMessage', { defaultMessage: - 'You cannot use the Painless Playground because license information is not available at this time.', + 'You cannot use the Painless Lab because license information is not available at this time.', }), }; } @@ -28,9 +28,9 @@ export function checkLicense(xpackLicenseInfo: any) { return { enableLink: false, enableAPIRoute: false, - message: i18n.translate('xpack.painless_playground.licenseHasExpiredMessage', { + message: i18n.translate('xpack.painlessLab.licenseHasExpiredMessage', { defaultMessage: - 'You cannot use the Painless Playground because your {licenseType} license has expired.', + 'You cannot use the Painless Lab because your {licenseType} license has expired.', values: { licenseType, }, diff --git a/x-pack/legacy/plugins/painless_playground/server/lib/license_pre_routing_factory.ts b/x-pack/legacy/plugins/painless_lab/server/lib/license_pre_routing_factory.ts similarity index 100% rename from x-pack/legacy/plugins/painless_playground/server/lib/license_pre_routing_factory.ts rename to x-pack/legacy/plugins/painless_lab/server/lib/license_pre_routing_factory.ts diff --git a/x-pack/legacy/plugins/painless_playground/server/register_execute_route.ts b/x-pack/legacy/plugins/painless_lab/server/register_execute_route.ts similarity index 100% rename from x-pack/legacy/plugins/painless_playground/server/register_execute_route.ts rename to x-pack/legacy/plugins/painless_lab/server/register_execute_route.ts diff --git a/x-pack/legacy/plugins/painless_playground/server/register_license_checker.ts b/x-pack/legacy/plugins/painless_lab/server/register_license_checker.ts similarity index 100% rename from x-pack/legacy/plugins/painless_playground/server/register_license_checker.ts rename to x-pack/legacy/plugins/painless_lab/server/register_license_checker.ts