Skip to content

Commit

Permalink
[Workplace Search] Fix Private Dashboard routes (#88985)
Browse files Browse the repository at this point in the history
* 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 8c8a3fb.

* Revert "Remove constants"

This reverts commit a88723e.

* Revert "Remove legacy sidebar link"

This reverts commit 5d08a12.

* Update TODO

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
scottybollinger and kibanamachine authored Jan 26, 2021
1 parent ecf512a commit 7bb8d3a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ export const WorkplaceSearchConfigured: React.FC<InitialAppData> = (props) => {
<Route exact path="/">
{errorConnecting ? <ErrorState /> : <Overview />}
</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}>
<Layout
navigation={<WorkplaceSearchNav sourcesSubNav={showSourcesSubnav && <SourceSubNav />} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 = (
<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}
</EuiButtonTo>
);
Expand Down

0 comments on commit 7bb8d3a

Please sign in to comment.