Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] [Fleet] Move integrations to a separate app (#99848) #101493

Merged
merged 1 commit into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pageLoadAssetSize:
indexManagement: 140608
indexPatternManagement: 28222
infra: 184320
fleet: 415829
fleet: 450005
ingestPipelines: 58003
inputControlVis: 172819
inspector: 148999
Expand Down Expand Up @@ -88,7 +88,6 @@ pageLoadAssetSize:
visTypeMarkdown: 30896
visTypeMetric: 42790
visTypeTable: 95078
visTypePie: 34051
visTypeTagcloud: 37575
visTypeTimelion: 68883
visTypeTimeseries: 55347
Expand All @@ -111,3 +110,4 @@ pageLoadAssetSize:
timelines: 28613
cases: 162385
screenshotMode: 17856
visTypePie: 35583
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export const applicationUsageSchema = {
metrics: commonSchema,
infra: commonSchema, // It's a forward app so we'll likely never report it
fleet: commonSchema,
integrations: commonSchema,
ingestManager: commonSchema,
lens: commonSchema,
maps: commonSchema,
Expand Down
131 changes: 131 additions & 0 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3184,6 +3184,137 @@
}
}
},
"integrations": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "Always `main`"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 90 days"
}
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "The application view being tracked"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application sub view since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application sub view is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
}
}
}
}
}
}
},
"ingestManager": {
"properties": {
"appId": {
Expand Down
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';
4 changes: 2 additions & 2 deletions x-pack/plugins/fleet/dev_docs/fleet_ui_extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class Plugin {

> The code above lives in `x-pack/plugins/security_solution/public/plugin.tsx`

For a list of supported Fleet UI extensions, see the `UIExtensionPoint` and associated Union types defined here: `x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts`.
For a list of supported Fleet UI extensions, see the `UIExtensionPoint` and associated Union types defined here: `x-pack/plugins/fleet/public/types/ui_extensions.ts`.



Expand Down Expand Up @@ -81,4 +81,4 @@ const LinkToAgentEnroll = () => {
}
```

For a list of supported Fleet pages, see the type `AnyIntraAppRouteState` and its associated Union types in `x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts`
For a list of supported Fleet pages, see the type `AnyIntraAppRouteState` and its associated Union types in `x-pack/plugins/fleet/public/types/intra_app_route_state.ts`
32 changes: 17 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,31 @@ 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';
import { CreatePackagePolicyPage } from './sections/agent_policy/create_package_policy_page';

const ErrorLayout = ({ children }: { children: JSX.Element }) => (
<EuiErrorBoundary>
Expand Down Expand Up @@ -236,31 +238,31 @@ 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>
</Route>
<Route path={FLEET_ROUTING_PATHS.add_integration_to_policy}>
<DefaultLayout showNav={false}>
<CreatePackagePolicyPage />
</DefaultLayout>
</Route>
<Redirect to="/" />
</Switch>
);
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';
Loading