Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into query-trimming-is-c…
Browse files Browse the repository at this point in the history
…ustomized
  • Loading branch information
dplumlee committed Dec 9, 2024
2 parents e47b15a + 598d3de commit 1732885
Show file tree
Hide file tree
Showing 129 changed files with 1,330 additions and 1,000 deletions.
3 changes: 0 additions & 3 deletions config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ xpack.ml.compatibleModuleType: 'search'

data_visualizer.resultLinks.fileBeat.enabled: false

# Search InferenceEndpoints
xpack.searchInferenceEndpoints.ui.enabled: true

# Search Notebooks
xpack.search.notebooks.catalog.url: https://elastic-enterprise-search.s3.us-east-2.amazonaws.com/serverless/catalog.json

Expand Down
1 change: 1 addition & 0 deletions config/serverless.oblt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ xpack.uptime.enabled: true
xpack.securitySolution.enabled: false
xpack.search.notebooks.enabled: false
xpack.searchPlayground.enabled: false
xpack.searchInferenceEndpoints.enabled: false

## Fine-tune the observability solution feature privileges. Also, refer to `serverless.yml` for the project-agnostic overrides.
xpack.features.overrides:
Expand Down
1 change: 1 addition & 0 deletions config/serverless.security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ xpack.observability.enabled: false
xpack.observabilityAIAssistant.enabled: false
xpack.search.notebooks.enabled: false
xpack.searchPlayground.enabled: false
xpack.searchInferenceEndpoints.enabled: false

## Fine-tune the security solution feature privileges. Also, refer to `serverless.yml` for the project-agnostic overrides.
xpack.features.overrides:
Expand Down
1 change: 1 addition & 0 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47102,6 +47102,7 @@ components:
enum:
- user
- host
- service
type: string
Security_Entity_Analytics_API_HostEntity:
type: object
Expand Down
1 change: 1 addition & 0 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54783,6 +54783,7 @@ components:
enum:
- user
- host
- service
type: string
Security_Entity_Analytics_API_HostEntity:
type: object
Expand Down
1 change: 0 additions & 1 deletion packages/deeplinks/search/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

export const ENTERPRISE_SEARCH_APP_ID = 'enterpriseSearch';
export const ENTERPRISE_SEARCH_CONTENT_APP_ID = 'enterpriseSearchContent';
export const ENTERPRISE_SEARCH_RELEVANCE_APP_ID = 'searchInferenceEndpoints';
export const ENTERPRISE_SEARCH_APPLICATIONS_APP_ID = 'enterpriseSearchApplications';
export const ENTERPRISE_SEARCH_ANALYTICS_APP_ID = 'enterpriseSearchAnalytics';
export const ENTERPRISE_SEARCH_APPSEARCH_APP_ID = 'appSearch';
Expand Down
7 changes: 2 additions & 5 deletions packages/deeplinks/search/deep_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
ENTERPRISE_SEARCH_APP_ID,
ENTERPRISE_SEARCH_CONTENT_APP_ID,
ENTERPRISE_SEARCH_APPLICATIONS_APP_ID,
ENTERPRISE_SEARCH_RELEVANCE_APP_ID,
ENTERPRISE_SEARCH_ANALYTICS_APP_ID,
ENTERPRISE_SEARCH_APPSEARCH_APP_ID,
ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID,
Expand All @@ -33,7 +32,6 @@ import {
export type EnterpriseSearchApp = typeof ENTERPRISE_SEARCH_APP_ID;
export type EnterpriseSearchContentApp = typeof ENTERPRISE_SEARCH_CONTENT_APP_ID;
export type EnterpriseSearchApplicationsApp = typeof ENTERPRISE_SEARCH_APPLICATIONS_APP_ID;
export type EnterpriseSearchRelevanceApp = typeof ENTERPRISE_SEARCH_RELEVANCE_APP_ID;
export type EnterpriseSearchAnalyticsApp = typeof ENTERPRISE_SEARCH_ANALYTICS_APP_ID;
export type EnterpriseSearchAppsearchApp = typeof ENTERPRISE_SEARCH_APPSEARCH_APP_ID;
export type EnterpriseSearchWorkplaceSearchApp = typeof ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID;
Expand All @@ -56,15 +54,14 @@ export type ApplicationsLinkId = 'searchApplications';

export type AppsearchLinkId = 'engines';

export type RelevanceLinkId = 'inferenceEndpoints';
export type SearchInferenceEndpointsLinkId = 'inferenceEndpoints';

export type SearchIndicesLinkId = typeof SEARCH_INDICES_CREATE_INDEX;

export type DeepLinkId =
| EnterpriseSearchApp
| EnterpriseSearchContentApp
| EnterpriseSearchApplicationsApp
| EnterpriseSearchRelevanceApp
| EnterpriseSearchAnalyticsApp
| EnterpriseSearchAppsearchApp
| EnterpriseSearchWorkplaceSearchApp
Expand All @@ -77,7 +74,7 @@ export type DeepLinkId =
| `${EnterpriseSearchContentApp}:${ContentLinkId}`
| `${EnterpriseSearchApplicationsApp}:${ApplicationsLinkId}`
| `${EnterpriseSearchAppsearchApp}:${AppsearchLinkId}`
| `${EnterpriseSearchRelevanceApp}:${RelevanceLinkId}`
| `${SearchInferenceEndpointsId}:${SearchInferenceEndpointsLinkId}`
| SearchStart
| SearchIndices
| SearchElasticsearch
Expand Down
1 change: 0 additions & 1 deletion packages/deeplinks/search/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export {
ENTERPRISE_SEARCH_APP_ID,
ENTERPRISE_SEARCH_CONTENT_APP_ID,
ENTERPRISE_SEARCH_RELEVANCE_APP_ID,
ENTERPRISE_SEARCH_APPLICATIONS_APP_ID,
ENTERPRISE_SEARCH_ANALYTICS_APP_ID,
ENTERPRISE_SEARCH_APPSEARCH_APP_ID,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-index-adapter/src/field_maps/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export type FieldMap<T extends string = string> = Record<
array?: boolean;
doc_values?: boolean;
enabled?: boolean;
fields?: Record<string, { type: string }>;
format?: string;
ignore_above?: number;
multi_fields?: MultiField[];
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-mock-idp-plugin/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const plugin: PluginInitializer<
]);

ReactDOM.render(
<KibanaThemeProvider theme={coreStart.theme}>
<KibanaThemeProvider {...coreStart}>
<KibanaContextProvider services={coreStart}>
<I18nProvider>
<LoginPage />
Expand All @@ -69,7 +69,7 @@ export const plugin: PluginInitializer<
order: 4000 + 1, // Make sure it comes after the user menu
mount: (element: HTMLElement) => {
ReactDOM.render(
<KibanaThemeProvider theme={coreStart.theme}>
<KibanaThemeProvider {...coreStart}>
<KibanaContextProvider services={coreStart}>
<I18nProvider>
<RoleSwitcher />
Expand Down
4 changes: 3 additions & 1 deletion packages/kbn-mock-idp-plugin/public/reload_page_toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import React from 'react';
import type { I18nStart } from '@kbn/core-i18n-browser';
import type { ToastInput } from '@kbn/core-notifications-browser';
import type { ThemeServiceStart } from '@kbn/core-theme-browser';
import type { UserProfileService } from '@kbn/core-user-profile-browser';
import { toMountPoint } from '@kbn/react-kibana-mount';
import type { AuthenticatedUser } from '@kbn/security-plugin-types-common';

Expand All @@ -26,6 +27,7 @@ export const DATA_TEST_SUBJ_PAGE_RELOAD_BUTTON = 'pageReloadButton';
*/
export const createReloadPageToast = (options: {
user: Pick<AuthenticatedUser, 'roles'>;
userProfile: UserProfileService;
theme: ThemeServiceStart;
i18n: I18nStart;
}): ToastInput => {
Expand All @@ -43,7 +45,7 @@ export const createReloadPageToast = (options: {
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>,
{ i18n: options.i18n, theme: options.theme }
options
),
color: 'success',
toastLifeTimeMs: 0x7fffffff, // Do not auto-hide toast since page is in an unknown state
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-mock-idp-plugin/public/role_switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const RoleSwitcher = () => {
services.notifications.toasts.add(
createReloadPageToast({
user: authenticateUserState.value,
userProfile: services.userProfile,
theme: services.theme,
i18n: services.i18n,
})
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-mock-idp-plugin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"@kbn/mock-idp-utils",
"@kbn/cloud-plugin",
"@kbn/es",
"@kbn/core-user-profile-browser",
]
}
6 changes: 4 additions & 2 deletions packages/kbn-user-profile-components/src/services.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import React, { useContext } from 'react';
import type { I18nStart } from '@kbn/core-i18n-browser';
import type { NotificationsStart, ToastOptions } from '@kbn/core-notifications-browser';
import type { ThemeServiceStart } from '@kbn/core-theme-browser';
import type { UserProfileService } from '@kbn/core-user-profile-browser';
import type { toMountPoint } from '@kbn/react-kibana-mount';

import type { UserProfileAPIClient } from './types';
Expand Down Expand Up @@ -47,6 +48,7 @@ export interface UserProfilesKibanaDependencies {
core: {
notifications: NotificationsStart;
theme: ThemeServiceStart;
userProfile: UserProfileService;
i18n: I18nStart;
};
security: {
Expand All @@ -70,7 +72,7 @@ export const UserProfilesKibanaProvider: FC<PropsWithChildren<UserProfilesKibana
...services
}) => {
const {
core: { notifications, i18n, theme },
core: { notifications, ...startServices },
security: { userProfiles: userProfileApiClient },
toMountPoint: toMountPointUtility,
} = services;
Expand All @@ -86,7 +88,7 @@ export const UserProfilesKibanaProvider: FC<PropsWithChildren<UserProfilesKibana
notifications.toasts.addSuccess(
{
title,
text: text ? toMountPointUtility(text, { i18n, theme }) : undefined,
text: text ? toMountPointUtility(text, startServices) : undefined,
},
toastOptions
);
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-user-profile-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@kbn/react-kibana-mount",
"@kbn/core-i18n-browser",
"@kbn/test-jest-helpers",
"@kbn/core-user-profile-browser",
],
"exclude": [
"target/**/*",
Expand Down
17 changes: 0 additions & 17 deletions x-pack/plugins/enterprise_search/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import dedent from 'dedent';
import {
ENTERPRISE_SEARCH_APP_ID,
ENTERPRISE_SEARCH_CONTENT_APP_ID,
ENTERPRISE_SEARCH_RELEVANCE_APP_ID,
ENTERPRISE_SEARCH_APPLICATIONS_APP_ID,
ENTERPRISE_SEARCH_ANALYTICS_APP_ID,
ENTERPRISE_SEARCH_APPSEARCH_APP_ID,
Expand Down Expand Up @@ -200,22 +199,6 @@ export const SEMANTIC_SEARCH_PLUGIN = {
URL: '/app/enterprise_search/semantic_search',
};

export const SEARCH_RELEVANCE_PLUGIN = {
ID: ENTERPRISE_SEARCH_RELEVANCE_APP_ID,
NAME: i18n.translate('xpack.enterpriseSearch.inferenceEndpoints.productName', {
defaultMessage: 'Inference Endpoints',
}),
NAV_TITLE: i18n.translate('xpack.enterpriseSearch.inferenceEndpoints.navTitle', {
defaultMessage: 'Relevance',
}),
DESCRIPTION: i18n.translate('xpack.enterpriseSearch.inferenceEndpoints.description', {
defaultMessage: 'Manage your inference endpoints for semantic search and AI use cases.',
}),
URL: '/app/elasticsearch/relevance',
LOGO: 'logoEnterpriseSearch',
SUPPORT_URL: 'https://discuss.elastic.co/c/enterprise-search/',
};

export const CREATE_CONNECTOR_PLUGIN = {
CLI_SNIPPET: dedent`./bin/connectors connector create
--index-name my-index
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/enterprise_search/common/locators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
*/

import type { SharePluginSetup } from '@kbn/share-plugin/public';
import { SerializableRecord } from '@kbn/utility-types';

import {
CreateIndexLocatorDefinition,
type CreateIndexLocatorParams,
} from './create_index_locator';
import { SearchInferenceEndpointLocatorDefinition } from './inference_locator';

export function registerLocators(share: SharePluginSetup) {
share.url.locators.create<CreateIndexLocatorParams>(new CreateIndexLocatorDefinition());
share.url.locators.create<SerializableRecord>(new SearchInferenceEndpointLocatorDefinition());
}

This file was deleted.

1 change: 0 additions & 1 deletion x-pack/plugins/enterprise_search/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"guidedOnboarding",
"console",
"searchConnectors",
"searchInferenceEndpoints",
"searchNavigation",
"searchPlayground",
"embeddable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export const mockKibanaValues = {
hasWebCrawler: true,
},
renderHeaderActions: jest.fn(),
searchInferenceEndpoints: null,
security: securityMock.createStart(),
setBreadcrumbs: jest.fn(),
setChromeIsVisible: jest.fn(),
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1732885

Please sign in to comment.