diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/nav.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/nav.tsx
index a454e3146f4d9..6fa6698e6b6ba 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/nav.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/nav.tsx
@@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import React from 'react';
-import { i18n } from '@kbn/i18n';
import { EuiSpacer } from '@elastic/eui';
@@ -13,7 +12,7 @@ import { getWorkplaceSearchUrl } from '../../../shared/enterprise_search_url';
import { SideNav, SideNavLink } from '../../../shared/layout';
import { GroupSubNav } from '../../views/groups/components/group_sub_nav';
-import { NAV } from '../../views/groups/constants';
+import { NAV } from '../../constants';
import {
ORG_SOURCES_PATH,
@@ -29,38 +28,26 @@ export const WorkplaceSearchNav: React.FC = () => {
return (
- {i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.overview', {
- defaultMessage: 'Overview',
- })}
+ {NAV.OVERVIEW}
- {i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.sources', {
- defaultMessage: 'Sources',
- })}
+ {NAV.SOURCES}
}>
{NAV.GROUPS}
- {i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.roleMappings', {
- defaultMessage: 'Role Mappings',
- })}
+ {NAV.ROLE_MAPPINGS}
- {i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.security', {
- defaultMessage: 'Security',
- })}
+ {NAV.SECURITY}
- {i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.settings', {
- defaultMessage: 'Settings',
- })}
+ {NAV.SETTINGS}
- {i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.personalDashboard', {
- defaultMessage: 'View my personal dashboard',
- })}
+ {NAV.PERSONAL_DASHBOARD}
);
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 9f313a6995ad5..3b911b87dea12 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
@@ -3,6 +3,44 @@
* 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 NAV = {
+ OVERVIEW: i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.overview', {
+ defaultMessage: 'Overview',
+ }),
+ SOURCES: i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.sources', {
+ defaultMessage: 'Sources',
+ }),
+ GROUPS: i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.groups', {
+ defaultMessage: 'Groups',
+ }),
+ GROUP_OVERVIEW: i18n.translate(
+ 'xpack.enterpriseSearch.workplaceSearch.nav.groups.groupOverview',
+ {
+ defaultMessage: 'Overview',
+ }
+ ),
+ SOURCE_PRIORITIZATION: i18n.translate(
+ 'xpack.enterpriseSearch.workplaceSearch.nav.groups.sourcePrioritization',
+ { defaultMessage: 'Source Prioritization' }
+ ),
+ ROLE_MAPPINGS: i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.roleMappings', {
+ defaultMessage: 'Role Mappings',
+ }),
+ SECURITY: i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.security', {
+ defaultMessage: 'Security',
+ }),
+ SETTINGS: i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.settings', {
+ defaultMessage: 'Settings',
+ }),
+ PERSONAL_DASHBOARD: i18n.translate(
+ 'xpack.enterpriseSearch.workplaceSearch.nav.personalDashboard',
+ {
+ defaultMessage: 'View my personal dashboard',
+ }
+ ),
+};
export const MAX_TABLE_ROW_ICONS = 3;
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 e22b9c6282f95..9875af7889447 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
@@ -16,7 +16,7 @@ import { AppLogic } from './app_logic';
import { Layout } from '../shared/layout';
import { WorkplaceSearchNav, WorkplaceSearchHeaderActions } from './components/layout';
-import { SETUP_GUIDE_PATH } from './routes';
+import { GROUPS_PATH, SETUP_GUIDE_PATH } from './routes';
import { SetupGuide } from './views/setup_guide';
import { ErrorState } from './views/error_state';
@@ -56,7 +56,7 @@ export const WorkplaceSearchConfigured: React.FC = (props) => {
) : (
-
+
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sub_nav.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sub_nav.tsx
index a41cf6191eb64..ad19ad059fb40 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sub_nav.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sub_nav.tsx
@@ -8,7 +8,7 @@ import React from 'react';
import { useValues } from 'kea';
import { GroupLogic } from '../group_logic';
-import { NAV } from '../constants';
+import { NAV } from '../../../constants';
import { SideNavLink } from '../../../../shared/layout';
@@ -23,7 +23,7 @@ export const GroupSubNav: React.FC = () => {
return (
<>
- {NAV.OVERVIEW}
+ {NAV.GROUP_OVERVIEW}
{NAV.SOURCE_PRIORITIZATION}
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/constants.ts
deleted file mode 100644
index 7c3d160017138..0000000000000
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/constants.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License;
- * you may not use this file except in compliance with the Elastic License.
- */
-
-import { i18n } from '@kbn/i18n';
-
-export const NAV = {
- GROUPS: i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.groups', {
- defaultMessage: 'Groups',
- }),
- OVERVIEW: i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.groups.groupOverview', {
- defaultMessage: 'Overview',
- }),
- SOURCE_PRIORITIZATION: i18n.translate(
- 'xpack.enterpriseSearch.workplaceSearch.nav.groups.sourcePrioritization',
- { defaultMessage: 'Source Prioritization' }
- ),
-};
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 1b6f0c4c49a05..822d966bfb8d2 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,7 +14,7 @@ import { SetWorkplaceSearchChrome as SetPageChrome } from '../../../shared/kiban
import { SendWorkplaceSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
import { GROUP_SOURCE_PRIORITIZATION_PATH, GROUP_PATH } from '../../routes';
-import { NAV } from './constants';
+import { NAV } from '../../constants';
import { GroupLogic } from './group_logic';
import { ManageUsersModal } from './components/manage_users_modal';
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups_router.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups_router.tsx
index a4fe472065d90..326362a0ddfbc 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups_router.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups_router.tsx
@@ -14,7 +14,7 @@ import { SetWorkplaceSearchChrome as SetPageChrome } from '../../../shared/kiban
import { SendWorkplaceSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
import { GROUP_PATH, GROUPS_PATH } from '../../routes';
-import { NAV } from './constants';
+import { NAV } from '../../constants';
import { GroupsLogic } from './groups_logic';