Skip to content

Commit

Permalink
WIP: Re-create separation of integrations app
Browse files Browse the repository at this point in the history
  • Loading branch information
kpollich committed May 27, 2021
1 parent 1c4d338 commit e18ca4b
Show file tree
Hide file tree
Showing 142 changed files with 1,313 additions and 574 deletions.
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/constants/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
*/

export const PLUGIN_ID = 'fleet';
export const INTEGRATIONS_PLUGIN_ID = 'integrations';
26 changes: 11 additions & 15 deletions x-pack/plugins/fleet/public/applications/fleet/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,30 @@ import type { FleetConfigType, FleetStartServices } from '../../plugin';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
import { EuiThemeProvider } from '../../../../../../src/plugins/kibana_react/common';

import { PackageInstallProvider } from '../integrations/hooks';

import {
ConfigContext,
FleetStatusProvider,
IntraAppStateProvider,
KibanaVersionContext,
sendGetPermissionsCheck,
sendSetup,
useBreadcrumbs,
useConfig,
useStartServices,
UIExtensionsContext,
} from './hooks';
import { Error, Loading } from './components';
import { IntraAppStateProvider } from './hooks/use_intra_app_state';
import { PackageInstallProvider } from './sections/epm/hooks';
import { PAGE_ROUTING_PATHS } from './constants';
import type { UIExtensionsStorage } from './types';

import { FLEET_ROUTING_PATHS } from './constants';
import { DefaultLayout, WithoutHeaderLayout } from './layouts';
import { EPMApp } from './sections/epm';
import { AgentPolicyApp } from './sections/agent_policy';
import { DataStreamApp } from './sections/data_stream';
import { FleetApp } from './sections/agents';
import { IngestManagerOverview } from './sections/overview';
import { ProtectedRoute } from './index';
import type { UIExtensionsStorage } from './types';
import { UIExtensionsContext } from './hooks/use_ui_extension';

const ErrorLayout = ({ children }: { children: JSX.Element }) => (
<EuiErrorBoundary>
Expand Down Expand Up @@ -236,27 +237,22 @@ export const AppRoutes = memo(() => {

return (
<Switch>
<Route path={PAGE_ROUTING_PATHS.integrations}>
<DefaultLayout section="epm">
<EPMApp />
</DefaultLayout>
</Route>
<Route path={PAGE_ROUTING_PATHS.policies}>
<Route path={FLEET_ROUTING_PATHS.policies}>
<DefaultLayout section="agent_policy">
<AgentPolicyApp />
</DefaultLayout>
</Route>
<Route path={PAGE_ROUTING_PATHS.data_streams}>
<Route path={FLEET_ROUTING_PATHS.data_streams}>
<DefaultLayout section="data_stream">
<DataStreamApp />
</DefaultLayout>
</Route>
<ProtectedRoute path={PAGE_ROUTING_PATHS.fleet} isAllowed={agents.enabled}>
<ProtectedRoute path={FLEET_ROUTING_PATHS.fleet} isAllowed={agents.enabled}>
<DefaultLayout section="fleet">
<FleetApp />
</DefaultLayout>
</ProtectedRoute>
<Route exact path={PAGE_ROUTING_PATHS.overview}>
<Route exact path={FLEET_ROUTING_PATHS.overview}>
<DefaultLayout section="overview">
<IngestManagerOverview />
</DefaultLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
* 2.0.
*/

export { Loading } from './loading';
export { Error } from './error';
export { Header, HeaderProps } from './header';
export { AlphaMessaging } from './alpha_messaging';
export { PackageIcon } from './package_icon';
export { ContextMenuActions } from './context_menu_actions';
export { SearchBar } from './search_bar';
export * from './settings_flyout';
export * from './link_and_revision';
export * from '../../../components';

export * from './enrollment_instructions';
export * from './search_bar';
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,4 @@
* 2.0.
*/

export {
PLUGIN_ID,
EPM_API_ROUTES,
AGENT_API_ROUTES,
SO_SEARCH_LIMIT,
AGENT_POLICY_SAVED_OBJECT_TYPE,
AGENT_SAVED_OBJECT_TYPE,
ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE,
PACKAGE_POLICY_SAVED_OBJECT_TYPE,
FLEET_SERVER_PACKAGE,
// Fleet Server index
AGENTS_INDEX,
ENROLLMENT_API_KEYS_INDEX,
} from '../../../../common';

export * from './page_paths';

export const INDEX_NAME = '.kibana';
export * from '../../../constants';
104 changes: 0 additions & 104 deletions x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts

This file was deleted.

19 changes: 2 additions & 17 deletions x-pack/plugins/fleet/public/applications/fleet/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@
* 2.0.
*/

export { useCapabilities } from './use_capabilities';
export { useStartServices } from './use_core';
export { useConfig, ConfigContext } from './use_config';
export { useKibanaVersion, KibanaVersionContext } from './use_kibana_version';
export { licenseService, useLicense } from './use_license';
export * from '../../../hooks';

export { useBreadcrumbs } from './use_breadcrumbs';
export { useLink } from './use_link';
export { useKibanaLink } from './use_kibana_link';
export { usePackageIconType, UsePackageIconType } from './use_package_icon_type';
export { usePagination, Pagination, PAGE_SIZE_OPTIONS } from './use_pagination';
export { useUrlPagination } from './use_url_pagination';
export { useSorting } from './use_sorting';
export { useDebounce } from './use_debounce';
export { useUrlModal } from './use_url_modal';
export * from './use_request';
export * from './use_input';
export * from './use_url_params';
export * from './use_fleet_status';
Loading

0 comments on commit e18ca4b

Please sign in to comment.