From 6a02ff0e4019a129158e32c6055b7e73f18e65d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efe=20G=C3=BCrkan=20YALAMAN?= Date: Tue, 5 Mar 2024 17:40:31 +0100 Subject: [PATCH] [Search] Move settings page to a flyout (#178000) ## Summary https://github.com/elastic/kibana/assets/1410658/493242e1-e942-43a4-b35b-2043c13f51f0 Moves settings page to a flyout that is reachable from Indices, Connectors and Crawlers pages. ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --- .../components/connectors/connectors.tsx | 159 ++++++++++--- .../search_indices/search_indices.tsx | 27 ++- .../settings/default_settings_flyout.tsx | 225 ++++++++++++++++++ .../components/settings/index.ts | 8 - .../components/settings/settings.test.tsx | 45 ---- .../components/settings/settings.tsx | 168 ------------- .../components/settings/settings_panel.tsx | 17 +- .../enterprise_search_content/index.test.tsx | 4 +- .../enterprise_search_content/index.tsx | 5 - .../applications/shared/layout/nav.test.tsx | 16 +- .../public/applications/shared/layout/nav.tsx | 20 +- .../translations/translations/fr-FR.json | 8 +- .../translations/translations/ja-JP.json | 8 +- .../translations/translations/zh-CN.json | 8 +- 14 files changed, 384 insertions(+), 334 deletions(-) create mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/default_settings_flyout.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/index.ts delete mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.test.tsx delete mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.tsx diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx index 34d058490e9af..5dc3c01586437 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx @@ -11,8 +11,12 @@ import { useActions, useValues } from 'kea'; import { EuiButton, + EuiButtonIcon, + EuiContextMenuItem, + EuiContextMenuPanel, EuiFlexGroup, EuiFlexItem, + EuiPopover, EuiSearchBar, EuiSpacer, EuiTitle, @@ -38,6 +42,8 @@ import { SelectConnector } from '../new_index/select_connector/select_connector' import { CannotConnect } from '../search_index/components/cannot_connect'; +import { DefaultSettingsFlyout } from '../settings/default_settings_flyout'; + import { ConnectorStats } from './connector_stats'; import { ConnectorsLogic } from './connectors_logic'; import { ConnectorsTable } from './connectors_table'; @@ -59,13 +65,16 @@ export const Connectors: React.FC = ({ isCrawler }) => { const { data, isLoading, searchParams, isEmpty, connectors } = useValues(ConnectorsLogic); const { errorConnectingMessage } = useValues(HttpLogic); const [searchQuery, setSearchValue] = useState(''); + const [showMoreOptionsPopover, setShowMoreOptionsPopover] = useState(false); + const [showDefaultSettingsFlyout, setShowDefaultSettingsFlyout] = useState(false); + const { productFeatures } = useValues(KibanaLogic); useEffect(() => { setIsFirstRequest(); }, [isCrawler]); useEffect(() => { - fetchConnectors({ ...searchParams, searchQuery, fetchCrawlersOnly: isCrawler }); + fetchConnectors({ ...searchParams, fetchCrawlersOnly: isCrawler, searchQuery }); }, [searchParams.from, searchParams.size, searchQuery, isCrawler]); return !isLoading && isEmpty && !isCrawler ? ( @@ -93,44 +102,97 @@ export const Connectors: React.FC = ({ isCrawler }) => { ? [] : !isCrawler ? [ - { - KibanaLogic.values.navigateToUrl(NEW_INDEX_SELECT_CONNECTOR_PATH); - }} - > - - , - { - KibanaLogic.values.navigateToUrl(NEW_INDEX_SELECT_CONNECTOR_NATIVE_PATH); - }} - > - {i18n.translate( - 'xpack.enterpriseSearch.connectors.newNativeConnectorButtonLabel', - { - defaultMessage: 'New Native Connector', - } - )} - , - { - KibanaLogic.values.navigateToUrl(NEW_INDEX_SELECT_CONNECTOR_CLIENTS_PATH); - }} - > - {i18n.translate( - 'xpack.enterpriseSearch.connectors.newConnectorsClientButtonLabel', - { defaultMessage: 'New Connector Client' } - )} - , + + + { + KibanaLogic.values.navigateToUrl(NEW_INDEX_SELECT_CONNECTOR_PATH); + }} + > + + + + + setShowMoreOptionsPopover(false)} + button={ + setShowMoreOptionsPopover(!showMoreOptionsPopover)} + /> + } + > + { + KibanaLogic.values.navigateToUrl( + NEW_INDEX_SELECT_CONNECTOR_NATIVE_PATH + ); + }} + icon="plusInCircle" + > + {i18n.translate( + 'xpack.enterpriseSearch.connectors.newNativeConnectorButtonLabel', + { + defaultMessage: 'New Native Connector', + } + )} + , + { + KibanaLogic.values.navigateToUrl( + NEW_INDEX_SELECT_CONNECTOR_CLIENTS_PATH + ); + }} + > + {i18n.translate( + 'xpack.enterpriseSearch.connectors.newConnectorsClientButtonLabel', + { defaultMessage: 'New Connector Client' } + )} + , + ]} + /> + + + , + ...(productFeatures.hasDefaultIngestPipeline + ? [ + setShowDefaultSettingsFlyout(true)} + > + {i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.defaultSettings', + { + defaultMessage: 'Default settings', + } + )} + , + ] + : []), ] : [ = ({ isCrawler }) => { defaultMessage: 'New web crawler', })} , + ...(productFeatures.hasDefaultIngestPipeline + ? [ + setShowDefaultSettingsFlyout(true)} + > + {i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.defaultSettings', + { + defaultMessage: 'Default settings', + } + )} + , + ] + : []), ], }} > + {productFeatures.hasDefaultIngestPipeline && showDefaultSettingsFlyout && ( + setShowDefaultSettingsFlyout(false)} /> + )} {Boolean(errorConnectingMessage) && ( <> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx index 64ae1486d650c..1540b944b2dec 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx @@ -34,12 +34,12 @@ import { NEW_API_PATH } from '../../routes'; import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; import { CannotConnect } from '../search_index/components/cannot_connect'; +import { DefaultSettingsFlyout } from '../settings/default_settings_flyout'; import { DeleteIndexModal } from './delete_index_modal'; import { IndicesLogic } from './indices_logic'; import { IndicesStats } from './indices_stats'; import { IndicesTable } from './indices_table'; - import './search_indices.scss'; export const baseBreadcrumbs = [ @@ -54,8 +54,9 @@ export const SearchIndices: React.FC = () => { const [showHiddenIndices, setShowHiddenIndices] = useState(false); const [onlyShowSearchOptimizedIndices, setOnlyShowSearchOptimizedIndices] = useState(false); const [searchQuery, setSearchValue] = useState(''); - const { config } = useValues(KibanaLogic); + const { config, productFeatures } = useValues(KibanaLogic); const { errorConnectingMessage } = useValues(HttpLogic); + const [showDefaultSettingsFlyout, setShowDefaultSettingsFlyout] = useState(false); useEffect(() => { // We don't want to trigger loading for each search query change, so we need this @@ -98,6 +99,9 @@ export const SearchIndices: React.FC = () => { ? undefined : { pageTitle, + rightSideGroupProps: { + gutterSize: 's', + }, rightSideItems: isLoading ? [] : [ @@ -116,10 +120,29 @@ export const SearchIndices: React.FC = () => { )} , + ...(productFeatures.hasDefaultIngestPipeline + ? [ + setShowDefaultSettingsFlyout(true)} + > + {i18n.translate( + 'xpack.enterpriseSearch.content.searchIndices.defaultSettings', + { + defaultMessage: 'Default settings', + } + )} + , + ] + : []), ], } } > + {productFeatures.hasDefaultIngestPipeline && showDefaultSettingsFlyout && ( + setShowDefaultSettingsFlyout(false)} /> + )} {config.host && config.canDeployEntSearch && errorConnectingMessage && ( <> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/default_settings_flyout.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/default_settings_flyout.tsx new file mode 100644 index 0000000000000..fd866a4ec82d9 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/default_settings_flyout.tsx @@ -0,0 +1,225 @@ +/* + * 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, useActions } from 'kea'; + +import { + EuiButton, + EuiButtonEmpty, + EuiCallOut, + EuiFlexGroup, + EuiFlexItem, + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiLink, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; + +import { docLinks } from '../../../shared/doc_links'; + +import { SettingsLogic } from './settings_logic'; +import { SettingsPanel } from './settings_panel'; + +export interface DefaultSettingsFlyoutProps { + closeFlyout: () => void; +} + +const Callout = ( + + {i18n.translate('xpack.enterpriseSearch.defaultSettingsFlyout.callout.body', { + defaultMessage: + 'You can also enable or disable this feature for a specific index on the index’s configuration page.', + })} + +); +export const DefaultSettingsFlyout: React.FC = ({ closeFlyout }) => { + const { makeRequest, setPipeline } = useActions(SettingsLogic); + const { defaultPipeline, hasNoChanges, isLoading, pipelineState } = useValues(SettingsLogic); + const { + extract_binary_content: extractBinaryContent, + reduce_whitespace: reduceWhitespace, + run_ml_inference: runMLInference, + } = pipelineState; + return ( + + + +

+ {i18n.translate( + 'xpack.enterpriseSearch.defaultSettingsFlyout.h2.defaultSettingsLabel', + { defaultMessage: 'Default Settings' } + )} +

+
+
+ + +

+ + {i18n.translate( + 'xpack.enterpriseSearch.defaultSettingsFlyout.body.description.ingestPipelinesLink.link', + { + defaultMessage: 'ingest pipelines', + } + )} + + ), + }} + /> +

+
+ + + setPipeline({ + ...pipelineState, + extract_binary_content: !pipelineState.extract_binary_content, + }) + } + title={i18n.translate('xpack.enterpriseSearch.content.settings.contentExtraction.title', { + defaultMessage: 'Deployment wide content extraction', + })} + value={extractBinaryContent} + /> + + + setPipeline({ + ...pipelineState, + reduce_whitespace: !pipelineState.reduce_whitespace, + }) + } + title={i18n.translate( + 'xpack.enterpriseSearch.content.settings.whitespaceReduction.deploymentHeaderTitle', + { + defaultMessage: 'Deployment wide whitespace reduction', + } + )} + value={reduceWhitespace} + /> + + + {i18n.translate('xpack.enterpriseSearch.content.settings.mlInference.link', { + defaultMessage: 'Learn more about document enrichment with ML', + })} + + } + onChange={() => + setPipeline({ + ...pipelineState, + run_ml_inference: !pipelineState.run_ml_inference, + }) + } + title={i18n.translate( + 'xpack.enterpriseSearch.content.settings.mlInference.deploymentHeaderTitle', + { + defaultMessage: 'Deployment wide ML Inference Pipelines extraction', + } + )} + value={runMLInference} + /> +
+ + + + closeFlyout()} + data-test-subj={'entSearchContentSettingsCancelButtonButton'} + > + {i18n.translate('xpack.enterpriseSearch.content.settings.cancelButtonLabel', { + defaultMessage: 'Cancel', + })} + + + + + + setPipeline(defaultPipeline)} + data-test-subj={'entSearchContentSettingsResetButton'} + > + {i18n.translate('xpack.enterpriseSearch.content.settings.resetButtonLabel', { + defaultMessage: 'Reset', + })} + + + + makeRequest(pipelineState)} + data-test-subj={'entSearchContentSettingsSaveButton'} + > + {i18n.translate('xpack.enterpriseSearch.content.settings.saveButtonLabel', { + defaultMessage: 'Save', + })} + + + + + + +
+ ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/index.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/index.ts deleted file mode 100644 index 5f8bbf1491904..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/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 { Settings } from './settings'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.test.tsx deleted file mode 100644 index 212425ddb874b..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.test.tsx +++ /dev/null @@ -1,45 +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 { screen } from '@testing-library/react'; - -import '@testing-library/jest-dom'; - -import { HttpSetupMock } from '@kbn/core-http-browser-mocks'; - -import { HttpLogic } from '../../../shared/http'; -import { TestHelper } from '../../../test_helpers/test_utils.test_helper'; -import { FetchDefaultPipelineApiLogic } from '../../api/connector/get_default_pipeline_api_logic'; - -import { Settings } from './settings'; - -test('displays Settings Save-Reset buttons disabled by default', async () => { - TestHelper.prepare(); - TestHelper.mountLogic(FetchDefaultPipelineApiLogic); - TestHelper.appendCallback(() => { - const http = HttpLogic.values.http as HttpSetupMock; - http.get.mockImplementationOnce(() => - Promise.resolve({ - extract_binary_content: true, - name: 'test', - reduce_whitespace: true, - run_ml_inference: true, - }) - ); - }); - TestHelper.render(); - - const saveButton = screen.getByTestId('entSearchContentSettingsSaveButton'); - const resetButton = screen.getByTestId('entSearchContentSettingsResetButton'); - - expect(saveButton).toHaveTextContent('Save'); - expect(saveButton).toBeDisabled(); - expect(resetButton).toHaveTextContent('Reset'); - expect(resetButton).toBeDisabled(); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.tsx deleted file mode 100644 index 6c4e9c3c1178a..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings.tsx +++ /dev/null @@ -1,168 +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, EuiLink, EuiSpacer } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -import { FormattedMessage } from '@kbn/i18n-react'; - -import { docLinks } from '../../../shared/doc_links'; -import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; - -import { SettingsLogic } from './settings_logic'; -import { SettingsPanel } from './settings_panel'; - -export const Settings: React.FC = () => { - const { makeRequest, setPipeline } = useActions(SettingsLogic); - const { defaultPipeline, hasNoChanges, isLoading, pipelineState } = useValues(SettingsLogic); - const { - extract_binary_content: extractBinaryContent, - reduce_whitespace: reduceWhitespace, - run_ml_inference: runMLInference, - } = pipelineState; - - return ( - - {i18n.translate('xpack.enterpriseSearch.content.settings.ingestLink', { - defaultMessage: 'ingest pipelines', - })} - - ), - }} - /> - ), - pageTitle: i18n.translate('xpack.enterpriseSearch.content.settings.headerTitle', { - defaultMessage: 'Content Settings', - }), - rightSideItems: [ - makeRequest(pipelineState)} - data-test-subj={'entSearchContentSettingsSaveButton'} - > - {i18n.translate('xpack.enterpriseSearch.content.settings.saveButtonLabel', { - defaultMessage: 'Save', - })} - , - setPipeline(defaultPipeline)} - data-test-subj={'entSearchContentSettingsResetButton'} - > - {i18n.translate('xpack.enterpriseSearch.content.settings.resetButtonLabel', { - defaultMessage: 'Reset', - })} - , - ], - }} - pageViewTelemetry="Settings" - isLoading={false} - > - - setPipeline({ - ...pipelineState, - extract_binary_content: !pipelineState.extract_binary_content, - }) - } - title={i18n.translate('xpack.enterpriseSearch.content.settings.contentExtraction.title', { - defaultMessage: 'Deployment wide content extraction', - })} - value={extractBinaryContent} - /> - - - setPipeline({ - ...pipelineState, - reduce_whitespace: !pipelineState.reduce_whitespace, - }) - } - title={i18n.translate( - 'xpack.enterpriseSearch.content.settings.whitespaceReduction.deploymentHeaderTitle', - { - defaultMessage: 'Deployment wide whitespace reduction', - } - )} - value={reduceWhitespace} - /> - - - {i18n.translate('xpack.enterpriseSearch.content.settings.mlInference.link', { - defaultMessage: 'Learn more about document enrichment with ML', - })} - - } - onChange={() => - setPipeline({ - ...pipelineState, - run_ml_inference: !pipelineState.run_ml_inference, - }) - } - title={i18n.translate( - 'xpack.enterpriseSearch.content.settings.mlInference.deploymentHeaderTitle', - { - defaultMessage: 'Deployment wide ML Inference Pipelines extraction', - } - )} - value={runMLInference} - /> - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_panel.tsx index 673861d80e6ef..635d627b6d9b9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_panel.tsx @@ -16,7 +16,6 @@ import { EuiSwitchEvent, EuiText, } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; interface SettingsPanelProps { description: string; @@ -45,23 +44,19 @@ export const SettingsPanel: React.FC = ({

{description}

-

- {i18n.translate( - 'xpack.enterpriseSearch.content.settings.contentExtraction.descriptionTwo', - { - defaultMessage: - 'You can also enable or disable this feature for a specific index on the index’s configuration page.', - } - )} -

+ {link && ( + <> + + {link} + + )} - {link && {link}} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.test.tsx index 6b2a17ddee57d..9fcfe7c7fcfab 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.test.tsx @@ -18,7 +18,6 @@ import { SetupGuide } from '../enterprise_search_overview/components/setup_guide import { VersionMismatchPage } from '../shared/version_mismatch'; import { SearchIndicesRouter } from './components/search_indices'; -import { Settings } from './components/settings'; import { EnterpriseSearchContent, EnterpriseSearchContentConfigured } from '.'; @@ -49,7 +48,7 @@ describe('EnterpriseSearchContent', () => { }); it('renders EnterpriseSearchContentConfigured when config.host is not set & Ent Search cannot be deployed', () => { - setMockValues({ errorConnectingMessage: '', config: { canDeployEntSearch: false, host: '' } }); + setMockValues({ config: { canDeployEntSearch: false, host: '' }, errorConnectingMessage: '' }); const wrapper = shallow(); expect(wrapper.find(EnterpriseSearchContentConfigured)).toHaveLength(1); @@ -61,6 +60,5 @@ describe('EnterpriseSearchContentConfigured', () => { it('renders engine routes', () => { expect(wrapper.find(SearchIndicesRouter)).toHaveLength(1); - expect(wrapper.find(Settings)).toHaveLength(1); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx index cd99649bcc88d..3e0240bc2538d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx @@ -24,7 +24,6 @@ import { ConnectorDetailRouter } from './components/connector_detail/connector_d import { Connectors } from './components/connectors/connectors'; import { NotFound } from './components/not_found'; import { SearchIndicesRouter } from './components/search_indices'; -import { Settings } from './components/settings'; import { CONNECTORS_PATH, CONNECTOR_DETAIL_PATH, @@ -32,7 +31,6 @@ import { ERROR_STATE_PATH, ROOT_PATH, SEARCH_INDICES_PATH, - SETTINGS_PATH, SETUP_GUIDE_PATH, } from './routes'; @@ -88,9 +86,6 @@ export const EnterpriseSearchContentConfigured: React.FC - - - diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx index 2e9f7d1d03aae..d643a2371984c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx @@ -57,12 +57,6 @@ const baseNavItems = [ items: undefined, name: 'Web crawlers', }, - { - href: '/app/enterprise_search/content/settings', - id: 'settings', - items: undefined, - name: 'Settings', - }, ], name: 'Content', }, @@ -366,15 +360,12 @@ describe('useEnterpriseSearchAnalyticsNav', () => { it('returns basic nav all params are empty', () => { const navItems = useEnterpriseSearchAnalyticsNav(); - // filter out settings item because we're setting hasDefaultIngestPipeline to false expect(navItems).toEqual( baseNavItems.map((item) => item.id === 'content' ? { ...item, - items: item.items?.filter( - (contentItem: { id: string }) => contentItem.id !== 'settings' - ), + items: item.items, } : item ) @@ -382,16 +373,13 @@ describe('useEnterpriseSearchAnalyticsNav', () => { }); it('returns basic nav if only name provided', () => { - // filter out settings item because we're setting hasDefaultIngestPipeline to false const navItems = useEnterpriseSearchAnalyticsNav('my-test-collection'); expect(navItems).toEqual( baseNavItems.map((item) => item.id === 'content' ? { ...item, - items: item.items?.filter( - (contentItem: { id: string }) => contentItem.id !== 'settings' - ), + items: item.items, } : item ) diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx index ba4a119ed808d..5f0efc3688d6d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx @@ -29,14 +29,13 @@ import { CONNECTORS_PATH, CRAWLERS_PATH, SEARCH_INDICES_PATH, - SETTINGS_PATH, } from '../../enterprise_search_content/routes'; import { KibanaLogic } from '../kibana'; import { generateNavLink } from './nav_link_helpers'; export const useEnterpriseSearchNav = () => { - const { isSidebarEnabled, productAccess, productFeatures } = useValues(KibanaLogic); + const { isSidebarEnabled, productAccess } = useValues(KibanaLogic); const indicesNavItems = useIndicesNav(); if (!isSidebarEnabled) return undefined; @@ -65,10 +64,10 @@ export const useEnterpriseSearchNav = () => { defaultMessage: 'Indices', }), ...generateNavLink({ + items: indicesNavItems, shouldNotCreateHref: true, shouldShowActiveForSubroutes: true, to: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + SEARCH_INDICES_PATH, - items: indicesNavItems, }), }, { @@ -93,21 +92,6 @@ export const useEnterpriseSearchNav = () => { to: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + CRAWLERS_PATH, }), }, - ...(productFeatures.hasDefaultIngestPipeline - ? [ - { - id: 'settings', - name: i18n.translate('xpack.enterpriseSearch.nav.contentSettingsTitle', { - defaultMessage: 'Settings', - }), - ...generateNavLink({ - shouldNotCreateHref: true, - shouldShowActiveForSubroutes: true, - to: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + SETTINGS_PATH, - }), - }, - ] - : []), ], name: i18n.translate('xpack.enterpriseSearch.nav.contentTitle', { defaultMessage: 'Content', diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 721b277d5a351..2ac7ba1031c63 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -12701,7 +12701,6 @@ "xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.indexNameDescription": "Cette action ne peut pas être annulée. Veuillez saisir {indexName} pour confirmer.", "xpack.enterpriseSearch.content.searchIndices.deleteModal.title": "Voulez-vous vraiment supprimer {indexName} ?", "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.tooltipContent": "Les index optimisés pour la recherche sont précédés du préfixe {code}. Ils sont gérés par des mécanismes d'ingestion tels que des robots d'indexation, des connecteurs ou des API d'ingestion.", - "xpack.enterpriseSearch.content.settings.description": "Ces paramètres s'appliquent à tous les nouveaux index Elasticsearch créés par des mécanismes d'ingestion Search. Pour les index basés sur l'ingestion d'API, n'oubliez pas d'inclure le pipeline lorsque vous ingérez des documents. Ces fonctionnalités sont alimentées par {link}.", "xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "Voulez-vous vraiment supprimer le domaine \"{domainUrl}\" et tous ses paramètres ?", "xpack.enterpriseSearch.crawler.addDomainForm.entryPointLabel": "Le point d'entrée du robot d'indexation a été défini sur {entryPointValue}", "xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.description": "Cliquer sur {addAuthenticationButtonLabel} afin de fournir les informations d'identification nécessaires pour indexer le contenu protégé", @@ -14391,13 +14390,9 @@ "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.ariaLabel": "Filtrer les index Elasticsearch", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.placeHolder": "Filtrer les index Elasticsearch", "xpack.enterpriseSearch.content.searchIndices.searchIndices.tableTitle": "Index disponibles", - "xpack.enterpriseSearch.content.settings.breadcrumb": "Paramètres", "xpack.enterpriseSearch.content.settings.contactExtraction.label": "Extraction du contenu", "xpack.enterpriseSearch.content.settings.contentExtraction.description": "Extrayez du contenu interrogeable de fichiers binaires, tels que des PDF et des documents Word.", - "xpack.enterpriseSearch.content.settings.contentExtraction.descriptionTwo": "Vous pouvez également activer ou désactiver cette fonctionnalité pour un index spécifique sur la page de configuration de l'index.", "xpack.enterpriseSearch.content.settings.contentExtraction.title": "Extraction de contenu de l'ensemble du déploiement", - "xpack.enterpriseSearch.content.settings.headerTitle": "Paramètres de contenu", - "xpack.enterpriseSearch.content.settings.ingestLink": "pipelines d'ingestion", "xpack.enterpriseSearch.content.settings.mlInference.deploymentHeaderTitle": "Extraction de pipelines d'inférence de ML de l'ensemble du déploiement", "xpack.enterpriseSearch.content.settings.mlInference.description": "Les pipelines d'inférence de ML seront exécutés avec vos pipelines. Vous devrez configurer les processeurs individuellement pour chaque index sur la page de ses pipelines.", "xpack.enterpriseSearch.content.settings.mlInference.label": "Inférence de ML", @@ -14750,7 +14745,6 @@ "xpack.enterpriseSearch.nav.applications.searchApplications.connectTitle": "Connecter", "xpack.enterpriseSearch.nav.applicationsTitle": "Applications", "xpack.enterpriseSearch.nav.appSearchTitle": "App Search", - "xpack.enterpriseSearch.nav.contentSettingsTitle": "Paramètres", "xpack.enterpriseSearch.nav.contentTitle": "Contenu", "xpack.enterpriseSearch.nav.elasticsearchTitle": "Elasticsearch", "xpack.enterpriseSearch.nav.enterpriseSearchOverviewTitle": "Premiers pas", @@ -42690,4 +42684,4 @@ "xpack.serverlessObservability.nav.projectSettings": "Paramètres de projet", "xpack.serverlessObservability.nav.visualizations": "Visualisations" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 0e77a48ddccae..20828e91a9d54 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -12714,7 +12714,6 @@ "xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.indexNameDescription": "この操作は元に戻すことができません。確認するには{indexName}を入力してください。", "xpack.enterpriseSearch.content.searchIndices.deleteModal.title": "{indexName}を削除しますか?", "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.tooltipContent": "検索用に最適化されたインデックスには、{code}がプレフィックスとして付けられます。これらは、クローラー、コネクター、インジェストAPIなどのインジェストメカニズムによって管理されます。", - "xpack.enterpriseSearch.content.settings.description": "これらの設定は、Searchインジェストメカニズムで作成されたすべての新しいElasticsearchインデックスに適用されます。APIインジェストベースのインデックスの場合は、ドキュメントをインジェストするときに、必ずパイプラインを含めてください。これらの機能は{link}によって実現されます。", "xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "ドメイン\"{domainUrl}\"とすべての設定を削除しますか?", "xpack.enterpriseSearch.crawler.addDomainForm.entryPointLabel": "Webクローラーエントリポイントが{entryPointValue}として設定されました", "xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.description": "{addAuthenticationButtonLabel}をクリックすると、保護されたコンテンツのクローリングに必要な資格情報を提供します", @@ -14404,13 +14403,9 @@ "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.ariaLabel": "Elasticsearchインデックスをフィルター", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.placeHolder": "Elasticsearchインデックスをフィルター", "xpack.enterpriseSearch.content.searchIndices.searchIndices.tableTitle": "利用可能なインデックス", - "xpack.enterpriseSearch.content.settings.breadcrumb": "設定", "xpack.enterpriseSearch.content.settings.contactExtraction.label": "コンテンツ抽出", "xpack.enterpriseSearch.content.settings.contentExtraction.description": "PDFやWordドキュメントなどの検索可能なコンテンツのみをバイナリファイルから抽出します。", - "xpack.enterpriseSearch.content.settings.contentExtraction.descriptionTwo": "インデックスの構成ページで、特定のインデックスに対して、この機能を有効化または無効化することもできます。", "xpack.enterpriseSearch.content.settings.contentExtraction.title": "デプロイレベルのコンテンツ抽出", - "xpack.enterpriseSearch.content.settings.headerTitle": "コンテンツ設定", - "xpack.enterpriseSearch.content.settings.ingestLink": "インジェストパイプライン", "xpack.enterpriseSearch.content.settings.mlInference.deploymentHeaderTitle": "デプロイレベルのML推論パイプライン抽出", "xpack.enterpriseSearch.content.settings.mlInference.description": "ML推論パイプラインは、パイプラインの一部として実行されます。パイプラインページで各インデックスのプロセッサーを個別に構成する必要はありません。", "xpack.enterpriseSearch.content.settings.mlInference.label": "ML推論", @@ -14763,7 +14758,6 @@ "xpack.enterpriseSearch.nav.applications.searchApplications.connectTitle": "接続", "xpack.enterpriseSearch.nav.applicationsTitle": "アプリケーション", "xpack.enterpriseSearch.nav.appSearchTitle": "App Search", - "xpack.enterpriseSearch.nav.contentSettingsTitle": "設定", "xpack.enterpriseSearch.nav.contentTitle": "コンテンツ", "xpack.enterpriseSearch.nav.elasticsearchTitle": "Elasticsearch", "xpack.enterpriseSearch.nav.enterpriseSearchOverviewTitle": "はじめて使う", @@ -42682,4 +42676,4 @@ "xpack.serverlessObservability.nav.projectSettings": "プロジェクト設定", "xpack.serverlessObservability.nav.visualizations": "ビジュアライゼーション" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 3eeaaee47eb35..11ea074c6b327 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -12808,7 +12808,6 @@ "xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.indexNameDescription": "此操作无法撤消。请键入 {indexName} 以确认。", "xpack.enterpriseSearch.content.searchIndices.deleteModal.title": "是否确定要删除 {indexName}", "xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.tooltipContent": "搜索优化索引以 {code} 为前缀。它们由网络爬虫、连接器或采集 API 等采集机制进行管理。", - "xpack.enterpriseSearch.content.settings.description": "这些设置适用于由 Search 采集机制创建的所有新 Elasticsearch 索引。对于基于 API 采集的索引,在采集文档时请记得包括管道。这些功能由 {link} 提供支持。", "xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "确定要移除域“{domainUrl}”及其所有设置?", "xpack.enterpriseSearch.crawler.addDomainForm.entryPointLabel": "网络爬虫入口点已设置为 {entryPointValue}", "xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.description": "单击 {addAuthenticationButtonLabel} 以提供爬网受保护内容所需的凭据", @@ -14498,13 +14497,9 @@ "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.ariaLabel": "筛选 Elasticsearch 索引", "xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.placeHolder": "筛选 Elasticsearch 索引", "xpack.enterpriseSearch.content.searchIndices.searchIndices.tableTitle": "可用索引", - "xpack.enterpriseSearch.content.settings.breadcrumb": "设置", "xpack.enterpriseSearch.content.settings.contactExtraction.label": "内容提取", "xpack.enterpriseSearch.content.settings.contentExtraction.description": "从二进制文件(如 PDF 和 Word 文档)提取可搜索内容。", - "xpack.enterpriseSearch.content.settings.contentExtraction.descriptionTwo": "您还可以在索引的配置页面针对特定索引启用或禁用此功能。", "xpack.enterpriseSearch.content.settings.contentExtraction.title": "部署广泛内容提取", - "xpack.enterpriseSearch.content.settings.headerTitle": "内容设置", - "xpack.enterpriseSearch.content.settings.ingestLink": "采集管道", "xpack.enterpriseSearch.content.settings.mlInference.deploymentHeaderTitle": "部署广泛 ML 推理管道提取", "xpack.enterpriseSearch.content.settings.mlInference.description": "ML 推理管道将作为您管道的一部分运行。您需要在其管道页面上单独为每个索引配置处理器。", "xpack.enterpriseSearch.content.settings.mlInference.label": "ML 推理", @@ -14857,7 +14852,6 @@ "xpack.enterpriseSearch.nav.applications.searchApplications.connectTitle": "连接", "xpack.enterpriseSearch.nav.applicationsTitle": "应用程序", "xpack.enterpriseSearch.nav.appSearchTitle": "App Search", - "xpack.enterpriseSearch.nav.contentSettingsTitle": "设置", "xpack.enterpriseSearch.nav.contentTitle": "内容", "xpack.enterpriseSearch.nav.elasticsearchTitle": "Elasticsearch", "xpack.enterpriseSearch.nav.enterpriseSearchOverviewTitle": "入门", @@ -42662,4 +42656,4 @@ "xpack.serverlessObservability.nav.projectSettings": "项目设置", "xpack.serverlessObservability.nav.visualizations": "可视化" } -} \ No newline at end of file +}