mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Search] Remove indices callout and rename Home nav item (#172103)
## Summary Removes the indices callout that's been here for over a year, and renames the Overview nav item to Home.
This commit is contained in:
parent
cb3fd2132f
commit
ad177dd94f
7 changed files with 28 additions and 91 deletions
|
@ -14,8 +14,6 @@ import React from 'react';
|
|||
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import { EuiCallOut, EuiButton } from '@elastic/eui';
|
||||
|
||||
import { AddContentEmptyPrompt } from '../../../shared/add_content_empty_prompt';
|
||||
import { ElasticsearchResources } from '../../../shared/elasticsearch_resources';
|
||||
import { GettingStartedSteps } from '../../../shared/getting_started_steps';
|
||||
|
@ -75,20 +73,6 @@ describe('SearchIndices', () => {
|
|||
expect(wrapper.find(ElasticsearchResources)).toHaveLength(0);
|
||||
|
||||
expect(mockActions.fetchIndices).toHaveBeenCalled();
|
||||
expect(wrapper.find(EuiCallOut)).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('dismisses callout on click to button', () => {
|
||||
setMockValues(mockValues);
|
||||
setMockActions(mockActions);
|
||||
|
||||
const wrapper = shallow(<SearchIndices />);
|
||||
const dismissButton = wrapper.find(EuiCallOut).find(EuiButton);
|
||||
expect(global.localStorage.getItem('enterprise-search-indices-callout-dismissed')).toBe(
|
||||
'false'
|
||||
);
|
||||
dismissButton.simulate('click');
|
||||
expect(global.localStorage.getItem('enterprise-search-indices-callout-dismissed')).toBe('true');
|
||||
});
|
||||
|
||||
// Move this test to the indices table when writing tests there
|
||||
|
|
|
@ -18,7 +18,6 @@ import {
|
|||
EuiTitle,
|
||||
EuiSwitch,
|
||||
EuiSearchBar,
|
||||
EuiLink,
|
||||
EuiToolTip,
|
||||
EuiCode,
|
||||
} from '@elastic/eui';
|
||||
|
@ -27,14 +26,12 @@ import { i18n } from '@kbn/i18n';
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
||||
import { AddContentEmptyPrompt } from '../../../shared/add_content_empty_prompt';
|
||||
import { docLinks } from '../../../shared/doc_links';
|
||||
import { ElasticsearchResources } from '../../../shared/elasticsearch_resources';
|
||||
import { GettingStartedSteps } from '../../../shared/getting_started_steps';
|
||||
import { HttpLogic } from '../../../shared/http/http_logic';
|
||||
import { KibanaLogic } from '../../../shared/kibana';
|
||||
import { EuiButtonTo, EuiLinkTo } from '../../../shared/react_router_helpers';
|
||||
import { handlePageChange } from '../../../shared/table_pagination';
|
||||
import { useLocalStorage } from '../../../shared/use_local_storage';
|
||||
import { NEW_INDEX_PATH } from '../../routes';
|
||||
import { EnterpriseSearchContentPageTemplate } from '../layout/page_template';
|
||||
|
||||
|
@ -62,11 +59,6 @@ export const SearchIndices: React.FC = () => {
|
|||
const { config } = useValues(KibanaLogic);
|
||||
const { errorConnectingMessage } = useValues(HttpLogic);
|
||||
|
||||
const [calloutDismissed, setCalloutDismissed] = useLocalStorage<boolean>(
|
||||
'enterprise-search-indices-callout-dismissed',
|
||||
false
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
// We don't want to trigger loading for each search query change, so we need this
|
||||
// flag to set if the call to backend is first request.
|
||||
|
@ -162,46 +154,6 @@ export const SearchIndices: React.FC = () => {
|
|||
)}
|
||||
{!hasNoIndices ? (
|
||||
<EuiFlexGroup direction="column">
|
||||
{!calloutDismissed && (
|
||||
<EuiFlexItem>
|
||||
<EuiSpacer size="l" />
|
||||
<EuiCallOut
|
||||
size="m"
|
||||
title={i18n.translate('xpack.enterpriseSearch.content.callout.title', {
|
||||
defaultMessage: 'Introducing Elasticsearch indices in Search',
|
||||
})}
|
||||
iconType="iInCircle"
|
||||
>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.indices.callout.text"
|
||||
defaultMessage="Your Elasticsearch indices are now front and center in Search. You can create new indices and build search experiences with them directly. To learn more about how to use Elasticsearch indices in Search {docLink}"
|
||||
values={{
|
||||
docLink: (
|
||||
<EuiLink
|
||||
data-test-subj="search-index-link"
|
||||
href={docLinks.appSearchElasticsearchIndexedEngines}
|
||||
target="_blank"
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.indices.callout.docLink',
|
||||
{
|
||||
defaultMessage: 'read the documentation',
|
||||
}
|
||||
)}
|
||||
</EuiLink>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
<EuiButton fill onClick={() => setCalloutDismissed(true)}>
|
||||
{i18n.translate('xpack.enterpriseSearch.content.callout.dismissButton', {
|
||||
defaultMessage: 'Dismiss',
|
||||
})}
|
||||
</EuiButton>
|
||||
</EuiCallOut>
|
||||
</EuiFlexItem>
|
||||
)}
|
||||
<EuiFlexItem>
|
||||
<IndicesStats />
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -27,12 +27,11 @@ const DEFAULT_PRODUCT_ACCESS: ProductAccess = {
|
|||
hasWorkplaceSearchAccess: true,
|
||||
};
|
||||
const baseNavItems = [
|
||||
{
|
||||
expect.objectContaining({
|
||||
href: '/app/enterprise_search/overview',
|
||||
id: 'overview',
|
||||
id: 'home',
|
||||
items: undefined,
|
||||
name: 'Overview',
|
||||
},
|
||||
}),
|
||||
{
|
||||
id: 'content',
|
||||
items: [
|
||||
|
@ -225,8 +224,8 @@ describe('useEnterpriseSearchApplicationNav', () => {
|
|||
it('returns selected engine sub nav items', () => {
|
||||
const engineName = 'my-test-engine';
|
||||
const navItems = useEnterpriseSearchApplicationNav(engineName);
|
||||
expect(navItems?.map((ni) => ni.name)).toEqual([
|
||||
'Overview',
|
||||
expect(navItems![0].id).toEqual('home');
|
||||
expect(navItems?.slice(1).map((ni) => ni.name)).toEqual([
|
||||
'Content',
|
||||
'Applications',
|
||||
'Getting started',
|
||||
|
@ -282,8 +281,8 @@ describe('useEnterpriseSearchApplicationNav', () => {
|
|||
it('returns selected engine without tabs when isEmpty', () => {
|
||||
const engineName = 'my-test-engine';
|
||||
const navItems = useEnterpriseSearchApplicationNav(engineName, true);
|
||||
expect(navItems?.map((ni) => ni.name)).toEqual([
|
||||
'Overview',
|
||||
expect(navItems![0].id).toEqual('home');
|
||||
expect(navItems?.slice(1).map((ni) => ni.name)).toEqual([
|
||||
'Content',
|
||||
'Applications',
|
||||
'Getting started',
|
||||
|
@ -355,7 +354,12 @@ describe('useEnterpriseSearchAnalyticsNav', () => {
|
|||
expect(navItems).toEqual(
|
||||
baseNavItems.map((item) =>
|
||||
item.id === 'content'
|
||||
? { ...item, items: item.items?.filter((contentItem) => contentItem.id !== 'settings') }
|
||||
? {
|
||||
...item,
|
||||
items: item.items?.filter(
|
||||
(contentItem: { id: string }) => contentItem.id !== 'settings'
|
||||
),
|
||||
}
|
||||
: item
|
||||
)
|
||||
);
|
||||
|
@ -367,7 +371,12 @@ describe('useEnterpriseSearchAnalyticsNav', () => {
|
|||
expect(navItems).toEqual(
|
||||
baseNavItems.map((item) =>
|
||||
item.id === 'content'
|
||||
? { ...item, items: item.items?.filter((contentItem) => contentItem.id !== 'settings') }
|
||||
? {
|
||||
...item,
|
||||
items: item.items?.filter(
|
||||
(contentItem: { id: string }) => contentItem.id !== 'settings'
|
||||
),
|
||||
}
|
||||
: item
|
||||
)
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
|
||||
import { useValues } from 'kea';
|
||||
|
||||
import { EuiFlexGroup, EuiIcon, EuiSideNavItemType } from '@elastic/eui';
|
||||
import { EuiFlexGroup, EuiIcon, EuiSideNavItemType, EuiText } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import {
|
||||
|
@ -35,10 +35,14 @@ export const useEnterpriseSearchNav = () => {
|
|||
|
||||
const navItems: Array<EuiSideNavItemType<unknown>> = [
|
||||
{
|
||||
id: 'overview',
|
||||
name: i18n.translate('xpack.enterpriseSearch.nav.overviewTitle', {
|
||||
defaultMessage: 'Overview',
|
||||
}),
|
||||
id: 'home',
|
||||
name: (
|
||||
<EuiText size="s">
|
||||
{i18n.translate('xpack.enterpriseSearch.nav.homeTitle', {
|
||||
defaultMessage: 'Home',
|
||||
})}
|
||||
</EuiText>
|
||||
),
|
||||
...generateNavLink({
|
||||
shouldNotCreateHref: true,
|
||||
shouldShowActiveForSubroutes: true,
|
||||
|
|
|
@ -13131,7 +13131,6 @@
|
|||
"xpack.enterpriseSearch.content.index.connector.syncRules.flyout.errorTitle": "{ids} {idsLength, plural, one {règle} many {règles} other {règles}} de synchronisation {idsLength, plural, one {est} many {sont} other {sont}} non valide(s).",
|
||||
"xpack.enterpriseSearch.content.index.pipelines.copyCustomizeCallout.description": "Votre index utilise notre pipeline d'ingestion par défaut {defaultPipeline}. Copiez ce pipeline dans une configuration spécifique à l'index pour déverrouiller la possibilité de créer des pipelines d'ingestion et d'inférence personnalisés.",
|
||||
"xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalBodyAPIText": "{apiIndex} Les modifications apportées aux paramètres ci-dessous sont uniquement fournies à titre indicatif. Ces paramètres ne seront pas conservés dans votre index ou pipeline.",
|
||||
"xpack.enterpriseSearch.content.indices.callout.text": "Vos index Elasticsearch sont maintenant au premier plan dans Search. Vous pouvez créer des index et lancer directement des expériences de recherche avec ces index. Pour en savoir plus sur l'utilisation des index de Elasticsearch dans Search {docLink}",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.description": "D'abord, générez une clé d'API Elasticsearch. Cette clé {apiKeyName} permet d'activer les autorisations de lecture et d'écriture du connecteur pour qu'il puisse indexer les documents dans l'index {indexName} créé. Enregistrez cette clé en lieu sûr, car vous en aurez besoin pour configurer votre connecteur.",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.connectorConnected": "Votre connecteur {name} s’est bien connecté à Search.",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.description.secondParagraph": "Le référentiel de connecteurs contient plusieurs {link}. Utilisez notre cadre pour accélérer le développement de connecteurs pour des sources de données personnalisées.",
|
||||
|
@ -14347,8 +14346,6 @@
|
|||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.done": "Terminé",
|
||||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.generateButton": "Générer une clé",
|
||||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.title": "Créer une clé d'API d'analyse",
|
||||
"xpack.enterpriseSearch.content.callout.dismissButton": "Rejeter",
|
||||
"xpack.enterpriseSearch.content.callout.title": "Présentation des index Elasticsearch dans Search",
|
||||
"xpack.enterpriseSearch.content.cannotConnect.body": "En savoir plus.",
|
||||
"xpack.enterpriseSearch.content.cannotConnect.title": "Impossible de se connecter à Enterprise Search",
|
||||
"xpack.enterpriseSearch.content.crawler.authentication": "Authentification",
|
||||
|
@ -14450,7 +14447,6 @@
|
|||
"xpack.enterpriseSearch.content.index.syncButton.label": "Sync",
|
||||
"xpack.enterpriseSearch.content.index.syncButton.syncing.label": "Synchronisation en cours",
|
||||
"xpack.enterpriseSearch.content.index.syncButton.waitingForSync.label": "En attente de la synchronisation",
|
||||
"xpack.enterpriseSearch.content.indices.callout.docLink": "lire la documentation",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.button.label": "Générer une clé API",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.cancelButton.label": "Annuler",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.confirmButton.label": "Générer une clé API",
|
||||
|
|
|
@ -13144,7 +13144,6 @@
|
|||
"xpack.enterpriseSearch.content.index.connector.syncRules.flyout.errorTitle": "同期{idsLength, plural, other {ルール}}{ids}{idsLength, plural, other {あります}}無効です。",
|
||||
"xpack.enterpriseSearch.content.index.pipelines.copyCustomizeCallout.description": "インデックスはデフォルトインジェストパイプライン\"{defaultPipeline}\"を使用しています。パイプラインをインデックス固有の構成にコピーし、カスタムインジェストと推論パイプラインを作成できるようにします。",
|
||||
"xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalBodyAPIText": "{apiIndex}以下の設定に行われた変更は参照専用です。これらの設定は、インデックスまたはパイプラインまで永続しません。",
|
||||
"xpack.enterpriseSearch.content.indices.callout.text": "Elasticsearchインデックスは、現在、Searchの中心です。直接そのインデックスを使用して、新しいインデックスを作成し、検索エクスペリエンスを構築できます。SearchでのElasticsearchの使用方法の詳細については、{docLink}をご覧ください",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.description": "まず、Elasticsearch APIキーを生成します。この{apiKeyName}は、コネクターがドキュメントを作成された{indexName}インデックスにインデックスするための読み書き権限を有効にします。キーは安全な場所に保管してください。コネクターを構成するときに必要になります。",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.connectorConnected": "コネクター{name}は、正常にSearchに接続されました。",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.description.secondParagraph": "コネクターリポジトリには複数の{link}が含まれています。当社のフレームワークを使用すると、カスタムデータソース用のコネクターの開発を加速できます。",
|
||||
|
@ -14360,8 +14359,6 @@
|
|||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.done": "完了",
|
||||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.generateButton": "キーを生成",
|
||||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.title": "分析APIキーを作成",
|
||||
"xpack.enterpriseSearch.content.callout.dismissButton": "閉じる",
|
||||
"xpack.enterpriseSearch.content.callout.title": "SearchでのElasticsearchインデックスの概要",
|
||||
"xpack.enterpriseSearch.content.cannotConnect.body": "詳細。",
|
||||
"xpack.enterpriseSearch.content.cannotConnect.title": "エンタープライズ サーチに接続できません",
|
||||
"xpack.enterpriseSearch.content.crawler.authentication": "認証",
|
||||
|
@ -14463,7 +14460,6 @@
|
|||
"xpack.enterpriseSearch.content.index.syncButton.label": "同期",
|
||||
"xpack.enterpriseSearch.content.index.syncButton.syncing.label": "同期中",
|
||||
"xpack.enterpriseSearch.content.index.syncButton.waitingForSync.label": "同期を待機しています",
|
||||
"xpack.enterpriseSearch.content.indices.callout.docLink": "ドキュメントを読む",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.button.label": "APIキーを生成",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.cancelButton.label": "キャンセル",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.confirmButton.label": "APIキーを生成",
|
||||
|
|
|
@ -13144,7 +13144,6 @@
|
|||
"xpack.enterpriseSearch.content.index.connector.syncRules.flyout.errorTitle": "同步{idsLength, plural, other {规则}} {ids}{idsLength, plural, other {有}}无效。",
|
||||
"xpack.enterpriseSearch.content.index.pipelines.copyCustomizeCallout.description": "您的索引正使用默认采集管道 {defaultPipeline}。将该管道复制到特定于索引的配置中,以解锁创建定制采集和推理管道的功能。",
|
||||
"xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalBodyAPIText": "{apiIndex}对以下设置所做的更改仅供参考。这些设置不会持续用于您的索引或管道。",
|
||||
"xpack.enterpriseSearch.content.indices.callout.text": "您的 Elasticsearch 索引如今在 Search 中位于前排和中心位置。您可以创建新索引,直接通过它们构建搜索体验。有关如何在 Search 中使用 Elasticsearch 索引的详情,{docLink}",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.description": "首先,生成一个 Elasticsearch API 密钥。此 {apiKeyName} 密钥将为连接器启用读取和写入权限,以便将文档索引到已创建的 {indexName} 索引。请将该密钥保存到安全位置,因为您需要它来配置连接器。",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.connectorConnected": "您的连接器 {name} 已成功连接到 Search。",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.description.secondParagraph": "连接器存储库包含几个 {link}。使用我们的框架可加速为定制数据源开发连接器。",
|
||||
|
@ -14360,8 +14359,6 @@
|
|||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.done": "完成",
|
||||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.generateButton": "生成密钥",
|
||||
"xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.title": "创建分析 API 密钥",
|
||||
"xpack.enterpriseSearch.content.callout.dismissButton": "关闭",
|
||||
"xpack.enterpriseSearch.content.callout.title": "在 Search 中引入 Elasticsearch 索引",
|
||||
"xpack.enterpriseSearch.content.cannotConnect.body": "更多信息。",
|
||||
"xpack.enterpriseSearch.content.cannotConnect.title": "无法连接到 Enterprise Search",
|
||||
"xpack.enterpriseSearch.content.crawler.authentication": "身份验证",
|
||||
|
@ -14463,7 +14460,6 @@
|
|||
"xpack.enterpriseSearch.content.index.syncButton.label": "同步",
|
||||
"xpack.enterpriseSearch.content.index.syncButton.syncing.label": "正在同步",
|
||||
"xpack.enterpriseSearch.content.index.syncButton.waitingForSync.label": "等待同步",
|
||||
"xpack.enterpriseSearch.content.indices.callout.docLink": "阅读文档",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.button.label": "生成 API 密钥",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.cancelButton.label": "取消",
|
||||
"xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.confirmButton.label": "生成 API 密钥",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue