Skip to content

Commit

Permalink
search: remove entsearch agent & request handler
Browse files Browse the repository at this point in the history
  • Loading branch information
TattdCodeMonkey committed Dec 19, 2024
1 parent d887ea9 commit 7cfa396
Show file tree
Hide file tree
Showing 31 changed files with 30 additions and 2,987 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const DEFAULT_INITIAL_APP_DATA = {
hasDocumentLevelSecurityEnabled: true,
hasIncrementalSyncEnabled: true,
hasNativeConnectors: true,
hasWebCrawler: true,
},
kibanaVersion: '9.0.0',
};
1 change: 0 additions & 1 deletion x-pack/plugins/enterprise_search/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ export const DEFAULT_PRODUCT_FEATURES: ProductFeatures = {
hasDocumentLevelSecurityEnabled: true,
hasIncrementalSyncEnabled: true,
hasNativeConnectors: true,
hasWebCrawler: true,
};

export const CONNECTORS_ACCESS_CONTROL_INDEX_PREFIX = '.search-acl-filter-';
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/enterprise_search/common/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export interface ProductFeatures {
hasDocumentLevelSecurityEnabled: boolean;
hasIncrementalSyncEnabled: boolean;
hasNativeConnectors: boolean;
hasWebCrawler: boolean;
}

export interface SearchOAuth {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const mockKibanaValues = {
hasDocumentLevelSecurityEnabled: true,
hasIncrementalSyncEnabled: true,
hasNativeConnectors: true,
hasWebCrawler: true,
},
renderHeaderActions: jest.fn(),
security: securityMock.createStart(),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import React, { useEffect, useMemo } from 'react';
import React, { useMemo } from 'react';

import { useActions, useValues } from 'kea';

Expand All @@ -21,8 +21,6 @@ import {
} from '../../../../shared/licensing_callout/licensing_callout';
import { AddConnectorApiLogic } from '../../../api/connector/add_connector_api_logic';

import { FetchCloudHealthApiLogic } from '../../../api/stats/fetch_cloud_health_api_logic';

import { errorToText } from '../utils/error_to_text';

import { AddConnectorLogic } from './add_connector_logic';
Expand Down Expand Up @@ -61,14 +59,6 @@ export const MethodConnector: React.FC<MethodConnectorProps> = ({

const isGated = isNative && !isCloud && !hasPlatinumLicense;

const { makeRequest: fetchCloudHealth } = useActions(FetchCloudHealthApiLogic);

useEffect(() => {
if (isCloud) {
fetchCloudHealth({});
}
}, [isCloud]);

return (
<EuiFlexGroup direction="column">
{isGated && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { NewIndexCard } from './new_index_card';
const getAvailableMethodOptions = (productFeatures: ProductFeatures): INGESTION_METHOD_IDS[] => {
return [
INGESTION_METHOD_IDS.API,
...(productFeatures.hasWebCrawler ? [INGESTION_METHOD_IDS.CRAWLER] : []),
...(productFeatures.hasConnectors ? [INGESTION_METHOD_IDS.CONNECTOR] : []),
];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ import { i18n } from '@kbn/i18n';
import {
ENTERPRISE_SEARCH_CONTENT_PLUGIN,
ENTERPRISE_SEARCH_ELASTICSEARCH_URL,
CRAWLER,
} from '../../../../../common/constants';

import apiLogo from '../../../../assets/images/api_image.png';
import fileUploadLogo from '../../../../assets/images/file_upload_logo.svg';
import sampleDataLogo from '../../../../assets/images/sample_data_logo.svg';
import connectorLogo from '../../../../assets/images/search_connector.svg';
import crawlerLogo from '../../../../assets/images/search_crawler.svg';
import languageClientsLogo from '../../../../assets/images/search_language_clients.svg';

import { IngestionCard } from '../../../enterprise_search_content/components/shared/ingestion_card/ingestion_card';
Expand All @@ -36,15 +34,14 @@ import {

import { ConnectorIcon } from '../../../shared/icons/connector';

import { GithubIcon } from '../../../shared/icons/github_icon';
import { KibanaLogic } from '../../../shared/kibana';

export const IngestionSelector: React.FC = () => {
const {
application: { navigateToApp },
productFeatures,
} = useValues(KibanaLogic);
const crawlerDisabled = true;

return (
<>
<EuiFlexGroup>
Expand All @@ -71,32 +68,6 @@ export const IngestionSelector: React.FC = () => {
)}
/>
</EuiFlexItem>
{productFeatures.hasWebCrawler && (
<EuiFlexItem>
<IngestionCard
buttonLabel={i18n.translate(
'xpack.enterpriseSearch.ingestSelector.method.sourceCodeButtonLabel',
{
defaultMessage: 'Source code',
}
)}
buttonIcon={GithubIcon}
description={i18n.translate(
'xpack.enterpriseSearch.ingestSelector.method.crawler.description',
{
defaultMessage:
'Discover, extract, and index searchable content from websites and knowledge bases.',
}
)}
href={CRAWLER.github_repo}
isBeta={crawlerDisabled}
logo={crawlerLogo}
title={i18n.translate('xpack.enterpriseSearch.ingestSelector.method.crawler', {
defaultMessage: 'Web Crawler',
})}
/>
</EuiFlexItem>
)}
{productFeatures.hasConnectors && (
<EuiFlexItem>
<IngestionCard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export const mockKibanaProps: KibanaLogicProps = {
hasDocumentLevelSecurityEnabled: true,
hasIncrementalSyncEnabled: true,
hasNativeConnectors: true,
hasWebCrawler: true,
},
renderHeaderActions: jest.fn(),
security: securityMock.createStart(),
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions x-pack/plugins/enterprise_search/server/__mocks__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ export {
mockRequestHandler,
mockDependencies,
} from './routerDependencies.mock';

export { mockHttpAgent } from './http_agent.mock';
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,11 @@ export const mockConfig: ConfigType = {
enabled: true,
},
isCloud: false,
host: 'http://localhost:3002',
accessCheckTimeout: 5000,
accessCheckTimeoutWarning: 300,
ssl: {} as ConfigType['ssl'],
hasConnectors: true,
hasDefaultIngestPipeline: true,
hasDocumentLevelSecurityEnabled: true,
hasIncrementalSyncEnabled: true,
hasNativeConnectors: true,
hasWebCrawler: true,
};

/**
Expand Down
26 changes: 12 additions & 14 deletions x-pack/plugins/enterprise_search/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,26 @@ export const plugin = async (initializerContext: PluginInitializerContext) => {
};

export const configSchema = schema.object({
accessCheckTimeout: schema.number({ defaultValue: 5000 }),
accessCheckTimeoutWarning: schema.number({ defaultValue: 300 }),
// accessCheckTimeout: schema.number({ defaultValue: 5000 }),
// accessCheckTimeoutWarning: schema.number({ defaultValue: 300 }),
// host: schema.maybe(schema.string()),
// ssl: schema.object({
// certificateAuthorities: schema.maybe(
// schema.oneOf([schema.arrayOf(schema.string(), { minSize: 1 }), schema.string()])
// ),
// verificationMode: schema.oneOf(
// [schema.literal('none'), schema.literal('certificate'), schema.literal('full')],
// { defaultValue: 'full' }
// ),
// }),
customHeaders: schema.maybe(schema.object({}, { unknowns: 'allow' })),
enabled: schema.boolean({ defaultValue: true }),
hasConnectors: schema.boolean({ defaultValue: true }),
hasDefaultIngestPipeline: schema.boolean({ defaultValue: true }),
hasDocumentLevelSecurityEnabled: schema.boolean({ defaultValue: true }),
hasIncrementalSyncEnabled: schema.boolean({ defaultValue: true }),
hasNativeConnectors: schema.boolean({ defaultValue: true }),
hasWebCrawler: schema.boolean({ defaultValue: true }),
host: schema.maybe(schema.string()),
isCloud: schema.boolean({ defaultValue: false }),
ssl: schema.object({
certificateAuthorities: schema.maybe(
schema.oneOf([schema.arrayOf(schema.string(), { minSize: 1 }), schema.string()])
),
verificationMode: schema.oneOf(
[schema.literal('none'), schema.literal('certificate'), schema.literal('full')],
{ defaultValue: 'full' }
),
}),
ui: schema.object({
enabled: schema.boolean({ defaultValue: true }),
}),
Expand All @@ -45,7 +44,6 @@ export type ConfigType = TypeOf<typeof configSchema>;
export const config: PluginConfigDescriptor<ConfigType> = {
deprecations: ({ unused }) => [unused('canDeployEntSearch', { level: 'warning' })],
exposeToBrowser: {
host: true,
ui: true,
},
schema: configSchema,
Expand Down
25 changes: 0 additions & 25 deletions x-pack/plugins/enterprise_search/server/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,9 @@
import type { CustomIntegrationsPluginSetup } from '@kbn/custom-integrations-plugin/server';
import { i18n } from '@kbn/i18n';

import { ConfigType } from '.';

export const registerEnterpriseSearchIntegrations = (
config: ConfigType,
customIntegrations: CustomIntegrationsPluginSetup
) => {
if (config.hasWebCrawler) {
customIntegrations.registerCustomIntegration({
id: 'web_crawler',
title: i18n.translate('xpack.enterpriseSearch.integrations.webCrawlerName', {
defaultMessage: 'Web crawler',
}),
description: i18n.translate('xpack.enterpriseSearch.integrations.webCrawlerDescription', {
defaultMessage: 'Add search to your website with the web crawler.',
}),
categories: ['search', 'web', 'elastic_stack', 'crawler'],
uiInternalPath: '/app/elasticsearch/content/crawlers/new_crawler',
icons: [
{
type: 'eui',
src: 'logoEnterpriseSearch',
},
],
shipper: 'search',
isBeta: false,
});
}

customIntegrations.registerCustomIntegration({
id: 'api',
title: i18n.translate('xpack.enterpriseSearch.integrations.apiName', {
Expand Down
Loading

0 comments on commit 7cfa396

Please sign in to comment.