From 8f8be5c087cab69b0ca68cab9fae2d8f728ea5cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 25 Sep 2024 09:45:59 +0200
Subject: [PATCH 01/18] AccessControlIndexSelector component can be more
customized
---
.../access_control_index_selector.tsx | 128 +++++++++++-------
1 file changed, 81 insertions(+), 47 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
index c525ed0a413af..c8896df80baf1 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
@@ -7,76 +7,110 @@
import React from 'react';
-import { EuiFlexGrid, EuiFlexItem, EuiSuperSelect, EuiText, EuiTitle } from '@elastic/eui';
+import {
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiIcon,
+ EuiSuperSelect,
+ EuiText,
+ EuiTitle,
+} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
export interface AccessControlSelectorOption {
description: string;
+ error: boolean;
title: string;
value: 'content-index' | 'access-control-index';
}
-const indexSelectorOptions: AccessControlSelectorOption[] = [
- {
- description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
- {
- defaultMessage: 'Browse content fields',
- }
- ),
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title',
- {
- defaultMessage: 'Content index',
- }
- ),
- value: 'content-index',
- },
- {
- description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
- {
- defaultMessage: 'Browse document level security fields',
- }
- ),
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title',
- {
- defaultMessage: 'Access control index',
- }
- ),
- value: 'access-control-index',
- },
-];
-
interface IndexSelectorProps {
+ accessControlIndexDescription?: string;
+ accessControlIndexTitle?: string;
+ accessSyncError?: boolean;
+ contentIndexDescription?: string;
+ contentIndexTitle?: string;
+ contentSyncError?: boolean;
+ fullWidth?: boolean;
onChange(value: AccessControlSelectorOption['value']): void;
valueOfSelected?: AccessControlSelectorOption['value'];
}
export const AccessControlIndexSelector: React.FC = ({
- valueOfSelected,
+ accessControlIndexDescription,
+ accessControlIndexTitle,
+ accessSyncError,
+ contentIndexDescription,
+ contentIndexTitle,
+ contentSyncError,
onChange,
+ valueOfSelected,
+ fullWidth,
}) => {
+ const indexSelectorOptions: AccessControlSelectorOption[] = [
+ {
+ description: i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
+ {
+ defaultMessage: contentIndexDescription || 'Browse content fields',
+ }
+ ),
+ error: Boolean(contentSyncError),
+ title: i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title',
+ {
+ defaultMessage: contentIndexTitle || 'Content index',
+ }
+ ),
+ value: 'content-index',
+ },
+ {
+ description: i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
+ {
+ defaultMessage: accessControlIndexDescription || 'Browse document level security fields',
+ }
+ ),
+ error: Boolean(accessSyncError),
+ title: i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title',
+ {
+ defaultMessage: accessControlIndexTitle || 'Access control index',
+ }
+ ),
+ value: 'access-control-index',
+ },
+ ];
+
return (
: undefined}
options={indexSelectorOptions.map((option) => {
return {
dropdownDisplay: (
-
-
-
- {option.title}
-
-
-
-
- {option.description}
-
-
-
+
+ {option.error ? (
+
+ {' '}
+
+ ) : null}
+
+
+
+
+ {option.title}
+
+
+
+
+ {option.description}
+
+
+
+
),
inputDisplay: option.title,
value: option.value,
From 280957a33c3701490c950de60b1c2a2be4f72740 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 25 Sep 2024 09:50:51 +0200
Subject: [PATCH 02/18] Consuming always AccessControlIndexSelector with new
props
---
.../components/search_index/documents.tsx | 1 +
.../search_index/index_mappings.tsx | 2 +-
.../search_index/sync_jobs/sync_jobs.tsx | 69 ++++++++-----------
3 files changed, 32 insertions(+), 40 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx
index 353fc84546a9c..a43d494c68de4 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx
@@ -133,6 +133,7 @@ export const SearchIndexDocuments: React.FC = () => {
accessControlSwitch={
shouldShowAccessControlSwitcher ? (
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_mappings.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_mappings.tsx
index b35415cc2e0e0..f9f46e854becd 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_mappings.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_mappings.tsx
@@ -69,13 +69,13 @@ export const SearchIndexIndexMappings: React.FC = () => {
return (
<>
-
{shouldShowAccessControlSwitch && (
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index 9495716e1a5e0..527b1e10f4a2d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -5,13 +5,11 @@
* 2.0.
*/
-import React, { useEffect } from 'react';
+import React, { useEffect, useState } from 'react';
import { useActions, useValues } from 'kea';
-import { EuiButtonGroup } from '@elastic/eui';
-
-import { i18n } from '@kbn/i18n';
+import { EuiSpacer } from '@elastic/eui';
import { Connector, SyncJobsTable } from '@kbn/search-connectors';
@@ -19,6 +17,11 @@ import { KibanaLogic } from '../../../../shared/kibana';
import { hasDocumentLevelSecurityFeature } from '../../../utils/connector_helpers';
+import {
+ AccessControlIndexSelector,
+ AccessControlSelectorOption,
+} from '../components/access_control_index_selector/access_control_index_selector';
+
import { SyncJobsViewLogic } from './sync_jobs_view_logic';
export interface SyncJobsProps {
@@ -31,6 +34,8 @@ export const SyncJobs: React.FC = ({ connector }) => {
productFeatures.hasDocumentLevelSecurityEnabled && hasDocumentLevelSecurityFeature(connector);
const errorOnAccessSync = Boolean(connector.last_access_control_sync_error);
const errorOnContentSync = Boolean(connector.last_sync_error);
+ const [selectedIndexType, setSelectedIndexType] =
+ useState('content-index');
const {
connectorId,
syncJobsPagination: pagination,
@@ -63,44 +68,30 @@ export const SyncJobs: React.FC = ({ connector }) => {
}
}, [connectorId, selectedSyncJobCategory]);
+ useEffect(() => {
+ if (selectedIndexType === 'content-index') {
+ setSelectedSyncJobCategory('content');
+ } else {
+ setSelectedSyncJobCategory('access_control');
+ }
+ }, [selectedIndexType]);
+
return (
<>
{shouldShowAccessSyncs && (
- {
- if (optionId === 'content' || optionId === 'access_control') {
- setSelectedSyncJobCategory(optionId);
- }
- }}
- options={[
- {
- id: 'content',
- label: i18n.translate(
- 'xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.content.label',
- { defaultMessage: 'Content syncs' }
- ),
- ...(errorOnContentSync ? { iconSide: 'right', iconType: 'warning' } : {}),
- },
-
- {
- id: 'access_control',
- label: i18n.translate(
- 'xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.accessControl.label',
- { defaultMessage: 'Access control syncs' }
- ),
- ...(errorOnAccessSync ? { iconSide: 'right', iconType: 'warning' } : {}),
- },
- ]}
- />
+ <>
+
+
+ >
)}
{selectedSyncJobCategory === 'content' ? (
Date: Wed, 25 Sep 2024 09:53:16 +0200
Subject: [PATCH 03/18] Index mappings becomes simple Mappings and index spaces
fix
---
.../connector_detail/connector_detail.tsx | 2 +-
.../components/search_index/search_index.tsx | 69 +++++++++++++++----
2 files changed, 58 insertions(+), 13 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx
index 62e209d2a5f14..d8c8ae59c3bc9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx
@@ -119,7 +119,7 @@ export const ConnectorDetail: React.FC = () => {
label: i18n.translate(
'xpack.enterpriseSearch.content.connectors.connectorDetail.indexMappingsTabLabel',
{
- defaultMessage: 'Index mappings',
+ defaultMessage: 'Mappings',
}
),
onClick: () =>
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx
index 538cc1c575fc9..6cdd06f1586a2 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx
@@ -11,7 +11,7 @@ import { useParams } from 'react-router-dom';
import { useValues } from 'kea';
-import { EuiTabbedContent, EuiTabbedContentTab } from '@elastic/eui';
+import { EuiSpacer, EuiTabbedContent, EuiTabbedContentTab } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
@@ -141,24 +141,39 @@ export const SearchIndex: React.FC = () => {
}),
},
{
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
id: SearchIndexTabId.DOCUMENTS,
name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.documentsTabLabel', {
defaultMessage: 'Documents',
}),
},
{
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
id: SearchIndexTabId.INDEX_MAPPINGS,
name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.indexMappingsTabLabel', {
- defaultMessage: 'Index mappings',
+ defaultMessage: 'Mappings',
}),
},
];
const CONNECTOR_TABS: EuiTabbedContentTab[] = [
{
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
id: SearchIndexTabId.CONFIGURATION,
name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.configurationTabLabel', {
defaultMessage: 'Configuration',
@@ -167,7 +182,12 @@ export const SearchIndex: React.FC = () => {
...(hasFilteringFeature
? [
{
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
id: SearchIndexTabId.SYNC_RULES,
name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.syncRulesTabLabel', {
defaultMessage: 'Sync rules',
@@ -176,7 +196,12 @@ export const SearchIndex: React.FC = () => {
]
: []),
{
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
id: SearchIndexTabId.SCHEDULING,
name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.schedulingTabLabel', {
defaultMessage: 'Scheduling',
@@ -186,14 +211,24 @@ export const SearchIndex: React.FC = () => {
const CRAWLER_TABS: EuiTabbedContentTab[] = [
{
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
id: SearchIndexTabId.DOMAIN_MANAGEMENT,
name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.domainManagementTabLabel', {
defaultMessage: 'Manage Domains',
}),
},
{
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
id: SearchIndexTabId.CRAWLER_CONFIGURATION,
name: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.crawlerConfigurationTabLabel',
@@ -203,7 +238,12 @@ export const SearchIndex: React.FC = () => {
),
},
{
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
'data-test-subj': 'entSearchContent-index-crawler-scheduler-tab',
id: SearchIndexTabId.SCHEDULING,
name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.schedulingTabLabel', {
@@ -213,7 +253,12 @@ export const SearchIndex: React.FC = () => {
];
const PIPELINES_TAB: EuiTabbedContentTab = {
- content: ,
+ content: (
+ <>
+
+
+ >
+ ),
id: SearchIndexTabId.PIPELINES,
name: i18n.translate('xpack.enterpriseSearch.content.searchIndex.pipelinesTabLabel', {
defaultMessage: 'Pipelines',
@@ -289,7 +334,7 @@ const Content: React.FC = ({
}
return (
<>
-
+
{isCrawlerIndex(index) && }
>
);
From 44bd704f6566892ec351be67d746e05816324b91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 25 Sep 2024 09:54:36 +0200
Subject: [PATCH 04/18] Removing Sync rules tabs section title
---
.../connector/sync_rules/connector_rules.tsx | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_rules.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_rules.tsx
index 2607cea17ce6c..6791e7778c9a3 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_rules.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_rules.tsx
@@ -56,7 +56,6 @@ export const ConnectorSyncRules: React.FC = () => {
setIsEditing={setIsEditing}
/>
)}
-
{hasDraft && (
@@ -71,18 +70,6 @@ export const ConnectorSyncRules: React.FC = () => {
-
-
-
-
- {i18n.translate('xpack.enterpriseSearch.index.connector.syncRules.title', {
- defaultMessage: 'Sync rules ',
- })}
-
-
-
-
-
{i18n.translate('xpack.enterpriseSearch.index.connector.syncRules.description', {
From fe47e7a83c48580c7c306ef319a04e4fb8b58736 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 25 Sep 2024 10:46:09 +0200
Subject: [PATCH 05/18] Better text hierarchy treatment
---
.../scheduling/connector_scheduling.tsx | 5 ++--
.../components/scheduling/full_content.tsx | 6 ++---
.../components/documents_overview.tsx | 27 +++++--------------
.../search_index/index_mappings.scss | 2 +-
.../search_index/pipelines/pipelines.tsx | 1 -
5 files changed, 13 insertions(+), 28 deletions(-)
diff --git a/packages/kbn-search-connectors/components/scheduling/connector_scheduling.tsx b/packages/kbn-search-connectors/components/scheduling/connector_scheduling.tsx
index 9f97a8ee63769..3d8ea94b3599a 100644
--- a/packages/kbn-search-connectors/components/scheduling/connector_scheduling.tsx
+++ b/packages/kbn-search-connectors/components/scheduling/connector_scheduling.tsx
@@ -42,8 +42,8 @@ export const SchedulePanel: FC> = ({
<>
-
- {title}
+
+ {title}
@@ -115,7 +115,6 @@ export const ConnectorSchedulingComponent: React.FC
-
{hasIngestionError ? : <>>}
{children}
diff --git a/packages/kbn-search-connectors/components/scheduling/full_content.tsx b/packages/kbn-search-connectors/components/scheduling/full_content.tsx
index ced6c9ef8442e..de85f8fb2e4a9 100644
--- a/packages/kbn-search-connectors/components/scheduling/full_content.tsx
+++ b/packages/kbn-search-connectors/components/scheduling/full_content.tsx
@@ -129,10 +129,10 @@ export const ConnectorContentScheduling: React.FC
+
-
- {getAccordionTitle(type)}
+
+ {getAccordionTitle(type)}
diff --git a/packages/kbn-search-index-documents/components/documents_overview.tsx b/packages/kbn-search-index-documents/components/documents_overview.tsx
index d5f6807e313a7..060eb17d4b233 100644
--- a/packages/kbn-search-index-documents/components/documents_overview.tsx
+++ b/packages/kbn-search-index-documents/components/documents_overview.tsx
@@ -7,14 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import {
- EuiFieldSearch,
- EuiFlexGroup,
- EuiFlexItem,
- EuiPanel,
- EuiSpacer,
- EuiTitle,
-} from '@elastic/eui';
+import { EuiFieldSearch, EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { ChangeEvent } from 'react';
@@ -32,20 +25,14 @@ export const DocumentsOverview: React.FC = ({
}) => {
return (
-
-
-
-
-
- {i18n.translate('searchIndexDocuments.documents.title', {
- defaultMessage: 'Browse documents',
- })}
-
-
-
- {accessControlSwitch && {accessControlSwitch}}
+
+ {accessControlSwitch && (
+
+ {accessControlSwitch}
+
+ )}
{
return (
<>
-
{showMissingPipelineCallout && (
<>
Date: Fri, 27 Sep 2024 10:59:54 +0200
Subject: [PATCH 06/18] Using emotion for min-width accessControlSwitch
container
---
.../components/documents_overview.tsx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/packages/kbn-search-index-documents/components/documents_overview.tsx b/packages/kbn-search-index-documents/components/documents_overview.tsx
index 060eb17d4b233..8c1c871e68a9a 100644
--- a/packages/kbn-search-index-documents/components/documents_overview.tsx
+++ b/packages/kbn-search-index-documents/components/documents_overview.tsx
@@ -7,9 +7,10 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { EuiFieldSearch, EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui';
+import { EuiFieldSearch, EuiFlexGroup, EuiFlexItem, EuiPanel, useEuiTheme } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { ChangeEvent } from 'react';
+import { css } from '@emotion/react';
interface DocumentsProps {
accessControlSwitch?: React.ReactNode;
@@ -23,13 +24,19 @@ export const DocumentsOverview: React.FC = ({
documentComponent,
searchQueryCallback,
}) => {
+ const { euiTheme } = useEuiTheme();
return (
{accessControlSwitch && (
-
+
{accessControlSwitch}
)}
From 0d4e41cf6a936b2e9852836558d3f945a321e2dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Fri, 27 Sep 2024 11:10:49 +0200
Subject: [PATCH 07/18] Using euiTheme.base for accessControlSwitch container
---
.../components/documents_overview.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/kbn-search-index-documents/components/documents_overview.tsx b/packages/kbn-search-index-documents/components/documents_overview.tsx
index 8c1c871e68a9a..8b5f210e8dd2e 100644
--- a/packages/kbn-search-index-documents/components/documents_overview.tsx
+++ b/packages/kbn-search-index-documents/components/documents_overview.tsx
@@ -32,8 +32,8 @@ export const DocumentsOverview: React.FC = ({
{accessControlSwitch && (
From a193a2d6c835494afc94d3005bc87a0c135d4718 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Fri, 27 Sep 2024 11:52:22 +0200
Subject: [PATCH 08/18] Passing indexSelectorOptions to the
AccessControlIndexSelector component
---
.../access_control_index_selector.tsx | 91 +++++++++----------
.../search_index/sync_jobs/sync_jobs.tsx | 41 +++++++--
2 files changed, 76 insertions(+), 56 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
index c8896df80baf1..7074af5702bc8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
@@ -19,75 +19,67 @@ import { i18n } from '@kbn/i18n';
export interface AccessControlSelectorOption {
description: string;
- error: boolean;
+ error?: boolean;
title: string;
value: 'content-index' | 'access-control-index';
}
interface IndexSelectorProps {
- accessControlIndexDescription?: string;
- accessControlIndexTitle?: string;
- accessSyncError?: boolean;
- contentIndexDescription?: string;
- contentIndexTitle?: string;
- contentSyncError?: boolean;
fullWidth?: boolean;
+ indexSelectorOptions?: AccessControlSelectorOption[];
onChange(value: AccessControlSelectorOption['value']): void;
valueOfSelected?: AccessControlSelectorOption['value'];
}
+export const DEFAULT_INDEX_SELECTOR_OPTIONS: AccessControlSelectorOption[] = [
+ {
+ description: i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
+ {
+ defaultMessage: 'Browse content fields',
+ }
+ ),
+ title: i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title',
+ {
+ defaultMessage: 'Content index',
+ }
+ ),
+ value: 'content-index',
+ },
+ {
+ description: i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
+ {
+ defaultMessage: 'Browse document level security fields',
+ }
+ ),
+ title: i18n.translate(
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title',
+ {
+ defaultMessage: 'Access control index',
+ }
+ ),
+ value: 'access-control-index',
+ },
+];
+
export const AccessControlIndexSelector: React.FC = ({
- accessControlIndexDescription,
- accessControlIndexTitle,
- accessSyncError,
- contentIndexDescription,
- contentIndexTitle,
- contentSyncError,
+ indexSelectorOptions = DEFAULT_INDEX_SELECTOR_OPTIONS,
onChange,
valueOfSelected,
fullWidth,
}) => {
- const indexSelectorOptions: AccessControlSelectorOption[] = [
- {
- description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
- {
- defaultMessage: contentIndexDescription || 'Browse content fields',
- }
- ),
- error: Boolean(contentSyncError),
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title',
- {
- defaultMessage: contentIndexTitle || 'Content index',
- }
- ),
- value: 'content-index',
- },
- {
- description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
- {
- defaultMessage: accessControlIndexDescription || 'Browse document level security fields',
- }
- ),
- error: Boolean(accessSyncError),
- title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title',
- {
- defaultMessage: accessControlIndexTitle || 'Access control index',
- }
- ),
- value: 'access-control-index',
- },
- ];
-
return (
: undefined}
+ prepend={
+ indexSelectorOptions.some((option) => option.error) ? (
+
+ ) : undefined
+ }
options={indexSelectorOptions.map((option) => {
return {
dropdownDisplay: (
@@ -97,7 +89,6 @@ export const AccessControlIndexSelector: React.FC = ({
{' '}
) : null}
-
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index 527b1e10f4a2d..54959b9629309 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -11,6 +11,7 @@ import { useActions, useValues } from 'kea';
import { EuiSpacer } from '@elastic/eui';
+import { i18n } from '@kbn/i18n';
import { Connector, SyncJobsTable } from '@kbn/search-connectors';
import { KibanaLogic } from '../../../../shared/kibana';
@@ -83,12 +84,40 @@ export const SyncJobs: React.FC = ({ connector }) => {
>
From 04a4bd57b89d7fde8822c8eefd2e74874ca721ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Fri, 27 Sep 2024 13:53:57 +0200
Subject: [PATCH 09/18] errorOnAccessSync and errorOContentSync more simple
prop pass
---
.../components/search_index/sync_jobs/sync_jobs.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index 54959b9629309..93f53770f7bb7 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -92,7 +92,7 @@ export const SyncJobs: React.FC = ({ connector }) => {
defaultMessage: 'Browse content syncs',
}
),
- error: errorOnContentSync ? true : false,
+ error: errorOnContentSync,
title: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title',
{
@@ -108,7 +108,7 @@ export const SyncJobs: React.FC = ({ connector }) => {
defaultMessage: 'Browse document level security syncs',
}
),
- error: errorOnAccessSync ? true : false,
+ error: errorOnAccessSync,
title: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title',
{
From 846c80a9fc24324cb805451cf952758fbbc0a07f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Tue, 1 Oct 2024 13:01:03 +0200
Subject: [PATCH 10/18] AccessControlIndexSelector text content reviwed
---
.../access_control_index_selector.tsx | 4 ++--
.../components/search_index/sync_jobs/sync_jobs.tsx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
index 7074af5702bc8..9ac28ab5ecfe8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
@@ -36,7 +36,7 @@ export const DEFAULT_INDEX_SELECTOR_OPTIONS: AccessControlSelectorOption[] = [
description: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
{
- defaultMessage: 'Browse content fields',
+ defaultMessage: 'Browse documents ingested by your content syncs',
}
),
title: i18n.translate(
@@ -51,7 +51,7 @@ export const DEFAULT_INDEX_SELECTOR_OPTIONS: AccessControlSelectorOption[] = [
description: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
{
- defaultMessage: 'Browse document level security fields',
+ defaultMessage: 'Browse access control lists ingested by your access control syncs',
}
),
title: i18n.translate(
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index 93f53770f7bb7..163b6efe4a606 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -89,7 +89,7 @@ export const SyncJobs: React.FC = ({ connector }) => {
description: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
{
- defaultMessage: 'Browse content syncs',
+ defaultMessage: 'Browse content sync history',
}
),
error: errorOnContentSync,
@@ -105,7 +105,7 @@ export const SyncJobs: React.FC = ({ connector }) => {
description: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
{
- defaultMessage: 'Browse document level security syncs',
+ defaultMessage: 'Browse access control sync history',
}
),
error: errorOnAccessSync,
From cd55edce77290199bd32b617cdb02a7daf0102b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Tue, 1 Oct 2024 13:35:38 +0200
Subject: [PATCH 11/18] Tooltip connecting access control syncs to DLS
---
.../search_index/sync_jobs/sync_jobs.tsx | 107 +++++++++++-------
1 file changed, 67 insertions(+), 40 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index 163b6efe4a606..06946b46006fc 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -7,9 +7,10 @@
import React, { useEffect, useState } from 'react';
+import { css } from '@emotion/react';
import { useActions, useValues } from 'kea';
-import { EuiSpacer } from '@elastic/eui';
+import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiToolTip, useEuiTheme } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { Connector, SyncJobsTable } from '@kbn/search-connectors';
@@ -76,49 +77,75 @@ export const SyncJobs: React.FC = ({ connector }) => {
setSelectedSyncJobCategory('access_control');
}
}, [selectedIndexType]);
-
+ const { euiTheme } = useEuiTheme();
return (
<>
{shouldShowAccessSyncs && (
<>
-
+
+
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.accessControlIndexSelector.p.accessControlSyncsAreLabel',
+ {
+ defaultMessage:
+ 'Access control syncs keep permissions information up to date for document level security (DLS)',
+ }
+ )}
+
+ }
+ >
+
+
+
+
+
>
)}
From 121f874114803b811efab4870e8d42c1a1229e95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Tue, 1 Oct 2024 16:48:54 +0200
Subject: [PATCH 12/18] i18n issue fix
---
.../components/search_index/sync_jobs/sync_jobs.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index 06946b46006fc..58b634cf1ab37 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -110,14 +110,14 @@ export const SyncJobs: React.FC = ({ connector }) => {
indexSelectorOptions={[
{
description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndexSync.description',
{
defaultMessage: 'Browse content sync history',
}
),
error: errorOnContentSync,
title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndexSync.title',
{
defaultMessage: 'Content syncs',
}
@@ -126,14 +126,14 @@ export const SyncJobs: React.FC = ({ connector }) => {
},
{
description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControlSync.description',
{
defaultMessage: 'Browse access control sync history',
}
),
error: errorOnAccessSync,
title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControlSync.title',
{
defaultMessage: 'Access control syncs',
}
From 12200c9307803e113d82eadc90fc12dafd6c2b5e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 2 Oct 2024 09:30:00 +0200
Subject: [PATCH 13/18] i18n issue fix
---
.../components/search_index/sync_jobs/sync_jobs.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index 58b634cf1ab37..06946b46006fc 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -110,14 +110,14 @@ export const SyncJobs: React.FC = ({ connector }) => {
indexSelectorOptions={[
{
description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndexSync.description',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
{
defaultMessage: 'Browse content sync history',
}
),
error: errorOnContentSync,
title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndexSync.title',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title',
{
defaultMessage: 'Content syncs',
}
@@ -126,14 +126,14 @@ export const SyncJobs: React.FC = ({ connector }) => {
},
{
description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControlSync.description',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
{
defaultMessage: 'Browse access control sync history',
}
),
error: errorOnAccessSync,
title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControlSync.title',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title',
{
defaultMessage: 'Access control syncs',
}
From 1e3333486a4db1046c2a23829f4ca2c93bc24747 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 2 Oct 2024 09:59:02 +0200
Subject: [PATCH 14/18] i18n fix using different Message ids
---
.../components/search_index/sync_jobs/sync_jobs.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index 06946b46006fc..ed915d0762df8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -110,14 +110,14 @@ export const SyncJobs: React.FC = ({ connector }) => {
indexSelectorOptions={[
{
description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndexSync.description',
{
defaultMessage: 'Browse content sync history',
}
),
error: errorOnContentSync,
title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndexSync.title',
{
defaultMessage: 'Content syncs',
}
@@ -126,14 +126,14 @@ export const SyncJobs: React.FC = ({ connector }) => {
},
{
description: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControlSync.description',
{
defaultMessage: 'Browse access control sync history',
}
),
error: errorOnAccessSync,
title: i18n.translate(
- 'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title',
+ 'xpack.enterpriseSearch.content.searchIndex.documents.selectorSync.accessControl.title',
{
defaultMessage: 'Access control syncs',
}
From 1127c483d753efb9cd158afc10297392ff0516b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 2 Oct 2024 13:29:46 +0200
Subject: [PATCH 15/18] Fixing i18n issue with unussed trtanslations
---
x-pack/plugins/translations/translations/fr-FR.json | 6 ------
x-pack/plugins/translations/translations/ja-JP.json | 6 ------
x-pack/plugins/translations/translations/zh-CN.json | 6 ------
3 files changed, 18 deletions(-)
diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json
index a14f2ce6d398d..a5a40cb0cf06f 100644
--- a/x-pack/plugins/translations/translations/fr-FR.json
+++ b/x-pack/plugins/translations/translations/fr-FR.json
@@ -6924,7 +6924,6 @@
"searchIndexDocuments.documentList.resultLimit": "Seuls les {number} premiers résultats sont disponibles pour la pagination. Veuillez utiliser la barre de recherche pour filtrer vos résultats.",
"searchIndexDocuments.documentList.resultLimitTitle": "Les résultats sont limités à {number} documents",
"searchIndexDocuments.documents.searchField.placeholder": "Rechercher des documents dans cet index",
- "searchIndexDocuments.documents.title": "Parcourir des documents",
"searchIndexDocuments.result.expandTooltip.allVisible": "Tous les champs sont visibles",
"searchIndexDocuments.result.expandTooltip.showFewer": "Afficher {amount} champs en moins",
"searchIndexDocuments.result.expandTooltip.showMore": "Afficher {amount} champs en plus",
@@ -17045,10 +17044,6 @@
"xpack.enterpriseSearch.content.supportedLanguages.spanishLabel": "Espagnol",
"xpack.enterpriseSearch.content.supportedLanguages.thaiLabel": "Thaï",
"xpack.enterpriseSearch.content.supportedLanguages.universalLabel": "Universel",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.accessControl.label": "Synchronisations de contrôle d'accès",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.content.label": "Synchronisations de contenu",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.legend": "Sélectionnez le type de tâche de synchronisation à afficher.",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.name": "Type de tâche de synchronisation",
"xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "Voulez-vous vraiment supprimer le domaine \"{domainUrl}\" et tous ses paramètres ?",
"xpack.enterpriseSearch.crawler.addDomainFlyout.description": "Vous pouvez ajouter plusieurs domaines au robot d'indexation de cet index. Ajoutez un autre domaine ici et modifiez les points d'entrée et les règles d'indexation à partir de la page \"Gérer\".",
"xpack.enterpriseSearch.crawler.addDomainFlyout.openButtonLabel": "Ajouter un domaine",
@@ -17323,7 +17318,6 @@
"xpack.enterpriseSearch.index.connector.syncRules.invalidTitle": "Les ébauches de règles de synchronisation ne sont pas valides",
"xpack.enterpriseSearch.index.connector.syncRules.successCallout.applyDraftRulesTitle": "Activer les ébauches de règles",
"xpack.enterpriseSearch.index.connector.syncRules.syncRulesLabel": "En savoir plus sur les règles de synchronisation",
- "xpack.enterpriseSearch.index.connector.syncRules.title": "Règles de synchronisation ",
"xpack.enterpriseSearch.index.connector.syncRules.unsavedChanges": "Vos modifications n'ont pas été enregistrées. Voulez-vous vraiment quitter ?",
"xpack.enterpriseSearch.index.connector.syncRules.validatedDescription": "Activez les ébauches de règles pour qu'elles prennent effet à la prochaine synchronisation.",
"xpack.enterpriseSearch.index.connector.syncRules.validateDraftTitle": "Enregistrer et valider l'ébauche",
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 5184bf3718ef6..e8b545048c721 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -6678,7 +6678,6 @@
"searchIndexDocuments.documentList.resultLimit": "最初の{number}件の結果のみがページ制御できます。結果を絞り込むには、検索バーを使用してください。",
"searchIndexDocuments.documentList.resultLimitTitle": "結果は{number}ドキュメントに制限されています。",
"searchIndexDocuments.documents.searchField.placeholder": "このインデックスでドキュメントを検索",
- "searchIndexDocuments.documents.title": "ドキュメントを参照",
"searchIndexDocuments.result.expandTooltip.allVisible": "すべてのフィールドが表示されます",
"searchIndexDocuments.result.expandTooltip.showFewer": "表示するフィールド数を{amount}個減らす",
"searchIndexDocuments.result.expandTooltip.showMore": "表示するフィールド数を{amount}個増やす",
@@ -16791,10 +16790,6 @@
"xpack.enterpriseSearch.content.supportedLanguages.spanishLabel": "スペイン語",
"xpack.enterpriseSearch.content.supportedLanguages.thaiLabel": "タイ語",
"xpack.enterpriseSearch.content.supportedLanguages.universalLabel": "ユニバーサル",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.accessControl.label": "アクセス制御同期",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.content.label": "コンテンツ同期",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.legend": "表示する同期ジョブタイプを選択します。",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.name": "同期ジョブタイプ",
"xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "ドメイン\"{domainUrl}\"とすべての設定を削除しますか?",
"xpack.enterpriseSearch.crawler.addDomainFlyout.description": "複数のドメインをこのインデックスのWebクローラーに追加できます。ここで別のドメインを追加して、[管理]ページからエントリポイントとクロールルールを変更します。",
"xpack.enterpriseSearch.crawler.addDomainFlyout.openButtonLabel": "ドメインを追加",
@@ -17069,7 +17064,6 @@
"xpack.enterpriseSearch.index.connector.syncRules.invalidTitle": "ドラフト同期ルールが無効です",
"xpack.enterpriseSearch.index.connector.syncRules.successCallout.applyDraftRulesTitle": "ドラフトルールをアクティブ化",
"xpack.enterpriseSearch.index.connector.syncRules.syncRulesLabel": "同期ルールの詳細",
- "xpack.enterpriseSearch.index.connector.syncRules.title": "同期ルール ",
"xpack.enterpriseSearch.index.connector.syncRules.unsavedChanges": "変更は保存されていません。終了してよろしいですか?",
"xpack.enterpriseSearch.index.connector.syncRules.validatedDescription": "ドラフトルールをアクティブ化し、次回の同期で有効にします。",
"xpack.enterpriseSearch.index.connector.syncRules.validateDraftTitle": "ドラフトを保存して検証",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index dcc0af6a008c3..59b07f710a8af 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -6692,7 +6692,6 @@
"searchIndexDocuments.documentList.resultLimit": "仅前 {number} 个结果可用于分页。请使用搜索栏筛选结果。",
"searchIndexDocuments.documentList.resultLimitTitle": "结果仅限于 {number} 个文档",
"searchIndexDocuments.documents.searchField.placeholder": "在此索引中搜索文档",
- "searchIndexDocuments.documents.title": "浏览文档",
"searchIndexDocuments.result.expandTooltip.allVisible": "所有字段均可见",
"searchIndexDocuments.result.expandTooltip.showFewer": "显示少于 {amount} 个字段",
"searchIndexDocuments.result.expandTooltip.showMore": "显示多于 {amount} 个字段",
@@ -16820,10 +16819,6 @@
"xpack.enterpriseSearch.content.supportedLanguages.spanishLabel": "西班牙语",
"xpack.enterpriseSearch.content.supportedLanguages.thaiLabel": "泰语",
"xpack.enterpriseSearch.content.supportedLanguages.universalLabel": "通用",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.accessControl.label": "访问控制同步",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.content.label": "内容同步",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.legend": "选择要显示的同步作业类型。",
- "xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.name": "同步作业类型",
"xpack.enterpriseSearch.crawler.action.deleteDomain.confirmationPopupMessage": "确定要移除域“{domainUrl}”和其所有设置?",
"xpack.enterpriseSearch.crawler.addDomainFlyout.description": "可以将多个域添加到此索引的网络爬虫。在此添加其他域并从“管理”页面修改入口点和爬网规则。",
"xpack.enterpriseSearch.crawler.addDomainFlyout.openButtonLabel": "添加域",
@@ -17098,7 +17093,6 @@
"xpack.enterpriseSearch.index.connector.syncRules.invalidTitle": "同步规则草案无效",
"xpack.enterpriseSearch.index.connector.syncRules.successCallout.applyDraftRulesTitle": "激活规则草案",
"xpack.enterpriseSearch.index.connector.syncRules.syncRulesLabel": "详细了解同步规则",
- "xpack.enterpriseSearch.index.connector.syncRules.title": "同步规则 ",
"xpack.enterpriseSearch.index.connector.syncRules.unsavedChanges": "您的更改尚未更改。是否确定要离开?",
"xpack.enterpriseSearch.index.connector.syncRules.validatedDescription": "激活规则草案以在下次同步时生效。",
"xpack.enterpriseSearch.index.connector.syncRules.validateDraftTitle": "保存并验证草案",
From c69bdb155ccd6b483b5d220f7291332fd5be8278 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 2 Oct 2024 14:22:34 +0200
Subject: [PATCH 16/18] Content fix and using EuiIconTip tooltip rather than
regular Tooltip
---
.../access_control_index_selector.tsx | 4 +-
.../search_index/sync_jobs/sync_jobs.tsx | 92 +++++++++----------
2 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
index 9ac28ab5ecfe8..e02741638f863 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/access_control_index_selector/access_control_index_selector.tsx
@@ -36,7 +36,7 @@ export const DEFAULT_INDEX_SELECTOR_OPTIONS: AccessControlSelectorOption[] = [
description: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description',
{
- defaultMessage: 'Browse documents ingested by your content syncs',
+ defaultMessage: 'Browse documents ingested by content syncs',
}
),
title: i18n.translate(
@@ -51,7 +51,7 @@ export const DEFAULT_INDEX_SELECTOR_OPTIONS: AccessControlSelectorOption[] = [
description: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description',
{
- defaultMessage: 'Browse access control lists ingested by your access control syncs',
+ defaultMessage: 'Browse access control lists ingested by access control syncs',
}
),
title: i18n.translate(
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
index ed915d0762df8..2669457cb6837 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs.tsx
@@ -10,7 +10,7 @@ import React, { useEffect, useState } from 'react';
import { css } from '@emotion/react';
import { useActions, useValues } from 'kea';
-import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiToolTip, useEuiTheme } from '@elastic/eui';
+import { EuiFlexGroup, EuiFlexItem, EuiIconTip, EuiSpacer, useEuiTheme } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { Connector, SyncJobsTable } from '@kbn/search-connectors';
@@ -82,15 +82,55 @@ export const SyncJobs: React.FC = ({ connector }) => {
<>
{shouldShowAccessSyncs && (
<>
-
+
-
+
+
+
{i18n.translate(
@@ -102,50 +142,10 @@ export const SyncJobs: React.FC = ({ connector }) => {
)}
}
- >
-
-
+ position="right"
+ />
-
>
)}
From 860e332cb4fe8d253972a7c5f38036a9711290cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Wed, 2 Oct 2024 17:20:46 +0200
Subject: [PATCH 17/18] Fixing unit test for documents overview when is empty
---
.../components/documents_overview.test.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/kbn-search-index-documents/components/documents_overview.test.tsx b/packages/kbn-search-index-documents/components/documents_overview.test.tsx
index c11cc5eb2d98d..68280e02bea94 100644
--- a/packages/kbn-search-index-documents/components/documents_overview.test.tsx
+++ b/packages/kbn-search-index-documents/components/documents_overview.test.tsx
@@ -27,6 +27,6 @@ describe('DocumentList', () => {
);
- expect(screen.getByText('Browse documents')).toBeInTheDocument();
+ expect(screen.getByText('No documents found for index')).toBeInTheDocument();
});
});
From eb5bf9ff669f47a41792c9b07529e566d735f36e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Gonz=C3=A1lez?=
Date: Thu, 3 Oct 2024 09:47:46 +0200
Subject: [PATCH 18/18] Fixing unit test DocumentsOverview
---
.../components/documents_overview.test.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/kbn-search-index-documents/components/documents_overview.test.tsx b/packages/kbn-search-index-documents/components/documents_overview.test.tsx
index 68280e02bea94..3f452e2e072a4 100644
--- a/packages/kbn-search-index-documents/components/documents_overview.test.tsx
+++ b/packages/kbn-search-index-documents/components/documents_overview.test.tsx
@@ -27,6 +27,6 @@ describe('DocumentList', () => {
);
- expect(screen.getByText('No documents found for index')).toBeInTheDocument();
+ expect(screen.getByPlaceholderText('Search documents in this index')).toBeInTheDocument();
});
});