diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/source_icons/gmail.svg b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/source_icons/gmail.svg index ee824f730aca6..ae068feb7133d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/source_icons/gmail.svg +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/source_icons/gmail.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/source_icons/google_drive.svg b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/source_icons/google_drive.svg index 59469d814e35f..c684cecb71235 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/source_icons/google_drive.svg +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/source_icons/google_drive.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/sources_full_bleed/gmail.svg b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/sources_full_bleed/gmail.svg index 98d418244c22f..31fe60c6a63f9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/sources_full_bleed/gmail.svg +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/sources_full_bleed/gmail.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/sources_full_bleed/google_drive.svg b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/sources_full_bleed/google_drive.svg index 6541b3f9e753f..f3fe82cd3cd98 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/sources_full_bleed/google_drive.svg +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/assets/sources_full_bleed/google_drive.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_row/source_row.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_row/source_row.tsx index 818d06c55dd12..2080f454596b5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_row/source_row.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_row/source_row.tsx @@ -26,7 +26,12 @@ import { import { EuiLinkTo } from '../../../../shared/react_router_helpers'; import { SOURCE_STATUSES as statuses } from '../../../constants'; import { ContentSourceDetails } from '../../../types'; -import { ADD_SOURCE_PATH, SOURCE_DETAILS_PATH, getContentSourcePath } from '../../../routes'; +import { + ADD_SOURCE_PATH, + SOURCE_DETAILS_PATH, + getContentSourcePath, + getSourcesPath, +} from '../../../routes'; import { SourceIcon } from '../source_icon'; @@ -77,7 +82,12 @@ export const SourceRow: React.FC = ({ const imageClass = classNames('source-row__icon', { 'source-row__icon--loading': isIndexing }); const fixLink = ( - + Fix ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts index 74e0682db89b5..4ca256ac91a3f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts @@ -136,6 +136,9 @@ export const SOURCE_NAMES = { }; export const SOURCE_OBJ_TYPES = { + FOLDERS: i18n.translate('xpack.enterpriseSearch.workplaceSearch.sources.objTypes.folders', { + defaultMessage: 'Folders', + }), PAGES: i18n.translate('xpack.enterpriseSearch.workplaceSearch.sources.objTypes.pages', { defaultMessage: 'Pages', }), diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.ts index 868d76f7d09c5..1e4b51e157724 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.ts @@ -124,7 +124,7 @@ export const getContentSourcePath = ( export const getGroupPath = (groupId: string): string => generatePath(GROUP_PATH, { groupId }); export const getGroupSourcePrioritizationPath = (groupId: string): string => `${GROUPS_PATH}/${groupId}/source_prioritization`; -export const getSourcesPath = (path: string, isOrganization: boolean): string => +export const getSourcesPath = (path: string, isOrganization?: boolean): string => isOrganization ? path : `${PERSONAL_PATH}${path}`; export const getReindexJobRoute = ( sourceId: string, diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts index 9bda686ebbf00..ed4946a019bb0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts @@ -130,7 +130,6 @@ export interface ContentSourceFullData extends ContentSourceDetails { groups: Group[]; custom: boolean; accessToken: string; - key: string; urlField: string; titleField: string; licenseSupportsPermissions: boolean; @@ -177,7 +176,6 @@ export enum FeatureIds { export interface CustomSource { accessToken: string; - key: string; name: string; id: string; } diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/constants.ts index 09a9d22461e14..7d891953e618b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/constants.ts @@ -299,10 +299,10 @@ export const SAVE_CUSTOM_ACCESS_TOKEN_LABEL = i18n.translate( } ); -export const SAVE_CUSTOM_API_KEY_LABEL = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.contentSource.saveCustom.apiKey.label', +export const SAVE_CUSTOM_ID_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.saveCustom.id.label', { - defaultMessage: 'Key', + defaultMessage: 'ID', } ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/save_custom.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/save_custom.tsx index 59d691023f413..28aeaec2b47df 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/save_custom.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/save_custom.tsx @@ -43,7 +43,7 @@ import { SAVE_CUSTOM_API_KEYS_TITLE, SAVE_CUSTOM_API_KEYS_BODY, SAVE_CUSTOM_ACCESS_TOKEN_LABEL, - SAVE_CUSTOM_API_KEY_LABEL, + SAVE_CUSTOM_ID_LABEL, SAVE_CUSTOM_VISUAL_WALKTHROUGH_TITLE, SAVE_CUSTOM_STYLING_RESULTS_TITLE, SAVE_CUSTOM_DOC_PERMISSIONS_TITLE, @@ -59,7 +59,7 @@ interface SaveCustomProps { export const SaveCustom: React.FC = ({ documentationUrl, - newCustomSource: { key, id, accessToken, name }, + newCustomSource: { id, accessToken, name }, isOrganization, header, }) => ( @@ -109,17 +109,13 @@ export const SaveCustom: React.FC = ({

{SAVE_CUSTOM_API_KEYS_BODY}

+ + - - diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/constants.ts new file mode 100644 index 0000000000000..0e6cbb2560128 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/constants.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const LEAVE_UNASSIGNED_FIELD = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.leaveUnassignedField', + { + defaultMessage: 'Leave unassigned', + } +); + +export const SUCCESS_MESSAGE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.successMessage', + { + defaultMessage: 'Display Settings have been successfuly updated.', + } +); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/display_settings_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/display_settings_logic.ts index c52665524f566..a8636b4a34da1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/display_settings_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/display_settings_logic.ts @@ -20,10 +20,8 @@ import { import { AppLogic } from '../../../../app_logic'; import { SourceLogic } from '../../source_logic'; -const SUCCESS_MESSAGE = 'Display Settings have been successfuly updated.'; - import { DetailField, SearchResultConfig, OptionValue, Result } from '../../../../types'; - +import { LEAVE_UNASSIGNED_FIELD, SUCCESS_MESSAGE } from './constants'; export interface DisplaySettingsResponseProps { sourceName: string; searchResultConfig: SearchResultConfig; @@ -271,7 +269,10 @@ export const DisplaySettingsLogic = kea< () => [selectors.fieldOptions], (fieldOptions) => { const optionalFieldOptions = cloneDeep(fieldOptions); - optionalFieldOptions.unshift({ value: '', text: '' }); + optionalFieldOptions.unshift({ + value: LEAVE_UNASSIGNED_FIELD, + text: LEAVE_UNASSIGNED_FIELD, + }); return optionalFieldOptions; }, ], diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/search_results.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/search_results.tsx index cfe0ddb1533ec..96b7a6fbe14b5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/search_results.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/search_results.tsx @@ -21,6 +21,7 @@ import { } from '@elastic/eui'; import { DisplaySettingsLogic } from './display_settings_logic'; +import { LEAVE_UNASSIGNED_FIELD } from './constants'; import { ExampleSearchResultGroup } from './example_search_result_group'; import { ExampleStandoutResult } from './example_standout_result'; @@ -104,8 +105,10 @@ export const SearchResults: React.FC = () => { className="field-selector" hasNoInitialSelection={true} data-test-subj="SubtitleFieldSelect" - value={subtitleField || ''} - onChange={({ target: { value } }) => setSubtitleField(value === '' ? null : value)} + value={subtitleField || LEAVE_UNASSIGNED_FIELD} + onChange={({ target: { value } }) => + setSubtitleField(value === LEAVE_UNASSIGNED_FIELD ? null : value) + } /> { className="field-selector" hasNoInitialSelection={true} data-test-subj="DescriptionFieldSelect" - value={descriptionField || ''} + value={descriptionField || LEAVE_UNASSIGNED_FIELD} onChange={({ target: { value } }) => - setDescriptionField(value === '' ? null : value) + setDescriptionField(value === LEAVE_UNASSIGNED_FIELD ? null : value) } /> diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx index 8d6e421005df7..71d79b4b2a082 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx @@ -33,8 +33,6 @@ import { DOCUMENT_PERMISSIONS_DOCS_URL, ENT_SEARCH_LICENSE_MANAGEMENT, EXTERNAL_IDENTITIES_DOCS_URL, - SOURCE_CONTENT_PATH, - getContentSourcePath, getGroupPath, } from '../../../routes'; @@ -45,7 +43,7 @@ import { CredentialItem } from '../../../components/shared/credential_item'; import { ViewContentHeader } from '../../../components/shared/view_content_header'; import { LicenseBadge } from '../../../components/shared/license_badge'; import { Loading } from '../../../../shared/loading'; -import { EuiButtonEmptyTo, EuiPanelTo } from '../../../../shared/react_router_helpers'; +import { EuiPanelTo } from '../../../../shared/react_router_helpers'; import aclImage from '../../../assets/supports_acl.svg'; import { SourceLogic } from '../source_logic'; @@ -63,7 +61,6 @@ export const Overview: React.FC = () => { details, custom, accessToken, - key, licenseSupportsPermissions, serviceTypeSupportsPermissions, indexPermissions, @@ -105,24 +102,9 @@ export const Overview: React.FC = () => { return (
- - - -

Content summary

-
-
- {totalDocuments > 0 && ( - - - Manage - - - )} -
+ +

Content summary

+
{!summary && } @@ -388,9 +370,9 @@ export const Overview: React.FC = () => { - + - + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources.tsx index 0f5f4ffb9e0da..a1a76c678866c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources.tsx @@ -107,16 +107,7 @@ export const PrivateSources: React.FC = () => { - You have no private sources} - body={ -

- Select from the content sources below to create a private source, available only to - you -

- } - /> + You have no private sources} />
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_data.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_data.tsx index 882c3861922e7..8aebbf721f8fc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_data.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_data.tsx @@ -106,7 +106,7 @@ export const staticSourceData = [ } ), connectStepDescription: connectStepDescription.files, - objTypes: [SOURCE_OBJ_TYPES.ALL_FILES], + objTypes: [SOURCE_OBJ_TYPES.FOLDERS, SOURCE_OBJ_TYPES.ALL_FILES], features: { basicOrgContext: [ FeatureIds.SyncFrequency, @@ -156,6 +156,7 @@ export const staticSourceData = [ FeatureIds.SyncedItems, FeatureIds.GlobalAccessPermissions, ], + basicOrgContextExcludedFeatures: [FeatureIds.DocumentLevelPermissions], platinumOrgContext: [FeatureIds.SyncFrequency, FeatureIds.SyncedItems], platinumPrivateContext: [ FeatureIds.Private, @@ -435,6 +436,7 @@ export const staticSourceData = [ FeatureIds.SyncedItems, FeatureIds.GlobalAccessPermissions, ], + basicOrgContextExcludedFeatures: [FeatureIds.DocumentLevelPermissions], platinumOrgContext: [FeatureIds.SyncFrequency, FeatureIds.SyncedItems], platinumPrivateContext: [ FeatureIds.Private, diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_router.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_router.tsx index 7244ff21e3b38..089ef0cd46a00 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_router.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_router.tsx @@ -84,12 +84,13 @@ export const SourceRouter: React.FC = () => { <>

- Your organization's license level changed and no longer supports document-level - permissions.{' '} + Your organization’s license level has changed. Your data is safe, but document-level + permissions are no longer supported and searching of this source has been disabled. + Upgrade to a Platinum license to re-enable this source.

-

Don't worry: your data is safe. Search has been disabled.

-

Upgrade to a Platinum license to re-enable this source.

- Explore Platinum license + + Explore Platinum license +
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx index 3b91c4e84d02f..8fefe3bac2a12 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx @@ -5,7 +5,7 @@ */ import React from 'react'; -import { EuiSpacer, EuiTitle, EuiText, EuiButton } from '@elastic/eui'; +import { EuiSpacer, EuiTitle, EuiText, EuiButton, EuiLink } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; @@ -30,7 +30,7 @@ export const SetupGuide: React.FC = () => { - + { width="1280" height-="720" /> - +