diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 08d459ac5e7fd..4065d3b915fe7 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -20,8 +20,8 @@ if (!prConfig) { } const GITHUB_PR_LABELS = process.env.GITHUB_PR_LABELS ?? ''; -const REQUIRED_PATHS = prConfig.always_require_ci_on_changed.map((r) => new RegExp(r, 'i')); -const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed.map((r) => new RegExp(r, 'i')); +const REQUIRED_PATHS = prConfig.always_require_ci_on_changed!.map((r) => new RegExp(r, 'i')); +const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed!.map((r) => new RegExp(r, 'i')); const getPipeline = (filename: string, removeSteps = true) => { const str = fs.readFileSync(filename).toString(); diff --git a/.eslintrc.js b/.eslintrc.js index f2e54b2d116ae..e46dde5a3c56f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -974,6 +974,12 @@ module.exports = { '@kbn/telemetry/event_generating_elements_should_be_instrumented': 'error', }, }, + { + files: ['x-pack/plugins/search*/**/*.tsx', 'x-pack/packages/search/**/*.tsx'], + rules: { + '@kbn/telemetry/event_generating_elements_should_be_instrumented': 'warn', + }, + }, { files: [ 'x-pack/plugins/observability_solution/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', diff --git a/packages/kbn-search-api-keys-components/src/components/api_key_form.tsx b/packages/kbn-search-api-keys-components/src/components/api_key_form.tsx index ccd169c413bb1..02e5a46b640ac 100644 --- a/packages/kbn-search-api-keys-components/src/components/api_key_form.tsx +++ b/packages/kbn-search-api-keys-components/src/components/api_key_form.tsx @@ -43,6 +43,7 @@ export const ApiKeyForm: React.FC = ({ hasTitle = true }) => { value={displayedApiKey} copyValue={apiKey} dataTestSubj="apiKeyFormAPIKey" + copyValueDataTestSubj="APIKeyButtonCopy" actions={[ void; } export const TryInConsoleButton = ({ request, @@ -38,6 +40,8 @@ export const TryInConsoleButton = ({ content = RUN_IN_CONSOLE, showIcon = true, type = 'emptyButton', + telemetryId, + onClick: onClickProp, }: TryInConsoleButtonProps) => { const url = sharePlugin?.url; const canShowDevtools = !!application?.capabilities?.dev_tools?.show; @@ -65,6 +69,7 @@ export const TryInConsoleButton = ({ } else { window.open(consolePreviewLink, '_blank', 'noreferrer'); } + onClickProp?.(); }; const getAriaLabel = () => { @@ -84,6 +89,7 @@ export const TryInConsoleButton = ({ const commonProps = { 'data-test-subj': type === 'link' ? 'tryInConsoleLink' : 'tryInConsoleButton', 'aria-label': getAriaLabel(), + 'data-telemetry-id': telemetryId, onClick, }; const iconType = showIcon ? 'play' : undefined; diff --git a/src/plugins/custom_integrations/common/index.ts b/src/plugins/custom_integrations/common/index.ts index 4b20974976d09..884d5357bf912 100755 --- a/src/plugins/custom_integrations/common/index.ts +++ b/src/plugins/custom_integrations/common/index.ts @@ -20,7 +20,6 @@ export const INTEGRATION_CATEGORY_DISPLAY: { advanced_analytics_ueba: { title: 'Advanced Analytics (UEBA', parent_id: 'security' }, analytics_engine: { title: 'Analytics Engine', parent_id: 'observability' }, application_observability: { title: 'Application', parent_id: 'observability' }, - app_search: { title: 'Application Search', parent_id: 'enterprise_search' }, auditd: { title: 'AuditD', parent_id: 'security' }, authentication: { title: 'Authentication', parent_id: 'security' }, aws: { title: 'AWS', parent_id: undefined }, @@ -29,10 +28,10 @@ export const INTEGRATION_CATEGORY_DISPLAY: { cdn_security: { title: 'Content Delivery Network', parent_id: 'security' }, cloud: { title: 'Cloud', parent_id: undefined }, config_management: { title: 'Config management', parent_id: undefined }, - connector: { title: 'Connector', parent_id: 'enterprise_search' }, - connector_client: { title: 'Connector Client', parent_id: 'enterprise_search' }, + connector: { title: 'Connector', parent_id: 'search' }, + connector_client: { title: 'Connector Client', parent_id: 'search' }, containers: { title: 'Containers', parent_id: undefined }, - crawler: { title: 'Crawler', parent_id: 'enterprise_search' }, + crawler: { title: 'Crawler', parent_id: 'search' }, credential_management: { title: 'Credential Management', parent_id: 'security' }, crm: { title: 'CRM', parent_id: undefined }, custom: { title: 'Custom', parent_id: undefined }, @@ -45,7 +44,6 @@ export const INTEGRATION_CATEGORY_DISPLAY: { elasticsearch_sdk: { title: 'Elasticsearch SDK', parent_id: undefined }, elastic_stack: { title: 'Elastic Stack', parent_id: undefined }, email_security: { title: 'Email', parent_id: 'security' }, - enterprise_search: { title: 'Search', parent_id: undefined }, firewall_security: { title: 'Firewall', parent_id: 'security' }, google_cloud: { title: 'Google Cloud', parent_id: undefined }, iam: { title: 'Identity and Access Management', parent_id: 'security' }, @@ -53,12 +51,12 @@ export const INTEGRATION_CATEGORY_DISPLAY: { infrastructure: { title: 'Infrastructure', parent_id: undefined }, java_observability: { title: 'Java', parent_id: 'observability' }, kubernetes: { title: 'Kubernetes', parent_id: 'observability' }, - language_client: { title: 'Language Client', parent_id: 'enterprise_search' }, + language_client: { title: 'Language Client', parent_id: 'search' }, languages: { title: 'Languages', parent_id: undefined }, load_balancer: { title: 'Load Balancer', parent_id: 'observability' }, message_queue: { title: 'Message Broker', parent_id: 'observability' }, monitoring: { title: 'Monitoring', parent_id: 'observability' }, - native_search: { title: 'Native Search', parent_id: 'enterprise_search' }, + native_search: { title: 'Native Search', parent_id: 'search' }, network: { title: 'Network', parent_id: undefined }, network_security: { title: 'Network', parent_id: 'security' }, notification: { title: 'Notification', parent_id: 'observability' }, @@ -68,7 +66,8 @@ export const INTEGRATION_CATEGORY_DISPLAY: { productivity: { title: 'Productivity', parent_id: undefined }, productivity_security: { title: 'Productivity', parent_id: 'security' }, proxy_security: { title: 'Proxy', parent_id: 'security' }, - sdk_search: { title: 'SDK', parent_id: 'enterprise_search' }, + sdk_search: { title: 'SDK', parent_id: 'search' }, + search: { title: 'Search', parent_id: undefined }, security: { title: 'Security', parent_id: undefined }, stream_processing: { title: 'Stream Processing', parent_id: 'observability' }, support: { title: 'Support', parent_id: undefined }, @@ -83,7 +82,7 @@ export const INTEGRATION_CATEGORY_DISPLAY: { websphere: { title: 'WebSphere Application Server', parent_id: 'observability' }, workplace_search_content_source: { title: 'Workplace Search Content Source', - parent_id: 'enterprise_search', + parent_id: 'search', }, // Kibana added apm: { title: 'APM', parent_id: undefined }, @@ -122,7 +121,7 @@ export interface IntegrationCategoryCount { // TODO: consider i18n export const SHIPPER_DISPLAY = { beats: 'Beats', - enterprise_search: 'Search', + search: 'Search', language_clients: 'Language clients', other: 'Other', sample_data: 'Sample data', diff --git a/test/api_integration/apis/custom_integration/integrations.ts b/test/api_integration/apis/custom_integration/integrations.ts index a3d50533010f1..26a8777e23800 100644 --- a/test/api_integration/apis/custom_integration/integrations.ts +++ b/test/api_integration/apis/custom_integration/integrations.ts @@ -25,7 +25,7 @@ export default function ({ getService }: FtrProviderContext) { expect(resp.body).to.be.an('array'); - expect(resp.body.length).to.be(56); + expect(resp.body.length).to.be(55); // Test for sample data card expect(resp.body.findIndex((c: { id: string }) => c.id === 'sample_data_all')).to.be.above( diff --git a/x-pack/packages/search/shared_ui/src/form_info_field/form_info_field.tsx b/x-pack/packages/search/shared_ui/src/form_info_field/form_info_field.tsx index 89e14e72454c6..c99daba9f4537 100644 --- a/x-pack/packages/search/shared_ui/src/form_info_field/form_info_field.tsx +++ b/x-pack/packages/search/shared_ui/src/form_info_field/form_info_field.tsx @@ -23,6 +23,7 @@ interface FormInfoFieldProps { value: string; copyValue?: string; dataTestSubj?: string; + copyValueDataTestSubj?: string; } export const FormInfoField: React.FC = ({ @@ -31,6 +32,7 @@ export const FormInfoField: React.FC = ({ value, copyValue, dataTestSubj, + copyValueDataTestSubj, }) => { const { euiTheme } = useEuiTheme(); @@ -71,6 +73,7 @@ export const FormInfoField: React.FC = ({ { const nativeSearchTag = config.hasNativeConnectors && isCloud ? ['native_search'] : []; - if (config.canDeployEntSearch) { - customIntegrations.registerCustomIntegration({ - id: 'app_search_json', - title: i18n.translate('xpack.enterpriseSearch.appSearch.integrations.jsonName', { - defaultMessage: 'JSON', - }), - description: i18n.translate('xpack.enterpriseSearch.appSearch.integrations.jsonDescription', { - defaultMessage: 'Search over your JSON data with App Search.', - }), - categories: ['enterprise_search', 'custom', 'app_search'], - uiInternalPath: '/app/enterprise_search/app_search/engines/new?method=json', - icons: [ - { - type: 'eui', - src: 'logoAppSearch', - }, - ], - shipper: 'enterprise_search', - isBeta: false, - }); - } - if (config.hasWebCrawler) { customIntegrations.registerCustomIntegration({ id: 'web_crawler', @@ -48,7 +26,7 @@ export const registerEnterpriseSearchIntegrations = ( description: i18n.translate('xpack.enterpriseSearch.integrations.webCrawlerDescription', { defaultMessage: 'Add search to your website with the web crawler.', }), - categories: ['enterprise_search', 'app_search', 'web', 'elastic_stack', 'crawler'], + categories: ['search', 'web', 'elastic_stack', 'crawler'], uiInternalPath: '/app/enterprise_search/content/crawlers/new_crawler', icons: [ { @@ -56,7 +34,7 @@ export const registerEnterpriseSearchIntegrations = ( src: 'logoEnterpriseSearch', }, ], - shipper: 'enterprise_search', + shipper: 'search', isBeta: false, }); } @@ -69,7 +47,7 @@ export const registerEnterpriseSearchIntegrations = ( description: i18n.translate('xpack.enterpriseSearch.integrations.apiDescription', { defaultMessage: "Add search to your application with Elasticsearch's robust APIs.", }), - categories: ['enterprise_search', 'custom', 'elastic_stack', 'sdk_search', 'language_client'], + categories: ['search', 'custom', 'elastic_stack', 'sdk_search', 'language_client'], uiInternalPath: '/app/enterprise_search/content/search_indices/new_index/api', icons: [ { @@ -77,7 +55,7 @@ export const registerEnterpriseSearchIntegrations = ( src: 'logoEnterpriseSearch', }, ], - shipper: 'enterprise_search', + shipper: 'search', isBeta: false, }); @@ -99,7 +77,7 @@ export const registerEnterpriseSearchIntegrations = ( ], id: `${connector.serviceType}-${connector.name}`, isBeta: connector.isBeta, - shipper: 'enterprise_search', + shipper: 'search', title: connector.name, uiInternalPath: `/app/enterprise_search/content/connectors/new_connector?connector_type=${connectorType}&service_type=${connector.serviceType}`, }); diff --git a/x-pack/plugins/search_connectors/common/connectors.ts b/x-pack/plugins/search_connectors/common/connectors.ts index a91dc9b0bd08c..b0bc5564e9750 100644 --- a/x-pack/plugins/search_connectors/common/connectors.ts +++ b/x-pack/plugins/search_connectors/common/connectors.ts @@ -25,7 +25,7 @@ export interface ConnectorServerSideDefinition { export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.azureBlob.description', { @@ -42,7 +42,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'azure_blob_storage', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.confluence.description', { @@ -59,7 +59,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'confluence', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.confluenceDataCenter.description', { @@ -80,13 +80,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'confluence', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'datastore', - 'connector', - 'connector_client', - ], + categories: ['search', 'elastic_stack', 'datastore', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.dropbox.description', { @@ -104,14 +98,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'dropbox', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'connector', - 'connector_client', - 'jira', - ], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'jira'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.jira.description', { @@ -128,14 +115,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'jira', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'connector', - 'connector_client', - 'jira', - ], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'jira'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.jiraServer.description', { @@ -152,7 +132,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'jira', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.jiraDataCenter.description', { @@ -170,7 +150,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'jira', }, { - categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.github.description', { @@ -187,7 +167,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'github', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.googleCloud.description', { @@ -204,7 +184,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'google_cloud_storage', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.googleDrive.description', { @@ -221,7 +201,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'google_drive', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.graphQL.description', { @@ -239,13 +219,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isTechPreview: true, }, { - categories: [ - 'enterprise_search', - 'datastore', - 'elastic_stack', - 'connector', - 'connector_client', - ], + categories: ['search', 'datastore', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.mongoDB.description', { @@ -262,13 +236,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'mongodb', }, { - categories: [ - 'enterprise_search', - 'datastore', - 'elastic_stack', - 'connector', - 'connector_client', - ], + categories: ['search', 'datastore', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.mysql.description', { @@ -285,14 +253,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'mysql', }, { - categories: [ - 'enterprise_search', - 'custom', - 'elastic_stack', - 'datastore', - 'connector', - 'connector_client', - ], + categories: ['search', 'custom', 'elastic_stack', 'datastore', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.msSql.description', { @@ -315,7 +276,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ defaultMessage: 'Search over your Network Drive content.', } ), - categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'connector', 'connector_client'], iconPath: 'network_drive.svg', isBeta: false, isNative: true, @@ -326,7 +287,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'network_drive', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.notion.description', { @@ -349,14 +310,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ defaultMessage: 'Search over your content on PostgreSQL.', } ), - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'datastore', - 'connector', - 'connector_client', - ], + categories: ['search', 'elastic_stack', 'custom', 'datastore', 'connector', 'connector_client'], iconPath: 'postgresql.svg', isBeta: false, isNative: true, @@ -367,7 +321,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'postgresql', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.redis.description', { @@ -385,7 +339,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'redis', }, { - categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.salesforce.description', { @@ -402,14 +356,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'salesforce', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'datastore', - 'connector', - 'connector_client', - ], + categories: ['search', 'elastic_stack', 'custom', 'datastore', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.salesforceSandbox.description', { @@ -426,7 +373,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'salesforce', }, { - categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.serviceNow.description', { @@ -444,7 +391,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'servicenow', }, { - categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.description', { @@ -462,7 +409,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'sharepoint_online', }, { - categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.gmail.description', { @@ -479,7 +426,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'gmail', }, { - categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.description', { @@ -500,14 +447,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'opentext_documentum', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'datastore', - 'connector', - 'connector_client', - ], + categories: ['search', 'elastic_stack', 'custom', 'datastore', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.oracle.description', { @@ -524,14 +464,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'oracle', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'datastore', - 'connector', - 'connector_client', - ], + categories: ['search', 'elastic_stack', 'custom', 'datastore', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.oneDrive.description', { @@ -551,13 +484,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ description: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.s3.description', { defaultMessage: 'Search over your content on Amazon S3.', }), - categories: [ - 'enterprise_search', - 'datastore', - 'elastic_stack', - 'connector', - 'connector_client', - ], + categories: ['search', 'datastore', 'elastic_stack', 'connector', 'connector_client'], iconPath: 's3.svg', isBeta: false, isNative: true, @@ -574,7 +501,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ defaultMessage: 'Search over your content on Slack.', } ), - categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'connector', 'connector_client'], iconPath: 'slack.svg', isBeta: false, isNative: true, @@ -586,7 +513,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'slack', }, { - categories: ['enterprise_search', 'elastic_stack', 'custom', 'connector', 'connector_client'], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.sharepointServer.description', { @@ -604,14 +531,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'sharepoint_server', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'connector', - 'connector_client', - 'box', - ], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'box'], description: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.box.description', { defaultMessage: 'Search over your content on Box.', }), @@ -632,14 +552,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ defaultMessage: 'Search over your content on Outlook.', } ), - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'connector', - 'connector_client', - 'outlook', - ], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'outlook'], iconPath: 'outlook.svg', isBeta: false, isNative: true, @@ -650,14 +563,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'outlook', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'connector', - 'connector_client', - 'teams', - ], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'teams'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.teams.description', { @@ -675,14 +581,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'microsoft_teams', }, { - categories: [ - 'enterprise_search', - 'elastic_stack', - 'custom', - 'connector', - 'connector_client', - 'zoom', - ], + categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'zoom'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.zoom.description', { @@ -700,7 +599,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ serviceType: 'zoom', }, { - categories: ['enterprise_search', 'custom', 'elastic_stack', 'connector', 'connector_client'], + categories: ['search', 'custom', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( 'searchConnectorsPlugin.content.nativeConnectors.customConnector.description', { diff --git a/x-pack/plugins/search_indices/public/analytics/constants.ts b/x-pack/plugins/search_indices/public/analytics/constants.ts index 2a8c6d0d0ea0d..d64019d6ef676 100644 --- a/x-pack/plugins/search_indices/public/analytics/constants.ts +++ b/x-pack/plugins/search_indices/public/analytics/constants.ts @@ -9,12 +9,18 @@ export enum AnalyticsEvents { startPageOpened = 'start_page_opened', startPageShowCodeClick = 'start_page_show_code', startPageShowCreateIndexUIClick = 'start_page_show_create_index_ui', + startCreateIndexPageModifyIndexName = 'start_modify_index_name', startCreateIndexClick = 'start_create_index', startCreateIndexLanguageSelect = 'start_code_lang_select', startCreateIndexCodeCopyInstall = 'start_code_copy_install', startCreateIndexCodeCopy = 'start_code_copy', + startCreateIndexRunInConsole = 'start_cta_run_in_console', + startCreateIndexCreatedRedirect = 'start_index_created_api', startFileUploadClick = 'start_file_upload', indexDetailsInstallCodeCopy = 'index_details_code_copy_install', indexDetailsAddMappingsCodeCopy = 'index_details_add_mappings_code_copy', indexDetailsIngestDocumentsCodeCopy = 'index_details_ingest_documents_code_copy', + indexDetailsNavDataTab = 'index_details_nav_data_tab', + indexDetailsNavSettingsTab = 'index_details_nav_settings_tab', + indexDetailsNavMappingsTab = 'index_details_nav_mappings_tab', } diff --git a/x-pack/plugins/search_indices/public/components/connection_details/connection_details.tsx b/x-pack/plugins/search_indices/public/components/connection_details/connection_details.tsx index b79a0e1f16828..2d7d71ee51cba 100644 --- a/x-pack/plugins/search_indices/public/components/connection_details/connection_details.tsx +++ b/x-pack/plugins/search_indices/public/components/connection_details/connection_details.tsx @@ -23,6 +23,7 @@ export const ConnectionDetails: React.FC = () => { value={elasticsearchUrl} copyValue={elasticsearchUrl} dataTestSubj="connectionDetailsEndpoint" + copyValueDataTestSubj="connectionDetailsEndpointCopy" /> ); }; diff --git a/x-pack/plugins/search_indices/public/components/indices/details_page.tsx b/x-pack/plugins/search_indices/public/components/indices/details_page.tsx index b2e1ab9f2c992..8cc673d073101 100644 --- a/x-pack/plugins/search_indices/public/components/indices/details_page.tsx +++ b/x-pack/plugins/search_indices/public/components/indices/details_page.tsx @@ -34,6 +34,8 @@ import { SearchIndexDetailsMappings } from './details_page_mappings'; import { SearchIndexDetailsSettings } from './details_page_settings'; import { SearchIndexDetailsPageMenuItemPopover } from './details_page_menu_item'; import { useIndexDocumentSearch } from '../../hooks/api/use_document_search'; +import { useUsageTracker } from '../../contexts/usage_tracker_context'; +import { AnalyticsEvents } from '../../analytics/constants'; export const SearchIndexDetailsPage = () => { const indexName = decodeURIComponent(useParams<{ indexName: string }>().indexName); @@ -69,6 +71,7 @@ export const SearchIndexDetailsPage = () => { setDocumentsLoading(isInitialLoading); setDocumentsExists(!(!isInitialLoading && indexDocuments?.results?.data.length === 0)); }, [indexDocuments, isInitialLoading, setDocumentsExists, setDocumentsLoading]); + const usageTracker = useUsageTracker(); const detailsPageTabs: EuiTabbedContentTab[] = useMemo(() => { return [ @@ -114,9 +117,19 @@ export const SearchIndexDetailsPage = () => { const handleTabClick = useCallback( (tab: EuiTabbedContentTab) => { history.push(`index_details/${indexName}/${tab.id}`); + + const tabEvent = { + [SearchIndexDetailsTabs.DATA]: AnalyticsEvents.indexDetailsNavDataTab, + [SearchIndexDetailsTabs.MAPPINGS]: AnalyticsEvents.indexDetailsNavMappingsTab, + [SearchIndexDetailsTabs.SETTINGS]: AnalyticsEvents.indexDetailsNavSettingsTab, + }[tab.id]; + + if (tabEvent) { + usageTracker.click(tabEvent); + } }, - [history, indexName] + [history, indexName, usageTracker] ); const embeddableConsole = useMemo( () => (consolePlugin?.EmbeddableConsole ? : null), diff --git a/x-pack/plugins/search_indices/public/components/start/create_index.tsx b/x-pack/plugins/search_indices/public/components/start/create_index.tsx index f1392b3d33813..788bd1e36f2ee 100644 --- a/x-pack/plugins/search_indices/public/components/start/create_index.tsx +++ b/x-pack/plugins/search_indices/public/components/start/create_index.tsx @@ -63,9 +63,14 @@ export const CreateIndexForm = ({ return; } usageTracker.click(AnalyticsEvents.startCreateIndexClick); + + if (formState.defaultIndexName !== formState.indexName) { + usageTracker.click(AnalyticsEvents.startCreateIndexPageModifyIndexName); + } + createIndex({ indexName: formState.indexName }); }, - [usageTracker, createIndex, formState.indexName] + [usageTracker, createIndex, formState.indexName, formState.defaultIndexName] ); const onIndexNameChange = (e: React.ChangeEvent) => { const newIndexName = e.target.value; diff --git a/x-pack/plugins/search_indices/public/components/start/create_index_code.tsx b/x-pack/plugins/search_indices/public/components/start/create_index_code.tsx index 0c18610f44d9e..ed473b1a63012 100644 --- a/x-pack/plugins/search_indices/public/components/start/create_index_code.tsx +++ b/x-pack/plugins/search_indices/public/components/start/create_index_code.tsx @@ -86,6 +86,13 @@ export const CreateIndexCodeView = ({ application={application} sharePlugin={share} consolePlugin={consolePlugin} + telemetryId={`${selectedLanguage}_create_index`} + onClick={() => { + usageTracker.click([ + AnalyticsEvents.startCreateIndexRunInConsole, + `${AnalyticsEvents.startCreateIndexRunInConsole}_${selectedLanguage}`, + ]); + }} /> )} diff --git a/x-pack/plugins/search_indices/public/components/start/elasticsearch_start.tsx b/x-pack/plugins/search_indices/public/components/start/elasticsearch_start.tsx index 8bc8d5fcd7ea2..42b021043cb34 100644 --- a/x-pack/plugins/search_indices/public/components/start/elasticsearch_start.tsx +++ b/x-pack/plugins/search_indices/public/components/start/elasticsearch_start.tsx @@ -35,8 +35,10 @@ import { CreateIndexFormState } from './types'; import { useKibana } from '../../hooks/use_kibana'; function initCreateIndexState(): CreateIndexFormState { + const defaultIndexName = generateRandomIndexName(); return { - indexName: generateRandomIndexName(), + indexName: defaultIndexName, + defaultIndexName, codingLanguage: getDefaultCodingLanguage(), }; } diff --git a/x-pack/plugins/search_indices/public/components/start/hooks/use_indices_redirect.tsx b/x-pack/plugins/search_indices/public/components/start/hooks/use_indices_redirect.tsx index 86fdf75a1d080..899d44da2afa8 100644 --- a/x-pack/plugins/search_indices/public/components/start/hooks/use_indices_redirect.tsx +++ b/x-pack/plugins/search_indices/public/components/start/hooks/use_indices_redirect.tsx @@ -12,11 +12,14 @@ import type { IndicesStatusResponse } from '../../../../common'; import { useKibana } from '../../../hooks/use_kibana'; import { navigateToIndexDetails } from './utils'; +import { useUsageTracker } from '../../../contexts/usage_tracker_context'; +import { AnalyticsEvents } from '../../../analytics/constants'; export const useIndicesRedirect = (indicesStatus?: IndicesStatusResponse) => { const { application, http } = useKibana().services; const [lastStatus, setLastStatus] = useState(() => undefined); const [hasDoneRedirect, setHasDoneRedirect] = useState(() => false); + const usageTracker = useUsageTracker(); return useEffect(() => { if (hasDoneRedirect) { return; @@ -36,9 +39,18 @@ export const useIndicesRedirect = (indicesStatus?: IndicesStatusResponse) => { if (indicesStatus.indexNames.length === 1) { navigateToIndexDetails(application, http, indicesStatus.indexNames[0]); setHasDoneRedirect(true); + usageTracker.click(AnalyticsEvents.startCreateIndexCreatedRedirect); return; } application.navigateToApp('management', { deepLinkId: 'index_management' }); setHasDoneRedirect(true); - }, [application, http, indicesStatus, lastStatus, hasDoneRedirect]); + }, [ + application, + http, + indicesStatus, + lastStatus, + setHasDoneRedirect, + usageTracker, + hasDoneRedirect, + ]); }; diff --git a/x-pack/plugins/search_indices/public/components/start/types.ts b/x-pack/plugins/search_indices/public/components/start/types.ts index c0dbbeca88883..4c0235ec515f1 100644 --- a/x-pack/plugins/search_indices/public/components/start/types.ts +++ b/x-pack/plugins/search_indices/public/components/start/types.ts @@ -9,5 +9,6 @@ import type { AvailableLanguages } from '../../code_examples'; export interface CreateIndexFormState { indexName: string; + defaultIndexName: string; codingLanguage: AvailableLanguages; } diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 41d1b6ab8b3d1..b3bf6ee59b413 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -16198,8 +16198,6 @@ "xpack.enterpriseSearch.appSearch.enginesOverview.table.column.lastUpdated": "Dernière mise à jour", "xpack.enterpriseSearch.appSearch.enginesOverview.table.column.name": "Nom", "xpack.enterpriseSearch.appSearch.enginesOverview.title": "Aperçu des moteurs", - "xpack.enterpriseSearch.appSearch.integrations.jsonDescription": "Recherchez dans vos données JSON avec App Search.", - "xpack.enterpriseSearch.appSearch.integrations.jsonName": "JSON", "xpack.enterpriseSearch.appSearch.logRetention.callout.description.manageSettingsDetail": "Pour gérer les analyses et le logging, {visitSettingsLink}.", "xpack.enterpriseSearch.appSearch.logRetention.callout.description.manageSettingsLinkText": "accédez à vos paramètres", "xpack.enterpriseSearch.appSearch.logRetention.callout.disabledSinceTitle": "{logsTitle} ont été désactivés depuis le {disabledDate}.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 9361689702bb4..70f10f96262ae 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -15945,8 +15945,6 @@ "xpack.enterpriseSearch.appSearch.enginesOverview.table.column.lastUpdated": "最終更新", "xpack.enterpriseSearch.appSearch.enginesOverview.table.column.name": "名前", "xpack.enterpriseSearch.appSearch.enginesOverview.title": "エンジン概要", - "xpack.enterpriseSearch.appSearch.integrations.jsonDescription": "App Searchを使用して、JSONデータを検索します。", - "xpack.enterpriseSearch.appSearch.integrations.jsonName": "JSON", "xpack.enterpriseSearch.appSearch.logRetention.callout.description.manageSettingsDetail": "分析とログを管理するには、{visitSettingsLink}してください。", "xpack.enterpriseSearch.appSearch.logRetention.callout.description.manageSettingsLinkText": "設定を表示", "xpack.enterpriseSearch.appSearch.logRetention.callout.disabledSinceTitle": "{logsTitle}は、{disabledDate}以降に無効にされました。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 0a17edfeb80ce..2a3f12fe5e6a0 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -15973,8 +15973,6 @@ "xpack.enterpriseSearch.appSearch.enginesOverview.table.column.lastUpdated": "上次更新时间", "xpack.enterpriseSearch.appSearch.enginesOverview.table.column.name": "名称", "xpack.enterpriseSearch.appSearch.enginesOverview.title": "引擎概览", - "xpack.enterpriseSearch.appSearch.integrations.jsonDescription": "通过 App Search 搜索您的 JSON 数据。", - "xpack.enterpriseSearch.appSearch.integrations.jsonName": "JSON", "xpack.enterpriseSearch.appSearch.logRetention.callout.description.manageSettingsDetail": "要管理分析和日志记录,请{visitSettingsLink}。", "xpack.enterpriseSearch.appSearch.logRetention.callout.description.manageSettingsLinkText": "访问您的设置", "xpack.enterpriseSearch.appSearch.logRetention.callout.disabledSinceTitle": "自 {disabledDate}后,{logsTitle} 已禁用。",