@@ -59,7 +59,7 @@ export const PersonalDashboardLayout: React.FC = ({ diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.test.tsx index 9fa4d4dd1b237c..8f2ecf012e1ea9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.test.tsx @@ -30,7 +30,7 @@ import { PrivateSourcesSidebar } from './private_sources_sidebar'; describe('PrivateSourcesSidebar', () => { const mockValues = { - account: { canCreatePersonalSources: true }, + account: { canCreatePrivateSources: true }, contentSource: {}, }; @@ -55,7 +55,7 @@ describe('PrivateSourcesSidebar', () => { }); it('uses correct title and description when private sources are disabled', () => { - setMockValues({ ...mockValues, account: { canCreatePersonalSources: false } }); + setMockValues({ ...mockValues, account: { canCreatePrivateSources: false } }); const wrapper = shallow(); expect(wrapper.find(ViewContentHeader).prop('title')).toEqual(PRIVATE_VIEW_ONLY_PAGE_TITLE); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.tsx index ac497f5ae3a28d..6cd7a10fc7ade1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.tsx @@ -24,13 +24,13 @@ import { ViewContentHeader } from '../../shared/view_content_header'; export const PrivateSourcesSidebar = () => { const { - account: { canCreatePersonalSources }, + account: { canCreatePrivateSources }, } = useValues(AppLogic); - const PAGE_TITLE = canCreatePersonalSources + const PAGE_TITLE = canCreatePrivateSources ? PRIVATE_CAN_CREATE_PAGE_TITLE : PRIVATE_VIEW_ONLY_PAGE_TITLE; - const PAGE_DESCRIPTION = canCreatePersonalSources + const PAGE_DESCRIPTION = canCreatePrivateSources ? PRIVATE_CAN_CREATE_PAGE_DESCRIPTION : PRIVATE_VIEW_ONLY_PAGE_DESCRIPTION; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx index 26f82ca5371d6e..1ed77ea0fb1fd4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx @@ -23,7 +23,7 @@ import { SOURCES_PATH, SOURCE_ADDED_PATH, OAUTH_AUTHORIZE_PATH, - PERSONAL_SOURCES_PATH, + PRIVATE_SOURCES_PATH, ORG_SETTINGS_PATH, USERS_AND_ROLES_PATH, SECURITY_PATH, @@ -94,8 +94,8 @@ export const WorkplaceSearchConfigured: React.FC = (props) => { - - + + diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.test.tsx index b89a1451f7e571..b69303aae21069 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.test.tsx @@ -19,7 +19,7 @@ import { getSourcesPath, GROUPS_PATH, SOURCES_PATH, - PERSONAL_SOURCES_PATH, + PRIVATE_SOURCES_PATH, SOURCE_DETAILS_PATH, } from './routes'; @@ -40,7 +40,7 @@ describe('getContentSourcePath', () => { const wrapper = shallow(); const path = wrapper.find(EuiLink).prop('href'); - expect(path).toEqual(`${PERSONAL_SOURCES_PATH}/123`); + expect(path).toEqual(`${PRIVATE_SOURCES_PATH}/123`); }); }); 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 edd33ac8855697..cd699f7df86cb3 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 @@ -60,7 +60,7 @@ export const GROUP_PATH = `${GROUPS_PATH}/:groupId`; export const GROUP_SOURCE_PRIORITIZATION_PATH = `${GROUPS_PATH}/:groupId/source_prioritization`; export const SOURCES_PATH = '/sources'; -export const PERSONAL_SOURCES_PATH = `${PERSONAL_PATH}${SOURCES_PATH}`; +export const PRIVATE_SOURCES_PATH = `${PERSONAL_PATH}${SOURCES_PATH}`; export const SOURCE_ADDED_PATH = `${SOURCES_PATH}/added`; export const ADD_SOURCE_PATH = `${SOURCES_PATH}/add`; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_list.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_list.tsx index 165586dcc3903a..32161046bdd514 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_list.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_list.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import { AppLogic } from '../../../../app_logic'; -import noSharedSourcesIcon from '../../../../assets/share_circle.svg'; +import noOrgSourcesIcon from '../../../../assets/share_circle.svg'; import { WorkplaceSearchPageTemplate, PersonalDashboardLayout, @@ -143,7 +143,7 @@ export const AddSourceList: React.FC = () => { {ADD_SOURCE_EMPTY_TITLE}} body={

{ADD_SOURCE_EMPTY_BODY}

} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_logic.test.ts index 63eba575f0c37b..93cbbef07f7d7f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_logic.test.ts @@ -23,7 +23,7 @@ import { AppLogic } from '../../../../app_logic'; import { ADD_GITHUB_PATH, SOURCES_PATH, - PERSONAL_SOURCES_PATH, + PRIVATE_SOURCES_PATH, getSourcesPath, } from '../../../../routes'; import { CustomSource } from '../../../../types'; @@ -321,7 +321,7 @@ describe('AddSourceLogic', () => { expect(navigateToUrl).toHaveBeenCalledWith(getSourcesPath(SOURCES_PATH, true)); }); - it('redirects to private dashboard when account context', async () => { + it('redirects to personal dashboard when account context', async () => { const accountQueryString = '?state=%7B%22action%22:%22create%22,%22context%22:%22account%22,%22service_type%22:%22gmail%22,%22csrf_token%22:%22token%3D%3D%22,%22index_permissions%22:false%7D&code=code'; @@ -379,7 +379,7 @@ describe('AddSourceLogic', () => { const githubQueryString = getGithubQueryString('account'); AddSourceLogic.actions.saveSourceParams(githubQueryString, errorParams, false); - expect(navigateToUrl).toHaveBeenCalledWith(PERSONAL_SOURCES_PATH); + expect(navigateToUrl).toHaveBeenCalledWith(PRIVATE_SOURCES_PATH); expect(setErrorMessage).toHaveBeenCalledWith( PERSONAL_DASHBOARD_SOURCE_ERROR(GITHUB_ERROR) ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_logic.ts index e63e58adb38e2e..300b2aa6a10ac8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_source_logic.ts @@ -25,7 +25,7 @@ import { CUSTOM_SERVICE_TYPE, WORKPLACE_SEARCH_URL_PREFIX } from '../../../../co import { SOURCES_PATH, ADD_GITHUB_PATH, - PERSONAL_SOURCES_PATH, + PRIVATE_SOURCES_PATH, getSourcesPath, } from '../../../../routes'; import { CustomSource } from '../../../../types'; @@ -521,7 +521,7 @@ export const AddSourceLogic = kea { const mockValues = { - account: { canCreatePersonalSources: false, groups: [] }, + account: { canCreatePrivateSources: false, groups: [] }, dataLoading: false, contentSources: [], privateContentSources: [], @@ -42,15 +42,15 @@ describe('PrivateSources', () => { expect(wrapper.find(SourcesView)).toHaveLength(1); }); - it('renders only shared sources section when canCreatePersonalSources is false', () => { + it('renders only organizational sources section when canCreatePrivateSources is false', () => { setMockValues({ ...mockValues }); const wrapper = shallow(); expect(wrapper.find(ContentSection)).toHaveLength(1); }); - it('renders both shared and private sources sections when canCreatePersonalSources is true', () => { - setMockValues({ ...mockValues, account: { canCreatePersonalSources: true, groups: [] } }); + it('renders both organizational and private sources sections when canCreatePrivateSources is true', () => { + setMockValues({ ...mockValues, account: { canCreatePrivateSources: true, groups: [] } }); const wrapper = shallow(); expect(wrapper.find(ContentSection)).toHaveLength(2); @@ -61,7 +61,7 @@ describe('PrivateSources', () => { ...mockValues, privateContentSources: ['source1', 'source2'], hasPlatinumLicense: false, - account: { canCreatePersonalSources: true, groups: [] }, + account: { canCreatePrivateSources: true, groups: [] }, }); const wrapper = shallow(); @@ -71,7 +71,7 @@ describe('PrivateSources', () => { it('renders an action button when user can add private sources', () => { setMockValues({ ...mockValues, - account: { canCreatePersonalSources: true, groups: [] }, + account: { canCreatePrivateSources: true, groups: [] }, serviceTypes: [{ configured: true }], }); const wrapper = shallow(); @@ -82,7 +82,7 @@ describe('PrivateSources', () => { it('renders empty prompts if no sources are available', () => { setMockValues({ ...mockValues, - account: { canCreatePersonalSources: true, groups: [] }, + account: { canCreatePrivateSources: true, groups: [] }, }); const wrapper = shallow(); @@ -92,7 +92,7 @@ describe('PrivateSources', () => { it('renders SourcesTable if sources are available', () => { setMockValues({ ...mockValues, - account: { canCreatePersonalSources: true, groups: [] }, + account: { canCreatePrivateSources: true, groups: [] }, contentSources: ['1', '2'], privateContentSources: ['1', '2'], }); 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 57574ce14df678..83e690fdb2a95c 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 @@ -15,7 +15,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { LicensingLogic } from '../../../shared/licensing'; import { EuiButtonTo } from '../../../shared/react_router_helpers'; import { AppLogic } from '../../app_logic'; -import noSharedSourcesIcon from '../../assets/share_circle.svg'; +import noOrgSourcesIcon from '../../assets/share_circle.svg'; import { PersonalDashboardLayout } from '../../components/layout'; import { ContentSection } from '../../components/shared/content_section'; import { SourcesTable } from '../../components/shared/sources_table'; @@ -27,10 +27,10 @@ import { PRIVATE_LINK_TITLE, PRIVATE_HEADER_TITLE, PRIVATE_HEADER_DESCRIPTION, - PRIVATE_SHARED_SOURCES_TITLE, + PRIVATE_ORG_SOURCES_TITLE, PRIVATE_EMPTY_TITLE, - SHARED_EMPTY_TITLE, - SHARED_EMPTY_DESCRIPTION, + ORG_SOURCES_EMPTY_TITLE, + ORG_SOURCES_EMPTY_DESCRIPTION, LICENSE_CALLOUT_TITLE, LICENSE_CALLOUT_DESCRIPTION, } from './constants'; @@ -51,13 +51,13 @@ export const PrivateSources: React.FC = () => { ); const { - account: { canCreatePersonalSources, groups }, + account: { canCreatePrivateSources, groups }, } = useValues(AppLogic); const hasConfiguredConnectors = serviceTypes.some(({ configured }) => configured); - const canAddSources = canCreatePersonalSources && hasConfiguredConnectors; + const canAddSources = canCreatePrivateSources && hasConfiguredConnectors; const hasPrivateSources = privateContentSources?.length > 0; - const hasSharedSources = contentSources.length > 0; + const hasOrgSources = contentSources.length > 0; const licenseCallout = ( <> @@ -106,30 +106,30 @@ export const PrivateSources: React.FC = () => { ); - const sharedSourcesEmptyState = ( + const orgSourcesEmptyState = ( {SHARED_EMPTY_TITLE}} - body={

{SHARED_EMPTY_DESCRIPTION}

} + iconType={noOrgSourcesIcon} + title={

{ORG_SOURCES_EMPTY_TITLE}

} + body={

{ORG_SOURCES_EMPTY_DESCRIPTION}

} />
); - const sharedSourcesTable = ( + const orgSourcesTable = ( ); - const sharedSourcesSection = ( + const orgSourcesSection = ( { ) } > - {hasSharedSources ? sharedSourcesTable : sharedSourcesEmptyState} + {hasOrgSources ? orgSourcesTable : orgSourcesEmptyState} ); @@ -148,8 +148,8 @@ export const PrivateSources: React.FC = () => { {hasPrivateSources && !hasPlatinumLicense && licenseCallout} - {canCreatePersonalSources && privateSourcesSection} - {sharedSourcesSection} + {canCreatePrivateSources && privateSourcesSection} + {orgSourcesSection} ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts index 94ec730ef256c9..3c926e13fe52ff 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts @@ -202,7 +202,7 @@ describe('SourceLogic', () => { AppLogic.values.isOrganization = false; http.get.mockReturnValue(mock404); - SourceLogic.actions.initializeSource('404ing_personal_source'); + SourceLogic.actions.initializeSource('404ing_private_source'); await expectedAsyncError(mock404); expect(navigateToUrl).toHaveBeenCalledWith('/p/sources'); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts index 5c947b68f23332..c31eacda695151 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts @@ -19,7 +19,7 @@ import { import { HttpLogic } from '../../../shared/http'; import { KibanaLogic } from '../../../shared/kibana'; import { AppLogic } from '../../app_logic'; -import { PERSONAL_SOURCES_PATH, SOURCES_PATH, getSourcesPath } from '../../routes'; +import { PRIVATE_SOURCES_PATH, SOURCES_PATH, getSourcesPath } from '../../routes'; import { ContentSourceFullData, Meta, DocumentSummaryItem, SourceContentItem } from '../../types'; export interface SourceActions { @@ -169,7 +169,7 @@ export const SourceLogic = kea>({ } } catch (e) { if (e?.response?.status === 404) { - const redirect = isOrganization ? SOURCES_PATH : PERSONAL_SOURCES_PATH; + const redirect = isOrganization ? SOURCES_PATH : PRIVATE_SOURCES_PATH; KibanaLogic.values.navigateToUrl(redirect); setErrorMessage( i18n.translate('xpack.enterpriseSearch.workplaceSearch.sources.notFoundErrorMessage', { diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_router.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_router.test.tsx index eb6a9949eb07c0..00cf56001f73b0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_router.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_router.test.tsx @@ -14,14 +14,14 @@ import { Route, Switch, Redirect } from 'react-router-dom'; import { shallow } from 'enzyme'; -import { ADD_SOURCE_PATH, PERSONAL_SOURCES_PATH, SOURCES_PATH, getSourcesPath } from '../../routes'; +import { ADD_SOURCE_PATH, PRIVATE_SOURCES_PATH, SOURCES_PATH, getSourcesPath } from '../../routes'; import { SourcesRouter } from './sources_router'; describe('SourcesRouter', () => { const resetSourcesState = jest.fn(); const mockValues = { - account: { canCreatePersonalSources: true }, + account: { canCreatePrivateSources: true }, isOrganization: true, hasPlatinumLicense: true, }; @@ -50,17 +50,17 @@ describe('SourcesRouter', () => { }); it('redirects when cannot create sources', () => { - setMockValues({ ...mockValues, account: { canCreatePersonalSources: false } }); + setMockValues({ ...mockValues, account: { canCreatePrivateSources: false } }); const wrapper = shallow(); expect(wrapper.find(Redirect).last().prop('from')).toEqual( getSourcesPath(ADD_SOURCE_PATH, false) ); - expect(wrapper.find(Redirect).last().prop('to')).toEqual(PERSONAL_SOURCES_PATH); + expect(wrapper.find(Redirect).last().prop('to')).toEqual(PRIVATE_SOURCES_PATH); }); - it('does not render the router until canCreatePersonalSources is fetched', () => { - setMockValues({ ...mockValues, account: {} }); // canCreatePersonalSources is undefined + it('does not render the router until canCreatePrivateSources is fetched', () => { + setMockValues({ ...mockValues, account: {} }); // canCreatePrivateSources is undefined const wrapper = shallow(); expect(wrapper.html()).toEqual(null); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_router.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_router.tsx index 0171717490c9bb..2d47bab00810c3 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_router.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_router.tsx @@ -16,7 +16,7 @@ import { AppLogic } from '../../app_logic'; import { ADD_SOURCE_PATH, SOURCE_DETAILS_PATH, - PERSONAL_SOURCES_PATH, + PRIVATE_SOURCES_PATH, SOURCES_PATH, getSourcesPath, } from '../../routes'; @@ -35,7 +35,7 @@ export const SourcesRouter: React.FC = () => { const { hasPlatinumLicense } = useValues(LicensingLogic); const { resetSourcesState } = useActions(SourcesLogic); const { - account: { canCreatePersonalSources }, + account: { canCreatePrivateSources }, isOrganization, } = useValues(AppLogic); @@ -49,18 +49,18 @@ export const SourcesRouter: React.FC = () => { /** * When opening `workplace_search/p/sources/add` as a bookmark or reloading this page, - * Sources router first get rendered *before* it receives the canCreatePersonalSources value. - * This results in canCreatePersonalSources always being undefined on the first render, + * Sources router first get rendered *before* it receives the canCreatePrivateSources value. + * This results in canCreatePrivateSources always being undefined on the first render, * and user always getting redirected to `workplace_search/p/sources`. * Here we check for this value being present before we render any routes. */ - if (canCreatePersonalSources === undefined) { + if (canCreatePrivateSources === undefined) { return null; } return ( - + @@ -93,12 +93,12 @@ export const SourcesRouter: React.FC = () => { ); })} - {canCreatePersonalSources ? ( + {canCreatePrivateSources ? ( ) : ( - + )} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/group_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/group_logic.mock.ts index d4c1ce9dc8a299..d4d66005ecdc57 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/group_logic.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/group_logic.mock.ts @@ -11,7 +11,7 @@ export const mockGroupValues = { group: {} as GroupDetails, dataLoading: true, managerModalFormErrors: [], - sharedSourcesModalVisible: false, + orgSourcesModalVisible: false, confirmDeleteModalVisible: false, groupNameInputValue: '', selectedGroupSources: [], diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.test.tsx index 5619698335b30a..2b22823219410e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.test.tsx @@ -23,7 +23,7 @@ const saveItems = jest.fn(); const props = { children: <>, - label: 'shared content sources', + label: 'organizational content sources', allItems: [], numSelected: 1, hideModal, diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.tsx index 10d115c8e60ab6..b5d23895e9efdc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.tsx @@ -26,7 +26,7 @@ import { import { i18n } from '@kbn/i18n'; import { EuiButtonTo } from '../../../../shared/react_router_helpers'; -import noSharedSourcesIcon from '../../../assets/share_circle.svg'; +import noOrgSourcesIcon from '../../../assets/share_circle.svg'; import { UPDATE_BUTTON, CANCEL_BUTTON } from '../../../constants'; import { SOURCES_PATH } from '../../../routes'; import { Group } from '../../../types'; @@ -36,7 +36,7 @@ import { GroupsLogic } from '../groups_logic'; const ADD_SOURCE_BUTTON_TEXT = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.groupManagerUpdateAddSourceButton', { - defaultMessage: 'Add a Shared Source', + defaultMessage: 'Add an organizational source', } ); const EMPTY_STATE_TITLE = i18n.translate( @@ -48,7 +48,7 @@ const EMPTY_STATE_TITLE = i18n.translate( const EMPTY_STATE_BODY = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.groupManagerSourceEmpty.body', { - defaultMessage: 'Looks like you have not added any shared content sources yet.', + defaultMessage: 'Looks like you have not added any organizational content sources yet.', } ); @@ -103,7 +103,7 @@ export const GroupManagerModal: React.FC = ({ {EMPTY_STATE_TITLE}} body={EMPTY_STATE_BODY} actions={sourcesButton} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_overview.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_overview.test.tsx index ed0246702d7a50..e1ecc47f026699 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_overview.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_overview.test.tsx @@ -20,7 +20,7 @@ import { SourcesTable } from '../../../components/shared/sources_table'; import { GroupOverview } from './group_overview'; const deleteGroup = jest.fn(); -const showSharedSourcesModal = jest.fn(); +const showOrgSourcesModal = jest.fn(); const showConfirmDeleteModal = jest.fn(); const hideConfirmDeleteModal = jest.fn(); const updateGroupName = jest.fn(); @@ -37,7 +37,7 @@ describe('GroupOverview', () => { beforeEach(() => { setMockActions({ deleteGroup, - showSharedSourcesModal, + showOrgSourcesModal, showConfirmDeleteModal, hideConfirmDeleteModal, updateGroupName, diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_overview.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_overview.tsx index 5714cc965827e1..c5febf37e1fbbf 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_overview.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_overview.tsx @@ -25,7 +25,7 @@ import { i18n } from '@kbn/i18n'; import { EuiButtonTo } from '../../../../shared/react_router_helpers'; import { TruncatedContent } from '../../../../shared/truncate'; -import noSharedSourcesIcon from '../../../assets/share_circle.svg'; +import noOrgSourcesIcon from '../../../assets/share_circle.svg'; import { WorkplaceSearchPageTemplate } from '../../../components/layout'; import { ContentSection } from '../../../components/shared/content_section'; import { SourcesTable } from '../../../components/shared/sources_table'; @@ -55,7 +55,7 @@ const GROUP_USERS_DESCRIPTION = i18n.translate( const MANAGE_SOURCES_BUTTON_TEXT = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.overview.manageSourcesButtonText', { - defaultMessage: 'Manage shared content sources', + defaultMessage: 'Manage organizational content sources', } ); const MANAGE_USERS_BUTTON_TEXT = i18n.translate( @@ -110,7 +110,7 @@ const CONFIRM_TITLE_TEXT = i18n.translate( export const GroupOverview: React.FC = () => { const { deleteGroup, - showSharedSourcesModal, + showOrgSourcesModal, showConfirmDeleteModal, hideConfirmDeleteModal, updateGroupName, @@ -159,7 +159,7 @@ export const GroupOverview: React.FC = () => { const hasContentSources = contentSources?.length > 0; const manageSourcesButton = ( - + {MANAGE_SOURCES_BUTTON_TEXT} ); @@ -185,7 +185,7 @@ export const GroupOverview: React.FC = () => { <> {GROUP_SOURCES_TITLE}} body={

{EMPTY_SOURCES_DESCRIPTION}

} actions={manageSourcesButton} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row.tsx index 8d3c7dfa7622b4..effacfa3aa4f89 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row.tsx @@ -25,7 +25,7 @@ const DAYS_CUTOFF = 8; export const NO_SOURCES_MESSAGE = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.noSourcesMessage', { - defaultMessage: 'No shared content sources', + defaultMessage: 'No organizational content sources', } ); export const NO_USERS_MESSAGE = i18n.translate( diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_sources_dropdown.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_sources_dropdown.tsx index 77d7de91caf7c0..aa25deff49e3db 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_sources_dropdown.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_sources_dropdown.tsx @@ -37,7 +37,7 @@ export const GroupRowSourcesDropdown: React.FC = ( const contentSourceCountHeading = ( {i18n.translate('xpack.enterpriseSearch.workplaceSearch.groups.contentSourceCountHeading', { - defaultMessage: '{numSources} shared content sources', + defaultMessage: '{numSources} organizational content sources', values: { numSources: groupSources.length }, })} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.test.tsx index ba667c6d8152d4..49dc7223e54e6c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.test.tsx @@ -18,7 +18,7 @@ import { GroupSourcePrioritization } from './group_source_prioritization'; const updatePriority = jest.fn(); const saveGroupSourcePrioritization = jest.fn(); -const showSharedSourcesModal = jest.fn(); +const showOrgSourcesModal = jest.fn(); const mockValues = { group: groups[0], @@ -36,7 +36,7 @@ describe('GroupSourcePrioritization', () => { setMockActions({ updatePriority, saveGroupSourcePrioritization, - showSharedSourcesModal, + showOrgSourcesModal, }); setMockValues(mockValues); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.tsx index 0fdaf2adde8699..76549ba1e96dc3 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.tsx @@ -36,7 +36,7 @@ import { GroupLogic } from '../group_logic'; const HEADER_TITLE = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.sourceProioritization.headerTitle', { - defaultMessage: 'Shared content source prioritization', + defaultMessage: 'Organizational content source prioritization', } ); const HEADER_DESCRIPTION = i18n.translate( @@ -54,7 +54,7 @@ const ZERO_STATE_TITLE = i18n.translate( const ZERO_STATE_BUTTON_TEXT = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.sourceProioritization.zeroStateButtonText', { - defaultMessage: 'Add shared content sources', + defaultMessage: 'Add organizational content sources', } ); const SOURCE_TABLE_HEADER = i18n.translate( @@ -71,7 +71,7 @@ const PRIORITY_TABLE_HEADER = i18n.translate( ); export const GroupSourcePrioritization: React.FC = () => { - const { updatePriority, saveGroupSourcePrioritization, showSharedSourcesModal } = useActions( + const { updatePriority, saveGroupSourcePrioritization, showOrgSourcesModal } = useActions( GroupLogic ); @@ -118,7 +118,7 @@ export const GroupSourcePrioritization: React.FC = () => { )} } - actions={{ZERO_STATE_BUTTON_TEXT}} + actions={{ZERO_STATE_BUTTON_TEXT}} />
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/shared_sources_modal.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/org_sources_modal.test.tsx similarity index 83% rename from x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/shared_sources_modal.test.tsx rename to x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/org_sources_modal.test.tsx index 02f0b53af97cc3..3059274686045f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/shared_sources_modal.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/org_sources_modal.test.tsx @@ -13,23 +13,23 @@ import React from 'react'; import { shallow } from 'enzyme'; import { GroupManagerModal } from './group_manager_modal'; -import { SharedSourcesModal } from './shared_sources_modal'; +import { OrgSourcesModal } from './org_sources_modal'; import { SourcesList } from './sources_list'; const group = groups[0]; const addGroupSource = jest.fn(); const selectAllSources = jest.fn(); -const hideSharedSourcesModal = jest.fn(); +const hideOrgSourcesModal = jest.fn(); const removeGroupSource = jest.fn(); const saveGroupSources = jest.fn(); -describe('SharedSourcesModal', () => { +describe('OrgSourcesModal', () => { it('renders', () => { setMockActions({ addGroupSource, selectAllSources, - hideSharedSourcesModal, + hideOrgSourcesModal, removeGroupSource, saveGroupSources, }); @@ -40,7 +40,7 @@ describe('SharedSourcesModal', () => { contentSources: group.contentSources, }); - const wrapper = shallow(); + const wrapper = shallow(); expect(wrapper.find(SourcesList)).toHaveLength(1); expect(wrapper.find(GroupManagerModal)).toHaveLength(1); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/shared_sources_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/org_sources_modal.tsx similarity index 91% rename from x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/shared_sources_modal.tsx rename to x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/org_sources_modal.tsx index 631c4f80f36b04..23598433d426b0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/shared_sources_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/org_sources_modal.tsx @@ -21,15 +21,15 @@ import { SourcesList } from './sources_list'; const MODAL_LABEL = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.sourcesModalLabel', { - defaultMessage: 'shared content sources', + defaultMessage: 'organizational content sources', } ); -export const SharedSourcesModal: React.FC = () => { +export const OrgSourcesModal: React.FC = () => { const { addGroupSource, selectAllSources, - hideSharedSourcesModal, + hideOrgSourcesModal, removeGroupSource, saveGroupSources, } = useActions(GroupLogic); @@ -43,7 +43,7 @@ export const SharedSourcesModal: React.FC = () => { label={MODAL_LABEL} allItems={contentSources} numSelected={selectedGroupSources.length} - hideModal={hideSharedSourcesModal} + hideModal={hideOrgSourcesModal} selectAll={selectAllSources} saveItems={saveGroupSources} > diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.test.ts index 088936443ccd34..79b253dd643015 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.test.ts @@ -114,7 +114,7 @@ describe('GroupLogic', () => { GroupLogic.actions.onGroupSourcesSaved(group); expect(GroupLogic.values.group).toEqual(group); - expect(GroupLogic.values.sharedSourcesModalVisible).toEqual(false); + expect(GroupLogic.values.orgSourcesModalVisible).toEqual(false); expect(GroupLogic.values.selectedGroupSources).toEqual(sourceIds); expect(GroupLogic.values.cachedSourcePriorities).toEqual(sourcePriorities); expect(GroupLogic.values.activeSourcePriorities).toEqual(sourcePriorities); @@ -130,11 +130,11 @@ describe('GroupLogic', () => { }); }); - describe('hideSharedSourcesModal', () => { + describe('hideOrgSourcesModal', () => { it('sets reducers', () => { - GroupLogic.actions.hideSharedSourcesModal(group); + GroupLogic.actions.hideOrgSourcesModal(group); - expect(GroupLogic.values.sharedSourcesModalVisible).toEqual(false); + expect(GroupLogic.values.orgSourcesModalVisible).toEqual(false); expect(GroupLogic.values.selectedGroupSources).toEqual(sourceIds); }); }); @@ -284,7 +284,7 @@ describe('GroupLogic', () => { await nextTick(); expect(onGroupSourcesSavedSpy).toHaveBeenCalledWith(group); expect(flashSuccessToast).toHaveBeenCalledWith( - 'Successfully updated shared content sources.' + 'Successfully updated organizational content sources.' ); }); @@ -321,7 +321,7 @@ describe('GroupLogic', () => { await nextTick(); expect(flashSuccessToast).toHaveBeenCalledWith( - 'Successfully updated shared source prioritization.' + 'Successfully updated organizational source prioritization.' ); expect(onGroupPrioritiesChangedSpy).toHaveBeenCalledWith(group); }); @@ -345,11 +345,11 @@ describe('GroupLogic', () => { }); }); - describe('showSharedSourcesModal', () => { + describe('showOrgSourcesModal', () => { it('sets reducer and clears flash messages', () => { - GroupLogic.actions.showSharedSourcesModal(); + GroupLogic.actions.showOrgSourcesModal(); - expect(GroupLogic.values.sharedSourcesModalVisible).toEqual(true); + expect(GroupLogic.values.orgSourcesModalVisible).toEqual(true); expect(clearFlashMessages).toHaveBeenCalled(); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts index 96b9213d30afc5..3ba7d68d0b3e94 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts @@ -32,13 +32,13 @@ interface GroupActions { removeGroupSource(sourceId: string): string; onGroupSourcesSaved(group: GroupDetails): GroupDetails; setGroupModalErrors(errors: string[]): string[]; - hideSharedSourcesModal(group: GroupDetails): GroupDetails; + hideOrgSourcesModal(group: GroupDetails): GroupDetails; selectAllSources(contentSources: ContentSourceDetails[]): ContentSourceDetails[]; updatePriority(id: string, boost: number): { id: string; boost: number }; resetGroup(): void; showConfirmDeleteModal(): void; hideConfirmDeleteModal(): void; - showSharedSourcesModal(): void; + showOrgSourcesModal(): void; resetFlashMessages(): void; initializeGroup(groupId: string): { groupId: string }; deleteGroup(): void; @@ -51,7 +51,7 @@ interface GroupValues { group: GroupDetails; dataLoading: boolean; managerModalFormErrors: string[]; - sharedSourcesModalVisible: boolean; + orgSourcesModalVisible: boolean; confirmDeleteModalVisible: boolean; groupNameInputValue: string; selectedGroupSources: string[]; @@ -71,13 +71,13 @@ export const GroupLogic = kea>({ removeGroupSource: (sourceId) => sourceId, onGroupSourcesSaved: (group) => group, setGroupModalErrors: (errors) => errors, - hideSharedSourcesModal: (group) => group, + hideOrgSourcesModal: (group) => group, selectAllSources: (contentSources) => contentSources, updatePriority: (id, boost) => ({ id, boost }), resetGroup: () => true, showConfirmDeleteModal: () => true, hideConfirmDeleteModal: () => true, - showSharedSourcesModal: () => true, + showOrgSourcesModal: () => true, resetFlashMessages: () => true, initializeGroup: (groupId) => ({ groupId }), deleteGroup: () => true, @@ -109,11 +109,11 @@ export const GroupLogic = kea>({ setGroupModalErrors: (_, errors) => errors, }, ], - sharedSourcesModalVisible: [ + orgSourcesModalVisible: [ false, { - showSharedSourcesModal: () => true, - hideSharedSourcesModal: () => false, + showOrgSourcesModal: () => true, + hideOrgSourcesModal: () => false, onGroupSourcesSaved: () => false, }, ], @@ -138,7 +138,7 @@ export const GroupLogic = kea>({ onInitializeGroup: (_, { contentSources }) => contentSources.map(({ id }) => id), onGroupSourcesSaved: (_, { contentSources }) => contentSources.map(({ id }) => id), selectAllSources: (_, contentSources) => contentSources.map(({ id }) => id), - hideSharedSourcesModal: (_, { contentSources }) => contentSources.map(({ id }) => id), + hideOrgSourcesModal: (_, { contentSources }) => contentSources.map(({ id }) => id), addGroupSource: (state, sourceId) => [...state, sourceId].sort(), removeGroupSource: (state, sourceId) => state.filter((id) => id !== sourceId), }, @@ -257,7 +257,7 @@ export const GroupLogic = kea>({ const GROUP_SOURCES_UPDATED_MESSAGE = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.groupSourcesUpdated', { - defaultMessage: 'Successfully updated shared content sources.', + defaultMessage: 'Successfully updated organizational content sources.', } ); flashSuccessToast(GROUP_SOURCES_UPDATED_MESSAGE); @@ -289,7 +289,7 @@ export const GroupLogic = kea>({ const GROUP_PRIORITIZATION_UPDATED_MESSAGE = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.groupPrioritizationUpdated', { - defaultMessage: 'Successfully updated shared source prioritization.', + defaultMessage: 'Successfully updated organizational source prioritization.', } ); @@ -302,7 +302,7 @@ export const GroupLogic = kea>({ showConfirmDeleteModal: () => { clearFlashMessages(); }, - showSharedSourcesModal: () => { + showOrgSourcesModal: () => { clearFlashMessages(); }, resetFlashMessages: () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_router.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_router.test.tsx index 9ea0908a0f0142..393b5a7e194dec 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_router.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_router.test.tsx @@ -17,7 +17,7 @@ import { shallow } from 'enzyme'; import { GroupOverview } from './components/group_overview'; import { GroupSourcePrioritization } from './components/group_source_prioritization'; -import { SharedSourcesModal } from './components/shared_sources_modal'; +import { OrgSourcesModal } from './components/org_sources_modal'; import { GroupRouter } from './group_router'; describe('GroupRouter', () => { @@ -26,7 +26,7 @@ describe('GroupRouter', () => { beforeEach(() => { setMockValues({ - sharedSourcesModalVisible: false, + orgSourcesModalVisible: false, group: groups[0], }); @@ -47,12 +47,12 @@ describe('GroupRouter', () => { it('renders modal', () => { setMockValues({ - sharedSourcesModalVisible: true, + orgSourcesModalVisible: true, group: groups[0], }); const wrapper = shallow(); - expect(wrapper.find(SharedSourcesModal)).toHaveLength(1); + expect(wrapper.find(OrgSourcesModal)).toHaveLength(1); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_router.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_router.tsx index 341e20099c6c25..ffdfb9c378614a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_router.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_router.tsx @@ -14,14 +14,14 @@ import { GROUP_SOURCE_PRIORITIZATION_PATH, GROUP_PATH } from '../../routes'; import { GroupOverview } from './components/group_overview'; import { GroupSourcePrioritization } from './components/group_source_prioritization'; -import { SharedSourcesModal } from './components/shared_sources_modal'; +import { OrgSourcesModal } from './components/org_sources_modal'; import { GroupLogic } from './group_logic'; export const GroupRouter: React.FC = () => { const { groupId } = useParams() as { groupId: string }; const { initializeGroup, resetGroup } = useActions(GroupLogic); - const { sharedSourcesModalVisible } = useValues(GroupLogic); + const { orgSourcesModalVisible } = useValues(GroupLogic); useEffect(() => { initializeGroup(groupId); @@ -38,7 +38,7 @@ export const GroupRouter: React.FC = () => {
- {sharedSourcesModalVisible && } + {orgSourcesModalVisible && } ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups.tsx index 1a4c4f51e93ea1..5ecaef95c8be1c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups.tsx @@ -112,7 +112,7 @@ export const Groups: React.FC = () => { }), description: i18n.translate('xpack.enterpriseSearch.workplaceSearch.groups.description', { defaultMessage: - 'Assign shared content sources and users to groups to create relevant search experiences for various internal teams.', + 'Assign organizational content sources and users to groups to create relevant search experiences for various internal teams.', }), rightSideItems: headerActions, }} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/not_found/not_found.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/not_found/not_found.tsx index ef556687755137..e5a162baa28712 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/not_found/not_found.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/not_found/not_found.tsx @@ -12,7 +12,7 @@ import { PageTemplateProps } from '../../../shared/layout'; import { NotFoundPrompt } from '../../../shared/not_found'; import { SendWorkplaceSearchTelemetry } from '../../../shared/telemetry'; import { WorkplaceSearchPageTemplate, PersonalDashboardLayout } from '../../components/layout'; -import { PERSONAL_SOURCES_PATH } from '../../routes'; +import { PRIVATE_SOURCES_PATH } from '../../routes'; interface Props { isOrganization?: boolean; @@ -25,7 +25,7 @@ export const NotFound: React.FC = ({ isOrganization = true, pageChrome = diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/overview_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/overview_logic.mock.ts index 7e30826c5e7ec2..72ad157dd06bf0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/overview_logic.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/overview_logic.mock.ts @@ -17,7 +17,7 @@ export const mockOverviewValues = { hasUsers: false, isOldAccount: false, pendingInvitationsCount: 0, - personalSourcesCount: 0, + privateSourcesCount: 0, sourcesCount: 0, dataLoading: true, }; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.test.tsx index b62f022d85e385..f4f87f48f63955 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.test.tsx @@ -21,19 +21,19 @@ import { OnboardingSteps, OrgNameOnboarding } from './onboarding_steps'; const account = { id: '1', isAdmin: true, - canCreatePersonalSources: true, + canCreatePrivateSources: true, groups: [], }; describe('OnboardingSteps', () => { - describe('Shared Sources', () => { + describe('Organizational Sources', () => { it('renders 0 sources state', () => { const wrapper = shallow(); expect(wrapper.find(OnboardingCard)).toHaveLength(2); expect(wrapper.find(OnboardingCard).first().prop('actionPath')).toBe(ADD_SOURCE_PATH); expect(wrapper.find(OnboardingCard).first().prop('description')).toBe( - 'Add shared sources for your organization to start searching.' + 'Add organizational sources for your organization to start searching.' ); }); @@ -42,7 +42,7 @@ describe('OnboardingSteps', () => { const wrapper = shallow(); expect(wrapper.find(OnboardingCard).first().prop('description')).toEqual( - 'You have added 2 shared sources. Happy searching.' + 'You have added 2 organizational sources. Happy searching.' ); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.tsx index b908211b83a439..13288bce982002 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.tsx @@ -24,7 +24,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { EuiButtonTo } from '../../../shared/react_router_helpers'; import { TelemetryLogic } from '../../../shared/telemetry'; import { AppLogic } from '../../app_logic'; -import sharedSourcesIcon from '../../components/shared/assets/source_icons/share_circle.svg'; +import orgSourcesIcon from '../../components/shared/assets/source_icons/share_circle.svg'; import { ContentSection } from '../../components/shared/content_section'; import { ADD_SOURCE_PATH, USERS_AND_ROLES_PATH, ORG_SETTINGS_PATH } from '../../routes'; @@ -33,7 +33,7 @@ import { OverviewLogic } from './overview_logic'; const SOURCES_TITLE = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.overviewOnboardingSourcesCard.title', - { defaultMessage: 'Shared sources' } + { defaultMessage: 'Organizational sources' } ); const USERS_TITLE = i18n.translate( @@ -53,7 +53,7 @@ const INVITE_MORE_USERS_BUTTON = i18n.translate( const ONBOARDING_SOURCES_CARD_DESCRIPTION = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.overviewOnboardingSourcesCard.description', - { defaultMessage: 'Add shared sources for your organization to start searching.' } + { defaultMessage: 'Add organizational sources for your organization to start searching.' } ); const ADD_FIRST_SOURCES_BUTTON = i18n.translate( @@ -87,7 +87,7 @@ export const OnboardingSteps: React.FC = () => { 'xpack.enterpriseSearch.workplaceSearch.sourcesOnboardingCard.description', { defaultMessage: - 'You have added {sourcesCount, number} shared {sourcesCount, plural, one {source} other {sources}}. Happy searching.', + 'You have added {sourcesCount, number} organizational {sourcesCount, plural, one {source} other {sources}}. Happy searching.', values: { sourcesCount }, } ); @@ -97,8 +97,8 @@ export const OnboardingSteps: React.FC = () => { { - const { sourcesCount, pendingInvitationsCount, accountsCount, personalSourcesCount } = useValues( + const { sourcesCount, pendingInvitationsCount, accountsCount, privateSourcesCount } = useValues( OverviewLogic ); @@ -37,8 +37,8 @@ export const OrganizationStats: React.FC = () => { { 'xpack.enterpriseSearch.workplaceSearch.organizationStats.privateSources', { defaultMessage: 'Private sources' } )} - count={personalSourcesCount} + count={privateSourcesCount} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.test.ts index f10918a1afe2d3..64e87b77bacefb 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.test.ts @@ -33,7 +33,7 @@ describe('OverviewLogic', () => { hasUsers: true, isOldAccount: true, pendingInvitationsCount: 1, - personalSourcesCount: 1, + privateSourcesCount: 1, sourcesCount: 1, }; @@ -52,7 +52,7 @@ describe('OverviewLogic', () => { expect(OverviewLogic.values.sourcesCount).toEqual(1); expect(OverviewLogic.values.pendingInvitationsCount).toEqual(1); expect(OverviewLogic.values.accountsCount).toEqual(1); - expect(OverviewLogic.values.personalSourcesCount).toEqual(1); + expect(OverviewLogic.values.privateSourcesCount).toEqual(1); expect(OverviewLogic.values.activityFeed).toEqual(feed); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.ts index 196de02646804b..1d79e66e778fb0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.ts @@ -19,7 +19,7 @@ interface OverviewServerData { sourcesCount: number; pendingInvitationsCount: number; accountsCount: number; - personalSourcesCount: number; + privateSourcesCount: number; activityFeed: FeedActivity[]; } @@ -75,10 +75,10 @@ export const OverviewLogic = kea> setServerData: (_, { accountsCount }) => accountsCount, }, ], - personalSourcesCount: [ + privateSourcesCount: [ 0, { - setServerData: (_, { personalSourcesCount }) => personalSourcesCount, + setServerData: (_, { privateSourcesCount }) => privateSourcesCount, }, ], activityFeed: [ diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts index d656c0f8896359..b5a8e205e5e1c5 100644 --- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts @@ -100,7 +100,7 @@ describe('callEnterpriseSearchConfigAPI', () => { id: 'some-id-string', groups: ['Default', 'Cats'], is_admin: true, - can_create_personal_sources: true, + can_create_private_sources: true, can_create_invitations: true, is_curated: false, viewed_onboarding_page: true, @@ -183,7 +183,7 @@ describe('callEnterpriseSearchConfigAPI', () => { id: undefined, groups: [], isAdmin: false, - canCreatePersonalSources: false, + canCreatePrivateSources: false, viewedOnboardingPage: false, }, }, diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts index fb3c3b14911a5d..ba3a2e6a6480e3 100644 --- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts +++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts @@ -124,8 +124,8 @@ export const callEnterpriseSearchConfigAPI = async ({ id: data?.current_user?.workplace_search?.account?.id, groups: data?.current_user?.workplace_search?.account?.groups || [], isAdmin: !!data?.current_user?.workplace_search?.account?.is_admin, - canCreatePersonalSources: !!data?.current_user?.workplace_search?.account - ?.can_create_personal_sources, + canCreatePrivateSources: !!data?.current_user?.workplace_search?.account + ?.can_create_private_sources, viewedOnboardingPage: !!data?.current_user?.workplace_search?.account ?.viewed_onboarding_page, }, diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index def2158f3dd780..f49d2d674330f0 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -10150,7 +10150,6 @@ "xpack.enterpriseSearch.workplaceSearch.organizationStats.activeUsers": "アクティブなユーザー", "xpack.enterpriseSearch.workplaceSearch.organizationStats.invitations": "招待", "xpack.enterpriseSearch.workplaceSearch.organizationStats.privateSources": "プライベートソース", - "xpack.enterpriseSearch.workplaceSearch.organizationStats.sharedSources": "共有ソース", "xpack.enterpriseSearch.workplaceSearch.organizationStats.title": "使用統計情報", "xpack.enterpriseSearch.workplaceSearch.orgNameOnboarding.buttonLabel": "組織名を指定", "xpack.enterpriseSearch.workplaceSearch.orgNameOnboarding.description": "同僚を招待する前に、組織名を指定し、認識しやすくしてください。", @@ -10165,7 +10164,6 @@ "xpack.enterpriseSearch.workplaceSearch.overviewUsersCard.title": "検索できるように、同僚を招待しました。", "xpack.enterpriseSearch.workplaceSearch.personalDashboardSourceError": "ソースに接続できませんでした。ヘルプについては管理者に問い合わせてください。エラーメッセージ:{error}", "xpack.enterpriseSearch.workplaceSearch.platinumFeature": "プラチナ機能", - "xpack.enterpriseSearch.workplaceSearch.privateDashboard.readOnlyMode.warning": "現在、定期メンテナンス中のため、Workplace Searchは検索でのみ使用できます。詳細については、システム管理者に連絡してください。", "xpack.enterpriseSearch.workplaceSearch.privatePlatinumCallout.text": "非公開ソースにはプラチナライセンスが必要です。", "xpack.enterpriseSearch.workplaceSearch.privateSource.text": "非公開ソース", "xpack.enterpriseSearch.workplaceSearch.privateSources.text": "非公開ソース", @@ -10325,7 +10323,6 @@ "xpack.enterpriseSearch.workplaceSearch.sources.private.header.description": "非公開コンテンツソースは自分のみが使用できます。", "xpack.enterpriseSearch.workplaceSearch.sources.private.header.title": "自分の非公開コンテンツソース", "xpack.enterpriseSearch.workplaceSearch.sources.private.link": "非公開コンテンツソースを追加", - "xpack.enterpriseSearch.workplaceSearch.sources.private.privateShared.header.title": "共有コンテンツソース", "xpack.enterpriseSearch.workplaceSearch.sources.private.vewOnly.description": "グループと共有するすべてのソースのステータスを確認します。", "xpack.enterpriseSearch.workplaceSearch.sources.private.vewOnly.title": "グループソースの確認", "xpack.enterpriseSearch.workplaceSearch.sources.ready.text": "検索できます", @@ -10336,8 +10333,6 @@ "xpack.enterpriseSearch.workplaceSearch.sources.settings.heading": "設定", "xpack.enterpriseSearch.workplaceSearch.sources.settings.title": "コンテンツソース名", "xpack.enterpriseSearch.workplaceSearch.sources.settingsModal.text": "ソースドキュメントはWorkplace Searchから削除されます。{lineBreak}{name}を削除しますか?", - "xpack.enterpriseSearch.workplaceSearch.sources.shared.empty.description": "コンテンツソースが自分と共有されたら、ここに表示され、検索エクスペリエンスで使用できます。", - "xpack.enterpriseSearch.workplaceSearch.sources.shared.empty.title": "コンテンツソースがありません", "xpack.enterpriseSearch.workplaceSearch.sources.sourceContent.title": "ソースコンテンツ", "xpack.enterpriseSearch.workplaceSearch.sources.sourceDisabled.button": "プラチナライセンスの詳細", "xpack.enterpriseSearch.workplaceSearch.sources.sourceDisabled.description": "組織のライセンスレベルが変更されました。データは安全ですが、ドキュメントレベルのアクセス権はサポートされなくなり、このソースの検索は無効になっています。このソースを再有効化するには、プラチナライセンスにアップグレードしてください。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index cc2bbcfbe811f5..85e11905e5eb74 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -10251,7 +10251,6 @@ "xpack.enterpriseSearch.workplaceSearch.organizationStats.activeUsers": "活动用户", "xpack.enterpriseSearch.workplaceSearch.organizationStats.invitations": "邀请", "xpack.enterpriseSearch.workplaceSearch.organizationStats.privateSources": "专用源", - "xpack.enterpriseSearch.workplaceSearch.organizationStats.sharedSources": "共享源", "xpack.enterpriseSearch.workplaceSearch.organizationStats.title": "使用统计", "xpack.enterpriseSearch.workplaceSearch.orgNameOnboarding.buttonLabel": "命名您的组织", "xpack.enterpriseSearch.workplaceSearch.orgNameOnboarding.description": "在邀请同事之前,请命名您的组织以提升辨识度。", @@ -10266,7 +10265,6 @@ "xpack.enterpriseSearch.workplaceSearch.overviewUsersCard.title": "很好,您已邀请同事一同搜索。", "xpack.enterpriseSearch.workplaceSearch.personalDashboardSourceError": "无法连接源,请联系管理员以获取帮助。错误消息:{error}", "xpack.enterpriseSearch.workplaceSearch.platinumFeature": "白金级功能", - "xpack.enterpriseSearch.workplaceSearch.privateDashboard.readOnlyMode.warning": "由于常规维护,Workplace Search 当前仅可供搜索。请与您的系统管理员联系,以获取更多信息。", "xpack.enterpriseSearch.workplaceSearch.privatePlatinumCallout.text": "专用源需要白金级许可证。", "xpack.enterpriseSearch.workplaceSearch.privateSource.text": "专用源", "xpack.enterpriseSearch.workplaceSearch.privateSources.text": "专用源", @@ -10426,8 +10424,6 @@ "xpack.enterpriseSearch.workplaceSearch.sources.private.header.description": "专用源仅供您使用。", "xpack.enterpriseSearch.workplaceSearch.sources.private.header.title": "我的专用内容源", "xpack.enterpriseSearch.workplaceSearch.sources.private.link": "添加专用内容源", - "xpack.enterpriseSearch.workplaceSearch.sources.private.privateShared.header.description": "您可以通过{groups, plural, other {组}} {groupsSentence}{newline}访问以下源。", - "xpack.enterpriseSearch.workplaceSearch.sources.private.privateShared.header.title": "共享内容源", "xpack.enterpriseSearch.workplaceSearch.sources.private.vewOnly.description": "查看与您的组共享的所有源的状态。", "xpack.enterpriseSearch.workplaceSearch.sources.private.vewOnly.title": "查看组源", "xpack.enterpriseSearch.workplaceSearch.sources.ready.text": "可供搜索", @@ -10438,8 +10434,6 @@ "xpack.enterpriseSearch.workplaceSearch.sources.settings.heading": "设置", "xpack.enterpriseSearch.workplaceSearch.sources.settings.title": "内容源名称", "xpack.enterpriseSearch.workplaceSearch.sources.settingsModal.text": "将从 Workplace Search 中删除您的源文档。{lineBreak}确定要移除 {name}?", - "xpack.enterpriseSearch.workplaceSearch.sources.shared.empty.description": "内容源共享给您后,其将显示在此处,并可通过搜索体验获取。", - "xpack.enterpriseSearch.workplaceSearch.sources.shared.empty.title": "没有可用的内容源", "xpack.enterpriseSearch.workplaceSearch.sources.sourceContent.title": "源内容", "xpack.enterpriseSearch.workplaceSearch.sources.sourceDisabled.button": "了解白金级许可证", "xpack.enterpriseSearch.workplaceSearch.sources.sourceDisabled.description": "您的组织的许可证级别已更改。您的数据是安全的,但不再支持文档级别权限,且已禁止搜索此源。升级到白金级许可证,以重新启用此源。",