diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.tsx
index 99cebd5ded58..bf0c5471f7b5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.tsx
@@ -33,7 +33,7 @@ export const SourceSubNav: React.FC = () => {
const isCustom = serviceType === CUSTOM_SERVICE_TYPE;
return (
- <>
+
{NAV.OVERVIEW}
@@ -53,6 +53,6 @@ export const SourceSubNav: React.FC = () => {
{NAV.SETTINGS}
- >
+
);
};
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.test.tsx
index 488eb4b49853..9e3b50ea083e 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.test.tsx
@@ -17,6 +17,8 @@ import { EuiCallOut } from '@elastic/eui';
import { ViewContentHeader } from '../../components/shared/view_content_header';
+import { SourceSubNav } from './components/source_sub_nav';
+
import {
PRIVATE_CAN_CREATE_PAGE_TITLE,
PRIVATE_VIEW_ONLY_PAGE_TITLE,
@@ -40,6 +42,7 @@ describe('PrivateSourcesLayout', () => {
const wrapper = shallow({children});
expect(wrapper.find('[data-test-subj="TestChildren"]')).toHaveLength(1);
+ expect(wrapper.find(SourceSubNav)).toHaveLength(1);
});
it('uses correct title and description when private sources are enabled', () => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.tsx
index bdc2421432c8..2a6281075dc4 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.tsx
@@ -14,6 +14,8 @@ import { EuiPage, EuiPageSideBar, EuiPageBody, EuiCallOut } from '@elastic/eui';
import { AppLogic } from '../../app_logic';
import { ViewContentHeader } from '../../components/shared/view_content_header';
+import { SourceSubNav } from './components/source_sub_nav';
+
import {
PRIVATE_DASHBOARD_READ_ONLY_MODE_WARNING,
PRIVATE_CAN_CREATE_PAGE_TITLE,
@@ -49,6 +51,7 @@ export const PrivateSourcesLayout: React.FC = ({
+
{readOnlyMode && (
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 d20d0576d11c..a9712cc4e1dc 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
@@ -214,7 +214,7 @@ describe('SourceLogic', () => {
SourceLogic.actions.initializeFederatedSummary(contentSource.id);
expect(http.get).toHaveBeenCalledWith(
- '/api/workplace_search/org/sources/123/federated_summary'
+ '/api/workplace_search/account/sources/123/federated_summary'
);
await promise;
expect(onUpdateSummarySpy).toHaveBeenCalledWith(contentSource.summary);
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 72700ce42c75..3da90c4fc773 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
@@ -156,7 +156,7 @@ export const SourceLogic = kea>({
}
},
initializeFederatedSummary: async ({ sourceId }) => {
- const route = `/api/workplace_search/org/sources/${sourceId}/federated_summary`;
+ const route = `/api/workplace_search/account/sources/${sourceId}/federated_summary`;
try {
const response = await HttpLogic.values.http.get(route);
actions.onUpdateSummary(response.summary);
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources.scss b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources.scss
index f142567fb621..abab139e3236 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources.scss
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources.scss
@@ -30,3 +30,9 @@
margin-left: -$sideBarWidth;
}
}
+
+.sourcesSubNav {
+ li {
+ display: block;
+ }
+}
diff --git a/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.ts b/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.ts
index 8257dd0dc52b..1dd6d859d88a 100644
--- a/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.ts
@@ -22,9 +22,9 @@ const schemaValuesSchema = schema.recordOf(
);
const pageSchema = schema.object({
- current: schema.number(),
- size: schema.number(),
- total_pages: schema.number(),
+ current: schema.nullable(schema.number()),
+ size: schema.nullable(schema.number()),
+ total_pages: schema.nullable(schema.number()),
total_results: schema.number(),
});