From 994c5f0c983123c8e69a7f79e3de97eef3b4a002 Mon Sep 17 00:00:00 2001 From: Yan Savitski Date: Wed, 13 Mar 2024 14:17:12 +0100 Subject: [PATCH 1/4] Update openAI field --- .../components/summarization_panel/open_ai_key_field.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_field.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_field.tsx index 7321e847c3234..197c37a596ad8 100644 --- a/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_field.tsx +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/open_ai_key_field.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiButton, EuiFieldText, EuiFlexGroup, EuiFormRow, keys } from '@elastic/eui'; +import { EuiButton, EuiFieldPassword, EuiFlexGroup, EuiFormRow, keys } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { useFormContext } from 'react-hook-form'; @@ -30,7 +30,7 @@ export const OpenAIKeyField: React.FC = () => { fullWidth > - Date: Wed, 13 Mar 2024 14:17:40 +0100 Subject: [PATCH 2/4] Hide playground from menu --- x-pack/plugins/search_playground/public/plugin.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/search_playground/public/plugin.tsx b/x-pack/plugins/search_playground/public/plugin.tsx index 9aff87f1d8734..eec029a22f828 100644 --- a/x-pack/plugins/search_playground/public/plugin.tsx +++ b/x-pack/plugins/search_playground/public/plugin.tsx @@ -5,13 +5,7 @@ * 2.0. */ -import { - CoreSetup, - Plugin, - CoreStart, - AppMountParameters, - DEFAULT_APP_CATEGORIES, -} from '@kbn/core/public'; +import { CoreSetup, Plugin, CoreStart, AppMountParameters } from '@kbn/core/public'; import { PLUGIN_ID, PLUGIN_NAME } from '../common'; import { PlaygroundToolbar, PlaygroundProvider, Playground } from './embedable'; import { @@ -24,10 +18,11 @@ export class SearchPlaygroundPlugin implements Plugin { public setup(core: CoreSetup): SearchPlaygroundPluginSetup { + return {}; + core.application.register({ id: PLUGIN_ID, appRoute: '/app/search_playground', - category: DEFAULT_APP_CATEGORIES.enterpriseSearch, title: PLUGIN_NAME, async mount(params: AppMountParameters) { const { renderApp } = await import('./application'); From 33701ec3a7afcdd132b86ce573a2a82eb88eadde Mon Sep 17 00:00:00 2001 From: Yan Savitski Date: Wed, 13 Mar 2024 14:18:09 +0100 Subject: [PATCH 3/4] Update id --- x-pack/plugins/search_playground/kibana.jsonc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/search_playground/kibana.jsonc b/x-pack/plugins/search_playground/kibana.jsonc index 9a1a096a14096..61f4cd97c1507 100644 --- a/x-pack/plugins/search_playground/kibana.jsonc +++ b/x-pack/plugins/search_playground/kibana.jsonc @@ -1,6 +1,6 @@ { "type": "plugin", - "id": "@kbn/search_playground", + "id": "@kbn/search-playground", "owner": "@elastic/enterprise-search-frontend", "plugin": { "id": "searchPlayground", From f4c2d4019ebc0801c7c6292f450506b16d753951 Mon Sep 17 00:00:00 2001 From: Yan Savitski Date: Wed, 13 Mar 2024 14:22:20 +0100 Subject: [PATCH 4/4] Update configs by kbn bootstrap --- package.json | 2 +- tsconfig.base.json | 4 ++-- yarn.lock | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c0f662b606734..f7f4d7f19ae6f 100644 --- a/package.json +++ b/package.json @@ -675,8 +675,8 @@ "@kbn/search-errors": "link:packages/kbn-search-errors", "@kbn/search-examples-plugin": "link:examples/search_examples", "@kbn/search-index-documents": "link:packages/kbn-search-index-documents", - "@kbn/search-response-warnings": "link:packages/kbn-search-response-warnings", "@kbn/search-playground": "link:x-pack/plugins/search_playground", + "@kbn/search-response-warnings": "link:packages/kbn-search-response-warnings", "@kbn/searchprofiler-plugin": "link:x-pack/plugins/searchprofiler", "@kbn/security-hardening": "link:packages/kbn-security-hardening", "@kbn/security-plugin": "link:x-pack/plugins/security", diff --git a/tsconfig.base.json b/tsconfig.base.json index c25c4f06057da..46bcfbc370fc3 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1326,8 +1326,6 @@ "@kbn/screenshotting-example-plugin/*": ["x-pack/examples/screenshotting_example/*"], "@kbn/screenshotting-plugin": ["x-pack/plugins/screenshotting"], "@kbn/screenshotting-plugin/*": ["x-pack/plugins/screenshotting/*"], - "@kbn/search_playground": ["x-pack/plugins/search_playground"], - "@kbn/search_playground/*": ["x-pack/plugins/search_playground/*"], "@kbn/search-api-panels": ["packages/kbn-search-api-panels"], "@kbn/search-api-panels/*": ["packages/kbn-search-api-panels/*"], "@kbn/search-connectors": ["packages/kbn-search-connectors"], @@ -1338,6 +1336,8 @@ "@kbn/search-examples-plugin/*": ["examples/search_examples/*"], "@kbn/search-index-documents": ["packages/kbn-search-index-documents"], "@kbn/search-index-documents/*": ["packages/kbn-search-index-documents/*"], + "@kbn/search-playground": ["x-pack/plugins/search_playground"], + "@kbn/search-playground/*": ["x-pack/plugins/search_playground/*"], "@kbn/search-response-warnings": ["packages/kbn-search-response-warnings"], "@kbn/search-response-warnings/*": ["packages/kbn-search-response-warnings/*"], "@kbn/searchprofiler-plugin": ["x-pack/plugins/searchprofiler"], diff --git a/yarn.lock b/yarn.lock index 45cc5edb72629..78039cec82f9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5740,11 +5740,11 @@ version "0.0.0" uid "" -"@kbn/search-response-warnings@link:packages/kbn-search-response-warnings": +"@kbn/search-playground@link:x-pack/plugins/search_playground": version "0.0.0" uid "" -"@kbn/search_playground@link:x-pack/plugins/search_playground": +"@kbn/search-response-warnings@link:packages/kbn-search-response-warnings": version "0.0.0" uid ""