From 7bb8d3a7b244d3d3f8127a757f480ab6a9d7a312 Mon Sep 17 00:00:00 2001 From: Scotty Bollinger Date: Tue, 26 Jan 2021 13:09:53 -0600 Subject: [PATCH] [Workplace Search] Fix Private Dashboard routes (#88985) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add index route for personal dashboard * Fix links to personal source flow In ent-search, the base route was /sources so the getSourcesPath helper was not needed. In Kibana, we use the ā€˜/pā€™ route to differentiate personal from org so the helper is needed and we pass false as the isOrganization flag * Remove legacy sidebar text When I first migrated this, I left the sidebar copy in so that it was not aboandoned before the design pass. After talking with John we decided to just use the copy to the right of the sidebar so this drops that legacy copy. * Remove constants * Remove legacy sidebar link * Revert "Remove legacy sidebar text" This reverts commit 8c8a3fb63c08154fbbdbe44533a8dd8ec6b265da. * Revert "Remove constants" This reverts commit a88723ec90d10e7b03214f176a2cab133e9d3ae5. * Revert "Remove legacy sidebar link" This reverts commit 5d08a12a7d53690805727f181967bd3d82b24235. * Update TODO Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../public/applications/workplace_search/index.tsx | 6 ++++++ .../views/content_sources/private_sources.tsx | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) 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 65a2c7a4a44d..d10de7a77017 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 @@ -78,6 +78,12 @@ export const WorkplaceSearchConfigured: React.FC = (props) => { {errorConnecting ? : } + + {/* TODO: replace Layout with PrivateSourcesLayout (needs to be created) */} + } restrictWidth readOnlyMode={readOnlyMode}> + + + } />} 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 a1a76c678866..c11cdaa5ec36 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 @@ -12,7 +12,7 @@ import { EuiCallOut, EuiEmptyPrompt, EuiSpacer, EuiPanel } from '@elastic/eui'; import { LicensingLogic } from '../../../../applications/shared/licensing'; -import { ADD_SOURCE_PATH } from '../../routes'; +import { ADD_SOURCE_PATH, getSourcesPath } from '../../routes'; import noSharedSourcesIcon from '../../assets/share_circle.svg'; @@ -74,12 +74,17 @@ export const PrivateSources: React.FC = () => { sidebarLinks.push({ title: PRIVATE_LINK_TITLE, iconType: 'plusInCircle', - path: ADD_SOURCE_PATH, + path: getSourcesPath(ADD_SOURCE_PATH, false), }); } const headerAction = ( - + {PRIVATE_LINK_TITLE} );