[Workplace Search] Fix Private Dashboard routes (#88985)
* 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 commit8c8a3fb63c
. * Revert "Remove constants" This reverts commita88723ec90
. * Revert "Remove legacy sidebar link" This reverts commit5d08a12a7d
. * Update TODO Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
ecf512a048
commit
7bb8d3a7b2
|
@ -78,6 +78,12 @@ export const WorkplaceSearchConfigured: React.FC<InitialAppData> = (props) => {
|
||||||
<Route exact path="/">
|
<Route exact path="/">
|
||||||
{errorConnecting ? <ErrorState /> : <Overview />}
|
{errorConnecting ? <ErrorState /> : <Overview />}
|
||||||
</Route>
|
</Route>
|
||||||
|
<Route path={PERSONAL_SOURCES_PATH}>
|
||||||
|
{/* TODO: replace Layout with PrivateSourcesLayout (needs to be created) */}
|
||||||
|
<Layout navigation={<></>} restrictWidth readOnlyMode={readOnlyMode}>
|
||||||
|
<SourcesRouter />
|
||||||
|
</Layout>
|
||||||
|
</Route>
|
||||||
<Route path={SOURCES_PATH}>
|
<Route path={SOURCES_PATH}>
|
||||||
<Layout
|
<Layout
|
||||||
navigation={<WorkplaceSearchNav sourcesSubNav={showSourcesSubnav && <SourceSubNav />} />}
|
navigation={<WorkplaceSearchNav sourcesSubNav={showSourcesSubnav && <SourceSubNav />} />}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { EuiCallOut, EuiEmptyPrompt, EuiSpacer, EuiPanel } from '@elastic/eui';
|
||||||
|
|
||||||
import { LicensingLogic } from '../../../../applications/shared/licensing';
|
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';
|
import noSharedSourcesIcon from '../../assets/share_circle.svg';
|
||||||
|
|
||||||
|
@ -74,12 +74,17 @@ export const PrivateSources: React.FC = () => {
|
||||||
sidebarLinks.push({
|
sidebarLinks.push({
|
||||||
title: PRIVATE_LINK_TITLE,
|
title: PRIVATE_LINK_TITLE,
|
||||||
iconType: 'plusInCircle',
|
iconType: 'plusInCircle',
|
||||||
path: ADD_SOURCE_PATH,
|
path: getSourcesPath(ADD_SOURCE_PATH, false),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerAction = (
|
const headerAction = (
|
||||||
<EuiButtonTo to={ADD_SOURCE_PATH} fill color="primary" data-test-subj="AddSourceButton">
|
<EuiButtonTo
|
||||||
|
to={getSourcesPath(ADD_SOURCE_PATH, false)}
|
||||||
|
fill
|
||||||
|
color="primary"
|
||||||
|
data-test-subj="AddSourceButton"
|
||||||
|
>
|
||||||
{PRIVATE_LINK_TITLE}
|
{PRIVATE_LINK_TITLE}
|
||||||
</EuiButtonTo>
|
</EuiButtonTo>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue