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

[Fleet] Move integrations to a separate app #99848

Merged
merged 37 commits into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b2bc086
WIP: Re-create separation of integrations app
kpollich May 27, 2021
04a24de
Fix breadcrumbs
kpollich Jun 1, 2021
63fcaea
Fix add integration button/routing
kpollich Jun 1, 2021
d1d97ea
Fix integrations test paths
kpollich Jun 1, 2021
2117a2b
Fix failing policy tab tests
kpollich Jun 1, 2021
f4c6e0d
Fix type errors
kpollich Jun 1, 2021
9ef2f3a
Fix more type errors
kpollich Jun 1, 2021
1ab6be4
Fix integrations home page redirect
kpollich Jun 1, 2021
297e257
Fix circular import
kpollich Jun 1, 2021
ee285f7
Fix i18n errors
kpollich Jun 1, 2021
bf03c68
Fix FTR paths
kpollich Jun 1, 2021
63c1f8d
Fix more deep fleet import paths
kpollich Jun 1, 2021
5a003b5
Remove unneeded state set
kpollich Jun 2, 2021
5c34ad4
Fix more type errors
kpollich Jun 2, 2021
d2ed629
Fix failing security_solutions tests
kpollich Jun 2, 2021
9508dce
Address redirect back path todo
kpollich Jun 2, 2021
416840f
Fix page path in FTR
kpollich Jun 2, 2021
ec046f4
Fix type error
kpollich Jun 2, 2021
8a784d0
🤞 Fix FTR failures
kpollich Jun 2, 2021
60fdc2d
Fix package details path in endpoint tests
kpollich Jun 3, 2021
633d3a2
Fix test import
kpollich Jun 3, 2021
3a1a609
Fix add integration route + breadcrumbs
kpollich Jun 3, 2021
1e87091
Fix missing layout for create package policy page
kpollich Jun 3, 2021
e334253
Fixup Kibana feature declaration + fix app registry arrays
kpollich Jun 3, 2021
056fb68
Fix Kibana startup error from feature registration
kpollich Jun 3, 2021
5a82b22
Fix telemetry schema
kpollich Jun 3, 2021
9398073
Remove integrations from privilege tests
kpollich Jun 3, 2021
4bc15a6
Increase Fleet bundle limit by 20kb to fix CI error
kpollich Jun 4, 2021
44b2b9d
Merge branch 'master' into integrations-separate-app
kibanamachine Jun 4, 2021
e51cbf9
Use correct updated Fleet bundle limit
kpollich Jun 4, 2021
da285a6
Update limits.yml via script
kpollich Jun 4, 2021
ae06c8c
Address design feedback
kpollich Jun 4, 2021
457f450
Fix i18n error
kpollich Jun 4, 2021
a361845
Merge branch 'master' into integrations-separate-app
kpollich Jun 4, 2021
2e47795
Fix failing security solution tests
kpollich Jun 4, 2021
20ff389
Merge branch 'master' into integrations-separate-app
kpollich Jun 7, 2021
a258250
Fix type error
kpollich Jun 7, 2021
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: 172675
inspector: 148711
Expand Down Expand Up @@ -87,7 +87,6 @@ pageLoadAssetSize:
visDefaultEditor: 50178
visTypeMarkdown: 30896
visTypeMetric: 42790
visTypePie: 34051
visTypeTable: 94934
visTypeTagcloud: 37575
visTypeTimelion: 68883
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';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we plan to move integrations to a different plugin? or it will always be an app inside the fleet plugin?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the plan would be to eventually move it to a separate plugin entirely.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later on it may become separate, but that's not firmly decided at this point

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