-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add_sysv_init_functions
- Loading branch information
Showing
44 changed files
with
554 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ins/enterprise_search/public/applications/workplace_search/components/layout/nav.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* 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 '../../../__mocks__/shallow_usecontext.mock'; | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { SideNav, SideNavLink } from '../../../shared/layout'; | ||
import { WorkplaceSearchNav } from './'; | ||
|
||
describe('WorkplaceSearchNav', () => { | ||
it('renders', () => { | ||
const wrapper = shallow(<WorkplaceSearchNav />); | ||
|
||
expect(wrapper.find(SideNav)).toHaveLength(1); | ||
expect(wrapper.find(SideNavLink).first().prop('to')).toEqual('/'); | ||
expect(wrapper.find(SideNavLink).last().prop('to')).toEqual('http://localhost:3002/ws/search'); | ||
}); | ||
}); |
74 changes: 74 additions & 0 deletions
74
.../plugins/enterprise_search/public/applications/workplace_search/components/layout/nav.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* 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 React, { useContext } from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
import { EuiSpacer } from '@elastic/eui'; | ||
|
||
import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants'; | ||
import { KibanaContext, IKibanaContext } from '../../../index'; | ||
import { SideNav, SideNavLink } from '../../../shared/layout'; | ||
|
||
import { | ||
ORG_SOURCES_PATH, | ||
SOURCES_PATH, | ||
SECURITY_PATH, | ||
ROLE_MAPPINGS_PATH, | ||
GROUPS_PATH, | ||
ORG_SETTINGS_PATH, | ||
} from '../../routes'; | ||
|
||
export const WorkplaceSearchNav: React.FC = () => { | ||
const { enterpriseSearchUrl } = useContext(KibanaContext) as IKibanaContext; | ||
const legacyUrl = (path: string) => `${enterpriseSearchUrl}/ws#${path}`; | ||
|
||
// TODO: icons | ||
return ( | ||
<SideNav product={WORKPLACE_SEARCH_PLUGIN}> | ||
<SideNavLink to="/" isRoot> | ||
{i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.overview', { | ||
defaultMessage: 'Overview', | ||
})} | ||
</SideNavLink> | ||
<SideNavLink isExternal to={legacyUrl(ORG_SOURCES_PATH)}> | ||
{i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.sources', { | ||
defaultMessage: 'Sources', | ||
})} | ||
</SideNavLink> | ||
<SideNavLink isExternal to={legacyUrl(GROUPS_PATH)}> | ||
{i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.groups', { | ||
defaultMessage: 'Groups', | ||
})} | ||
</SideNavLink> | ||
<SideNavLink isExternal to={legacyUrl(ROLE_MAPPINGS_PATH)}> | ||
{i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.roleMappings', { | ||
defaultMessage: 'Role Mappings', | ||
})} | ||
</SideNavLink> | ||
<SideNavLink isExternal to={legacyUrl(SECURITY_PATH)}> | ||
{i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.security', { | ||
defaultMessage: 'Security', | ||
})} | ||
</SideNavLink> | ||
<SideNavLink isExternal to={legacyUrl(ORG_SETTINGS_PATH)}> | ||
{i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.settings', { | ||
defaultMessage: 'Settings', | ||
})} | ||
</SideNavLink> | ||
<EuiSpacer /> | ||
<SideNavLink isExternal to={legacyUrl(SOURCES_PATH)}> | ||
{i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.personalDashboard', { | ||
defaultMessage: 'View my personal dashboard', | ||
})} | ||
</SideNavLink> | ||
<SideNavLink isExternal to={`${enterpriseSearchUrl}/ws/search`}> | ||
{i18n.translate('xpack.enterpriseSearch.workplaceSearch.nav.search', { | ||
defaultMessage: 'Go to search application', | ||
})} | ||
</SideNavLink> | ||
</SideNav> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
22 changes: 0 additions & 22 deletions
22
...ent/public/application/sections/edit_policy/components/cold_phase/cold_phase.container.js
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...fecycle_management/public/application/sections/edit_policy/components/cold_phase/index.js
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
...public/application/sections/edit_policy/components/delete_phase/delete_phase.container.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
22 changes: 0 additions & 22 deletions
22
...ement/public/application/sections/edit_policy/components/hot_phase/hot_phase.container.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.