From 8b9ce1848ca59291a759396e61389a76e0d17133 Mon Sep 17 00:00:00 2001 From: Sander Philipse <94373878+sphilipse@users.noreply.github.com> Date: Fri, 8 Dec 2023 19:48:56 +0100 Subject: [PATCH] Language client getting started dedicated (#172869) ## Summary This adds the getting started page from Serverless Elasticsearch to Dedicated. --- .../components/cloud_details.tsx | 142 +++++++ .../components/pipeline_panel.tsx | 75 ++-- packages/kbn-search-api-panels/index.tsx | 2 + ...elasticsearch_client_instructions.test.tsx | 57 --- .../elasticsearch_client_instructions.tsx | 53 --- .../index.ts | 8 - .../languages/elasticsearch_dotnet.tsx | 155 -------- .../languages/elasticsearch_go.tsx | 139 ------- .../languages/elasticsearch_java.tsx | 107 ------ .../languages/elasticsearch_javascript.tsx | 97 ----- .../languages/elasticsearch_php.tsx | 113 ------ .../languages/elasticsearch_python.tsx | 163 -------- .../languages/elasticsearch_ruby.tsx | 161 -------- .../languages/elasticsearch_rust.tsx | 89 ----- .../languages/index.ts | 26 -- .../elasticsearch_cloud_id.test.tsx | 99 ----- .../elasticsearch_cloud_id.tsx | 136 ------- .../elasticsearch_cloud_id/index.ts | 8 - .../elasticsearch_guide.test.tsx | 73 ---- .../elasticsearch_guide.tsx | 236 +++--------- .../components/elasticsearch_guide/index.ts | 8 - .../components/layout/page_template.tsx | 1 + .../applications/elasticsearch/index.test.tsx | 2 +- .../applications/elasticsearch/index.tsx | 2 +- .../getting_started/getting_started.tsx | 362 +----------------- .../getting_started/getting_started.tsx | 335 ++++++++++++++++ .../getting_started/languages/console.ts | 0 .../getting_started/languages/constants.ts | 0 .../getting_started/languages/curl.ts | 2 +- .../getting_started/languages/go.ts | 2 +- .../getting_started/languages/helpers.test.ts | 0 .../getting_started/languages/helpers.ts | 0 .../getting_started/languages/javascript.ts | 2 +- .../getting_started/languages/languages.ts | 0 .../getting_started/languages/php.ts | 2 +- .../getting_started/languages/python.ts | 2 +- .../getting_started/languages/ruby.ts | 2 +- .../panels/add_data_panel_content.tsx | 49 +++ .../panels/api_key_panel_content.tsx | 129 +++++++ .../initialize_client_panel_content.tsx | 49 +++ .../getting_started/panels/pipeline_panel.tsx | 20 + .../panels/search_query_panel_content.tsx | 53 +++ .../panels/test_connection_panel_content.tsx | 49 +++ .../shared/layout/endpoints_header_action.tsx | 105 ++--- .../shared/layout/page_template.tsx | 38 +- .../public/assets/images/cluster.svg | 4 + .../public/assets/images/cut.svg | 11 + .../public/assets/images/reporter.svg | 11 + .../application/components/overview.tsx | 11 +- .../components/overview/cloud_details.tsx | 127 ------ .../components/pipeline_button_overview.tsx | 6 +- .../plugins/serverless_search/tsconfig.json | 2 +- .../translations/translations/fr-FR.json | 22 -- .../translations/translations/ja-JP.json | 22 -- .../translations/translations/zh-CN.json | 22 -- 55 files changed, 1045 insertions(+), 2346 deletions(-) create mode 100644 packages/kbn-search-api-panels/components/cloud_details.tsx rename {x-pack/plugins/serverless_search/public/application => packages/kbn-search-api-panels}/components/pipeline_panel.tsx (54%) delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/elasticsearch_client_instructions.test.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/elasticsearch_client_instructions.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/index.ts delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_dotnet.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_go.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_java.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_javascript.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_php.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_python.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_ruby.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_rust.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/index.ts delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.test.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/index.ts delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.test.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/index.ts create mode 100644 x-pack/plugins/enterprise_search/public/applications/shared/getting_started/getting_started.tsx rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/console.ts (100%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/constants.ts (100%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/curl.ts (97%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/go.ts (98%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/helpers.test.ts (100%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/helpers.ts (100%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/javascript.ts (98%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/languages.ts (100%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/php.ts (98%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/python.ts (97%) rename x-pack/plugins/enterprise_search/public/applications/{enterprise_search_content/components/search_index/components => shared}/getting_started/languages/ruby.ts (97%) create mode 100644 x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/add_data_panel_content.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/api_key_panel_content.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/initialize_client_panel_content.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/pipeline_panel.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/search_query_panel_content.tsx create mode 100644 x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/test_connection_panel_content.tsx create mode 100644 x-pack/plugins/enterprise_search/public/assets/images/cluster.svg create mode 100644 x-pack/plugins/enterprise_search/public/assets/images/cut.svg create mode 100644 x-pack/plugins/enterprise_search/public/assets/images/reporter.svg delete mode 100644 x-pack/plugins/serverless_search/public/application/components/overview/cloud_details.tsx diff --git a/packages/kbn-search-api-panels/components/cloud_details.tsx b/packages/kbn-search-api-panels/components/cloud_details.tsx new file mode 100644 index 0000000000000..2354ca4b345f2 --- /dev/null +++ b/packages/kbn-search-api-panels/components/cloud_details.tsx @@ -0,0 +1,142 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useState } from 'react'; +import { + EuiCheckableCard, + EuiCodeBlock, + EuiFlexGroup, + EuiFlexItem, + EuiPanel, + EuiSpacer, + EuiText, + EuiThemeProvider, + EuiTitle, + EuiBadge, + EuiPanelProps, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { OverviewPanel } from '..'; +import { ELASTICSEARCH_URL_PLACEHOLDER } from '../constants'; + +export interface CloudDetailsPanelProps { + cloudId?: string; + elasticsearchUrl?: string; + isPanelLeft?: boolean; + overviewPanelProps?: Partial; +} + +enum CloudDetail { + ElasticsearchEndpoint = 'es_url', + CloudId = 'cloud_id', +} + +export const CloudDetailsPanel = ({ + cloudId, + elasticsearchUrl = ELASTICSEARCH_URL_PLACEHOLDER, + isPanelLeft = true, + overviewPanelProps, +}: CloudDetailsPanelProps) => { + const [selectedDetail, setSelectedCloudDetail] = useState( + CloudDetail.ElasticsearchEndpoint + ); + const panelContent = ( + + + + {selectedDetail === CloudDetail.CloudId && cloudId} + {selectedDetail === CloudDetail.ElasticsearchEndpoint && elasticsearchUrl} + + + + ); + return ( + + + + + +
+ +
+
+
+ + + + + + + + + } + checked={selectedDetail === CloudDetail.ElasticsearchEndpoint} + onChange={() => setSelectedCloudDetail(CloudDetail.ElasticsearchEndpoint)} + > + +

+ +

+
+
+ + {Boolean(cloudId) && ( + +
+ +
+ + } + checked={selectedDetail === CloudDetail.CloudId} + onChange={() => setSelectedCloudDetail(CloudDetail.CloudId)} + > + +

+ +

+
+
+ )} +
+ ); +}; diff --git a/x-pack/plugins/serverless_search/public/application/components/pipeline_panel.tsx b/packages/kbn-search-api-panels/components/pipeline_panel.tsx similarity index 54% rename from x-pack/plugins/serverless_search/public/application/components/pipeline_panel.tsx rename to packages/kbn-search-api-panels/components/pipeline_panel.tsx index f5b11247b3395..4ee6d6a7f0003 100644 --- a/x-pack/plugins/serverless_search/public/application/components/pipeline_panel.tsx +++ b/packages/kbn-search-api-panels/components/pipeline_panel.tsx @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ import React from 'react'; @@ -19,11 +20,17 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { useAssetBasePath } from '../hooks/use_asset_base_path'; - -export const PipelinePanel: React.FC = () => { - const assetBasePath = useAssetBasePath(); +interface PipelinePanelProps { + clusterImage: string; + cutImage: string; + reporterImage: string; +} +export const PipelinePanel: React.FC = ({ + clusterImage, + cutImage, + reporterImage, +}) => { return ( @@ -31,24 +38,21 @@ export const PipelinePanel: React.FC = () => { - +

- {i18n.translate( - 'xpack.serverlessSearch.pipeline.overview.dataEnrichment.title', - { - defaultMessage: 'Enrich Data', - } - )} + {i18n.translate('searchApiPanels.pipeline.overview.dataEnrichment.title', { + defaultMessage: 'Enrich Data', + })}

{i18n.translate( - 'xpack.serverlessSearch.pipeline.overview.dataEnrichment.description', + 'searchApiPanels.pipeline.overview.dataEnrichment.description', { defaultMessage: 'Add information from external sources or apply transformations to your documents for more contextual, insightful search.', @@ -62,28 +66,22 @@ export const PipelinePanel: React.FC = () => { - +

- {i18n.translate( - 'xpack.serverlessSearch.pipeline.overview.extAndStandard.title', - { - defaultMessage: 'Extract and standardize', - } - )} + {i18n.translate('searchApiPanels.pipeline.overview.extAndStandard.title', { + defaultMessage: 'Extract and standardize', + })}

- {i18n.translate( - 'xpack.serverlessSearch.pipeline.overview.extAndStandard.description', - { - defaultMessage: - 'Parse information from your documents to ensure they conform to a standardized format.', - } - )} + {i18n.translate('searchApiPanels.pipeline.overview.extAndStandard.description', { + defaultMessage: + 'Parse information from your documents to ensure they conform to a standardized format.', + })}
@@ -91,28 +89,21 @@ export const PipelinePanel: React.FC = () => { - +

- {i18n.translate( - 'xpack.serverlessSearch.pipeline.overview.anonymization.title', - { - defaultMessage: 'Anonymize data', - } - )} + {i18n.translate('searchApiPanels.pipeline.overview.anonymization.title', { + defaultMessage: 'Anonymize data', + })}

- {i18n.translate( - 'xpack.serverlessSearch.pipeline.overview.anonymization.description', - { - defaultMessage: - 'Remove sensitive information from documents before indexing.', - } - )} + {i18n.translate('searchApiPanels.pipeline.overview.anonymization.description', { + defaultMessage: 'Remove sensitive information from documents before indexing.', + })}
diff --git a/packages/kbn-search-api-panels/index.tsx b/packages/kbn-search-api-panels/index.tsx index 6e78a0b388555..ada194f6fab46 100644 --- a/packages/kbn-search-api-panels/index.tsx +++ b/packages/kbn-search-api-panels/index.tsx @@ -11,12 +11,14 @@ import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiSpacer, EuiImage, EuiText } fro import { i18n } from '@kbn/i18n'; import { AuthenticatedUser } from '@kbn/security-plugin/common'; +export * from './components/cloud_details'; export * from './components/code_box'; export * from './components/github_link'; export * from './components/ingest_data'; export * from './components/ingestions_panel'; export * from './components/language_client_panel'; export * from './components/overview_panel'; +export * from './components/pipeline_panel'; export * from './components/select_client'; export * from './components/try_in_console_button'; export * from './components/install_client'; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/elasticsearch_client_instructions.test.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/elasticsearch_client_instructions.test.tsx deleted file mode 100644 index b7fe9c459ee6d..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/elasticsearch_client_instructions.test.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { setMockValues } from '../../../__mocks__/kea_logic'; - -import React from 'react'; - -import { shallow, ShallowWrapper } from 'enzyme'; - -import * as Languages from './languages'; - -import { ElasticsearchClientInstructions } from '.'; - -describe('Elasticsearch Client Instructions', () => { - let wrapper: ShallowWrapper; - - afterEach(() => { - jest.clearAllMocks(); - }); - - const setup = (language: string) => { - setMockValues({ - cloud: { - cloudId: 'example-cloud-id', - }, - }); - wrapper = shallow(); - }; - - describe('Displaying the right language options', () => { - it.concurrent.each([ - ['dotnet', Languages.ElasticsearchDotnet, false], - ['go', Languages.ElasticsearchGo, true], - ['java', Languages.ElasticsearchJava, false], - ['javascript', Languages.ElasticsearchJavascript, true], - ['php', Languages.ElasticsearchPhp, true], - ['python', Languages.ElasticsearchPython, true], - ['ruby', Languages.ElasticsearchRuby, true], - ['rust', Languages.ElasticsearchRust, false], - ])('%s', (language, Component, hasCloudIdProp) => { - setup(language); - expect(wrapper.find(Component)).toHaveLength(1); - expect(wrapper.find(Component).prop('cloudId')).toEqual( - hasCloudIdProp ? 'example-cloud-id' : undefined - ); - }); - }); - - it('does not display language for unrecognised language', () => { - setup('coffeescript'); - expect(wrapper.isEmptyRender()).toEqual(true); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/elasticsearch_client_instructions.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/elasticsearch_client_instructions.tsx deleted file mode 100644 index 92c28e8f23336..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/elasticsearch_client_instructions.tsx +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { useValues } from 'kea'; - -import { KibanaLogic } from '../../../shared/kibana'; - -import { - ElasticsearchDotnet, - ElasticsearchGo, - ElasticsearchJava, - ElasticsearchJavascript, - ElasticsearchPhp, - ElasticsearchPython, - ElasticsearchRuby, - ElasticsearchRust, -} from './languages'; - -const useCloudId = (): string | undefined => { - const { cloud } = useValues(KibanaLogic); - return cloud?.cloudId; -}; - -export const ElasticsearchClientInstructions: React.FC<{ language: string }> = ({ language }) => { - const cloudId = useCloudId(); - - switch (language) { - case 'dotnet': - return ; - case 'go': - return ; - case 'java': - return ; - case 'javascript': - return ; - case 'php': - return ; - case 'python': - return ; - case 'ruby': - return ; - case 'rust': - return ; - default: - return null; - } -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/index.ts b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/index.ts deleted file mode 100644 index 901adb44b00d3..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -export { ElasticsearchClientInstructions } from './elasticsearch_client_instructions'; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_dotnet.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_dotnet.tsx deleted file mode 100644 index ee739a459c774..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_dotnet.tsx +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import dedent from 'dedent'; - -import { EuiCodeBlock, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; - -import { docLinks } from '../../../../shared/doc_links'; - -export const ElasticsearchDotnet: React.FC<{ cloudId?: string }> = ({ cloudId }) => { - return ( - <> - -

- The official .Net client for Elasticsearch includes all the features you need to add - search to a .Net application: -

-
    -
  • One-to-one mapping with REST API.
  • -
  • Strongly typed requests and responses for Elasticsearch APIs.
  • -
  • Fluent API for building requests.
  • -
  • Helpers for common tasks such as bulk indexing of documents.
  • -
  • Pluggable serialization of requests and responses based on System.Text.Json.
  • -
  • Diagnostics, auditing, and .NET activity integration.
  • -
- -

- The .NET Elasticsearch client is built upon the Elastic Transport library which provides: -

-
    -
  • Connection management and load balancing across all available nodes.
  • -
  • Request retries and dead connections handling.
  • -
- - - Learn more about the official .NET clients for Elasticsearch - - - - The official Elasticsearch .NET clients on Github - -
- - - - -

Installation

-

- For SDK style projects, you can install the Elasticsearch client by running the following - .NET CLI command in your terminal: -

-
- - - {dedent` - dotnet add package Elastic.Clients.Elasticsearch - `} - - - -

- This command adds a package reference to your project (csproj) file for the latest stable - version of the client. -

-

- If you prefer, you may also manually add a package reference inside your project file: -

-
- - - {dedent` - - `} - - - - - -

- For Visual Studio users, the .NET client can also be installed from the Package Manager - Console inside Visual Studio using the following command: -

-
- - - {dedent` - Install-Package Elastic.Clients.Elasticsearch - `} - - - - - -

- Alternatively, search for Elastic.Clients.Elasticsearch in the NuGet Package Manager UI. -

-
- - - - {cloudId ? ( - <> - -

Connecting to Elastic Cloud

-

- Connecting to an Elasticsearch Service deployment is achieved by providing the unique - Cloud ID for your deployment when configuring the ElasticsearchClient instance. You - can retrieve the Cloud ID from the homepage of the deployment in Elasticsearch - Service. You also require suitable credentials that your application uses to - authenticate with your deployment. -

-

- As a security best practice, it is recommended to create a dedicated API key per - application, with permissions limited to only those required for any API calls the - application is authorized to make. -

-

- The following snippet shows you how to create a client instance that connects to an - Elasticsearch deployment in the cloud. -

-
- - - {dedent` - using Elastic.Clients.Elasticsearch; - using Elastic.Transport; - - var client = new ElasticsearchClient("${cloudId}", new ApiKey("")); - - `} - - - ) : ( - <> - -

Connecting to Elasticsearch

-

- The .Net client for Elasticsearch supports connecting to single nodes as well as - multiple nodes utilizing a node pool.{' '} - - Visit the documentation to learn more about connecting to Elasticsearch. - -

-
- - )} - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_go.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_go.tsx deleted file mode 100644 index cca6fe484fb3c..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_go.tsx +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import dedent from 'dedent'; - -import { EuiCodeBlock, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; - -import { docLinks } from '../../../../shared/doc_links'; - -export const ElasticsearchGo: React.FC<{ cloudId?: string }> = ({ cloudId }) => { - return ( - <> - -

- The official Go client for Elasticsearch includes all the features you need to add search - to a Go application: -

-
    -
  • One-to-one mapping with the Elasticsearch REST API
  • -
  • Generalized, pluggable architecture
  • -
  • Helpers for convenience
  • -
  • A rich set of examples in the documentation
  • -
- - Learn more about the Go client for Elasticsearch - - - - The Go client for Elasticsearch on Github - - - - View the documentation on GoDoc - -
- - - - -

Installation

-

Add the package to your go.mod file:

-
- - - {dedent` - require github.com/elastic/go-elasticsearch/v8 main - `} - - - - - -

Getting started

-

- The elasticsearch package ties together two separate packages for calling the - Elasticsearch APIs and transferring data over HTTP: esapi and{' '} - elastictransport. -

-

- Use the elasticsearch.NewDefaultClient() function to create the client with - the default settings. -

-
- - - {dedent` - es, err := elasticsearch.NewDefaultClient() - if err != nil { - log.Fatalf("Error creating the client: %s", err) - } - - res, err := es.Info() - if err != nil { - log.Fatalf("Error getting response: %s", err) - } - - defer res.Body.Close() - log.Println(res) - `} - - - - - {cloudId ? ( - <> - -

Connecting to Elastic Cloud

-

- If you are using Elastic Cloud, the client offers an easy way to connect to it. You - must pass your Cloud ID to the client, which is found in the Cloud console, as well as - a corresponding API key. -

-
- - - {dedent` - cfg := elasticsearch.Config{ - CloudID: "${cloudId}", - APIKey: "API_KEY" - } - es, err := elasticsearch.NewClient(cfg) - `} - - - ) : ( - <> - -

Connecting to Elasticsearch

-

- To set the cluster endpoint(s) programmatically, pass a configuration object to the{' '} - elasticsearch.NewClient() function. To set the username and password, - include them in the endpoint URL, or use the corresponding configuration options. -

-
- - - {dedent` - cfg := elasticsearch.Config{ - Addresses: []string{ - "http://localhost:9200", - "http://localhost:9201", - }, - Username: "", - Password: "", - } - es, err := elasticsearch.NewClient(cfg) - `} - - - )} - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_java.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_java.tsx deleted file mode 100644 index 573d447c25e03..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_java.tsx +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import dedent from 'dedent'; - -import { EuiCodeBlock, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; - -import { docLinks } from '../../../../shared/doc_links'; - -export const ElasticsearchJava: React.FC = () => { - return ( - <> - -

- The Elasticsearch Java API Client includes all the features you need to add search to a - Java application: -

-
    -
  • Strongly typed requests and responses for all Elasticsearch APIs.
  • -
  • Blocking and asynchronous versions of all APIs.
  • -
  • - Use of fluent builders and functional patterns to allow writing concise yet readable - code when creating complex nested structures. -
  • -
  • - Seamless integration of application classes by using an object mapper such as Jackson or - any JSON-B implementation. -
  • -
- - Learn more about the Elasticsearch JAVA API client - - - - The Elasticsearch JAVA API client on Github - -
- - - - -

Installation

-

- There are several ways to install the Java API client.{' '} - - Visit the client documentation to learn more - - . -

-

Connecting to Elasticsearch

-

The client is structured around three main components:

-
    -
  • - API client classes. These provide strongly typed data structures and - methods for Elasticsearch APIs. Since the Elasticsearch API is large, it is structured - in feature groups (also called “namespaces”), each having its own client class. - Elasticsearch core features are implemented in the ElasticsearchClient class. -
  • -
  • - A JSON object mapper. This maps your application classes to JSON and - seamlessly integrates them with the API client. -
  • -
  • - A transport layer implementation. This is where all HTTP request - handling takes place. -
  • -
-

The code snippet below creates and wires these three components together:

-
- - - {dedent` - // Create the low-level client - RestClient restClient = RestClient.builder( - new HttpHost("localhost", 9200)).build(); - - // Create the transport with a Jackson mapper - ElasticsearchTransport transport = new RestClientTransport( - restClient, new JacksonJsonpMapper()); - - // And create the API client - ElasticsearchClient client = new ElasticsearchClient(transport); - `} - - - -

- Authentication is managed by the{' '} - - Java Low Level REST Client - - . For further details on configuring authentication, refer to{' '} - - its documentation - - . -

-
- - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_javascript.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_javascript.tsx deleted file mode 100644 index 587ecb09e1198..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_javascript.tsx +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import dedent from 'dedent'; - -import { EuiCodeBlock, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; - -import { docLinks } from '../../../../shared/doc_links'; - -export const ElasticsearchJavascript: React.FC<{ cloudId?: string }> = ({ cloudId }) => { - return ( - <> - -

- This is the official Node.js client for Elasticsearch includes all the features you need - to add search to any Node.js application: -

-
    -
  • One-to-one mapping with REST API.
  • -
  • Generalized, pluggable architecture.
  • -
  • Configurable, automatic discovery of cluster nodes.
  • -
  • Persistent, Keep-Alive connections.
  • -
  • Load balancing across all available nodes.
  • -
  • Child client support.
  • -
  • TypeScript support out of the box.
  • -
- - Learn more about the official Node.js client for Elasticsearch - - - - The official Node.js client for Elasticsearch on Github - -
- - - - -

Installation

-

To install the latest version of the client, run the following command:

-
- - - npm install @elastic/elasticsearch - - - - - {cloudId ? ( - <> - -

Connecting to Elastic Cloud

-

- If you are using Elastic Cloud, the client offers an easy way to connect to it via the - cloud option. You must pass the Cloud ID that you can find in the cloud console, then - your username and password inside the auth option. -

-
- - - {dedent` - const { Client } = require('@elastic/elasticsearch') - const client = new Client({ - cloud: { - id: '${cloudId}', - }, - auth: { - username: '', - password: '' - } - })`} - - - ) : ( - <> - -

Connecting to Elasticsearch

-

- There are several ways to connect and authenticate to Elasticsearch running outside of - Cloud, including API keys, bearer tokens, and basic authentication.{' '} - - Visit the client’s documentation to learn more - - . -

-
- - )} - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_php.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_php.tsx deleted file mode 100644 index 229d36d487469..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_php.tsx +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import dedent from 'dedent'; - -import { EuiCodeBlock, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; - -import { docLinks } from '../../../../shared/doc_links'; - -export const ElasticsearchPhp: React.FC<{ cloudId?: string }> = ({ cloudId }) => { - return ( - <> - -

- This official PHP client for Elasticsearch is designed to be a low-level client that does - not stray from the Elasticsearch REST API. -

- - Learn more about the official PHP client for Elasticsearch - - - - The official PHP client for Elasticsearch on Github - -
- - - - -

Installation

-

To install the latest version of the client, run the following command:

- -

Elasticsearch-php only has four requirements that you need to pay attention:

-
    -
  • PHP 7.1.0 or higher
  • -
  • - - Composer - -
  • -
  • - - ext-curl - - : the Libcurl extension for PHP -
  • -
  • Native JSON Extensions (ext-json) 1.3.7 or higher
  • -
-

- The rest of the dependencies are automatically downloaded and installed by Composer. - Composer is a package and dependency manager for PHP and makes it easy to install - Elasticsearch-php. -

- - Visit the documentation for more information. - -
- - - - {cloudId ? ( - <> - -

Connecting to Elastic Cloud

-

- You can connect to Elastic Cloud using Basic authentication or an{' '} - API key. Where {''} is reported in the Deployment UI. For - basic authentication, {''} and {''} are generated when you deploy - a new cloud instance. You’ll need to store the {''} and {''} since - they will not be available via UI. -

-
- - - {dedent` - // Connect via basic authentication - $client = ClientBuilder::create() - ->setElasticCloudId('${cloudId}') - ->setBasicAuthentication('', '') - ->build(); - - // Connect with an API key - $client = ClientBuilder::create() - ->setElasticCloudId('${cloudId}') - ->setApiKey('', '') - ->build(); - `} - - - ) : ( - <> - -

Connecting to Elasticsearch

-

- There are several ways to connect and authenticate to Elasticsearch running outside of - Cloud, including API keys, bearer tokens, and basic authentication.{' '} - - Visit the client’s documentation to learn more - - . -

-
- - )} - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_python.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_python.tsx deleted file mode 100644 index 54c7aca9b610a..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_python.tsx +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import dedent from 'dedent'; - -import { EuiCodeBlock, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; - -import { docLinks } from '../../../../shared/doc_links'; - -export const ElasticsearchPython: React.FC<{ cloudId?: string }> = ({ cloudId }) => { - return ( - <> - -

- elasticsearch-py, the official Python client for Elasticsearch, is a low-level client for - interacting with Elasticsearch’s REST API. It’s designed to be unopinionated and - extendable. -

- - Learn more about the Python client for Elasticsearch - - - - The Python client for Elasticsearch on Read the Docs - - - - elasticsearch-py on Github - -
- - - - -

Installation

-

- Install the elasticsearch package with{' '} - - pip - - : -

-
- - - {dedent` - $ python -m pip install elasticsearch - `} - - - - - -

- If your application uses async/await in Python you can install the client with the async - extra: -

-
- - - {dedent` - $ python -m pip install elasticsearch[async] - `} - - - -

- Learn more about{' '} - - using asyncio with this project - - . -

-
- - - - {cloudId ? ( - <> - -

Connecting to Elastic Cloud

-

- Cloud ID is an easy way to configure your client to work with your Elastic Cloud - deployment. Combine the cloud_id with either basic_auth or api_key to authenticate - with your Elastic Cloud deployment. -

-

- Using cloud_id enables TLS verification and HTTP compression by default and sets the - port to 443 unless otherwise overwritten via the port parameter or the port value - encoded within cloud_id. Using Cloud ID also disables sniffing as a proxy is in use. -

-
- - - {dedent` - from elasticsearch import Elasticsearch - - es = Elasticsearch( - cloud_id="${cloudId}" - ) - `} - - - ) : ( - <> - -

Connecting to Elasticsearch

-

- A single node can be specified via a scheme, host,{' '} - port, and optional path_prefix. These values can either be - specified manually via a URL in a string, dictionary, - NodeConfig, or a list of these values. You must specify at least{' '} - scheme, host and port - for each node. All of the following are valid configurations: -

-
- - - {dedent` - from elasticsearch import Elasticsearch - - # Single node via URL - es = Elasticsearch("http://localhost:9200") - - # Multiple nodes via URL - es = Elasticsearch([ - "http://localhost:9200", - "http://localhost:9201", - "http://localhost:9202" - ]) - - # Single node via dictionary - es = Elasticsearch({"scheme": "http", "host": "localhost", "port": 9200}) - - # Multiple nodes via dictionary - es = Elasticsearch([ - {"scheme": "http", "host": "localhost", "port": 9200}, - {"scheme": "http", "host": "localhost", "port": 9201}, - ]) - `} - - - -

- There are several ways to authenticate to Elasticsearch running outside of Cloud, - including API keys, bearer tokens, and basic authentication.{' '} - - Visit the client’s documentation to learn more - - . -

-
- - )} - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_ruby.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_ruby.tsx deleted file mode 100644 index 0592037311900..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_ruby.tsx +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import dedent from 'dedent'; - -import { EuiCodeBlock, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; - -import { docLinks } from '../../../../shared/doc_links'; - -export const ElasticsearchRuby: React.FC<{ cloudId?: string }> = ({ cloudId }) => { - return ( - <> - -

- The elasticsearch{' '} - - Rubygem - {' '} - provides a low-level client for communicating with an Elasticsearch cluster, fully - compatible with other official clients. -

- - Learn more about the Ruby client for Elasticsearch - - - - The Elasticsearch Ruby client on Github - - - - The Elasticsearch Ruby client on RubyDoc - - - - -

Check out these other official Ruby libraries for working with Elasticsearch:

- -
- - - - -

Installation

-

- Install the elasticsearch gem from Rubygems: -

-
- - - {dedent` - $ gem install elasticsearch - `} - - - -

Or add it to your project’s Gemfile:

-
- - - {dedent` - gem 'elasticsearch', '' - `} - - - - - {cloudId ? ( - <> - -

Connecting to Elastic Cloud

-

- If you are using Elastic Cloud, the client offers an easy way to connect to it. You - must pass the Cloud ID that you can find in the cloud console. -

-

- You can connect to Elastic Cloud using Basic authentication or an{' '} - API key. Where {''} is reported in the Deployment UI. For - basic authentication, {''} and {''} are generated when you deploy - a new cloud instance. You’ll need to store the {''} and {''} since - they will not be available via UI. -

-
- - - {dedent` - require 'elasticsearch' - - // Connect via basic authentication - client = Elasticsearch::Client.new( - cloud_id: '${cloudId}' - user: '', - password: '', - ) - - // Connect via API key - client = Elasticsearch::Client.new( - cloud_id: '${cloudId}', - api_key: {id: '', api_key: ''} - ) - `} - - - ) : ( - <> - -

Connecting to Elasticsearch

-

- There are several ways to authenticate to Elasticsearch running outside of Cloud, - including API keys, bearer tokens, and basic authentication.{' '} - - Visit the client’s documentation to learn more - - . -

-
- - )} - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_rust.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_rust.tsx deleted file mode 100644 index 208fffca35a52..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/elasticsearch_rust.tsx +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import dedent from 'dedent'; - -import { EuiCodeBlock, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; - -import { docLinks } from '../../../../shared/doc_links'; - -export const ElasticsearchRust: React.FC = () => { - return ( - <> - -

- The official Rust client for Elasticsearch includes all the features you need to add - search to a Rust application: -

-
    -
  • Fluent builders for all Elasticsearch REST API endpoints
  • -
  • Persistent keep-alive connections
  • -
  • TLS support with system or custom certificates
  • -
  • Proxy support with authentication
  • -
  • Async support with Tokio
  • -
- - Learn more about the Rust client for Elasticsearch - - - - The official Rust client for Elasticsearch on Github - - - - View the documentation on docs.rs - -
- - - - -

Installation

-

- Add elasticsearch crate and version to Cargo.toml. -

-
- - - {dedent` - [dependencies] - elasticsearch = "" - `} - - - -

- The following optional dependencies may also be useful to create requests and read - responses -

-
- - - {dedent` - serde = "~1" - serde_json = "~1" - `} - - - -

- The client also includes{' '} - - async support with tokio - - . -

-
- - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/index.ts b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/index.ts deleted file mode 100644 index 8a2accf80142f..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_client_instructions/languages/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { ElasticsearchDotnet } from './elasticsearch_dotnet'; -import { ElasticsearchGo } from './elasticsearch_go'; -import { ElasticsearchJava } from './elasticsearch_java'; -import { ElasticsearchJavascript } from './elasticsearch_javascript'; -import { ElasticsearchPhp } from './elasticsearch_php'; -import { ElasticsearchPython } from './elasticsearch_python'; -import { ElasticsearchRuby } from './elasticsearch_ruby'; -import { ElasticsearchRust } from './elasticsearch_rust'; - -export { - ElasticsearchDotnet, - ElasticsearchGo, - ElasticsearchJava, - ElasticsearchJavascript, - ElasticsearchPhp, - ElasticsearchPython, - ElasticsearchRuby, - ElasticsearchRust, -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.test.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.test.tsx deleted file mode 100644 index a6070724bb878..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.test.tsx +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { setMockValues, mockTelemetryActions } from '../../../__mocks__/kea_logic'; - -import React from 'react'; - -import { shallow, ShallowWrapper } from 'enzyme'; - -import { EuiButtonIcon, EuiCopy, EuiFieldText } from '@elastic/eui'; - -import { ElasticsearchCloudId } from '.'; - -const execCommandMock = (global.document.execCommand = jest.fn()); -const warn = jest.spyOn(console, 'warn').mockImplementation(() => {}); - -describe('Elasticsearch Cloud Id', () => { - let wrapper: ShallowWrapper; - - beforeEach(() => { - setMockValues({ - cloud: { - cloudId: 'example-cloud-id', - deploymentUrl: 'https://cloud.elastic.co/deployments/fake-deployment-id', - }, - }); - wrapper = shallow(); - }); - - afterEach(() => { - jest.clearAllMocks(); - }); - - describe('Visibility conditions', () => { - it('renders panel when cloud id is provided', () => { - expect(wrapper.find('[data-test-subj="CloudIdPanel"]')).toHaveLength(1); - }); - - it('is hidden when cloud id isnt available', () => { - setMockValues({ cloud: { cloudId: null } }); - wrapper = shallow(); - expect(wrapper.find('[data-test-subj="CloudIdPanel"]')).toHaveLength(0); - }); - }); - - describe('Cloud Id Interactions', () => { - it('should be able copy cloud id', () => { - const field = wrapper.find(EuiFieldText).dive(); - - expect(field.props()).toEqual( - expect.objectContaining({ - readOnly: true, - }) - ); - expect(field.find('input').props()).toEqual( - expect.objectContaining({ - value: 'example-cloud-id', - }) - ); - - const euiCopyHOC = field.dive().find(EuiCopy); - expect(euiCopyHOC.props().textToCopy).toEqual('example-cloud-id'); - const copyButton = euiCopyHOC.dive().find(EuiButtonIcon); - expect(copyButton).toHaveLength(1); - execCommandMock.mockImplementationOnce(() => true); - - copyButton.simulate('click'); - expect(execCommandMock).toHaveBeenCalledWith('copy'); - expect(mockTelemetryActions.sendEnterpriseSearchTelemetry).toHaveBeenCalledWith({ - action: 'clicked', - metric: 'cloud_id', - }); - }); - - it('should fail gracefully if not allowed to copy', () => { - const field = wrapper.find(EuiFieldText).dive(); - const euiCopyHOC = field.dive().find(EuiCopy); - const copyButton = euiCopyHOC.dive().find(EuiButtonIcon); - execCommandMock.mockImplementationOnce(() => false); - - copyButton.simulate('click'); - expect(execCommandMock).toHaveBeenCalledWith('copy'); - expect(warn).toHaveBeenCalledWith('Unable to copy to clipboard.'); - expect(mockTelemetryActions.sendEnterpriseSearchTelemetry).toHaveBeenCalled(); - }); - - it('should present a manage link to deployment screen', () => { - const manageLink = wrapper.find('[data-test-subj="cloudManageLink"]'); - expect(manageLink).toHaveLength(1); - expect(manageLink.props().href).toEqual( - 'https://cloud.elastic.co/deployments/fake-deployment-id' - ); - }); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.tsx deleted file mode 100644 index 9e3a59aee83df..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/elasticsearch_cloud_id.tsx +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { useActions, useValues } from 'kea'; - -import { - EuiButton, - EuiButtonIcon, - EuiCopy, - EuiFieldText, - EuiFlexGroup, - EuiFlexItem, - EuiForm, - EuiFormRow, - EuiLink, - EuiPanel, - EuiTitle, -} from '@elastic/eui'; - -import { i18n } from '@kbn/i18n'; - -import { useCloudDetails } from '../../../shared/cloud_details/cloud_details'; -import { HttpLogic } from '../../../shared/http'; -import { TelemetryLogic } from '../../../shared/telemetry'; -import { SendTelemetryHelper } from '../../../shared/telemetry/telemetry_logic'; - -const onFocusHandler = (e: React.FocusEvent): void => { - e.target.select(); -}; - -const copyCloudIdHandler = ( - copy: () => void, - sendTelemetry: ({ action, metric }: SendTelemetryHelper) => void -) => { - return () => { - copy(); - sendTelemetry({ - action: 'clicked', - metric: 'cloud_id', - }); - }; -}; - -export const ElasticsearchCloudId: React.FC = () => { - const cloud = useCloudDetails(); - const { sendEnterpriseSearchTelemetry } = useActions(TelemetryLogic); - const { http } = useValues(HttpLogic); - - // hide the panel when no cloud context is available - if (!cloud.cloudId) { - return null; - } - - return ( - - - - - - -

- {i18n.translate('xpack.enterpriseSearch.overview.elasticsearchCloudId.heading', { - defaultMessage: 'My Deployment', - })} -

-
-
-
-
- - - {i18n.translate('xpack.enterpriseSearch.overview.elasticsearchCloudId.manageLink', { - defaultMessage: 'Manage', - })} - - -
- - - - - - {(copy) => ( - - )} - - } - /> - - - - - - - {i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchCloudId.manageApiKeysLink', - { - defaultMessage: 'Manage API keys', - } - )} - - - -
- ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/index.ts b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/index.ts deleted file mode 100644 index 950ac3cbda25d..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_cloud_id/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -export { ElasticsearchCloudId } from './elasticsearch_cloud_id'; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.test.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.test.tsx deleted file mode 100644 index 07849ce476268..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.test.tsx +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { shallow, ShallowWrapper } from 'enzyme'; - -import { EuiSteps, EuiSelect } from '@elastic/eui'; - -import { ElasticsearchClientInstructions } from '../elasticsearch_client_instructions'; - -import { ElasticsearchGuide } from '.'; - -describe('Elasticsearch Guide Component', () => { - let wrapper: ShallowWrapper; - - const setup = (param: string) => { - Object.defineProperty(window, 'location', { - value: { search: param }, - writable: true, - }); - wrapper = shallow(); - }; - - describe('Rendering Language option ', () => { - it('should use default language (java)', () => { - setup(''); - const clientInstructionsElement = wrapper - .find(EuiSteps) - .dive() - .find(ElasticsearchClientInstructions); - expect(clientInstructionsElement.prop('language')).toBe('java'); - }); - - it('should use language from param (ruby)', () => { - setup('?client=ruby'); - const clientInstructionsElement = wrapper - .find(EuiSteps) - .dive() - .find(ElasticsearchClientInstructions); - expect(clientInstructionsElement.prop('language')).toBe('ruby'); - }); - - it('should fallback to java if client not recognised', () => { - setup('?client=coffeescript'); - const clientInstructionsElement = wrapper - .find(EuiSteps) - .dive() - .find(ElasticsearchClientInstructions); - expect(clientInstructionsElement.prop('language')).toBe('java'); - }); - }); - - describe('Changing Language option', () => { - it('should change the client instructions language prop when choosing another option', () => { - setup(''); - const languageSelectElement = wrapper.find(EuiSteps).dive().find(EuiSelect); - languageSelectElement.simulate('change', { target: { value: 'ruby' } }); - - wrapper.update(); - - const clientInstructionsElement = wrapper - .find(EuiSteps) - .dive() - .find(ElasticsearchClientInstructions); - expect(clientInstructionsElement.prop('language')).toBe('ruby'); - }); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.tsx index 7da4392ef1112..e4a08654199de 100644 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/elasticsearch_guide.tsx @@ -7,191 +7,81 @@ import React, { useEffect, useState } from 'react'; -import queryString from 'query-string'; +import { useActions, useValues } from 'kea'; -import { - EuiText, - EuiFlexGroup, - EuiFlexItem, - EuiSpacer, - EuiSteps, - EuiSelect, - EuiLink, - useGeneratedHtmlId, -} from '@elastic/eui'; +import { EuiHorizontalRule, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { LanguageDefinitionSnippetArguments } from '@kbn/search-api-panels'; +import { ELASTICSEARCH_URL_PLACEHOLDER } from '@kbn/search-api-panels/constants'; -import { docLinks } from '../../../shared/doc_links'; -import { ElasticsearchResources } from '../../../shared/elasticsearch_resources'; -import { SetElasticsearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; -import { ElasticsearchClientInstructions } from '../elasticsearch_client_instructions'; -import { ElasticsearchCloudId } from '../elasticsearch_cloud_id'; -import { EnterpriseSearchElasticsearchPageTemplate } from '../layout'; - -// Replace FormattedMessage with i18n strings +import { Status } from '../../../../../common/types/api'; -export const ElasticsearchGuide: React.FC = () => { - const languages = [ - { value: 'dotnet', text: '.Net' }, - { value: 'go', text: 'Go' }, - { value: 'java', text: 'Java' }, - { value: 'javascript', text: 'JavaScript' }, - { value: 'php', text: 'PHP' }, - { value: 'python', text: 'Python' }, - { value: 'ruby', text: 'Ruby' }, - { value: 'rust', text: 'Rust' }, - ]; - - const client = queryString.parse(window.location.search).client as string; - const languageExists = languages.some((language) => language.value === client); - const [selectedLanguage, setSelectedLanguage] = useState(languageExists ? client : 'java'); +import { CreateApiKeyAPILogic } from '../../../enterprise_search_overview/api/create_elasticsearch_api_key_logic'; +import { FetchApiKeysAPILogic } from '../../../enterprise_search_overview/api/fetch_api_keys_logic'; +import { CreateApiKeyFlyout } from '../../../shared/api_key/create_api_key_flyout'; +import { useCloudDetails } from '../../../shared/cloud_details/cloud_details'; +import { GettingStarted } from '../../../shared/getting_started/getting_started'; +import { KibanaLogic } from '../../../shared/kibana/kibana_logic'; +import { EnterpriseSearchElasticsearchPageTemplate } from '../layout'; - const basicSelectId = useGeneratedHtmlId({ prefix: 'languageSelect' }); +export const ElasticsearchGuide = () => { + const { user } = useValues(KibanaLogic); + const cloudContext = useCloudDetails(); + const [isFlyoutOpen, setIsFlyoutOpen] = useState(false); - const onChange = (e: React.ChangeEvent) => { - setSelectedLanguage(e.target.value); + const codeArgs: LanguageDefinitionSnippetArguments = { + apiKey: '', + cloudId: cloudContext.cloudId, + url: cloudContext.elasticsearchUrl || ELASTICSEARCH_URL_PLACEHOLDER, }; + const { makeRequest } = useActions(FetchApiKeysAPILogic); + const { makeRequest: saveApiKey } = useActions(CreateApiKeyAPILogic); + const { error, status } = useValues(CreateApiKeyAPILogic); + const { data } = useValues(FetchApiKeysAPILogic); + const apiKeys = data?.api_keys || []; - // TODO: The page keeps the scroll position if being opened from Enterpise Search Overview, - // This is a temporary solution for demoing - useEffect(() => { - window.scrollTo(0, 0); - }, []); + useEffect(() => makeRequest({}), []); return ( - - - {/* maxWidth is needed to prevent code blocks with long unbreakable strings (Kibana PR Cloud ID) from stretching the column */} - - -

- {i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchTitle', - { - defaultMessage: 'Getting started with Elasticsearch', - } - )} -

-

- {i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchDescription', - { - defaultMessage: - "Elasticsearch provides the low-level tools you need to build fast, relevant search for your website or application. Because it's powerful and flexible, Elasticsearch can handle search use cases of all shapes and sizes.", - } - )} -

-
- - - - - -

- {i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.connectToElasticsearchDescription', - { - defaultMessage: - 'Elastic builds and maintains clients in several popular languages and our community has contributed many more.', - } - )} -

- - {i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsLink', - { defaultMessage: 'Learn more about Elasticsearch clients' } - )} - -
- - - - onChange(e)} - aria-label={i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsSelectAriaLabel', - { defaultMessage: 'Language client' } - )} - /> - - - - ), - }, - { - title: i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchExperienceTitle', - { defaultMessage: 'Build a search experience with Elasticsearch' } - ), - children: ( - <> - -

- {i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchExperienceDescription', - { - defaultMessage: - 'Ready to add an engaging, modern search experience to your application or website? Search UI, Elastic’s JavaScript search framework for building world-class search experiences, was made for the task.', - } - )} -

-
- - - - - - {i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchUIMarketingLink', - { defaultMessage: 'Learn more about Search UI' } - )} - - - - - - - {i18n.translate( - 'xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchUIGitHubLink', - { defaultMessage: 'Search UI on GitHub' } - )} - - - - - - ), - }, - ]} - /> -
- - - - - -
+ {isFlyoutOpen && ( + setIsFlyoutOpen(false)} + setApiKey={saveApiKey} + username={user?.full_name || user?.username || ''} + /> + )} + +

+ {i18n.translate('xpack.enterpriseSearch.content.overview.gettingStarted.pageTitle', { + defaultMessage: 'Elasticsearch language clients', + })} +

+
+ + +

+ {i18n.translate( + 'xpack.enterpriseSearch.content.overview.gettingStarted.pageDescription', + { + defaultMessage: + "Set up your programming language client, ingest some data, and you'll be ready to start searching within minutes.", + } + )} +

+
+ + + setIsFlyoutOpen(true)} + codeArgs={codeArgs} + isPanelLeft + showPipelinesPanel + />
); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/index.ts b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/index.ts deleted file mode 100644 index 853898403e364..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/elasticsearch_guide/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -export { ElasticsearchGuide } from './elasticsearch_guide'; diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/layout/page_template.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/layout/page_template.tsx index f854246a9f9a7..81ba64913879e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/layout/page_template.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/components/layout/page_template.tsx @@ -22,6 +22,7 @@ export const EnterpriseSearchElasticsearchPageTemplate: React.FC { - const { http } = useValues(HttpLogic); const { apiKey, isGenerateModalOpen, indexPipelineParameters } = useValues(OverviewLogic); const { fetchIndexPipelineParameters, openGenerateModal, closeGenerateModal } = useActions(OverviewLogic); const { indexName } = useValues(IndexViewLogic); - const { services } = useKibana(); const cloudContext = useCloudDetails(); @@ -83,9 +47,7 @@ export const APIGettingStarted = () => { ingestPipeline: indexPipelineParameters.name, url: cloudContext.elasticsearchUrl || DEFAULT_URL, }; - const assetBasePath = http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets/client_libraries`); - const [selectedLanguage, setSelectedLanguage] = useState(curlDefinition); return ( <> {isGenerateModalOpen && ( @@ -93,322 +55,12 @@ export const APIGettingStarted = () => { )}

- {i18n.translate('xpack.enterpriseSearch.content.overview.gettingStarted.pageTitle', { - defaultMessage: 'Getting Started with Elastic API', + {i18n.translate('xpack.enterpriseSearch.gettingStarted.pageTitle', { + defaultMessage: 'Getting started with Elastic API', })}

- - {languageDefinitions.map((language, index) => ( - - - - ))} - - - - - - - -
- {i18n.translate( - 'xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeytitle', - { - defaultMessage: 'Generate an API key', - } - )} -
-
- - - {i18n.translate( - 'xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeydesc', - { - defaultMessage: - 'Your private, unique identifier for authentication and authorization.', - } - )} - -
- - - - - -

- {i18n.translate( - 'xpack.enterpriseSearch.content.overview.documementExample.generateApiKeyButton.createNew', - { defaultMessage: 'New' } - )} -

-
-
-
- - - KibanaLogic.values.navigateToUrl('/app/management/security/api_keys', { - shouldNotCreateHref: true, - }) - } - > - -

- {i18n.translate( - 'xpack.enterpriseSearch.content.overview.documementExample.generateApiKeyButton.viewAll', - { defaultMessage: 'Manage' } - )} -

-
-
-
-
-
-
-
- } - links={[]} - title={i18n.translate( - 'xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.panelTitle', - { - defaultMessage: 'Generate an API key', - } - )} - overviewPanelProps={{ color: 'plain', hasShadow: false }} - /> - - - - -
- {i18n.translate( - 'xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.elasticTitle', - { - defaultMessage: 'Store your Elasticsearch URL', - } - )} -
-
- - {i18n.translate( - 'xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.desc', - { - defaultMessage: 'Unique identifier for your deployment. ', - } - )} - -
- - - - {codeArgs.cloudId - ? dedent`{ - CloudID: "${codeArgs.cloudId}", - Url: "${codeArgs.url}", - }` - : codeArgs.url} - - - - - } - links={[]} - title={i18n.translate( - 'xpack.enterpriseSearch.overview.gettingStarted.cloudId.panelTitleElastic', - { - defaultMessage: 'Copy your Elasticsearch URL', - } - )} - overviewPanelProps={{ color: 'plain', hasShadow: false }} - /> - - - } - links={[]} - title={i18n.translate( - 'xpack.enterpriseSearch.overview.gettingStarted.configureClient.title', - { - defaultMessage: 'Configure your client', - } - )} - overviewPanelProps={{ color: 'plain', hasShadow: false }} - /> - - - } - links={[]} - title={i18n.translate( - 'xpack.enterpriseSearch.overview.gettingStarted.testConnection.title', - { - defaultMessage: 'Test your connection', - } - )} - overviewPanelProps={{ color: 'plain', hasShadow: false }} - /> - - } - links={[]} - title={i18n.translate('xpack.enterpriseSearch.overview.gettingStarted.ingestData.title', { - defaultMessage: 'Ingest Data', - })} - overviewPanelProps={{ color: 'plain', hasShadow: false }} - /> - - - } - links={[]} - title={i18n.translate('xpack.enterpriseSearch.overview.gettingStarted.searchQuery.title', { - defaultMessage: 'Build your first search query', - })} - overviewPanelProps={{ color: 'plain', hasShadow: false }} - /> + ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/getting_started.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/getting_started.tsx new file mode 100644 index 0000000000000..afe579827a019 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/getting_started.tsx @@ -0,0 +1,335 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; + +import { useValues } from 'kea'; + +import { EuiButton, EuiFlexItem, EuiLink, EuiSpacer, EuiText } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { + SelectClientPanel, + LanguageDefinition, + LanguageDefinitionSnippetArguments, + LanguageClientPanel, + InstallClientPanel, + OverviewPanel, + getLanguageDefinitionCodeSnippet, + getConsoleRequest, + CloudDetailsPanel, +} from '@kbn/search-api-panels'; + +import { ApiKey } from '@kbn/security-plugin/common'; + +import { PLUGIN_ID } from '../../../../common/constants'; +import { KibanaDeps } from '../../../../common/types'; + +import { icons } from '../../../assets/client_libraries'; +import { docLinks } from '../doc_links'; + +import { HttpLogic } from '../http'; + +import { curlDefinition } from './languages/curl'; +import { languageDefinitions } from './languages/languages'; +import { AddDataPanelContent } from './panels/add_data_panel_content'; +import { ApiKeyPanelContent } from './panels/api_key_panel_content'; +import { InitializeClientPanelContent } from './panels/initialize_client_panel_content'; +import { GettingStartedPipelinePanel } from './panels/pipeline_panel'; +import { SearchQueryPanelContent } from './panels/search_query_panel_content'; +import { TestConnectionPanelContent } from './panels/test_connection_panel_content'; + +interface GettingStartedProps { + apiKeys?: ApiKey[]; + codeArgs: LanguageDefinitionSnippetArguments; + isPanelLeft?: boolean; + openApiKeyModal: () => void; + showPipelinesPanel?: boolean; +} + +export const GettingStarted: React.FC = ({ + apiKeys, + codeArgs, + isPanelLeft = false, + openApiKeyModal, + showPipelinesPanel, +}) => { + const { http } = useValues(HttpLogic); + const { services } = useKibana(); + + const assetBasePath = http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets/client_libraries`); + + const [selectedLanguage, setSelectedLanguage] = useState(curlDefinition); + + return ( + <> + + {languageDefinitions.map((language, index) => ( + + + + ))} + + + + + ) : undefined + } + rightPanelContent={ + isPanelLeft ? undefined : ( + + ) + } + links={[]} + title={i18n.translate( + 'xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.panelTitle', + { + defaultMessage: 'Generate an API key', + } + )} + overviewPanelProps={{ color: 'plain', hasShadow: false }} + /> + + + + + ) : undefined + } + rightPanelContent={ + isPanelLeft ? undefined : ( + + ) + } + links={[]} + title={i18n.translate( + 'xpack.enterpriseSearch.overview.gettingStarted.configureClient.title', + { + defaultMessage: 'Configure your client', + } + )} + overviewPanelProps={{ color: 'plain', hasShadow: false }} + /> + + + ) : undefined + } + rightPanelContent={ + isPanelLeft ? undefined : ( + + ) + } + links={[]} + title={i18n.translate( + 'xpack.enterpriseSearch.overview.gettingStarted.testConnection.title', + { + defaultMessage: 'Test your connection', + } + )} + overviewPanelProps={{ color: 'plain', hasShadow: false }} + /> + + ) : undefined + } + rightPanelContent={ + isPanelLeft ? undefined : ( + + ) + } + links={[]} + title={i18n.translate('xpack.enterpriseSearch.overview.gettingStarted.ingestData.title', { + defaultMessage: 'Ingest Data', + })} + overviewPanelProps={{ color: 'plain', hasShadow: false }} + /> + + + ) : undefined + } + rightPanelContent={ + isPanelLeft ? undefined : ( + + ) + } + links={[]} + title={i18n.translate('xpack.enterpriseSearch.overview.gettingStarted.searchQuery.title', { + defaultMessage: 'Build your first search query', + })} + overviewPanelProps={{ color: 'plain', hasShadow: false }} + /> + {showPipelinesPanel && ( + + + {i18n.translate( + 'xpack.enterpriseSearch.gettingStarted.description.ingestPipelinesLink.link', + { + defaultMessage: 'ingest pipelines', + } + )} + + ), + }} + /> + + + + {i18n.translate( + 'xpack.enterpriseSearch.gettingStarted.pipeline.description.createButtonLabel', + { + defaultMessage: 'Create a pipeline', + } + )} + + + + } + leftPanelContent={} + links={[]} + overviewPanelProps={{ color: 'plain', hasShadow: false }} + title={i18n.translate('xpack.enterpriseSearch.pipeline.title', { + defaultMessage: 'Transform and enrich your data', + })} + /> + )} + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/console.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/console.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/console.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/console.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/constants.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/constants.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/constants.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/constants.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/curl.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/curl.ts similarity index 97% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/curl.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/curl.ts index 8bac32d754064..726052211f765 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/curl.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/curl.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { Languages, LanguageDefinition } from '@kbn/search-api-panels'; -import { docLinks } from '../../../../../../shared/doc_links'; +import { docLinks } from '../../doc_links'; import { ingestKeysToJSON } from './helpers'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/go.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/go.ts similarity index 98% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/go.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/go.ts index 6c504bba26bdc..7591ed942247c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/go.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/go.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { Languages, LanguageDefinition } from '@kbn/search-api-panels'; -import { docLinks } from '../../../../../../shared/doc_links'; +import { docLinks } from '../../doc_links'; import { ingestKeysToJSON } from './helpers'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/helpers.test.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/helpers.test.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/helpers.test.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/helpers.test.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/helpers.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/helpers.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/helpers.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/helpers.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/javascript.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/javascript.ts similarity index 98% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/javascript.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/javascript.ts index 51d7e4ef68625..fa90ed6ca6c62 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/javascript.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/javascript.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { Languages, LanguageDefinition } from '@kbn/search-api-panels'; -import { docLinks } from '../../../../../../shared/doc_links'; +import { docLinks } from '../../doc_links'; import { ingestKeysToJSON } from './helpers'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/languages.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/languages.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/languages.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/languages.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/php.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/php.ts similarity index 98% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/php.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/php.ts index 3146ca60af306..6851cdca14e8c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/php.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/php.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { Languages, LanguageDefinition } from '@kbn/search-api-panels'; -import { docLinks } from '../../../../../../shared/doc_links'; +import { docLinks } from '../../doc_links'; import { ingestKeysToPHP } from './helpers'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/python.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/python.ts similarity index 97% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/python.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/python.ts index 24723ba3632da..5be06e06d5831 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/python.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/python.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { Languages, LanguageDefinition } from '@kbn/search-api-panels'; -import { docLinks } from '../../../../../../shared/doc_links'; +import { docLinks } from '../../doc_links'; import { ingestKeysToJSON } from './helpers'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/ruby.ts b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/ruby.ts similarity index 97% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/ruby.ts rename to x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/ruby.ts index 43a104b0f7a8b..d2a2ac7d84c45 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/getting_started/languages/ruby.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/languages/ruby.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { Languages, LanguageDefinition } from '@kbn/search-api-panels'; -import { docLinks } from '../../../../../../shared/doc_links'; +import { docLinks } from '../../doc_links'; import { ingestKeysToRuby } from './helpers'; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/add_data_panel_content.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/add_data_panel_content.tsx new file mode 100644 index 0000000000000..7ab9053c765db --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/add_data_panel_content.tsx @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { + CodeBox, + getConsoleRequest, + getLanguageDefinitionCodeSnippet, + LanguageDefinition, + LanguageDefinitionSnippetArguments, +} from '@kbn/search-api-panels'; + +import { KibanaDeps } from '../../../../../common/types'; + +import { languageDefinitions } from '../languages/languages'; + +interface AddDataPanelContentProps { + assetBasePath: string; + codeArgs: LanguageDefinitionSnippetArguments; + selectedLanguage: LanguageDefinition; + setSelectedLanguage: (selectedLanguage: LanguageDefinition) => void; +} + +export const AddDataPanelContent: React.FC = ({ + assetBasePath, + codeArgs, + selectedLanguage, + setSelectedLanguage, +}) => { + const { services } = useKibana(); + return ( + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/api_key_panel_content.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/api_key_panel_content.tsx new file mode 100644 index 0000000000000..987e6fa4232d0 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/api_key_panel_content.tsx @@ -0,0 +1,129 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { + EuiPanel, + EuiFlexGroup, + EuiFlexItem, + EuiTitle, + EuiSpacer, + EuiText, + EuiButton, + EuiBadge, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; + +import { ApiKey } from '@kbn/security-plugin/common'; + +import { KibanaLogic } from '../../kibana'; + +interface ApiKeyPanelContent { + apiKeys?: ApiKey[]; + openApiKeyModal: () => void; +} + +export const ApiKeyPanelContent: React.FC = ({ apiKeys, openApiKeyModal }) => { + return ( + + + + +
+ {i18n.translate( + 'xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeytitle', + { + defaultMessage: 'Generate an API key', + } + )} +
+
+ + + {i18n.translate( + 'xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeydesc', + { + defaultMessage: + 'Your private, unique identifier for authentication and authorization.', + } + )} + +
+ + + + + + + +

+ {i18n.translate( + 'xpack.enterpriseSearch.content.overview.documementExample.generateApiKeyButton.createNew', + { defaultMessage: 'New' } + )} +

+
+
+
+ + + KibanaLogic.values.navigateToUrl('/app/management/security/api_keys', { + shouldNotCreateHref: true, + }) + } + > + +

+ {i18n.translate( + 'xpack.enterpriseSearch.content.overview.documementExample.generateApiKeyButton.viewAll', + { defaultMessage: 'Manage' } + )} +

+
+
+
+
+
+ + + + + 0 ? 'success' : 'warning'} + data-test-subj="api-keys-count-badge" + > + {apiKeys?.length || 0} + + ), + }} + /> + + + + +
+
+
+
+ ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/initialize_client_panel_content.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/initialize_client_panel_content.tsx new file mode 100644 index 0000000000000..33260011d8381 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/initialize_client_panel_content.tsx @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { + CodeBox, + getConsoleRequest, + getLanguageDefinitionCodeSnippet, + LanguageDefinition, + LanguageDefinitionSnippetArguments, +} from '@kbn/search-api-panels'; + +import { KibanaDeps } from '../../../../../common/types'; + +import { languageDefinitions } from '../languages/languages'; + +interface InitializeClientPanelContentProps { + assetBasePath: string; + codeArgs: LanguageDefinitionSnippetArguments; + selectedLanguage: LanguageDefinition; + setSelectedLanguage: (selectedLanguage: LanguageDefinition) => void; +} + +export const InitializeClientPanelContent: React.FC = ({ + assetBasePath, + codeArgs, + selectedLanguage, + setSelectedLanguage, +}) => { + const { services } = useKibana(); + return ( + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/pipeline_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/pipeline_panel.tsx new file mode 100644 index 0000000000000..8ccd789d230c4 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/pipeline_panel.tsx @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { PipelinePanel } from '@kbn/search-api-panels'; + +import clusterImage from '../../../../assets/images/cluster.svg'; +import cutImage from '../../../../assets/images/cut.svg'; +import reporterImage from '../../../../assets/images/reporter.svg'; + +export const GettingStartedPipelinePanel: React.FC = () => { + return ( + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/search_query_panel_content.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/search_query_panel_content.tsx new file mode 100644 index 0000000000000..2ce2801f033e0 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/search_query_panel_content.tsx @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { + CodeBox, + getLanguageDefinitionCodeSnippet, + LanguageDefinition, + LanguageDefinitionSnippetArguments, +} from '@kbn/search-api-panels'; + +import { KibanaDeps } from '../../../../../common/types'; + +import { consoleDefinition } from '../languages/console'; +import { languageDefinitions } from '../languages/languages'; + +interface SearchQueryPanelContentProps { + assetBasePath: string; + codeArgs: LanguageDefinitionSnippetArguments; + selectedLanguage: LanguageDefinition; + setSelectedLanguage: (selectedLanguage: LanguageDefinition) => void; +} + +export const SearchQueryPanelContent: React.FC = ({ + assetBasePath, + codeArgs, + selectedLanguage, + setSelectedLanguage, +}) => { + const { services } = useKibana(); + return ( + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/test_connection_panel_content.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/test_connection_panel_content.tsx new file mode 100644 index 0000000000000..f185671fabbb4 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/panels/test_connection_panel_content.tsx @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { + CodeBox, + getConsoleRequest, + getLanguageDefinitionCodeSnippet, + LanguageDefinition, + LanguageDefinitionSnippetArguments, +} from '@kbn/search-api-panels'; + +import { KibanaDeps } from '../../../../../common/types'; + +import { languageDefinitions } from '../languages/languages'; + +interface TestConnectionPanelContentProps { + assetBasePath: string; + codeArgs: LanguageDefinitionSnippetArguments; + selectedLanguage: LanguageDefinition; + setSelectedLanguage: (selectedLanguage: LanguageDefinition) => void; +} + +export const TestConnectionPanelContent: React.FC = ({ + assetBasePath, + codeArgs, + selectedLanguage, + setSelectedLanguage, +}) => { + const { services } = useKibana(); + return ( + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/endpoints_header_action.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/endpoints_header_action.tsx index 9a2fc6e01c59a..87ffe6d91df25 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/endpoints_header_action.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/endpoints_header_action.tsx @@ -27,33 +27,31 @@ import { EuiHorizontalRule, EuiButton, } from '@elastic/eui'; + import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; +import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; import { ELASTICSEARCH_URL_PLACEHOLDER } from '@kbn/search-api-panels/constants'; +import { Status } from '../../../../common/types/api'; + import endpointIcon from '../../../assets/images/endpoint_icon.svg'; +import { CreateApiKeyAPILogic } from '../../enterprise_search_overview/api/create_elasticsearch_api_key_logic'; import { FetchApiKeysAPILogic } from '../../enterprise_search_overview/api/fetch_api_keys_logic'; +import { CreateApiKeyFlyout } from '../api_key/create_api_key_flyout'; import { KibanaLogic } from '../kibana'; -interface EndpointsHeaderActionProps { - isFlyoutOpen: boolean; - setIsFlyoutOpen: (isOpen: boolean) => void; -} - -export const EndpointsHeaderAction: React.FC = ({ - setIsFlyoutOpen, -}) => { +export const EndpointsHeaderAction: React.FC = () => { const [isPopoverOpen, setPopoverOpen] = useState(false); const { cloud, navigateToUrl } = useValues(KibanaLogic); const { makeRequest } = useActions(FetchApiKeysAPILogic); const { data } = useValues(FetchApiKeysAPILogic); + const [isFlyoutOpen, setIsFlyoutOpen] = useState(false); + const { user } = useValues(KibanaLogic); + const { makeRequest: saveApiKey } = useActions(CreateApiKeyAPILogic); + const { data: apiKey, error, status } = useValues(CreateApiKeyAPILogic); useEffect(() => makeRequest({}), []); - if (!cloud) { - return null; - } - const COPIED_LABEL = i18n.translate('xpack.enterpriseSearch.pageTemplate.apiKey.copied', { defaultMessage: 'Copied', }); @@ -76,7 +74,17 @@ export const EndpointsHeaderAction: React.FC = ({ ); return ( - <> + + {isFlyoutOpen && ( + setIsFlyoutOpen(false)} + setApiKey={saveApiKey} + username={user?.full_name || user?.username || ''} + /> + )} = ({ , - - - {i18n.translate('xpack.enterpriseSearch.apiKey.cloudId', { - defaultMessage: 'Cloud ID:', - })} - - + ...(Boolean(cloudId) + ? [ + + + {i18n.translate('xpack.enterpriseSearch.apiKey.cloudId', { + defaultMessage: 'Cloud ID:', + })} + + - - - {cloudId} - - - - {(copy) => ( - - )} - - - - , + + + {cloudId} + + + + {(copy) => ( + + )} + + + + , + ] + : []), @@ -192,7 +204,10 @@ export const EndpointsHeaderAction: React.FC = ({ setIsFlyoutOpen(true)} + onClick={() => { + setIsFlyoutOpen(true); + setPopoverOpen(false); + }} data-test-subj="new-api-key-button" fullWidth > @@ -206,6 +221,6 @@ export const EndpointsHeaderAction: React.FC = ({ ]} /> - + ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx index bb5a126a653e7..260b95316b001 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx @@ -5,22 +5,17 @@ * 2.0. */ -import React, { useState } from 'react'; +import React, { useEffect } from 'react'; import classNames from 'classnames'; -import { useActions, useValues } from 'kea'; +import { useValues } from 'kea'; import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { I18nProvider } from '@kbn/i18n-react'; import { KibanaPageTemplate, KibanaPageTemplateProps } from '@kbn/shared-ux-page-kibana-template'; -import { Status } from '../../../../common/types/api'; - -import { CreateApiKeyAPILogic } from '../../enterprise_search_overview/api/create_elasticsearch_api_key_logic'; -import { CreateApiKeyFlyout } from '../api_key/create_api_key_flyout'; import { FlashMessages } from '../flash_messages'; import { HttpLogic } from '../http'; import { KibanaLogic } from '../kibana'; @@ -69,25 +64,18 @@ export const EnterpriseSearchPageTemplateWrapper: React.FC = ...pageTemplateProps }) => { const { readOnlyMode } = useValues(HttpLogic); - const { cloud, renderHeaderActions, user } = useValues(KibanaLogic); - const { makeRequest: saveApiKey } = useActions(CreateApiKeyAPILogic); - const { data: apiKey, error, status } = useValues(CreateApiKeyAPILogic); + const { renderHeaderActions } = useValues(KibanaLogic); const hasCustomEmptyState = !!emptyState; const showCustomEmptyState = hasCustomEmptyState && isEmptyState; const navIcon = solutionNavIcon ?? 'logoEnterpriseSearch'; - const [isFlyoutOpen, setIsFlyoutOpen] = useState(false); - const HeaderAction: React.FC<{}> = () => ( - - - - ); - - if (cloud && useEndpointHeaderActions) { - renderHeaderActions(HeaderAction); - } + useEffect(() => { + if (useEndpointHeaderActions) { + renderHeaderActions(EndpointsHeaderAction); + } + }, []); return ( = isEmptyState={isEmptyState && !isLoading} solutionNav={solutionNav && solutionNav.items ? { icon: navIcon, ...solutionNav } : undefined} > - {isFlyoutOpen && ( - setIsFlyoutOpen(false)} - setApiKey={saveApiKey} - username={user?.full_name || user?.username || ''} - /> - )} {setPageChrome} {readOnlyMode && ( <> diff --git a/x-pack/plugins/enterprise_search/public/assets/images/cluster.svg b/x-pack/plugins/enterprise_search/public/assets/images/cluster.svg new file mode 100644 index 0000000000000..99d4d0a731377 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/images/cluster.svg @@ -0,0 +1,4 @@ + + + + diff --git a/x-pack/plugins/enterprise_search/public/assets/images/cut.svg b/x-pack/plugins/enterprise_search/public/assets/images/cut.svg new file mode 100644 index 0000000000000..58d33d453d716 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/images/cut.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/x-pack/plugins/enterprise_search/public/assets/images/reporter.svg b/x-pack/plugins/enterprise_search/public/assets/images/reporter.svg new file mode 100644 index 0000000000000..bfd2a2afe869c --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/images/reporter.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/x-pack/plugins/serverless_search/public/application/components/overview.tsx b/x-pack/plugins/serverless_search/public/application/components/overview.tsx index ba9c65a93d6d4..d5e1c84f2aec6 100644 --- a/x-pack/plugins/serverless_search/public/application/components/overview.tsx +++ b/x-pack/plugins/serverless_search/public/application/components/overview.tsx @@ -36,6 +36,7 @@ import type { LanguageDefinitionSnippetArguments, } from '@kbn/search-api-panels'; import { useLocation } from 'react-router-dom'; +import { CloudDetailsPanel, PipelinePanel } from '@kbn/search-api-panels'; import { docLinks } from '../../../common/doc_links'; import { useKibanaServices } from '../hooks/use_kibana'; import { useAssetBasePath } from '../hooks/use_asset_base_path'; @@ -52,8 +53,6 @@ import { ApiKeyPanel } from './api_key/api_key'; import { ConnectorsCallout } from './connectors_callout'; import { ConnectorIngestionPanel } from './connectors_ingestion'; import { PipelineButtonOverview } from './pipeline_button_overview'; -import { PipelinePanel } from './pipeline_panel'; -import { CloudDetailsPanel } from './overview/cloud_details'; export const ElasticsearchOverview = () => { const [selectedLanguage, setSelectedLanguage] = useState(javaDefinition); @@ -311,7 +310,13 @@ export const ElasticsearchOverview = () => { }} /> } - leftPanelContent={} + leftPanelContent={ + + } links={[]} title={i18n.translate('xpack.serverlessSearch.pipeline.title', { defaultMessage: 'Transform and enrich your data', diff --git a/x-pack/plugins/serverless_search/public/application/components/overview/cloud_details.tsx b/x-pack/plugins/serverless_search/public/application/components/overview/cloud_details.tsx deleted file mode 100644 index 2b192d3f80520..0000000000000 --- a/x-pack/plugins/serverless_search/public/application/components/overview/cloud_details.tsx +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useState } from 'react'; -import { - EuiCheckableCard, - EuiCodeBlock, - EuiFlexGroup, - EuiFlexItem, - EuiPanel, - EuiSpacer, - EuiText, - EuiThemeProvider, - EuiTitle, - EuiBadge, -} from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { OverviewPanel } from '@kbn/search-api-panels'; - -export interface CloudDetailsPanelProps { - cloudId?: string; - elasticsearchUrl?: string; -} - -enum CloudDetail { - ElasticsearchEndpoint = 'es_url', - CloudId = 'cloud_id', -} - -export const CloudDetailsPanel = ({ cloudId, elasticsearchUrl }: CloudDetailsPanelProps) => { - const [selectedDetail, setSelectedCloudDetail] = useState( - CloudDetail.ElasticsearchEndpoint - ); - return ( - - - - {selectedDetail === CloudDetail.CloudId && cloudId} - {selectedDetail === CloudDetail.ElasticsearchEndpoint && elasticsearchUrl} - - -
- } - links={[]} - title={i18n.translate('xpack.serverlessSearch.cloudIdDetails.title', { - defaultMessage: 'Copy your connection details', - })} - > - - - - -
- -
-
-
- - - - - - - - - } - checked={selectedDetail === CloudDetail.ElasticsearchEndpoint} - onChange={() => setSelectedCloudDetail(CloudDetail.ElasticsearchEndpoint)} - > - -

- -

-
-
- - -
- -
- - } - checked={selectedDetail === CloudDetail.CloudId} - onChange={() => setSelectedCloudDetail(CloudDetail.CloudId)} - > - -

- -

-
-
- - ); -}; diff --git a/x-pack/plugins/serverless_search/public/application/components/pipeline_button_overview.tsx b/x-pack/plugins/serverless_search/public/application/components/pipeline_button_overview.tsx index dd33faad7f6f7..7554cad412ed3 100644 --- a/x-pack/plugins/serverless_search/public/application/components/pipeline_button_overview.tsx +++ b/x-pack/plugins/serverless_search/public/application/components/pipeline_button_overview.tsx @@ -13,9 +13,7 @@ import { i18n } from '@kbn/i18n'; import { useKibanaServices } from '../hooks/use_kibana'; export const PipelineButtonOverview: React.FC = () => { - const { - application: { navigateToUrl }, - } = useKibanaServices(); + const { http } = useKibanaServices(); return ( <> @@ -23,7 +21,7 @@ export const PipelineButtonOverview: React.FC = () => { navigateToUrl('/app/management/ingest/ingest_pipelines/create')} + href={http.basePath.prepend('/app/management/ingest/ingest_pipelines/create')} data-test-subj="create-a-pipeline-button" > diff --git a/x-pack/plugins/serverless_search/tsconfig.json b/x-pack/plugins/serverless_search/tsconfig.json index 3f79fa5c9277a..6e00a0f988c2d 100644 --- a/x-pack/plugins/serverless_search/tsconfig.json +++ b/x-pack/plugins/serverless_search/tsconfig.json @@ -9,7 +9,7 @@ "public/**/*.ts", "public/**/*.tsx", "server/**/*.ts", - "../../../typings/**/*" + "../../../typings/**/*", ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 1f53d831fae6c..512a0f74eaec4 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -14659,9 +14659,6 @@ "xpack.enterpriseSearch.content.overview.generateApiKeyModal.info": "Avant de pouvoir commencer à publier des documents dans votre index Elasticsearch, vous devez créer au moins une clé d’API.", "xpack.enterpriseSearch.content.overview.generateApiKeyModal.learnMore": "En savoir plus sur les clés d’API", "xpack.enterpriseSearch.content.overview.generateApiKeyModal.title": "Générer une clé d’API", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.desc": "Identificateur unique pour votre déploiement. ", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.description": "Il vous faut identifier votre déploiement.", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.elasticTitle": "Stockez votre ULR Elasticsearch", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeydesc": "Identifiant privé et unique pour l'authentification et l'autorisation.", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeytitle": "Générer une clé d’API", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.description": "Il vous faut votre clé d'API privée pour connecter votre appareil en toute sécurité. Copiez-la dans un endroit sûr.", @@ -15194,22 +15191,6 @@ "xpack.enterpriseSearch.overview.elasticsearchCard.button": "Démarrer", "xpack.enterpriseSearch.overview.elasticsearchCard.description": "Concevez et créez des applications de recherche performantes et pertinentes ou des implémentations de recherche à grande échelle directement dans Elasticsearch", "xpack.enterpriseSearch.overview.elasticsearchCard.heading": "Lancez-vous avec Elasticsearch", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.cloudIdLabel": "Identifiant du cloud", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.copyCloudIdAriaLabel": "Copier l'Identifiant du cloud", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.heading": "Mon Déploiement", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.manageApiKeysLink": "Gérer les clés d'API", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.manageLink": "Gérer", - "xpack.enterpriseSearch.overview.elasticsearchGuide.connectToElasticsearchDescription": "Elastic construit et assure la maintenance des clients dans plusieurs langues populaires et notre communauté a contribué à beaucoup d'autres.", - "xpack.enterpriseSearch.overview.elasticsearchGuide.connectToElasticsearchTitle": "Se connecter à Elasticsearch", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsLink": "En savoir plus sur les clients Elasticsearch", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsSelectAriaLabel": "Clients de langage", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsSelectLabel": "Sélectionner un client", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchDescription": "Elasticsearch fournit les outils de bas niveau dont vous avez besoin pour créer une recherche rapide et pertinente pour votre site web ou votre application. Grâce à sa puissance et sa flexibilité, Elasticsearch peut gérer des cas d'utilisation de toutes sortes en lien avec la recherche.", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchExperienceDescription": "Vous êtes prêt à ajouter une expérience de recherche moderne et attrayante à votre application ou à votre site web ? Search UI, le cadre de recherche JavaScript d'Elastic permettant de créer des expériences de recherche de classe mondiale, a été conçu pour cette tâche.", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchExperienceTitle": "Construire une expérience de recherche avec Elasticsearch", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchUIGitHubLink": "Search UI sur GitHub", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchUIMarketingLink": "En savoir plus sur Search UI", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchTitle": "Prise en main d'Elasticsearch", "xpack.enterpriseSearch.overview.elasticsearchResources.createIndex": "Créer un nouvel index", "xpack.enterpriseSearch.overview.elasticsearchResources.elasticsearchClients": "Configurer un client de langage", "xpack.enterpriseSearch.overview.elasticsearchResources.gettingStarted": "Prise en main d'Elasticsearch", @@ -15218,7 +15199,6 @@ "xpack.enterpriseSearch.overview.emptyState.buttonTitle": "Ajouter du contenu à Search", "xpack.enterpriseSearch.overview.emptyState.footerLinkTitle": "En savoir plus", "xpack.enterpriseSearch.overview.emptyState.heading": "Ajouter du contenu à Search", - "xpack.enterpriseSearch.overview.gettingStarted.cloudId.panelTitleElastic": "Copier votre ULR Elasticsearch", "xpack.enterpriseSearch.overview.gettingStarted.configureClient.description": "Initialiser votre client avec votre clé d'API unique", "xpack.enterpriseSearch.overview.gettingStarted.configureClient.title": "Configurer votre client", "xpack.enterpriseSearch.overview.gettingStarted.ingestData.description": "Ajoutez des données à votre flux de données ou à votre index pour les rendre interrogeables", @@ -36775,8 +36755,6 @@ "xpack.serverlessSearch.app.elasticsearch.title": "Elasticsearch", "xpack.serverlessSearch.back": "Retour", "xpack.serverlessSearch.cancel": "Annuler", - "xpack.serverlessSearch.cloudIdDetails.description": "Il vous faut l'identifiant et l'URL du cloud pour identifier votre projet et vous y connecter.", - "xpack.serverlessSearch.cloudIdDetails.title": "Copiez vos informations de connexion", "xpack.serverlessSearch.configureClient.basicConfigLabel": "Configuration de base", "xpack.serverlessSearch.configureClient.description": "Initialiser votre client avec votre clé d’API et votre identifiant de cloud uniques", "xpack.serverlessSearch.configureClient.title": "Configurer votre client", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 5d0a766d14300..6dfa6e3ab9bab 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -14672,9 +14672,6 @@ "xpack.enterpriseSearch.content.overview.generateApiKeyModal.info": "ElasticsearchドキュメントをElasticsearchインデックスに送信する前に、少なくとも1つのAPIキーを作成する必要があります。", "xpack.enterpriseSearch.content.overview.generateApiKeyModal.learnMore": "APIキーの詳細", "xpack.enterpriseSearch.content.overview.generateApiKeyModal.title": "APIキーを生成", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.desc": "デプロイ固有の識別子。", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.description": "デプロイを特定するために必要です。", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.elasticTitle": "Elasticsearch URLを保存", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeydesc": "認証と認可のための非公開の一意の識別子。", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeytitle": "APIキーを生成", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.description": "プロジェクトに安全に接続するには、非公開のAPIキーが必要です。安全な場所にコピーしてください。", @@ -15207,22 +15204,6 @@ "xpack.enterpriseSearch.overview.elasticsearchCard.button": "使ってみる", "xpack.enterpriseSearch.overview.elasticsearchCard.description": "Elasticsearchで直接、パフォーマンスと関連性が高い、検索対応アプリケーションまたは大規模検索実装を設計して構築", "xpack.enterpriseSearch.overview.elasticsearchCard.heading": "Elasticsearchをはじめよう", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.cloudIdLabel": "クラウドID", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.copyCloudIdAriaLabel": "クラウドIDのコピー", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.heading": "マイデプロイ", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.manageApiKeysLink": "APIキーの管理", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.manageLink": "管理", - "xpack.enterpriseSearch.overview.elasticsearchGuide.connectToElasticsearchDescription": "Elasticは複数の一般的な言語でクライアントを構築および保守します。Elasticのコミュニティはさらに多くを提供しています。", - "xpack.enterpriseSearch.overview.elasticsearchGuide.connectToElasticsearchTitle": "Elasticsearchに接続", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsLink": "Elasticsearchクライアントの詳細", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsSelectAriaLabel": "言語クライアント", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsSelectLabel": "クライアントを選択", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchDescription": "Elasticsearchは、Webサイトやアプリケーションで高速かつ関連性の高い検索を構築するために必要な低水準ツールを提供しています。高性能と柔軟性を備えているため、Elasticsearchはすべての形とサイズの検索ユースケースを処理できます。", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchExperienceDescription": "興味をそそる最新の検索エクスペリエンスをアプリケーションやWebサイトに追加しませんか。世界クラスの検索エクスペリエンスを構築するためのElasticのJavaScript検索フレームワークであるSearch UIを活用できます。", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchExperienceTitle": "Elasticsearchで検索エクスペリエンスを構築", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchUIGitHubLink": "GitHubのSearch UI", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchUIMarketingLink": "Search UIの詳細を参照してください", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchTitle": "Elasticsearchを使い始める", "xpack.enterpriseSearch.overview.elasticsearchResources.createIndex": "新しいインデックスを作成", "xpack.enterpriseSearch.overview.elasticsearchResources.elasticsearchClients": "言語クライアントのセットアップ", "xpack.enterpriseSearch.overview.elasticsearchResources.gettingStarted": "Elasticsearchを使い始める", @@ -15231,7 +15212,6 @@ "xpack.enterpriseSearch.overview.emptyState.buttonTitle": "Searchにコンテンツを追加", "xpack.enterpriseSearch.overview.emptyState.footerLinkTitle": "詳細", "xpack.enterpriseSearch.overview.emptyState.heading": "Searchにコンテンツを追加", - "xpack.enterpriseSearch.overview.gettingStarted.cloudId.panelTitleElastic": "Elasticsearch URLをコピー", "xpack.enterpriseSearch.overview.gettingStarted.configureClient.description": "一意のAPIキーでクライアントを初期化", "xpack.enterpriseSearch.overview.gettingStarted.configureClient.title": "クライアントを構成", "xpack.enterpriseSearch.overview.gettingStarted.ingestData.description": "データストリームやインデックスにデータを追加して、データを検索可能にする", @@ -36774,8 +36754,6 @@ "xpack.serverlessSearch.app.elasticsearch.title": "Elasticsearch", "xpack.serverlessSearch.back": "戻る", "xpack.serverlessSearch.cancel": "キャンセル", - "xpack.serverlessSearch.cloudIdDetails.description": "プロジェクトを識別して、それに接続するには、クラウドIDとクラウドURLが必要です。", - "xpack.serverlessSearch.cloudIdDetails.title": "接続詳細情報をコピー", "xpack.serverlessSearch.configureClient.basicConfigLabel": "基本構成", "xpack.serverlessSearch.configureClient.description": "一意のAPIキーとCloud IDでクライアントを初期化", "xpack.serverlessSearch.configureClient.title": "クライアントを構成", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 084532e4917d1..4547de925cb33 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -14672,9 +14672,6 @@ "xpack.enterpriseSearch.content.overview.generateApiKeyModal.info": "在开始将文档发布到 Elasticsearch 索引之前,您至少需要创建一个 API 密钥。", "xpack.enterpriseSearch.content.overview.generateApiKeyModal.learnMore": "进一步了解 API 密钥", "xpack.enterpriseSearch.content.overview.generateApiKeyModal.title": "生成 API 密钥", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.desc": "您的部署的唯一标识符。", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.description": "需要此项来标识您的部署。", - "xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.elasticTitle": "存储您的 Elasticsearch URL", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeydesc": "用于身份验证和授权的专用唯一标识符。", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeytitle": "生成 API 密钥", "xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.description": "您需要私有 API 密钥以便安全连接到您的项目。将其复制到某个安全位置。", @@ -15207,22 +15204,6 @@ "xpack.enterpriseSearch.overview.elasticsearchCard.button": "开始使用", "xpack.enterpriseSearch.overview.elasticsearchCard.description": "直接在 Elasticsearch 中设计并构建由相关搜索提供支持的高性能应用程序或大规模搜索实现", "xpack.enterpriseSearch.overview.elasticsearchCard.heading": "Elasticsearch 入门", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.cloudIdLabel": "云 ID", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.copyCloudIdAriaLabel": "复制云 ID", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.heading": "我的部署", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.manageApiKeysLink": "管理 API 密钥", - "xpack.enterpriseSearch.overview.elasticsearchCloudId.manageLink": "管理", - "xpack.enterpriseSearch.overview.elasticsearchGuide.connectToElasticsearchDescription": "Elastic 以几种流行语言构建和维护客户端,我们的社区也做出了许多贡献。", - "xpack.enterpriseSearch.overview.elasticsearchGuide.connectToElasticsearchTitle": "连接到 Elasticsearch", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsLink": "详细了解 Elasticsearch 客户端", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsSelectAriaLabel": "语言客户端", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchClientsSelectLabel": "选择客户端", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchDescription": "Elasticsearch 提供了为您的网站或应用程序构建快速的相关搜索所需的低级工具。由于功能强大而灵活,Elasticsearch 可处理所有形状和规模的搜索用例。", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchExperienceDescription": "准备为您的应用程序或网站添加富于吸引力的现代搜索体验?搜索 UI 是 Elastic 用于构建世界级搜索体验的 JavaScript 搜索框架,它专为执行该任务而设计。", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchExperienceTitle": "使用 Elasticsearch 构建搜索体验", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchUIGitHubLink": "GitHub 上的搜索 UI", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchSearchUIMarketingLink": "详细了解搜索 UI", - "xpack.enterpriseSearch.overview.elasticsearchGuide.elasticsearchTitle": "Elasticsearch 入门", "xpack.enterpriseSearch.overview.elasticsearchResources.createIndex": "创建新索引", "xpack.enterpriseSearch.overview.elasticsearchResources.elasticsearchClients": "设置语言客户端", "xpack.enterpriseSearch.overview.elasticsearchResources.gettingStarted": "Elasticsearch 入门", @@ -15231,7 +15212,6 @@ "xpack.enterpriseSearch.overview.emptyState.buttonTitle": "添加内容到 Search", "xpack.enterpriseSearch.overview.emptyState.footerLinkTitle": "了解详情", "xpack.enterpriseSearch.overview.emptyState.heading": "添加内容到 Search", - "xpack.enterpriseSearch.overview.gettingStarted.cloudId.panelTitleElastic": "复制您的 Elasticsearch URL", "xpack.enterpriseSearch.overview.gettingStarted.configureClient.description": "使用唯一 API 密钥对客户端进行初始化", "xpack.enterpriseSearch.overview.gettingStarted.configureClient.title": "配置客户端", "xpack.enterpriseSearch.overview.gettingStarted.ingestData.description": "将数据添加到数据流或索引,使其可进行搜索", @@ -36769,8 +36749,6 @@ "xpack.serverlessSearch.app.elasticsearch.title": "Elasticsearch", "xpack.serverlessSearch.back": "返回", "xpack.serverlessSearch.cancel": "取消", - "xpack.serverlessSearch.cloudIdDetails.description": "您需要云 ID 和云 URL 以标识并连接到您的项目。", - "xpack.serverlessSearch.cloudIdDetails.title": "复制连接详情", "xpack.serverlessSearch.configureClient.basicConfigLabel": "基本配置", "xpack.serverlessSearch.configureClient.description": "使用唯一 API 密钥和云 ID 对客户端进行初始化", "xpack.serverlessSearch.configureClient.title": "配置客户端",