[Fleet] Rename ingestManager plugin ID fleet (#83200)

This commit is contained in:
Nicolas Chaulet 2020-11-19 08:43:14 -05:00 committed by GitHub
parent ffdc507668
commit 1b6cfe819d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 277 additions and 317 deletions

View file

@ -377,6 +377,10 @@ and actions.
|Backend and core front-end react-components for GeoJson file upload. Only supports the Maps plugin. |Backend and core front-end react-components for GeoJson file upload. Only supports the Maps plugin.
|{kib-repo}blob/{branch}/x-pack/plugins/fleet/README.md[fleet]
|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.fleet.agents.tlsCheckDisabled=false)
|{kib-repo}blob/{branch}/x-pack/plugins/global_search/README.md[globalSearch] |{kib-repo}blob/{branch}/x-pack/plugins/global_search/README.md[globalSearch]
|The GlobalSearch plugin provides an easy way to search for various objects, such as applications |The GlobalSearch plugin provides an easy way to search for various objects, such as applications
or dashboards from the Kibana instance, from both server and client-side plugins or dashboards from the Kibana instance, from both server and client-side plugins
@ -413,10 +417,6 @@ Index Management by running this series of requests in Console:
the infrastructure monitoring use-case within Kibana. the infrastructure monitoring use-case within Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/fleet/README.md[ingestManager]
|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.fleet.agents.tlsCheckDisabled=false)
|{kib-repo}blob/{branch}/x-pack/plugins/ingest_pipelines/README.md[ingestPipelines] |{kib-repo}blob/{branch}/x-pack/plugins/ingest_pipelines/README.md[ingestPipelines]
|The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest nodes. Please refer to the Elasticsearch documentation for more details. |The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest nodes. Please refer to the Elasticsearch documentation for more details.

View file

@ -36,7 +36,7 @@ pageLoadAssetSize:
indexManagement: 140608 indexManagement: 140608
indexPatternManagement: 154222 indexPatternManagement: 154222
infra: 197873 infra: 197873
ingestManager: 415829 fleet: 415829
ingestPipelines: 58003 ingestPipelines: 58003
inputControlVis: 172675 inputControlVis: 172675
inspector: 148711 inspector: 148711

View file

@ -148,7 +148,7 @@ async function init() {
indexPatterns: ['read'], indexPatterns: ['read'],
savedObjectsManagement: ['read'], savedObjectsManagement: ['read'],
stackAlerts: ['read'], stackAlerts: ['read'],
ingestManager: ['read'], fleet: ['read'],
actions: ['read'], actions: ['read'],
}, },
}, },
@ -181,7 +181,7 @@ async function init() {
indexPatterns: ['all'], indexPatterns: ['all'],
savedObjectsManagement: ['all'], savedObjectsManagement: ['all'],
stackAlerts: ['all'], stackAlerts: ['all'],
ingestManager: ['all'], fleet: ['all'],
actions: ['all'], actions: ['all'],
}, },
}, },

View file

@ -1,4 +1,4 @@
# Ingest Manager # Fleet
## Plugin ## Plugin
@ -46,6 +46,8 @@ One common development workflow is:
This plugin follows the `common`, `server`, `public` structure from the [Architecture Style Guide This plugin follows the `common`, `server`, `public` structure from the [Architecture Style Guide
](https://github.com/elastic/kibana/blob/master/style_guides/architecture_style_guide.md#file-and-folder-structure). We also follow the pattern of developing feature branches under your personal fork of Kibana. ](https://github.com/elastic/kibana/blob/master/style_guides/architecture_style_guide.md#file-and-folder-structure). We also follow the pattern of developing feature branches under your personal fork of Kibana.
Note: The plugin was previously named Ingest Manager it's possible that some variables are still named with that old plugin name.
### Tests ### Tests
#### API integration tests #### API integration tests

View file

@ -3,4 +3,4 @@
* or more contributor license agreements. Licensed under the Elastic License; * or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License. * you may not use this file except in compliance with the Elastic License.
*/ */
export const PLUGIN_ID = 'ingestManager'; export const PLUGIN_ID = 'fleet';

View file

@ -5,7 +5,7 @@
*/ */
import { decodeCloudId } from './decode_cloud_id'; import { decodeCloudId } from './decode_cloud_id';
describe('Ingest Manager - decodeCloudId', () => { describe('Fleet - decodeCloudId', () => {
it('parses various CloudID formats', () => { it('parses various CloudID formats', () => {
const tests = [ const tests = [
{ {

View file

@ -94,7 +94,7 @@ const getAgent = ({
} }
return agent; return agent;
}; };
describe('Ingest Manager - isAgentUpgradeable', () => { describe('Fleet - isAgentUpgradeable', () => {
it('returns false if agent reports not upgradeable with agent version < kibana version', () => { it('returns false if agent reports not upgradeable with agent version < kibana version', () => {
expect(isAgentUpgradeable(getAgent({ version: '7.9.0' }), '8.0.0')).toBe(false); expect(isAgentUpgradeable(getAgent({ version: '7.9.0' }), '8.0.0')).toBe(false);
}); });

View file

@ -5,7 +5,7 @@
*/ */
import { isDiffPathProtocol } from './is_diff_path_protocol'; import { isDiffPathProtocol } from './is_diff_path_protocol';
describe('Ingest Manager - isDiffPathProtocol', () => { describe('Fleet - isDiffPathProtocol', () => {
it('returns true for different paths', () => { it('returns true for different paths', () => {
expect( expect(
isDiffPathProtocol([ isDiffPathProtocol([

View file

@ -5,7 +5,7 @@
*/ */
import { isValidNamespace } from './is_valid_namespace'; import { isValidNamespace } from './is_valid_namespace';
describe('Ingest Manager - isValidNamespace', () => { describe('Fleet - isValidNamespace', () => {
it('returns true for valid namespaces', () => { it('returns true for valid namespaces', () => {
expect(isValidNamespace('default').valid).toBe(true); expect(isValidNamespace('default').valid).toBe(true);
expect(isValidNamespace('namespace-with-dash').valid).toBe(true); expect(isValidNamespace('namespace-with-dash').valid).toBe(true);

View file

@ -6,7 +6,7 @@
import { PackagePolicy, PackagePolicyInput } from '../types'; import { PackagePolicy, PackagePolicyInput } from '../types';
import { storedPackagePoliciesToAgentInputs } from './package_policies_to_agent_inputs'; import { storedPackagePoliciesToAgentInputs } from './package_policies_to_agent_inputs';
describe('Ingest Manager - storedPackagePoliciesToAgentInputs', () => { describe('Fleet - storedPackagePoliciesToAgentInputs', () => {
const mockPackagePolicy: PackagePolicy = { const mockPackagePolicy: PackagePolicy = {
id: 'some-uuid', id: 'some-uuid',
name: 'mock-package-policy', name: 'mock-package-policy',

View file

@ -7,7 +7,7 @@ import { installationStatuses } from '../constants';
import { PackageInfo } from '../types'; import { PackageInfo } from '../types';
import { packageToPackagePolicy, packageToPackagePolicyInputs } from './package_to_package_policy'; import { packageToPackagePolicy, packageToPackagePolicyInputs } from './package_to_package_policy';
describe('Ingest Manager - packageToPackagePolicy', () => { describe('Fleet - packageToPackagePolicy', () => {
const mockPackage: PackageInfo = { const mockPackage: PackageInfo = {
name: 'mock-package', name: 'mock-package',
title: 'Mock package', title: 'Mock package',

View file

@ -6,7 +6,7 @@
export * from './models'; export * from './models';
export * from './rest_spec'; export * from './rest_spec';
export interface IngestManagerConfigType { export interface FleetConfigType {
enabled: boolean; enabled: boolean;
registryUrl?: string; registryUrl?: string;
registryProxyUrl?: string; registryProxyUrl?: string;

View file

@ -1,5 +1,5 @@
{ {
"id": "ingestManager", "id": "fleet",
"version": "kibana", "version": "kibana",
"server": true, "server": true,
"ui": true, "ui": true,

View file

@ -1,7 +1,7 @@
{ {
"author": "Elastic", "author": "Elastic",
"name": "ingest-manager", "name": "fleet",
"version": "8.0.0", "version": "8.0.0",
"private": true, "private": true,
"license": "Elastic-License" "license": "Elastic-License"
} }

View file

@ -31,7 +31,7 @@ export interface DynamicPagePathValues {
[key: string]: string; [key: string]: string;
} }
export const BASE_PATH = '/app/ingestManager'; export const BASE_PATH = '/app/fleet';
// If routing paths are changed here, please also check to see if // If routing paths are changed here, please also check to see if
// `pagePathGetters()`, below, needs any modifications // `pagePathGetters()`, below, needs any modifications

View file

@ -8,5 +8,5 @@ import { useCore } from './';
export function useCapabilities() { export function useCapabilities() {
const core = useCore(); const core = useCore();
return core.application.capabilities.ingestManager; return core.application.capabilities.fleet;
} }

View file

@ -5,9 +5,9 @@
*/ */
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import { IngestManagerConfigType } from '../../../plugin'; import { FleetConfigType } from '../../../plugin';
export const ConfigContext = React.createContext<IngestManagerConfigType | null>(null); export const ConfigContext = React.createContext<FleetConfigType | null>(null);
export function useConfig() { export function useConfig() {
const config = useContext(ConfigContext); const config = useContext(ConfigContext);

View file

@ -5,11 +5,11 @@
*/ */
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import { IngestManagerSetupDeps, IngestManagerStartDeps } from '../../../plugin'; import { FleetSetupDeps, FleetStartDeps } from '../../../plugin';
export const DepsContext = React.createContext<{ export const DepsContext = React.createContext<{
setup: IngestManagerSetupDeps; setup: FleetSetupDeps;
start: IngestManagerStartDeps; start: FleetStartDeps;
} | null>(null); } | null>(null);
export function useSetupDeps() { export function useSetupDeps() {

View file

@ -14,11 +14,7 @@ import { EuiErrorBoundary, EuiPanel, EuiEmptyPrompt, EuiCode } from '@elastic/eu
import { CoreStart, AppMountParameters } from 'src/core/public'; import { CoreStart, AppMountParameters } from 'src/core/public';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public'; import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
import { EuiThemeProvider } from '../../../../xpack_legacy/common'; import { EuiThemeProvider } from '../../../../xpack_legacy/common';
import { import { FleetSetupDeps, FleetConfigType, FleetStartDeps } from '../../plugin';
IngestManagerSetupDeps,
IngestManagerConfigType,
IngestManagerStartDeps,
} from '../../plugin';
import { PAGE_ROUTING_PATHS } from './constants'; import { PAGE_ROUTING_PATHS } from './constants';
import { DefaultLayout, WithoutHeaderLayout } from './layouts'; import { DefaultLayout, WithoutHeaderLayout } from './layouts';
import { Loading, Error } from './components'; import { Loading, Error } from './components';
@ -241,9 +237,9 @@ const IngestManagerApp = ({
}: { }: {
basepath: string; basepath: string;
coreStart: CoreStart; coreStart: CoreStart;
setupDeps: IngestManagerSetupDeps; setupDeps: FleetSetupDeps;
startDeps: IngestManagerStartDeps; startDeps: FleetStartDeps;
config: IngestManagerConfigType; config: FleetConfigType;
history: AppMountParameters['history']; history: AppMountParameters['history'];
kibanaVersion: string; kibanaVersion: string;
extensions: UIExtensionsStorage; extensions: UIExtensionsStorage;
@ -271,9 +267,9 @@ const IngestManagerApp = ({
export function renderApp( export function renderApp(
coreStart: CoreStart, coreStart: CoreStart,
{ element, appBasePath, history }: AppMountParameters, { element, appBasePath, history }: AppMountParameters,
setupDeps: IngestManagerSetupDeps, setupDeps: FleetSetupDeps,
startDeps: IngestManagerStartDeps, startDeps: FleetStartDeps,
config: IngestManagerConfigType, config: FleetConfigType,
kibanaVersion: string, kibanaVersion: string,
extensions: UIExtensionsStorage extensions: UIExtensionsStorage
) { ) {
@ -296,7 +292,7 @@ export function renderApp(
}; };
} }
export const teardownIngestManager = (coreStart: CoreStart) => { export const teardownFleet = (coreStart: CoreStart) => {
coreStart.chrome.docTitle.reset(); coreStart.chrome.docTitle.reset();
coreStart.chrome.setBreadcrumbs([]); coreStart.chrome.setBreadcrumbs([]);
licenseService.stop(); licenseService.stop();

View file

@ -5,7 +5,7 @@
*/ */
import { hasInvalidButRequiredVar } from './has_invalid_but_required_var'; import { hasInvalidButRequiredVar } from './has_invalid_but_required_var';
describe('Ingest Manager - hasInvalidButRequiredVar', () => { describe('Fleet - hasInvalidButRequiredVar', () => {
it('returns true for invalid & required vars', () => { it('returns true for invalid & required vars', () => {
expect( expect(
hasInvalidButRequiredVar( hasInvalidButRequiredVar(

View file

@ -5,7 +5,7 @@
*/ */
import { isAdvancedVar } from './is_advanced_var'; import { isAdvancedVar } from './is_advanced_var';
describe('Ingest Manager - isAdvancedVar', () => { describe('Fleet - isAdvancedVar', () => {
it('returns true for vars that should be show under advanced options', () => { it('returns true for vars that should be show under advanced options', () => {
expect( expect(
isAdvancedVar({ isAdvancedVar({

View file

@ -7,7 +7,7 @@ import { installationStatuses } from '../../../../../../../common/constants';
import { PackageInfo, NewPackagePolicy, RegistryPolicyTemplate } from '../../../../types'; import { PackageInfo, NewPackagePolicy, RegistryPolicyTemplate } from '../../../../types';
import { validatePackagePolicy, validationHasErrors } from './validate_package_policy'; import { validatePackagePolicy, validationHasErrors } from './validate_package_policy';
describe('Ingest Manager - validatePackagePolicy()', () => { describe('Fleet - validatePackagePolicy()', () => {
const mockPackage = ({ const mockPackage = ({
name: 'mock-package', name: 'mock-package',
title: 'Mock package', title: 'Mock package',
@ -496,7 +496,7 @@ describe('Ingest Manager - validatePackagePolicy()', () => {
}); });
}); });
describe('Ingest Manager - validationHasErrors()', () => { describe('Fleet - validationHasErrors()', () => {
it('returns true for stream validation results with errors', () => { it('returns true for stream validation results with errors', () => {
expect( expect(
validationHasErrors({ validationHasErrors({

View file

@ -144,7 +144,7 @@ export const AgentUnenrollAgentModal: React.FunctionComponent<Props> = ({
}} }}
> >
<EuiCheckbox <EuiCheckbox
id="ingestManagerForceUnenrollAgents" id="fleetForceUnenrollAgents"
label={ label={
<FormattedMessage <FormattedMessage
id="xpack.fleet.unenrollAgents.forceUnenrollCheckboxLabel" id="xpack.fleet.unenrollAgents.forceUnenrollCheckboxLabel"

View file

@ -7,7 +7,7 @@ import React from 'react';
import { HashRouter as Router, Route, Switch, Redirect } from 'react-router-dom'; import { HashRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
import { PAGE_ROUTING_PATHS } from '../../constants'; import { PAGE_ROUTING_PATHS } from '../../constants';
import { Loading } from '../../components'; import { Loading } from '../../components';
import { useConfig, useCore, useFleetStatus, useBreadcrumbs } from '../../hooks'; import { useConfig, useFleetStatus, useBreadcrumbs, useCapabilities } from '../../hooks';
import { AgentListPage } from './agent_list_page'; import { AgentListPage } from './agent_list_page';
import { SetupPage } from './setup_page'; import { SetupPage } from './setup_page';
import { AgentDetailsPage } from './agent_details_page'; import { AgentDetailsPage } from './agent_details_page';
@ -17,8 +17,8 @@ import { ListLayout } from './components/list_layout';
export const FleetApp: React.FunctionComponent = () => { export const FleetApp: React.FunctionComponent = () => {
useBreadcrumbs('fleet'); useBreadcrumbs('fleet');
const core = useCore();
const { agents } = useConfig(); const { agents } = useConfig();
const capabilities = useCapabilities();
const fleetStatus = useFleetStatus(); const fleetStatus = useFleetStatus();
@ -35,7 +35,7 @@ export const FleetApp: React.FunctionComponent = () => {
/> />
); );
} }
if (!core.application.capabilities.ingestManager.read) { if (!capabilities.read) {
return <NoAccessPage />; return <NoAccessPage />;
} }

View file

@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License. * you may not use this file except in compliance with the Elastic License.
*/ */
import { PluginInitializerContext } from 'src/core/public'; import { PluginInitializerContext } from 'src/core/public';
import { IngestManagerPlugin } from './plugin'; import { FleetPlugin } from './plugin';
export { IngestManagerSetup, IngestManagerStart } from './plugin'; export { FleetSetup, FleetStart } from './plugin';
export const plugin = (initializerContext: PluginInitializerContext) => { export const plugin = (initializerContext: PluginInitializerContext) => {
return new IngestManagerPlugin(initializerContext); return new FleetPlugin(initializerContext);
}; };
export type { NewPackagePolicy } from './applications/fleet/types'; export type { NewPackagePolicy } from './applications/fleet/types';

View file

@ -11,7 +11,7 @@ import {
CoreStart, CoreStart,
} from 'src/core/public'; } from 'src/core/public';
import { i18n } from '@kbn/i18n'; import { i18n } from '@kbn/i18n';
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public'; import { DEFAULT_APP_CATEGORIES, AppNavLinkStatus } from '../../../../src/core/public';
import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../../src/plugins/data/public'; import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../../src/plugins/data/public';
import { import {
HomePublicPluginSetup, HomePublicPluginSetup,
@ -21,7 +21,7 @@ import { LicensingPluginSetup } from '../../licensing/public';
import { PLUGIN_ID, CheckPermissionsResponse, PostIngestSetupResponse } from '../common'; import { PLUGIN_ID, CheckPermissionsResponse, PostIngestSetupResponse } from '../common';
import { BASE_PATH } from './applications/fleet/constants'; import { BASE_PATH } from './applications/fleet/constants';
import { IngestManagerConfigType } from '../common/types'; import { FleetConfigType } from '../common/types';
import { setupRouteService, appRoutesService } from '../common'; import { setupRouteService, appRoutesService } from '../common';
import { licenseService } from './applications/fleet/hooks/use_license'; import { licenseService } from './applications/fleet/hooks/use_license';
import { setHttpClient } from './applications/fleet/hooks/use_request/use_request'; import { setHttpClient } from './applications/fleet/hooks/use_request/use_request';
@ -33,44 +33,42 @@ import {
import { createExtensionRegistrationCallback } from './applications/fleet/services/ui_extensions'; import { createExtensionRegistrationCallback } from './applications/fleet/services/ui_extensions';
import { UIExtensionRegistrationCallback, UIExtensionsStorage } from './applications/fleet/types'; import { UIExtensionRegistrationCallback, UIExtensionsStorage } from './applications/fleet/types';
export { IngestManagerConfigType } from '../common/types'; export { FleetConfigType } from '../common/types';
// We need to provide an object instead of void so that dependent plugins know when Ingest Manager // We need to provide an object instead of void so that dependent plugins know when Fleet
// is disabled. // is disabled.
// eslint-disable-next-line @typescript-eslint/no-empty-interface // eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface IngestManagerSetup {} export interface FleetSetup {}
/** /**
* Describes public IngestManager plugin contract returned at the `start` stage. * Describes public Fleet plugin contract returned at the `start` stage.
*/ */
export interface IngestManagerStart { export interface FleetStart {
registerExtension: UIExtensionRegistrationCallback; registerExtension: UIExtensionRegistrationCallback;
isInitialized: () => Promise<true>; isInitialized: () => Promise<true>;
} }
export interface IngestManagerSetupDeps { export interface FleetSetupDeps {
licensing: LicensingPluginSetup; licensing: LicensingPluginSetup;
data: DataPublicPluginSetup; data: DataPublicPluginSetup;
home?: HomePublicPluginSetup; home?: HomePublicPluginSetup;
} }
export interface IngestManagerStartDeps { export interface FleetStartDeps {
data: DataPublicPluginStart; data: DataPublicPluginStart;
} }
export class IngestManagerPlugin export class FleetPlugin implements Plugin<FleetSetup, FleetStart, FleetSetupDeps, FleetStartDeps> {
implements private config: FleetConfigType;
Plugin<IngestManagerSetup, IngestManagerStart, IngestManagerSetupDeps, IngestManagerStartDeps> {
private config: IngestManagerConfigType;
private kibanaVersion: string; private kibanaVersion: string;
private extensions: UIExtensionsStorage = {}; private extensions: UIExtensionsStorage = {};
constructor(private readonly initializerContext: PluginInitializerContext) { constructor(private readonly initializerContext: PluginInitializerContext) {
this.config = this.initializerContext.config.get<IngestManagerConfigType>(); this.config = this.initializerContext.config.get<FleetConfigType>();
this.kibanaVersion = initializerContext.env.packageInfo.version; this.kibanaVersion = initializerContext.env.packageInfo.version;
} }
public setup(core: CoreSetup, deps: IngestManagerSetupDeps) { public setup(core: CoreSetup, deps: FleetSetupDeps) {
const config = this.config; const config = this.config;
const kibanaVersion = this.kibanaVersion; const kibanaVersion = this.kibanaVersion;
const extensions = this.extensions; const extensions = this.extensions;
@ -81,7 +79,7 @@ export class IngestManagerPlugin
// Set up license service // Set up license service
licenseService.start(deps.licensing.license$); licenseService.start(deps.licensing.license$);
// Register main Ingest Manager app // Register main Fleet app
core.application.register({ core.application.register({
id: PLUGIN_ID, id: PLUGIN_ID,
category: DEFAULT_APP_CATEGORIES.management, category: DEFAULT_APP_CATEGORIES.management,
@ -91,10 +89,10 @@ export class IngestManagerPlugin
async mount(params: AppMountParameters) { async mount(params: AppMountParameters) {
const [coreStart, startDeps] = (await core.getStartServices()) as [ const [coreStart, startDeps] = (await core.getStartServices()) as [
CoreStart, CoreStart,
IngestManagerStartDeps, FleetStartDeps,
IngestManagerStart FleetStart
]; ];
const { renderApp, teardownIngestManager } = await import('./applications/fleet/'); const { renderApp, teardownFleet } = await import('./applications/fleet/');
const unmount = renderApp( const unmount = renderApp(
coreStart, coreStart,
params, params,
@ -107,11 +105,26 @@ export class IngestManagerPlugin
return () => { return () => {
unmount(); unmount();
teardownIngestManager(coreStart); teardownFleet(coreStart);
}; };
}, },
}); });
// BWC < 7.11 redirect /app/ingestManager to /app/fleet
core.application.register({
id: 'ingestManager',
category: DEFAULT_APP_CATEGORIES.management,
navLinkStatus: AppNavLinkStatus.hidden,
title: i18n.translate('xpack.fleet.oldAppTitle', { defaultMessage: 'Ingest Manager' }),
async mount(params: AppMountParameters) {
const [coreStart] = await core.getStartServices();
coreStart.application.navigateToApp('fleet', {
path: params.history.location.hash,
});
return () => {};
},
});
// Register components for home/add data integration // Register components for home/add data integration
if (deps.home) { if (deps.home) {
deps.home.tutorials.registerDirectoryNotice(PLUGIN_ID, TutorialDirectoryNotice); deps.home.tutorials.registerDirectoryNotice(PLUGIN_ID, TutorialDirectoryNotice);
@ -119,7 +132,7 @@ export class IngestManagerPlugin
deps.home.tutorials.registerModuleNotice(PLUGIN_ID, TutorialModuleNotice); deps.home.tutorials.registerModuleNotice(PLUGIN_ID, TutorialModuleNotice);
deps.home.featureCatalogue.register({ deps.home.featureCatalogue.register({
id: 'ingestManager', id: 'fleet',
title: i18n.translate('xpack.fleet.featureCatalogueTitle', { title: i18n.translate('xpack.fleet.featureCatalogueTitle', {
defaultMessage: 'Add Elastic Agent', defaultMessage: 'Add Elastic Agent',
}), }),
@ -137,8 +150,8 @@ export class IngestManagerPlugin
return {}; return {};
} }
public async start(core: CoreStart): Promise<IngestManagerStart> { public async start(core: CoreStart): Promise<FleetStart> {
let successPromise: ReturnType<IngestManagerStart['isInitialized']>; let successPromise: ReturnType<FleetStart['isInitialized']>;
return { return {
isInitialized: () => { isInitialized: () => {

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License. * you may not use this file except in compliance with the Elastic License.
*/ */
import { IngestManagerConfigType } from '..'; import { FleetConfigType } from '..';
export const getIsFleetEnabled = (config: IngestManagerConfigType) => { export const getIsFleetEnabled = (config: FleetConfigType) => {
return config.agents.enabled; return config.agents.enabled;
}; };

View file

@ -10,7 +10,7 @@ import { getIsFleetEnabled } from './config_collectors';
import { AgentUsage, getAgentUsage } from './agent_collectors'; import { AgentUsage, getAgentUsage } from './agent_collectors';
import { getInternalSavedObjectsClient } from './helpers'; import { getInternalSavedObjectsClient } from './helpers';
import { PackageUsage, getPackageUsage } from './package_collectors'; import { PackageUsage, getPackageUsage } from './package_collectors';
import { IngestManagerConfigType } from '..'; import { FleetConfigType } from '..';
interface Usage { interface Usage {
fleet_enabled: boolean; fleet_enabled: boolean;
@ -20,7 +20,7 @@ interface Usage {
export function registerIngestManagerUsageCollector( export function registerIngestManagerUsageCollector(
core: CoreSetup, core: CoreSetup,
config: IngestManagerConfigType, config: FleetConfigType,
usageCollection: UsageCollectionSetup | undefined usageCollection: UsageCollectionSetup | undefined
): void { ): void {
// usageCollection is an optional dependency, so make sure to return if it is not registered. // usageCollection is an optional dependency, so make sure to return if it is not registered.

View file

@ -5,7 +5,7 @@
*/ */
import { schema, TypeOf } from '@kbn/config-schema'; import { schema, TypeOf } from '@kbn/config-schema';
import { PluginConfigDescriptor, PluginInitializerContext } from 'src/core/server'; import { PluginConfigDescriptor, PluginInitializerContext } from 'src/core/server';
import { IngestManagerPlugin } from './plugin'; import { FleetPlugin } from './plugin';
import { import {
AGENT_POLICY_ROLLOUT_RATE_LIMIT_INTERVAL_MS, AGENT_POLICY_ROLLOUT_RATE_LIMIT_INTERVAL_MS,
AGENT_POLICY_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL, AGENT_POLICY_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL,
@ -14,12 +14,7 @@ import {
export { default as apm } from 'elastic-apm-node'; export { default as apm } from 'elastic-apm-node';
export { AgentService, ESIndexPatternService, getRegistryUrl, PackageService } from './services'; export { AgentService, ESIndexPatternService, getRegistryUrl, PackageService } from './services';
export { export { FleetSetupContract, FleetSetupDeps, FleetStartContract, ExternalCallback } from './plugin';
IngestManagerSetupContract,
IngestManagerSetupDeps,
IngestManagerStartContract,
ExternalCallback,
} from './plugin';
export const config: PluginConfigDescriptor = { export const config: PluginConfigDescriptor = {
exposeToBrowser: { exposeToBrowser: {
@ -65,10 +60,10 @@ export const config: PluginConfigDescriptor = {
}), }),
}; };
export type IngestManagerConfigType = TypeOf<typeof config.schema>; export type FleetConfigType = TypeOf<typeof config.schema>;
export { PackagePolicyServiceInterface } from './services/package_policy'; export { PackagePolicyServiceInterface } from './services/package_policy';
export const plugin = (initializerContext: PluginInitializerContext) => { export const plugin = (initializerContext: PluginInitializerContext) => {
return new IngestManagerPlugin(initializerContext); return new FleetPlugin(initializerContext);
}; };

View file

@ -5,12 +5,12 @@
*/ */
import { loggingSystemMock, savedObjectsServiceMock } from 'src/core/server/mocks'; import { loggingSystemMock, savedObjectsServiceMock } from 'src/core/server/mocks';
import { IngestManagerAppContext } from './plugin'; import { FleetAppContext } from './plugin';
import { encryptedSavedObjectsMock } from '../../encrypted_saved_objects/server/mocks'; import { encryptedSavedObjectsMock } from '../../encrypted_saved_objects/server/mocks';
import { securityMock } from '../../security/server/mocks'; import { securityMock } from '../../security/server/mocks';
import { PackagePolicyServiceInterface } from './services/package_policy'; import { PackagePolicyServiceInterface } from './services/package_policy';
export const createAppContextStartContractMock = (): IngestManagerAppContext => { export const createAppContextStartContractMock = (): FleetAppContext => {
return { return {
encryptedSavedObjectsStart: encryptedSavedObjectsMock.createStart(), encryptedSavedObjectsStart: encryptedSavedObjectsMock.createStart(),
savedObjects: savedObjectsServiceMock.createStartContract(), savedObjects: savedObjectsServiceMock.createStartContract(),

View file

@ -51,7 +51,7 @@ import {
registerSettingsRoutes, registerSettingsRoutes,
registerAppRoutes, registerAppRoutes,
} from './routes'; } from './routes';
import { EsAssetReference, IngestManagerConfigType, NewPackagePolicy } from '../common'; import { EsAssetReference, FleetConfigType, NewPackagePolicy } from '../common';
import { import {
appContextService, appContextService,
licenseService, licenseService,
@ -72,7 +72,7 @@ import { agentCheckinState } from './services/agents/checkin/state';
import { registerIngestManagerUsageCollector } from './collectors/register'; import { registerIngestManagerUsageCollector } from './collectors/register';
import { getInstallation } from './services/epm/packages'; import { getInstallation } from './services/epm/packages';
export interface IngestManagerSetupDeps { export interface FleetSetupDeps {
licensing: LicensingPluginSetup; licensing: LicensingPluginSetup;
security?: SecurityPluginSetup; security?: SecurityPluginSetup;
features?: FeaturesPluginSetup; features?: FeaturesPluginSetup;
@ -81,13 +81,13 @@ export interface IngestManagerSetupDeps {
usageCollection?: UsageCollectionSetup; usageCollection?: UsageCollectionSetup;
} }
export type IngestManagerStartDeps = object; export type FleetStartDeps = object;
export interface IngestManagerAppContext { export interface FleetAppContext {
encryptedSavedObjectsStart: EncryptedSavedObjectsPluginStart; encryptedSavedObjectsStart: EncryptedSavedObjectsPluginStart;
encryptedSavedObjectsSetup?: EncryptedSavedObjectsPluginSetup; encryptedSavedObjectsSetup?: EncryptedSavedObjectsPluginSetup;
security?: SecurityPluginSetup; security?: SecurityPluginSetup;
config$?: Observable<IngestManagerConfigType>; config$?: Observable<FleetConfigType>;
savedObjects: SavedObjectsServiceStart; savedObjects: SavedObjectsServiceStart;
isProductionMode: PluginInitializerContext['env']['mode']['prod']; isProductionMode: PluginInitializerContext['env']['mode']['prod'];
kibanaVersion: PluginInitializerContext['env']['packageInfo']['version']; kibanaVersion: PluginInitializerContext['env']['packageInfo']['version'];
@ -97,7 +97,7 @@ export interface IngestManagerAppContext {
httpSetup?: HttpServiceSetup; httpSetup?: HttpServiceSetup;
} }
export type IngestManagerSetupContract = void; export type FleetSetupContract = void;
const allSavedObjectTypes = [ const allSavedObjectTypes = [
OUTPUT_SAVED_OBJECT_TYPE, OUTPUT_SAVED_OBJECT_TYPE,
@ -110,7 +110,7 @@ const allSavedObjectTypes = [
]; ];
/** /**
* Callbacks supported by the Ingest plugin * Callbacks supported by the Fleet plugin
*/ */
export type ExternalCallback = [ export type ExternalCallback = [
'packagePolicyCreate', 'packagePolicyCreate',
@ -124,52 +124,46 @@ export type ExternalCallback = [
export type ExternalCallbacksStorage = Map<ExternalCallback[0], Set<ExternalCallback[1]>>; export type ExternalCallbacksStorage = Map<ExternalCallback[0], Set<ExternalCallback[1]>>;
/** /**
* Describes public IngestManager plugin contract returned at the `startup` stage. * Describes public Fleet plugin contract returned at the `startup` stage.
*/ */
export interface IngestManagerStartContract { export interface FleetStartContract {
esIndexPatternService: ESIndexPatternService; esIndexPatternService: ESIndexPatternService;
packageService: PackageService; packageService: PackageService;
agentService: AgentService; agentService: AgentService;
/** /**
* Services for Ingest's package policies * Services for Fleet's package policies
*/ */
packagePolicyService: typeof packagePolicyService; packagePolicyService: typeof packagePolicyService;
/** /**
* Register callbacks for inclusion in ingest API processing * Register callbacks for inclusion in fleet API processing
* @param args * @param args
*/ */
registerExternalCallback: (...args: ExternalCallback) => void; registerExternalCallback: (...args: ExternalCallback) => void;
} }
export class IngestManagerPlugin export class FleetPlugin
implements implements Plugin<FleetSetupContract, FleetStartContract, FleetSetupDeps, FleetStartDeps> {
Plugin<
IngestManagerSetupContract,
IngestManagerStartContract,
IngestManagerSetupDeps,
IngestManagerStartDeps
> {
private licensing$!: Observable<ILicense>; private licensing$!: Observable<ILicense>;
private config$: Observable<IngestManagerConfigType>; private config$: Observable<FleetConfigType>;
private security: SecurityPluginSetup | undefined; private security: SecurityPluginSetup | undefined;
private cloud: CloudSetup | undefined; private cloud: CloudSetup | undefined;
private logger: Logger | undefined; private logger: Logger | undefined;
private isProductionMode: IngestManagerAppContext['isProductionMode']; private isProductionMode: FleetAppContext['isProductionMode'];
private kibanaVersion: IngestManagerAppContext['kibanaVersion']; private kibanaVersion: FleetAppContext['kibanaVersion'];
private kibanaBranch: IngestManagerAppContext['kibanaBranch']; private kibanaBranch: FleetAppContext['kibanaBranch'];
private httpSetup: HttpServiceSetup | undefined; private httpSetup: HttpServiceSetup | undefined;
private encryptedSavedObjectsSetup: EncryptedSavedObjectsPluginSetup | undefined; private encryptedSavedObjectsSetup: EncryptedSavedObjectsPluginSetup | undefined;
constructor(private readonly initializerContext: PluginInitializerContext) { constructor(private readonly initializerContext: PluginInitializerContext) {
this.config$ = this.initializerContext.config.create<IngestManagerConfigType>(); this.config$ = this.initializerContext.config.create<FleetConfigType>();
this.isProductionMode = this.initializerContext.env.mode.prod; this.isProductionMode = this.initializerContext.env.mode.prod;
this.kibanaVersion = this.initializerContext.env.packageInfo.version; this.kibanaVersion = this.initializerContext.env.packageInfo.version;
this.kibanaBranch = this.initializerContext.env.packageInfo.branch; this.kibanaBranch = this.initializerContext.env.packageInfo.branch;
this.logger = this.initializerContext.logger.get(); this.logger = this.initializerContext.logger.get();
} }
public async setup(core: CoreSetup, deps: IngestManagerSetupDeps) { public async setup(core: CoreSetup, deps: FleetSetupDeps) {
this.httpSetup = core.http; this.httpSetup = core.http;
this.licensing$ = deps.licensing.license$; this.licensing$ = deps.licensing.license$;
if (deps.security) { if (deps.security) {
@ -186,15 +180,15 @@ export class IngestManagerPlugin
if (deps.features) { if (deps.features) {
deps.features.registerKibanaFeature({ deps.features.registerKibanaFeature({
id: PLUGIN_ID, id: PLUGIN_ID,
name: 'Ingest Manager', name: 'Fleet',
category: DEFAULT_APP_CATEGORIES.management, category: DEFAULT_APP_CATEGORIES.management,
app: [PLUGIN_ID, 'kibana'], app: [PLUGIN_ID, 'kibana'],
catalogue: ['ingestManager'], catalogue: ['fleet'],
privileges: { privileges: {
all: { all: {
api: [`${PLUGIN_ID}-read`, `${PLUGIN_ID}-all`], api: [`${PLUGIN_ID}-read`, `${PLUGIN_ID}-all`],
app: [PLUGIN_ID, 'kibana'], app: [PLUGIN_ID, 'kibana'],
catalogue: ['ingestManager'], catalogue: ['fleet'],
savedObject: { savedObject: {
all: allSavedObjectTypes, all: allSavedObjectTypes,
read: [], read: [],
@ -204,7 +198,7 @@ export class IngestManagerPlugin
read: { read: {
api: [`${PLUGIN_ID}-read`], api: [`${PLUGIN_ID}-read`],
app: [PLUGIN_ID, 'kibana'], app: [PLUGIN_ID, 'kibana'],
catalogue: ['ingestManager'], // TODO: check if this is actually available to read user catalogue: ['fleet'], // TODO: check if this is actually available to read user
savedObject: { savedObject: {
all: [], all: [],
read: allSavedObjectTypes, read: allSavedObjectTypes,
@ -264,7 +258,7 @@ export class IngestManagerPlugin
plugins: { plugins: {
encryptedSavedObjects: EncryptedSavedObjectsPluginStart; encryptedSavedObjects: EncryptedSavedObjectsPluginStart;
} }
): Promise<IngestManagerStartContract> { ): Promise<FleetStartContract> {
await appContextService.start({ await appContextService.start({
encryptedSavedObjectsStart: plugins.encryptedSavedObjects, encryptedSavedObjectsStart: plugins.encryptedSavedObjects,
encryptedSavedObjectsSetup: this.encryptedSavedObjectsSetup, encryptedSavedObjectsSetup: this.encryptedSavedObjectsSetup,

View file

@ -55,7 +55,7 @@ import * as AgentService from '../../services/agents';
import { postNewAgentActionHandlerBuilder } from './actions_handlers'; import { postNewAgentActionHandlerBuilder } from './actions_handlers';
import { appContextService } from '../../services'; import { appContextService } from '../../services';
import { postAgentUnenrollHandler, postBulkAgentsUnenrollHandler } from './unenroll_handler'; import { postAgentUnenrollHandler, postBulkAgentsUnenrollHandler } from './unenroll_handler';
import { IngestManagerConfigType } from '../..'; import { FleetConfigType } from '../..';
import { postAgentUpgradeHandler, postBulkAgentsUpgradeHandler } from './upgrade_handler'; import { postAgentUpgradeHandler, postBulkAgentsUpgradeHandler } from './upgrade_handler';
const ajv = new Ajv({ const ajv = new Ajv({
@ -81,7 +81,7 @@ function makeValidator(jsonSchema: any) {
}; };
} }
export const registerRoutes = (router: IRouter, config: IngestManagerConfigType) => { export const registerRoutes = (router: IRouter, config: FleetConfigType) => {
// Get one // Get one
router.get( router.get(
{ {

View file

@ -10,12 +10,12 @@ import {
isLimitedRoute, isLimitedRoute,
registerLimitedConcurrencyRoutes, registerLimitedConcurrencyRoutes,
} from './limited_concurrency'; } from './limited_concurrency';
import { IngestManagerConfigType } from '../index'; import { FleetConfigType } from '../index';
describe('registerLimitedConcurrencyRoutes', () => { describe('registerLimitedConcurrencyRoutes', () => {
test(`doesn't call registerOnPreAuth if maxConcurrentConnections is 0`, async () => { test(`doesn't call registerOnPreAuth if maxConcurrentConnections is 0`, async () => {
const mockSetup = coreMock.createSetup(); const mockSetup = coreMock.createSetup();
const mockConfig = { agents: { maxConcurrentConnections: 0 } } as IngestManagerConfigType; const mockConfig = { agents: { maxConcurrentConnections: 0 } } as FleetConfigType;
registerLimitedConcurrencyRoutes(mockSetup, mockConfig); registerLimitedConcurrencyRoutes(mockSetup, mockConfig);
expect(mockSetup.http.registerOnPreAuth).not.toHaveBeenCalled(); expect(mockSetup.http.registerOnPreAuth).not.toHaveBeenCalled();
@ -23,7 +23,7 @@ describe('registerLimitedConcurrencyRoutes', () => {
test(`calls registerOnPreAuth once if maxConcurrentConnections is 1`, async () => { test(`calls registerOnPreAuth once if maxConcurrentConnections is 1`, async () => {
const mockSetup = coreMock.createSetup(); const mockSetup = coreMock.createSetup();
const mockConfig = { agents: { maxConcurrentConnections: 1 } } as IngestManagerConfigType; const mockConfig = { agents: { maxConcurrentConnections: 1 } } as FleetConfigType;
registerLimitedConcurrencyRoutes(mockSetup, mockConfig); registerLimitedConcurrencyRoutes(mockSetup, mockConfig);
expect(mockSetup.http.registerOnPreAuth).toHaveBeenCalledTimes(1); expect(mockSetup.http.registerOnPreAuth).toHaveBeenCalledTimes(1);
@ -31,7 +31,7 @@ describe('registerLimitedConcurrencyRoutes', () => {
test(`calls registerOnPreAuth once if maxConcurrentConnections is 1000`, async () => { test(`calls registerOnPreAuth once if maxConcurrentConnections is 1000`, async () => {
const mockSetup = coreMock.createSetup(); const mockSetup = coreMock.createSetup();
const mockConfig = { agents: { maxConcurrentConnections: 1000 } } as IngestManagerConfigType; const mockConfig = { agents: { maxConcurrentConnections: 1000 } } as FleetConfigType;
registerLimitedConcurrencyRoutes(mockSetup, mockConfig); registerLimitedConcurrencyRoutes(mockSetup, mockConfig);
expect(mockSetup.http.registerOnPreAuth).toHaveBeenCalledTimes(1); expect(mockSetup.http.registerOnPreAuth).toHaveBeenCalledTimes(1);

View file

@ -11,7 +11,7 @@ import {
OnPreAuthToolkit, OnPreAuthToolkit,
} from 'kibana/server'; } from 'kibana/server';
import { LIMITED_CONCURRENCY_ROUTE_TAG } from '../../common'; import { LIMITED_CONCURRENCY_ROUTE_TAG } from '../../common';
import { IngestManagerConfigType } from '../index'; import { FleetConfigType } from '../index';
export class MaxCounter { export class MaxCounter {
constructor(private readonly max: number = 1) {} constructor(private readonly max: number = 1) {}
@ -74,7 +74,7 @@ export function createLimitedPreAuthHandler({
}; };
} }
export function registerLimitedConcurrencyRoutes(core: CoreSetup, config: IngestManagerConfigType) { export function registerLimitedConcurrencyRoutes(core: CoreSetup, config: FleetConfigType) {
const max = config.agents.maxConcurrentConnections; const max = config.agents.maxConcurrentConnections;
if (!max) return; if (!max) return;

View file

@ -9,7 +9,7 @@ import { httpServerMock } from 'src/core/server/mocks';
import { PostIngestSetupResponse } from '../../../common'; import { PostIngestSetupResponse } from '../../../common';
import { RegistryError } from '../../errors'; import { RegistryError } from '../../errors';
import { createAppContextStartContractMock } from '../../mocks'; import { createAppContextStartContractMock } from '../../mocks';
import { ingestManagerSetupHandler } from './handlers'; import { FleetSetupHandler } from './handlers';
import { appContextService } from '../../services/app_context'; import { appContextService } from '../../services/app_context';
import { setupIngestManager } from '../../services/setup'; import { setupIngestManager } from '../../services/setup';
@ -21,7 +21,7 @@ jest.mock('../../services/setup', () => {
const mockSetupIngestManager = setupIngestManager as jest.MockedFunction<typeof setupIngestManager>; const mockSetupIngestManager = setupIngestManager as jest.MockedFunction<typeof setupIngestManager>;
describe('ingestManagerSetupHandler', () => { describe('FleetSetupHandler', () => {
let context: ReturnType<typeof xpackMocks.createRequestHandlerContext>; let context: ReturnType<typeof xpackMocks.createRequestHandlerContext>;
let response: ReturnType<typeof httpServerMock.createResponseFactory>; let response: ReturnType<typeof httpServerMock.createResponseFactory>;
let request: ReturnType<typeof httpServerMock.createKibanaRequest>; let request: ReturnType<typeof httpServerMock.createKibanaRequest>;
@ -44,7 +44,7 @@ describe('ingestManagerSetupHandler', () => {
it('POST /setup succeeds w/200 and body of resolved value', async () => { it('POST /setup succeeds w/200 and body of resolved value', async () => {
mockSetupIngestManager.mockImplementation(() => Promise.resolve({ isIntialized: true })); mockSetupIngestManager.mockImplementation(() => Promise.resolve({ isIntialized: true }));
await ingestManagerSetupHandler(context, request, response); await FleetSetupHandler(context, request, response);
const expectedBody: PostIngestSetupResponse = { isInitialized: true }; const expectedBody: PostIngestSetupResponse = { isInitialized: true };
expect(response.customError).toHaveBeenCalledTimes(0); expect(response.customError).toHaveBeenCalledTimes(0);
@ -55,7 +55,7 @@ describe('ingestManagerSetupHandler', () => {
mockSetupIngestManager.mockImplementation(() => mockSetupIngestManager.mockImplementation(() =>
Promise.reject(new Error('SO method mocked to throw')) Promise.reject(new Error('SO method mocked to throw'))
); );
await ingestManagerSetupHandler(context, request, response); await FleetSetupHandler(context, request, response);
expect(response.customError).toHaveBeenCalledTimes(1); expect(response.customError).toHaveBeenCalledTimes(1);
expect(response.customError).toHaveBeenCalledWith({ expect(response.customError).toHaveBeenCalledWith({
@ -71,7 +71,7 @@ describe('ingestManagerSetupHandler', () => {
Promise.reject(new RegistryError('Registry method mocked to throw')) Promise.reject(new RegistryError('Registry method mocked to throw'))
); );
await ingestManagerSetupHandler(context, request, response); await FleetSetupHandler(context, request, response);
expect(response.customError).toHaveBeenCalledTimes(1); expect(response.customError).toHaveBeenCalledTimes(1);
expect(response.customError).toHaveBeenCalledWith({ expect(response.customError).toHaveBeenCalledWith({
statusCode: 502, statusCode: 502,

View file

@ -72,7 +72,7 @@ export const createFleetSetupHandler: RequestHandler<
} }
}; };
export const ingestManagerSetupHandler: RequestHandler = async (context, request, response) => { export const FleetSetupHandler: RequestHandler = async (context, request, response) => {
const soClient = context.core.savedObjects.client; const soClient = context.core.savedObjects.client;
const callCluster = context.core.elasticsearch.legacy.client.callAsCurrentUser; const callCluster = context.core.elasticsearch.legacy.client.callAsCurrentUser;

View file

@ -6,15 +6,11 @@
import { IRouter } from 'src/core/server'; import { IRouter } from 'src/core/server';
import { PLUGIN_ID, AGENTS_SETUP_API_ROUTES, SETUP_API_ROUTE } from '../../constants'; import { PLUGIN_ID, AGENTS_SETUP_API_ROUTES, SETUP_API_ROUTE } from '../../constants';
import { IngestManagerConfigType } from '../../../common'; import { FleetConfigType } from '../../../common';
import { import { getFleetStatusHandler, createFleetSetupHandler, FleetSetupHandler } from './handlers';
getFleetStatusHandler,
createFleetSetupHandler,
ingestManagerSetupHandler,
} from './handlers';
import { PostFleetSetupRequestSchema } from '../../types'; import { PostFleetSetupRequestSchema } from '../../types';
export const registerIngestManagerSetupRoute = (router: IRouter) => { export const registerFleetSetupRoute = (router: IRouter) => {
router.post( router.post(
{ {
path: SETUP_API_ROUTE, path: SETUP_API_ROUTE,
@ -23,7 +19,7 @@ export const registerIngestManagerSetupRoute = (router: IRouter) => {
// and will see `Unable to initialize Ingest Manager` in the UI // and will see `Unable to initialize Ingest Manager` in the UI
options: { tags: [`access:${PLUGIN_ID}-read`] }, options: { tags: [`access:${PLUGIN_ID}-read`] },
}, },
ingestManagerSetupHandler FleetSetupHandler
); );
}; };
@ -49,9 +45,9 @@ export const registerGetFleetStatusRoute = (router: IRouter) => {
); );
}; };
export const registerRoutes = (router: IRouter, config: IngestManagerConfigType) => { export const registerRoutes = (router: IRouter, config: FleetConfigType) => {
// Ingest manager setup // Ingest manager setup
registerIngestManagerSetupRoute(router); registerFleetSetupRoute(router);
if (!config.agents.enabled) { if (!config.agents.enabled) {
return; return;

View file

@ -12,26 +12,26 @@ import {
} from '../../../encrypted_saved_objects/server'; } from '../../../encrypted_saved_objects/server';
import packageJSON from '../../../../../package.json'; import packageJSON from '../../../../../package.json';
import { SecurityPluginSetup } from '../../../security/server'; import { SecurityPluginSetup } from '../../../security/server';
import { IngestManagerConfigType } from '../../common'; import { FleetConfigType } from '../../common';
import { ExternalCallback, ExternalCallbacksStorage, IngestManagerAppContext } from '../plugin'; import { ExternalCallback, ExternalCallbacksStorage, FleetAppContext } from '../plugin';
import { CloudSetup } from '../../../cloud/server'; import { CloudSetup } from '../../../cloud/server';
class AppContextService { class AppContextService {
private encryptedSavedObjects: EncryptedSavedObjectsClient | undefined; private encryptedSavedObjects: EncryptedSavedObjectsClient | undefined;
private encryptedSavedObjectsSetup: EncryptedSavedObjectsPluginSetup | undefined; private encryptedSavedObjectsSetup: EncryptedSavedObjectsPluginSetup | undefined;
private security: SecurityPluginSetup | undefined; private security: SecurityPluginSetup | undefined;
private config$?: Observable<IngestManagerConfigType>; private config$?: Observable<FleetConfigType>;
private configSubject$?: BehaviorSubject<IngestManagerConfigType>; private configSubject$?: BehaviorSubject<FleetConfigType>;
private savedObjects: SavedObjectsServiceStart | undefined; private savedObjects: SavedObjectsServiceStart | undefined;
private isProductionMode: IngestManagerAppContext['isProductionMode'] = false; private isProductionMode: FleetAppContext['isProductionMode'] = false;
private kibanaVersion: IngestManagerAppContext['kibanaVersion'] = packageJSON.version; private kibanaVersion: FleetAppContext['kibanaVersion'] = packageJSON.version;
private kibanaBranch: IngestManagerAppContext['kibanaBranch'] = packageJSON.branch; private kibanaBranch: FleetAppContext['kibanaBranch'] = packageJSON.branch;
private cloud?: CloudSetup; private cloud?: CloudSetup;
private logger: Logger | undefined; private logger: Logger | undefined;
private httpSetup?: HttpServiceSetup; private httpSetup?: HttpServiceSetup;
private externalCallbacks: ExternalCallbacksStorage = new Map(); private externalCallbacks: ExternalCallbacksStorage = new Map();
public async start(appContext: IngestManagerAppContext) { public async start(appContext: FleetAppContext) {
this.encryptedSavedObjects = appContext.encryptedSavedObjectsStart?.getClient(); this.encryptedSavedObjects = appContext.encryptedSavedObjectsStart?.getClient();
this.encryptedSavedObjectsSetup = appContext.encryptedSavedObjectsSetup; this.encryptedSavedObjectsSetup = appContext.encryptedSavedObjectsSetup;
this.security = appContext.security; this.security = appContext.security;

View file

@ -4,21 +4,21 @@
* you may not use this file except in compliance with the Elastic License. * you may not use this file except in compliance with the Elastic License.
*/ */
import { Observable, Subscription } from 'rxjs'; import { Observable, Subscription } from 'rxjs';
import { IngestManagerConfigType } from '../'; import { FleetConfigType } from '../';
/** /**
* Kibana config observable service, *NOT* agent policy * Kibana config observable service, *NOT* agent policy
*/ */
class ConfigService { class ConfigService {
private observable: Observable<IngestManagerConfigType> | null = null; private observable: Observable<FleetConfigType> | null = null;
private subscription: Subscription | null = null; private subscription: Subscription | null = null;
private config: IngestManagerConfigType | null = null; private config: FleetConfigType | null = null;
private updateInformation(config: IngestManagerConfigType) { private updateInformation(config: FleetConfigType) {
this.config = config; this.config = config;
} }
public start(config$: Observable<IngestManagerConfigType>) { public start(config$: Observable<FleetConfigType>) {
this.observable = config$; this.observable = config$;
this.subscription = this.observable.subscribe(this.updateInformation.bind(this)); this.subscription = this.observable.subscribe(this.updateInformation.bind(this));
} }

View file

@ -67,9 +67,9 @@ describe('Data Streams tab', () => {
expect(exists('templateList')).toBe(true); expect(exists('templateList')).toBe(true);
}); });
test('when Ingest Manager is enabled, links to Ingest Manager', async () => { test('when Fleet is enabled, links to Fleet', async () => {
testBed = await setup({ testBed = await setup({
plugins: { ingestManager: { hi: 'ok' } }, plugins: { fleet: { hi: 'ok' } },
}); });
await act(async () => { await act(async () => {
@ -80,7 +80,7 @@ describe('Data Streams tab', () => {
component.update(); component.update();
// Assert against the text because the href won't be available, due to dependency upon our core mock. // Assert against the text because the href won't be available, due to dependency upon our core mock.
expect(findEmptyPromptIndexTemplateLink().text()).toBe('Ingest Manager'); expect(findEmptyPromptIndexTemplateLink().text()).toBe('Fleet');
}); });
}); });

View file

@ -3,18 +3,8 @@
"version": "kibana", "version": "kibana",
"server": true, "server": true,
"ui": true, "ui": true,
"requiredPlugins": [ "requiredPlugins": ["home", "licensing", "management", "features", "share"],
"home", "optionalPlugins": ["security", "usageCollection", "fleet"],
"licensing",
"management",
"features",
"share"
],
"optionalPlugins": [
"security",
"usageCollection",
"ingestManager"
],
"configPath": ["xpack", "index_management"], "configPath": ["xpack", "index_management"],
"requiredBundles": [ "requiredBundles": [
"kibanaReact", "kibanaReact",

View file

@ -10,7 +10,7 @@ import { ManagementAppMountParams } from 'src/plugins/management/public';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
import { CoreSetup, CoreStart } from '../../../../../src/core/public'; import { CoreSetup, CoreStart } from '../../../../../src/core/public';
import { IngestManagerSetup } from '../../../fleet/public'; import { FleetSetup } from '../../../fleet/public';
import { IndexMgmtMetricsType } from '../types'; import { IndexMgmtMetricsType } from '../types';
import { UiMetricService, NotificationService, HttpService } from './services'; import { UiMetricService, NotificationService, HttpService } from './services';
import { ExtensionsService } from '../services'; import { ExtensionsService } from '../services';
@ -25,7 +25,7 @@ export interface AppDependencies {
}; };
plugins: { plugins: {
usageCollection: UsageCollectionSetup; usageCollection: UsageCollectionSetup;
ingestManager?: IngestManagerSetup; fleet?: FleetSetup;
}; };
services: { services: {
uiMetricService: UiMetricService<IndexMgmtMetricsType>; uiMetricService: UiMetricService<IndexMgmtMetricsType>;

View file

@ -9,7 +9,7 @@ import { CoreSetup } from 'src/core/public';
import { ManagementAppMountParams } from 'src/plugins/management/public/'; import { ManagementAppMountParams } from 'src/plugins/management/public/';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
import { IngestManagerSetup } from '../../../fleet/public'; import { FleetSetup } from '../../../fleet/public';
import { PLUGIN } from '../../common/constants'; import { PLUGIN } from '../../common/constants';
import { ExtensionsService } from '../services'; import { ExtensionsService } from '../services';
import { IndexMgmtMetricsType, StartDependencies } from '../types'; import { IndexMgmtMetricsType, StartDependencies } from '../types';
@ -32,7 +32,7 @@ export async function mountManagementSection(
usageCollection: UsageCollectionSetup, usageCollection: UsageCollectionSetup,
services: InternalServices, services: InternalServices,
params: ManagementAppMountParams, params: ManagementAppMountParams,
ingestManager?: IngestManagerSetup fleet?: FleetSetup
) { ) {
const { element, setBreadcrumbs, history } = params; const { element, setBreadcrumbs, history } = params;
const [core, startDependencies] = await coreSetup.getStartServices(); const [core, startDependencies] = await coreSetup.getStartServices();
@ -57,7 +57,7 @@ export async function mountManagementSection(
}, },
plugins: { plugins: {
usageCollection, usageCollection,
ingestManager, fleet,
}, },
services, services,
history, history,

View file

@ -49,7 +49,7 @@ export const DataStreamList: React.FunctionComponent<RouteComponentProps<MatchPa
const { const {
core: { getUrlForApp }, core: { getUrlForApp },
plugins: { ingestManager }, plugins: { fleet },
} = useAppContext(); } = useAppContext();
const [isIncludeStatsChecked, setIsIncludeStatsChecked] = useState(false); const [isIncludeStatsChecked, setIsIncludeStatsChecked] = useState(false);
@ -100,7 +100,7 @@ export const DataStreamList: React.FunctionComponent<RouteComponentProps<MatchPa
defaultMessage="Data streams store time-series data across multiple indices." defaultMessage="Data streams store time-series data across multiple indices."
/> />
{' ' /* We need this space to separate these two sentences. */} {' ' /* We need this space to separate these two sentences. */}
{ingestManager ? ( {fleet ? (
<FormattedMessage <FormattedMessage
id="xpack.idxMgmt.dataStreamList.emptyPrompt.noDataStreamsCtaIngestManagerMessage" id="xpack.idxMgmt.dataStreamList.emptyPrompt.noDataStreamsCtaIngestManagerMessage"
defaultMessage="Get started with data streams in {link}." defaultMessage="Get started with data streams in {link}."
@ -108,12 +108,12 @@ export const DataStreamList: React.FunctionComponent<RouteComponentProps<MatchPa
link: ( link: (
<EuiLink <EuiLink
data-test-subj="dataStreamsEmptyPromptTemplateLink" data-test-subj="dataStreamsEmptyPromptTemplateLink"
href={getUrlForApp('ingestManager')} href={getUrlForApp('fleet')}
> >
{i18n.translate( {i18n.translate(
'xpack.idxMgmt.dataStreamList.emptyPrompt.noDataStreamsCtaIngestManagerLink', 'xpack.idxMgmt.dataStreamList.emptyPrompt.noDataStreamsCtaIngestManagerLink',
{ {
defaultMessage: 'Ingest Manager', defaultMessage: 'Fleet',
} }
)} )}
</EuiLink> </EuiLink>

View file

@ -40,7 +40,7 @@ export class IndexMgmtUIPlugin {
plugins: SetupDependencies plugins: SetupDependencies
): IndexManagementPluginSetup { ): IndexManagementPluginSetup {
const { http, notifications } = coreSetup; const { http, notifications } = coreSetup;
const { ingestManager, usageCollection, management } = plugins; const { fleet, usageCollection, management } = plugins;
httpService.setup(http); httpService.setup(http);
notificationService.setup(notifications); notificationService.setup(notifications);
@ -58,7 +58,7 @@ export class IndexMgmtUIPlugin {
uiMetricService: this.uiMetricService, uiMetricService: this.uiMetricService,
extensionsService: this.extensionsService, extensionsService: this.extensionsService,
}; };
return mountManagementSection(coreSetup, usageCollection, services, params, ingestManager); return mountManagementSection(coreSetup, usageCollection, services, params, fleet);
}, },
}); });

View file

@ -5,7 +5,7 @@
*/ */
import { ExtensionsSetup } from './services'; import { ExtensionsSetup } from './services';
import { IngestManagerSetup } from '../../fleet/public'; import { FleetSetup } from '../../fleet/public';
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public'; import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
import { ManagementSetup } from '../../../../src/plugins/management/public'; import { ManagementSetup } from '../../../../src/plugins/management/public';
import { SharePluginStart } from '../../../../src/plugins/share/public'; import { SharePluginStart } from '../../../../src/plugins/share/public';
@ -17,7 +17,7 @@ export interface IndexManagementPluginSetup {
} }
export interface SetupDependencies { export interface SetupDependencies {
ingestManager?: IngestManagerSetup; fleet?: FleetSetup;
usageCollection: UsageCollectionSetup; usageCollection: UsageCollectionSetup;
management: ManagementSetup; management: ManagementSetup;
} }

View file

@ -13,14 +13,14 @@ import { EuiText } from '@elastic/eui';
import { EuiLink } from '@elastic/eui'; import { EuiLink } from '@elastic/eui';
import { usePluginContext } from '../../../hooks/use_plugin_context'; import { usePluginContext } from '../../../hooks/use_plugin_context';
export function IngestManagerPanel() { export function FleetPanel() {
const { core } = usePluginContext(); const { core } = usePluginContext();
return ( return (
<EuiPanel <EuiPanel
paddingSize="l" paddingSize="l"
hasShadow hasShadow
betaBadgeLabel={i18n.translate('xpack.observability.ingestManager.beta', { betaBadgeLabel={i18n.translate('xpack.observability.fleet.beta', {
defaultMessage: 'Beta', defaultMessage: 'Beta',
})} })}
> >
@ -28,24 +28,24 @@ export function IngestManagerPanel() {
<EuiFlexItem grow={false}> <EuiFlexItem grow={false}>
<EuiTitle size="s"> <EuiTitle size="s">
<h4> <h4>
{i18n.translate('xpack.observability.ingestManager.title', { {i18n.translate('xpack.observability.fleet.title', {
defaultMessage: 'Have you seen our new Ingest Manager?', defaultMessage: 'Have you seen our new Fleet?',
})} })}
</h4> </h4>
</EuiTitle> </EuiTitle>
</EuiFlexItem> </EuiFlexItem>
<EuiFlexItem> <EuiFlexItem>
<EuiText size="s" color="subdued" style={{ maxWidth: '700px' }}> <EuiText size="s" color="subdued" style={{ maxWidth: '700px' }}>
{i18n.translate('xpack.observability.ingestManager.text', { {i18n.translate('xpack.observability.fleet.text', {
defaultMessage: defaultMessage:
'The Elastic Agent provides a simple, unified way to add monitoring for logs, metrics, and other types of data to your hosts. You no longer need to install multiple Beats and other agents, making it easier and faster to deploy configurations across your infrastructure.', 'The Elastic Agent provides a simple, unified way to add monitoring for logs, metrics, and other types of data to your hosts. You no longer need to install multiple Beats and other agents, making it easier and faster to deploy configurations across your infrastructure.',
})} })}
</EuiText> </EuiText>
</EuiFlexItem> </EuiFlexItem>
<EuiFlexItem> <EuiFlexItem>
<EuiLink href={core.http.basePath.prepend('/app/ingestManager#/')}> <EuiLink href={core.http.basePath.prepend('/app/fleet#/')}>
{i18n.translate('xpack.observability.ingestManager.button', { {i18n.translate('xpack.observability.fleet.button', {
defaultMessage: 'Try Ingest Manager Beta', defaultMessage: 'Try Fleet Beta',
})} })}
</EuiLink> </EuiLink>
</EuiFlexItem> </EuiFlexItem>

View file

@ -18,7 +18,7 @@ import {
import { i18n } from '@kbn/i18n'; import { i18n } from '@kbn/i18n';
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import styled, { ThemeContext } from 'styled-components'; import styled, { ThemeContext } from 'styled-components';
import { IngestManagerPanel } from '../../components/app/ingest_manager_panel'; import { FleetPanel } from '../../components/app/fleet_panel';
import { WithHeaderLayout } from '../../components/app/layout/with_header'; import { WithHeaderLayout } from '../../components/app/layout/with_header';
import { usePluginContext } from '../../hooks/use_plugin_context'; import { usePluginContext } from '../../hooks/use_plugin_context';
import { useTrackPageview } from '../../hooks/use_track_metric'; import { useTrackPageview } from '../../hooks/use_track_metric';
@ -122,7 +122,7 @@ export function LandingPage() {
<EuiFlexItem> <EuiFlexItem>
<EuiFlexGroup justifyContent="spaceAround"> <EuiFlexGroup justifyContent="spaceAround">
<EuiFlexItem grow={false}> <EuiFlexItem grow={false}>
<IngestManagerPanel /> <FleetPanel />
</EuiFlexItem> </EuiFlexItem>
</EuiFlexGroup> </EuiFlexGroup>
</EuiFlexItem> </EuiFlexItem>

View file

@ -20,7 +20,7 @@
], ],
"optionalPlugins": [ "optionalPlugins": [
"encryptedSavedObjects", "encryptedSavedObjects",
"ingestManager", "fleet",
"ml", "ml",
"newsfeed", "newsfeed",
"security", "security",
@ -33,5 +33,5 @@
], ],
"server": true, "server": true,
"ui": true, "ui": true,
"requiredBundles": ["esUiShared", "ingestManager", "kibanaUtils", "kibanaReact", "lists", "ml"] "requiredBundles": ["esUiShared", "fleet", "kibanaUtils", "kibanaReact", "lists", "ml"]
} }

View file

@ -6,12 +6,12 @@
import * as React from 'react'; import * as React from 'react';
import { i18n } from '@kbn/i18n'; import { i18n } from '@kbn/i18n';
import { NotificationsStart } from 'kibana/public'; import { NotificationsStart } from 'kibana/public';
import { IngestManagerStart } from '../../../../fleet/public'; import { FleetStart } from '../../../../fleet/public';
export const Setup: React.FunctionComponent<{ export const Setup: React.FunctionComponent<{
ingestManager: IngestManagerStart; fleet: FleetStart;
notifications: NotificationsStart; notifications: NotificationsStart;
}> = ({ ingestManager, notifications }) => { }> = ({ fleet, notifications }) => {
React.useEffect(() => { React.useEffect(() => {
const defaultText = i18n.translate('xpack.securitySolution.endpoint.ingestToastMessage', { const defaultText = i18n.translate('xpack.securitySolution.endpoint.ingestToastMessage', {
defaultMessage: 'Ingest Manager failed during its setup.', defaultMessage: 'Ingest Manager failed during its setup.',
@ -32,8 +32,8 @@ export const Setup: React.FunctionComponent<{
}); });
}; };
ingestManager.isInitialized().catch((error: Error) => displayToastWithModal(error.message)); fleet.isInitialized().catch((error: Error) => displayToastWithModal(error.message));
}, [ingestManager, notifications.toasts]); }, [fleet, notifications.toasts]);
return null; return null;
}; };

View file

@ -2,16 +2,16 @@
exports[`LinkToApp component should render with href 1`] = ` exports[`LinkToApp component should render with href 1`] = `
<Memo() <Memo()
appId="ingestManager" appId="fleet"
href="/app/ingest" href="/app/fleet"
> >
<EuiLink <EuiLink
href="/app/ingest" href="/app/fleet"
onClick={[Function]} onClick={[Function]}
> >
<a <a
className="euiLink euiLink--primary" className="euiLink euiLink--primary"
href="/app/ingest" href="/app/fleet"
onClick={[Function]} onClick={[Function]}
rel="noreferrer" rel="noreferrer"
> >
@ -23,7 +23,7 @@ exports[`LinkToApp component should render with href 1`] = `
exports[`LinkToApp component should render with minimum input 1`] = ` exports[`LinkToApp component should render with minimum input 1`] = `
<Memo() <Memo()
appId="ingestManager" appId="fleet"
> >
<EuiLink <EuiLink
onClick={[Function]} onClick={[Function]}

View file

@ -31,12 +31,12 @@ describe('LinkToApp component', () => {
}); });
it('should render with minimum input', () => { it('should render with minimum input', () => {
expect(render(<LinkToApp appId="ingestManager">{'link'}</LinkToApp>)).toMatchSnapshot(); expect(render(<LinkToApp appId="fleet">{'link'}</LinkToApp>)).toMatchSnapshot();
}); });
it('should render with href', () => { it('should render with href', () => {
expect( expect(
render( render(
<LinkToApp appId="ingestManager" href="/app/ingest"> <LinkToApp appId="fleet" href="/app/fleet">
{'link'} {'link'}
</LinkToApp> </LinkToApp>
) )
@ -46,7 +46,7 @@ describe('LinkToApp component', () => {
// Take `_event` (even though it is not used) so that `jest.fn` will have a type that expects to be called with an event // Take `_event` (even though it is not used) so that `jest.fn` will have a type that expects to be called with an event
const spyOnClickHandler: LinkToAppOnClickMock = jest.fn().mockImplementation((_event) => {}); const spyOnClickHandler: LinkToAppOnClickMock = jest.fn().mockImplementation((_event) => {});
const renderResult = render( const renderResult = render(
<LinkToApp appId="ingestManager" href="/app/ingest" onClick={spyOnClickHandler}> <LinkToApp appId="fleet" href="/app/fleet" onClick={spyOnClickHandler}>
{'link'} {'link'}
</LinkToApp> </LinkToApp>
); );
@ -57,19 +57,19 @@ describe('LinkToApp component', () => {
expect(spyOnClickHandler).toHaveBeenCalled(); expect(spyOnClickHandler).toHaveBeenCalled();
expect(clickEventArg.preventDefault).toBeInstanceOf(Function); expect(clickEventArg.preventDefault).toBeInstanceOf(Function);
expect(clickEventArg.isDefaultPrevented()).toBe(true); expect(clickEventArg.isDefaultPrevented()).toBe(true);
expect(fakeCoreStart.application.navigateToApp).toHaveBeenCalledWith('ingestManager', { expect(fakeCoreStart.application.navigateToApp).toHaveBeenCalledWith('fleet', {
path: undefined, path: undefined,
state: undefined, state: undefined,
}); });
}); });
it('should navigate to App with specific path', () => { it('should navigate to App with specific path', () => {
const renderResult = render( const renderResult = render(
<LinkToApp appId="ingestManager" appPath="/some/path" href="/app/ingest"> <LinkToApp appId="fleet" appPath="/some/path" href="/app/fleet">
{'link'} {'link'}
</LinkToApp> </LinkToApp>
); );
renderResult.find('EuiLink').simulate('click', { button: 0 }); renderResult.find('EuiLink').simulate('click', { button: 0 });
expect(fakeCoreStart.application.navigateToApp).toHaveBeenCalledWith('ingestManager', { expect(fakeCoreStart.application.navigateToApp).toHaveBeenCalledWith('fleet', {
path: '/some/path', path: '/some/path',
state: undefined, state: undefined,
}); });
@ -77,9 +77,9 @@ describe('LinkToApp component', () => {
it('should passes through EuiLinkProps', () => { it('should passes through EuiLinkProps', () => {
const renderResult = render( const renderResult = render(
<LinkToApp <LinkToApp
appId="ingestManager" appId="fleet"
appPath="/some/path" appPath="/some/path"
href="/app/ingest" href="/app/fleet"
className="my-class" className="my-class"
color="primary" color="primary"
data-test-subj="my-test-subject" data-test-subj="my-test-subject"
@ -92,7 +92,7 @@ describe('LinkToApp component', () => {
className: 'my-class', className: 'my-class',
color: 'primary', color: 'primary',
'data-test-subj': 'my-test-subject', 'data-test-subj': 'my-test-subject',
href: '/app/ingest', href: '/app/fleet',
onClick: expect.any(Function), onClick: expect.any(Function),
}); });
}); });
@ -105,7 +105,7 @@ describe('LinkToApp component', () => {
try { try {
} catch (e) { } catch (e) {
const renderResult = render( const renderResult = render(
<LinkToApp appId="ingestManager" href="/app/ingest" onClick={spyOnClickHandler}> <LinkToApp appId="fleet" href="/app/fleet" onClick={spyOnClickHandler}>
{'link'} {'link'}
</LinkToApp> </LinkToApp>
); );
@ -119,7 +119,7 @@ describe('LinkToApp component', () => {
ev.preventDefault(); ev.preventDefault();
}); });
const renderResult = render( const renderResult = render(
<LinkToApp appId="ingestManager" href="/app/ingest" onClick={spyOnClickHandler}> <LinkToApp appId="fleet" href="/app/fleet" onClick={spyOnClickHandler}>
{'link'} {'link'}
</LinkToApp> </LinkToApp>
); );
@ -127,13 +127,13 @@ describe('LinkToApp component', () => {
expect(fakeCoreStart.application.navigateToApp).not.toHaveBeenCalled(); expect(fakeCoreStart.application.navigateToApp).not.toHaveBeenCalled();
}); });
it('should not to navigate if it was not left click', () => { it('should not to navigate if it was not left click', () => {
const renderResult = render(<LinkToApp appId="ingestManager">{'link'}</LinkToApp>); const renderResult = render(<LinkToApp appId="fleet">{'link'}</LinkToApp>);
renderResult.find('EuiLink').simulate('click', { button: 1 }); renderResult.find('EuiLink').simulate('click', { button: 1 });
expect(fakeCoreStart.application.navigateToApp).not.toHaveBeenCalled(); expect(fakeCoreStart.application.navigateToApp).not.toHaveBeenCalled();
}); });
it('should not to navigate if it includes an anchor target', () => { it('should not to navigate if it includes an anchor target', () => {
const renderResult = render( const renderResult = render(
<LinkToApp appId="ingestManager" target="_blank" href="/some/path"> <LinkToApp appId="fleet" target="_blank" href="/some/path">
{'link'} {'link'}
</LinkToApp> </LinkToApp>
); );
@ -142,7 +142,7 @@ describe('LinkToApp component', () => {
}); });
it('should not to navigate if if meta|alt|ctrl|shift keys are pressed', () => { it('should not to navigate if if meta|alt|ctrl|shift keys are pressed', () => {
const renderResult = render( const renderResult = render(
<LinkToApp appId="ingestManager" target="_blank"> <LinkToApp appId="fleet" target="_blank">
{'link'} {'link'}
</LinkToApp> </LinkToApp>
); );

View file

@ -7,7 +7,7 @@
import { ApplicationStart } from 'src/core/public'; import { ApplicationStart } from 'src/core/public';
import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; import { useKibana } from '../../../../../../../src/plugins/kibana_react/public';
/** /**
* Returns an object which ingest permissions are allowed * Returns an object which fleet permissions are allowed
*/ */
export const useIngestEnabledCheck = (): { export const useIngestEnabledCheck = (): {
allEnabled: boolean; allEnabled: boolean;
@ -17,12 +17,12 @@ export const useIngestEnabledCheck = (): {
} => { } => {
const { services } = useKibana<{ application: ApplicationStart }>(); const { services } = useKibana<{ application: ApplicationStart }>();
// Check if Ingest Manager is present in the configuration // Check if Fleet is present in the configuration
const show = Boolean(services.application.capabilities.ingestManager?.show); const show = Boolean(services.application.capabilities.fleet?.show);
const write = Boolean(services.application.capabilities.ingestManager?.write); const write = Boolean(services.application.capabilities.fleet?.write);
const read = Boolean(services.application.capabilities.ingestManager?.read); const read = Boolean(services.application.capabilities.fleet?.read);
// Check if all Ingest Manager permissions are enabled // Check if all Fleet permissions are enabled
const allEnabled = show && read && write ? true : false; const allEnabled = show && read && write ? true : false;
return { return {

View file

@ -25,7 +25,7 @@ type EventHandlerCallback = MouseEventHandler<HTMLButtonElement | HTMLAnchorElem
* *
* @example * @example
* *
* const handleOnClick = useNavigateToAppEventHandler('ingestManager', {path: '#/policies'}) * const handleOnClick = useNavigateToAppEventHandler('fleet', {path: '#/policies'})
* return <EuiLink onClick={handleOnClick}>See policies</EuiLink> * return <EuiLink onClick={handleOnClick}>See policies</EuiLink>
*/ */
export const useNavigateToAppEventHandler = <S = unknown>( export const useNavigateToAppEventHandler = <S = unknown>(

View file

@ -29,7 +29,7 @@ export interface AppContextTestRender {
store: Store<State>; store: Store<State>;
history: ReturnType<typeof createMemoryHistory>; history: ReturnType<typeof createMemoryHistory>;
coreStart: ReturnType<typeof coreMock.createStart>; coreStart: ReturnType<typeof coreMock.createStart>;
depsStart: Pick<StartPlugins, 'data' | 'ingestManager'>; depsStart: Pick<StartPlugins, 'data' | 'fleet'>;
middlewareSpy: MiddlewareActionSpyHelper; middlewareSpy: MiddlewareActionSpyHelper;
/** /**
* A wrapper around `AppRootContext` component. Uses the mocked modules as input to the * A wrapper around `AppRootContext` component. Uses the mocked modules as input to the

View file

@ -24,7 +24,7 @@ export const AppRootProvider = memo<{
store: Store; store: Store;
history: History; history: History;
coreStart: CoreStart; coreStart: CoreStart;
depsStart: Pick<StartPlugins, 'data' | 'ingestManager'>; depsStart: Pick<StartPlugins, 'data' | 'fleet'>;
children: ReactNode | ReactNode[]; children: ReactNode | ReactNode[];
}>( }>(
({ ({

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License. * you may not use this file except in compliance with the Elastic License.
*/ */
import { IngestManagerStart } from '../../../../../fleet/public'; import { FleetStart } from '../../../../../fleet/public';
import { import {
dataPluginMock, dataPluginMock,
Start as DataPublicStartMock, Start as DataPublicStartMock,
@ -33,7 +33,7 @@ type DataMock = Omit<DataPublicStartMock, 'indexPatterns' | 'query'> & {
*/ */
export interface DepsStartMock { export interface DepsStartMock {
data: DataMock; data: DataMock;
ingestManager: IngestManagerStart; fleet: FleetStart;
} }
/** /**
@ -56,7 +56,7 @@ export const depsStartMock: () => DepsStartMock = () => {
return { return {
data: dataMock, data: dataMock,
ingestManager: { fleet: {
isInitialized: () => Promise.resolve(true), isInitialized: () => Promise.resolve(true),
registerExtension: jest.fn(), registerExtension: jest.fn(),
}, },

View file

@ -76,7 +76,7 @@ export type ImmutableMiddleware<S, A extends Action> = (
*/ */
export type ImmutableMiddlewareFactory<S = State> = ( export type ImmutableMiddlewareFactory<S = State> = (
coreStart: CoreStart, coreStart: CoreStart,
depsStart: Pick<StartPlugins, 'data' | 'ingestManager'> depsStart: Pick<StartPlugins, 'data' | 'fleet'>
) => ImmutableMiddleware<S, AppAction>; ) => ImmutableMiddleware<S, AppAction>;
/** /**
@ -87,7 +87,7 @@ export type ImmutableMiddlewareFactory<S = State> = (
*/ */
export type SecuritySubPluginMiddlewareFactory = ( export type SecuritySubPluginMiddlewareFactory = (
coreStart: CoreStart, coreStart: CoreStart,
depsStart: Pick<StartPlugins, 'data' | 'ingestManager'> depsStart: Pick<StartPlugins, 'data' | 'fleet'>
) => Array<Middleware<{}, State, Dispatch<AppAction | Immutable<AppAction>>>>; ) => Array<Middleware<{}, State, Dispatch<AppAction | Immutable<AppAction>>>>;
/** /**

View file

@ -24,22 +24,22 @@ export function useEndpointSelector<TSelected>(selector: (state: EndpointState)
} }
/** /**
* Returns an object that contains Ingest app and URL information * Returns an object that contains Fleet app and URL information
*/ */
export const useIngestUrl = (subpath: string): { url: string; appId: string; appPath: string } => { export const useIngestUrl = (subpath: string): { url: string; appId: string; appPath: string } => {
const { services } = useKibana(); const { services } = useKibana();
return useMemo(() => { return useMemo(() => {
const appPath = `#/${subpath}`; const appPath = `#/${subpath}`;
return { return {
url: `${services.application.getUrlForApp('ingestManager')}${appPath}`, url: `${services.application.getUrlForApp('fleet')}${appPath}`,
appId: 'ingestManager', appId: 'fleet',
appPath, appPath,
}; };
}, [services.application, subpath]); }, [services.application, subpath]);
}; };
/** /**
* Returns an object that contains Ingest app and URL information * Returns an object that contains Fleet app and URL information
*/ */
export const useAgentDetailsIngestUrl = ( export const useAgentDetailsIngestUrl = (
agentId: string agentId: string
@ -48,8 +48,8 @@ export const useAgentDetailsIngestUrl = (
return useMemo(() => { return useMemo(() => {
const appPath = `#/fleet/agents/${agentId}/activity`; const appPath = `#/fleet/agents/${agentId}/activity`;
return { return {
url: `${services.application.getUrlForApp('ingestManager')}${appPath}`, url: `${services.application.getUrlForApp('fleet')}${appPath}`,
appId: 'ingestManager', appId: 'fleet',
appPath, appPath,
}; };
}, [services.application, agentId]); }, [services.application, agentId]);

View file

@ -612,19 +612,19 @@ describe('when on the list page', () => {
}); });
it('should include the link to reassignment in Ingest', async () => { it('should include the link to reassignment in Ingest', async () => {
coreStart.application.getUrlForApp.mockReturnValue('/app/ingestManager'); coreStart.application.getUrlForApp.mockReturnValue('/app/fleet');
const renderResult = await renderAndWaitForData(); const renderResult = await renderAndWaitForData();
const linkToReassign = await renderResult.findByTestId('endpointDetailsLinkToIngest'); const linkToReassign = await renderResult.findByTestId('endpointDetailsLinkToIngest');
expect(linkToReassign).not.toBeNull(); expect(linkToReassign).not.toBeNull();
expect(linkToReassign.textContent).toEqual('Reassign Policy'); expect(linkToReassign.textContent).toEqual('Reassign Policy');
expect(linkToReassign.getAttribute('href')).toEqual( expect(linkToReassign.getAttribute('href')).toEqual(
`/app/ingestManager#/fleet/agents/${elasticAgentId}/activity?openReassignFlyout=true` `/app/fleet#/fleet/agents/${elasticAgentId}/activity?openReassignFlyout=true`
); );
}); });
describe('when link to reassignment in Ingest is clicked', () => { describe('when link to reassignment in Ingest is clicked', () => {
beforeEach(async () => { beforeEach(async () => {
coreStart.application.getUrlForApp.mockReturnValue('/app/ingestManager'); coreStart.application.getUrlForApp.mockReturnValue('/app/fleet');
const renderResult = await renderAndWaitForData(); const renderResult = await renderAndWaitForData();
const linkToReassign = await renderResult.findByTestId('endpointDetailsLinkToIngest'); const linkToReassign = await renderResult.findByTestId('endpointDetailsLinkToIngest');
reactTestingLibrary.act(() => { reactTestingLibrary.act(() => {
@ -820,8 +820,8 @@ describe('when on the list page', () => {
switch (appName) { switch (appName) {
case 'securitySolution': case 'securitySolution':
return '/app/security'; return '/app/security';
case 'ingestManager': case 'fleet':
return '/app/ingestManager'; return '/app/fleet';
} }
return appName; return appName;
}); });
@ -852,9 +852,7 @@ describe('when on the list page', () => {
}); });
const agentPolicyLink = await renderResult.findByTestId('agentPolicyLink'); const agentPolicyLink = await renderResult.findByTestId('agentPolicyLink');
expect(agentPolicyLink.getAttribute('href')).toEqual( expect(agentPolicyLink.getAttribute('href')).toEqual(`/app/fleet#/policies/${agentPolicyId}`);
`/app/ingestManager#/policies/${agentPolicyId}`
);
}); });
it('navigates to the Ingest Agent Details page', async () => { it('navigates to the Ingest Agent Details page', async () => {
const renderResult = await renderAndWaitForData(); const renderResult = await renderAndWaitForData();
@ -864,9 +862,7 @@ describe('when on the list page', () => {
}); });
const agentDetailsLink = await renderResult.findByTestId('agentDetailsLink'); const agentDetailsLink = await renderResult.findByTestId('agentDetailsLink');
expect(agentDetailsLink.getAttribute('href')).toEqual( expect(agentDetailsLink.getAttribute('href')).toEqual(`/app/fleet#/fleet/agents/${agentId}`);
`/app/ingestManager#/fleet/agents/${agentId}`
);
}); });
}); });
}); });

View file

@ -177,7 +177,7 @@ export const EndpointList = () => {
); );
const handleCreatePolicyClick = useNavigateToAppEventHandler<CreatePackagePolicyRouteState>( const handleCreatePolicyClick = useNavigateToAppEventHandler<CreatePackagePolicyRouteState>(
'ingestManager', 'fleet',
{ {
path: `#/integrations${ path: `#/integrations${
endpointPackageVersion ? `/endpoint-${endpointPackageVersion}/add-integration` : '' endpointPackageVersion ? `/endpoint-${endpointPackageVersion}/add-integration` : ''
@ -219,7 +219,7 @@ export const EndpointList = () => {
const handleDeployEndpointsClick = useNavigateToAppEventHandler< const handleDeployEndpointsClick = useNavigateToAppEventHandler<
AgentPolicyDetailsDeployAgentAction AgentPolicyDetailsDeployAgentAction
>('ingestManager', { >('fleet', {
path: `#/policies/${selectedPolicyId}?openEnrollmentFlyout=true`, path: `#/policies/${selectedPolicyId}?openEnrollmentFlyout=true`,
state: { state: {
onDoneNavigateTo: [ onDoneNavigateTo: [
@ -443,14 +443,14 @@ export const EndpointList = () => {
icon="logoObservability" icon="logoObservability"
key="agentConfigLink" key="agentConfigLink"
data-test-subj="agentPolicyLink" data-test-subj="agentPolicyLink"
navigateAppId="ingestManager" navigateAppId="fleet"
navigateOptions={{ navigateOptions={{
path: `#${pagePathGetters.policy_details({ path: `#${pagePathGetters.policy_details({
policyId: agentPolicies[item.metadata.Endpoint.policy.applied.id], policyId: agentPolicies[item.metadata.Endpoint.policy.applied.id],
})}`, })}`,
}} }}
href={`${services?.application?.getUrlForApp( href={`${services?.application?.getUrlForApp(
'ingestManager' 'fleet'
)}#${pagePathGetters.policy_details({ )}#${pagePathGetters.policy_details({
policyId: agentPolicies[item.metadata.Endpoint.policy.applied.id], policyId: agentPolicies[item.metadata.Endpoint.policy.applied.id],
})}`} })}`}
@ -467,14 +467,14 @@ export const EndpointList = () => {
icon="logoObservability" icon="logoObservability"
key="agentDetailsLink" key="agentDetailsLink"
data-test-subj="agentDetailsLink" data-test-subj="agentDetailsLink"
navigateAppId="ingestManager" navigateAppId="fleet"
navigateOptions={{ navigateOptions={{
path: `#${pagePathGetters.fleet_agent_details({ path: `#${pagePathGetters.fleet_agent_details({
agentId: item.metadata.elastic.agent.id, agentId: item.metadata.elastic.agent.id,
})}`, })}`,
}} }}
href={`${services?.application?.getUrlForApp( href={`${services?.application?.getUrlForApp(
'ingestManager' 'fleet'
)}#${pagePathGetters.fleet_agent_details({ )}#${pagePathGetters.fleet_agent_details({
agentId: item.metadata.elastic.agent.id, agentId: item.metadata.elastic.agent.id,
})}`} })}`}
@ -591,12 +591,12 @@ export const EndpointList = () => {
values={{ values={{
agentsLink: ( agentsLink: (
<LinkToApp <LinkToApp
appId="ingestManager" appId="fleet"
appPath={`#${pagePathGetters.fleet_agent_list({ appPath={`#${pagePathGetters.fleet_agent_list({
kuery: 'fleet-agents.packages : "endpoint"', kuery: 'fleet-agents.packages : "endpoint"',
})}`} })}`}
href={`${services?.application?.getUrlForApp( href={`${services?.application?.getUrlForApp(
'ingestManager' 'fleet'
)}#${pagePathGetters.fleet_agent_list({ )}#${pagePathGetters.fleet_agent_list({
kuery: 'fleet-agents.packages : "endpoint"', kuery: 'fleet-agents.packages : "endpoint"',
})}`} })}`}

View file

@ -70,7 +70,7 @@ const EditFlowMessage = memo<{
TrustedAppsListPageRouteState['onBackButtonNavigateTo'] TrustedAppsListPageRouteState['onBackButtonNavigateTo']
>(() => { >(() => {
return [ return [
'ingestManager', 'fleet',
{ {
path: `#${pagePathGetters.edit_integration({ path: `#${pagePathGetters.edit_integration({
policyId: agentPolicyId, policyId: agentPolicyId,
@ -99,11 +99,11 @@ const EditFlowMessage = memo<{
path: getTrustedAppsListPath(), path: getTrustedAppsListPath(),
state: { state: {
backButtonUrl: navigateBackToIngest[1]?.path backButtonUrl: navigateBackToIngest[1]?.path
? `${getUrlForApp('ingestManager')}${navigateBackToIngest[1].path}` ? `${getUrlForApp('fleet')}${navigateBackToIngest[1].path}`
: undefined, : undefined,
onBackButtonNavigateTo: navigateBackToIngest, onBackButtonNavigateTo: navigateBackToIngest,
backButtonLabel: i18n.translate( backButtonLabel: i18n.translate(
'xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.trustedAppsMessageReturnBackLabel', 'xpack.securitySolution.endpoint.fleet.editPackagePolicy.trustedAppsMessageReturnBackLabel',
{ defaultMessage: 'Back to Edit Integration' } { defaultMessage: 'Back to Edit Integration' }
), ),
}, },
@ -120,7 +120,7 @@ const EditFlowMessage = memo<{
data-test-subj="endpointActions" data-test-subj="endpointActions"
> >
<FormattedMessage <FormattedMessage
id="xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.menuButton" id="xpack.securitySolution.endpoint.fleet.editPackagePolicy.menuButton"
defaultMessage="Actions" defaultMessage="Actions"
/> />
</EuiButton> </EuiButton>
@ -135,7 +135,7 @@ const EditFlowMessage = memo<{
data-test-subj="securityPolicy" data-test-subj="securityPolicy"
> >
<FormattedMessage <FormattedMessage
id="xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionSecurityPolicy" id="xpack.securitySolution.endpoint.fleet.editPackagePolicy.actionSecurityPolicy"
defaultMessage="Edit Policy" defaultMessage="Edit Policy"
/> />
</EuiContextMenuItem>, </EuiContextMenuItem>,
@ -145,7 +145,7 @@ const EditFlowMessage = memo<{
data-test-subj="trustedAppsAction" data-test-subj="trustedAppsAction"
> >
<FormattedMessage <FormattedMessage
id="xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionTrustedApps" id="xpack.securitySolution.endpoint.fleet.editPackagePolicy.actionTrustedApps"
defaultMessage="Edit Trusted Applications" defaultMessage="Edit Trusted Applications"
/> />
</EuiContextMenuItem>, </EuiContextMenuItem>,
@ -156,7 +156,7 @@ const EditFlowMessage = memo<{
<EuiFlexGroup> <EuiFlexGroup>
<EuiFlexItem> <EuiFlexItem>
<FormattedMessage <FormattedMessage
id="xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.message" id="xpack.securitySolution.endpoint.fleet.editPackagePolicy.message"
defaultMessage="Access additional configuration options from the action menu" defaultMessage="Access additional configuration options from the action menu"
/> />
</EuiFlexItem> </EuiFlexItem>

View file

@ -147,7 +147,7 @@ export const PolicyList = React.memo(() => {
} = usePolicyListSelector(selector); } = usePolicyListSelector(selector);
const handleCreatePolicyClick = useNavigateToAppEventHandler<CreatePackagePolicyRouteState>( const handleCreatePolicyClick = useNavigateToAppEventHandler<CreatePackagePolicyRouteState>(
'ingestManager', 'fleet',
{ {
// We redirect to Ingest's Integaration page if we can't get the package version, and // We redirect to Ingest's Integaration page if we can't get the package version, and
// to the Integration Endpoint Package Add Integration if we have package information. // to the Integration Endpoint Package Add Integration if we have package information.
@ -339,9 +339,9 @@ export const PolicyList = React.memo(() => {
<EuiContextMenuItem icon="link" key="agentPolicyLink"> <EuiContextMenuItem icon="link" key="agentPolicyLink">
<LinkToApp <LinkToApp
data-test-subj="agentPolicyLink" data-test-subj="agentPolicyLink"
appId="ingestManager" appId="fleet"
appPath={`#/policies/${item.policy_id}`} appPath={`#/policies/${item.policy_id}`}
href={`${services.application.getUrlForApp('ingestManager')}#/policies/${ href={`${services.application.getUrlForApp('fleet')}#/policies/${
item.policy_id item.policy_id
}`} }`}
> >

View file

@ -331,8 +331,8 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
public start(core: CoreStart, plugins: StartPlugins) { public start(core: CoreStart, plugins: StartPlugins) {
KibanaServices.init({ ...core, ...plugins, kibanaVersion: this.kibanaVersion }); KibanaServices.init({ ...core, ...plugins, kibanaVersion: this.kibanaVersion });
if (plugins.ingestManager) { if (plugins.fleet) {
const { registerExtension } = plugins.ingestManager; const { registerExtension } = plugins.fleet;
registerExtension({ registerExtension({
package: 'endpoint', package: 'endpoint',

View file

@ -15,7 +15,7 @@ import { UiActionsStart } from '../../../../src/plugins/ui_actions/public';
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public'; import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
import { TelemetryManagementSectionPluginSetup } from '../../../../src/plugins/telemetry_management_section/public'; import { TelemetryManagementSectionPluginSetup } from '../../../../src/plugins/telemetry_management_section/public';
import { Storage } from '../../../../src/plugins/kibana_utils/public'; import { Storage } from '../../../../src/plugins/kibana_utils/public';
import { IngestManagerStart } from '../../fleet/public'; import { FleetStart } from '../../fleet/public';
import { PluginStart as ListsPluginStart } from '../../lists/public'; import { PluginStart as ListsPluginStart } from '../../lists/public';
import { import {
TriggersAndActionsUIPublicPluginSetup as TriggersActionsSetup, TriggersAndActionsUIPublicPluginSetup as TriggersActionsSetup,
@ -48,7 +48,7 @@ export interface StartPlugins {
data: DataPublicPluginStart; data: DataPublicPluginStart;
embeddable: EmbeddableStart; embeddable: EmbeddableStart;
inspector: InspectorStart; inspector: InspectorStart;
ingestManager?: IngestManagerStart; fleet?: FleetStart;
lists?: ListsPluginStart; lists?: ListsPluginStart;
licensing: LicensingPluginStart; licensing: LicensingPluginStart;
newsfeed?: NewsfeedPublicPluginStart; newsfeed?: NewsfeedPublicPluginStart;

View file

@ -10,7 +10,7 @@ import {
SavedObjectsClientContract, SavedObjectsClientContract,
} from 'src/core/server'; } from 'src/core/server';
import { SecurityPluginSetup } from '../../../security/server'; import { SecurityPluginSetup } from '../../../security/server';
import { AgentService, IngestManagerStartContract, PackageService } from '../../../fleet/server'; import { AgentService, FleetStartContract, PackageService } from '../../../fleet/server';
import { PluginStartContract as AlertsPluginStartContract } from '../../../alerts/server'; import { PluginStartContract as AlertsPluginStartContract } from '../../../alerts/server';
import { getPackagePolicyCreateCallback } from './ingest_integration'; import { getPackagePolicyCreateCallback } from './ingest_integration';
import { ManifestManager } from './services/artifacts'; import { ManifestManager } from './services/artifacts';
@ -66,7 +66,7 @@ export const createMetadataService = (packageService: PackageService): MetadataS
}; };
export type EndpointAppContextServiceStartContract = Partial< export type EndpointAppContextServiceStartContract = Partial<
Pick<IngestManagerStartContract, 'agentService' | 'packageService'> Pick<FleetStartContract, 'agentService' | 'packageService'>
> & { > & {
logger: Logger; logger: Logger;
manifestManager?: ManifestManager; manifestManager?: ManifestManager;
@ -74,7 +74,7 @@ export type EndpointAppContextServiceStartContract = Partial<
security: SecurityPluginSetup; security: SecurityPluginSetup;
alerts: AlertsPluginStartContract; alerts: AlertsPluginStartContract;
config: ConfigType; config: ConfigType;
registerIngestCallback?: IngestManagerStartContract['registerExternalCallback']; registerIngestCallback?: FleetStartContract['registerExternalCallback'];
savedObjectsStart: SavedObjectsServiceStart; savedObjectsStart: SavedObjectsServiceStart;
}; };

View file

@ -11,7 +11,7 @@ import { alertsMock } from '../../../alerts/server/mocks';
import { xpackMocks } from '../../../../mocks'; import { xpackMocks } from '../../../../mocks';
import { import {
AgentService, AgentService,
IngestManagerStartContract, FleetStartContract,
ExternalCallback, ExternalCallback,
PackageService, PackageService,
} from '../../../fleet/server'; } from '../../../fleet/server';
@ -74,8 +74,8 @@ export const createMockEndpointAppContextServiceStartContract = (): jest.Mocked<
alerts: alertsMock.createStart(), alerts: alertsMock.createStart(),
config, config,
registerIngestCallback: jest.fn< registerIngestCallback: jest.fn<
ReturnType<IngestManagerStartContract['registerExternalCallback']>, ReturnType<FleetStartContract['registerExternalCallback']>,
Parameters<IngestManagerStartContract['registerExternalCallback']> Parameters<FleetStartContract['registerExternalCallback']>
>(), >(),
}; };
}; };
@ -109,9 +109,7 @@ export const createMockAgentService = (): jest.Mocked<AgentService> => {
* @param indexPattern a string index pattern to return when called by a test * @param indexPattern a string index pattern to return when called by a test
* @returns the same value as `indexPattern` parameter * @returns the same value as `indexPattern` parameter
*/ */
export const createMockIngestManagerStartContract = ( export const createMockFleetStartContract = (indexPattern: string): FleetStartContract => {
indexPattern: string
): IngestManagerStartContract => {
return { return {
esIndexPatternService: { esIndexPatternService: {
getESIndexPattern: jest.fn().mockResolvedValue(indexPattern), getESIndexPattern: jest.fn().mockResolvedValue(indexPattern),

View file

@ -55,7 +55,7 @@ describe('test endpoint route', () => {
let routeHandler: RequestHandler<any, any, any>; let routeHandler: RequestHandler<any, any, any>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
let routeConfig: RouteConfig<any, any, any, any>; let routeConfig: RouteConfig<any, any, any, any>;
// tests assume that ingestManager is enabled, and thus agentService is available // tests assume that fleet is enabled, and thus agentService is available
let mockAgentService: Required< let mockAgentService: Required<
ReturnType<typeof createMockEndpointAppContextServiceStartContract> ReturnType<typeof createMockEndpointAppContextServiceStartContract>
>['agentService']; >['agentService'];

View file

@ -50,7 +50,7 @@ describe('test endpoint route v1', () => {
let routeHandler: RequestHandler<any, any, any>; let routeHandler: RequestHandler<any, any, any>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
let routeConfig: RouteConfig<any, any, any, any>; let routeConfig: RouteConfig<any, any, any, any>;
// tests assume that ingestManager is enabled, and thus agentService is available // tests assume that fleet is enabled, and thus agentService is available
let mockAgentService: Required< let mockAgentService: Required<
ReturnType<typeof createMockEndpointAppContextServiceStartContract> ReturnType<typeof createMockEndpointAppContextServiceStartContract>
>['agentService']; >['agentService'];

View file

@ -34,7 +34,7 @@ import { ListPluginSetup } from '../../lists/server';
import { EncryptedSavedObjectsPluginSetup as EncryptedSavedObjectsSetup } from '../../encrypted_saved_objects/server'; import { EncryptedSavedObjectsPluginSetup as EncryptedSavedObjectsSetup } from '../../encrypted_saved_objects/server';
import { SpacesPluginSetup as SpacesSetup } from '../../spaces/server'; import { SpacesPluginSetup as SpacesSetup } from '../../spaces/server';
import { ILicense, LicensingPluginStart } from '../../licensing/server'; import { ILicense, LicensingPluginStart } from '../../licensing/server';
import { IngestManagerStartContract, ExternalCallback } from '../../fleet/server'; import { FleetStartContract, ExternalCallback } from '../../fleet/server';
import { TaskManagerSetupContract, TaskManagerStartContract } from '../../task_manager/server'; import { TaskManagerSetupContract, TaskManagerStartContract } from '../../task_manager/server';
import { initServer } from './init_server'; import { initServer } from './init_server';
import { compose } from './lib/compose/kibana'; import { compose } from './lib/compose/kibana';
@ -93,7 +93,7 @@ export interface SetupPlugins {
export interface StartPlugins { export interface StartPlugins {
alerts: AlertPluginStartContract; alerts: AlertPluginStartContract;
data: DataPluginStart; data: DataPluginStart;
ingestManager?: IngestManagerStartContract; fleet?: FleetStartContract;
licensing: LicensingPluginStart; licensing: LicensingPluginStart;
taskManager?: TaskManagerStartContract; taskManager?: TaskManagerStartContract;
telemetry?: TelemetryPluginStart; telemetry?: TelemetryPluginStart;
@ -326,27 +326,27 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
let registerIngestCallback: ((...args: ExternalCallback) => void) | undefined; let registerIngestCallback: ((...args: ExternalCallback) => void) | undefined;
const exceptionListsStartEnabled = () => { const exceptionListsStartEnabled = () => {
return this.lists && plugins.taskManager && plugins.ingestManager; return this.lists && plugins.taskManager && plugins.fleet;
}; };
if (exceptionListsStartEnabled()) { if (exceptionListsStartEnabled()) {
const exceptionListClient = this.lists!.getExceptionListClient(savedObjectsClient, 'kibana'); const exceptionListClient = this.lists!.getExceptionListClient(savedObjectsClient, 'kibana');
const artifactClient = new ArtifactClient(savedObjectsClient); const artifactClient = new ArtifactClient(savedObjectsClient);
registerIngestCallback = plugins.ingestManager!.registerExternalCallback; registerIngestCallback = plugins.fleet!.registerExternalCallback;
manifestManager = new ManifestManager({ manifestManager = new ManifestManager({
savedObjectsClient, savedObjectsClient,
artifactClient, artifactClient,
exceptionListClient, exceptionListClient,
packagePolicyService: plugins.ingestManager!.packagePolicyService, packagePolicyService: plugins.fleet!.packagePolicyService,
logger: this.logger, logger: this.logger,
cache: this.exceptionsCache, cache: this.exceptionsCache,
}); });
} }
this.endpointAppContextService.start({ this.endpointAppContextService.start({
agentService: plugins.ingestManager?.agentService, agentService: plugins.fleet?.agentService,
packageService: plugins.ingestManager?.packageService, packageService: plugins.fleet?.packageService,
appClientFactory: this.appClientFactory, appClientFactory: this.appClientFactory,
security: this.setupPlugins!.security!, security: this.setupPlugins!.security!,
alerts: plugins.alerts, alerts: plugins.alerts,

View file

@ -15130,10 +15130,6 @@
"xpack.observability.home.sectionsubtitle": "ログ、メトリック、トレースを大規模に、1つのスタックにまとめて、環境内のあらゆる場所で生じるイベントの監視、分析、対応を行います。", "xpack.observability.home.sectionsubtitle": "ログ、メトリック、トレースを大規模に、1つのスタックにまとめて、環境内のあらゆる場所で生じるイベントの監視、分析、対応を行います。",
"xpack.observability.home.sectionTitle": "エコシステム全体の一元的な可視性", "xpack.observability.home.sectionTitle": "エコシステム全体の一元的な可視性",
"xpack.observability.home.title": "オブザーバビリティ", "xpack.observability.home.title": "オブザーバビリティ",
"xpack.observability.ingestManager.beta": "ベータ",
"xpack.observability.ingestManager.button": "Ingest Managerベータを試す",
"xpack.observability.ingestManager.text": "Elasticエージェントでは、シンプルかつ統合された方法で、ログ、メトリック、他の種類のデータの監視をホストに追加することができます。複数のBeatsと他のエージェントをインストールする必要はありません。このため、インフラストラクチャ全体での構成のデプロイが簡単で高速になりました。",
"xpack.observability.ingestManager.title": "新しいIngest Managerをご覧になりましたか?",
"xpack.observability.landing.breadcrumb": "はじめて使う", "xpack.observability.landing.breadcrumb": "はじめて使う",
"xpack.observability.news.readFullStory": "詳細なストーリーを読む", "xpack.observability.news.readFullStory": "詳細なストーリーを読む",
"xpack.observability.news.title": "新機能", "xpack.observability.news.title": "新機能",
@ -17435,12 +17431,6 @@
"xpack.securitySolution.endpoint.details.policyResponse.workflow": "ワークフロー", "xpack.securitySolution.endpoint.details.policyResponse.workflow": "ワークフロー",
"xpack.securitySolution.endpoint.details.policyStatus": "ポリシー応答", "xpack.securitySolution.endpoint.details.policyStatus": "ポリシー応答",
"xpack.securitySolution.endpoint.details.policyStatusValue": "{policyStatus, select, success {成功} warning {警告} failure {失敗} other {不明}}", "xpack.securitySolution.endpoint.details.policyStatusValue": "{policyStatus, select, success {成功} warning {警告} failure {失敗} other {不明}}",
"xpack.securitySolution.endpoint.ingestManager.createPackagePolicy.endpointConfiguration": "推奨のデフォルト値で統合が保存されます。後からこれを変更するには、エージェントポリシー内でEndpoint Security統合を編集します。",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionSecurityPolicy": "セキュリティポリシーを編集",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionTrustedApps": "信頼できるアプリケーションを表示",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.menuButton": "アクション",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.message": "詳細構成オプションを表示するには、メニューからアクションを選択します。",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.trustedAppsMessageReturnBackLabel": "統合の編集に戻る",
"xpack.securitySolution.endpoint.ingestToastMessage": "Ingest Managerが設定中に失敗しました。", "xpack.securitySolution.endpoint.ingestToastMessage": "Ingest Managerが設定中に失敗しました。",
"xpack.securitySolution.endpoint.ingestToastTitle": "アプリを初期化できませんでした", "xpack.securitySolution.endpoint.ingestToastTitle": "アプリを初期化できませんでした",
"xpack.securitySolution.endpoint.list.actionmenu": "開く", "xpack.securitySolution.endpoint.list.actionmenu": "開く",

View file

@ -15148,10 +15148,6 @@
"xpack.observability.home.sectionsubtitle": "通过根据需要将日志、指标和跟踪都置于单个堆栈上,来监测、分析和响应环境中任何位置发生的事件。", "xpack.observability.home.sectionsubtitle": "通过根据需要将日志、指标和跟踪都置于单个堆栈上,来监测、分析和响应环境中任何位置发生的事件。",
"xpack.observability.home.sectionTitle": "整个生态系统的统一可见性", "xpack.observability.home.sectionTitle": "整个生态系统的统一可见性",
"xpack.observability.home.title": "可观测性", "xpack.observability.home.title": "可观测性",
"xpack.observability.ingestManager.beta": "公测版",
"xpack.observability.ingestManager.button": "试用采集管理器公测版",
"xpack.observability.ingestManager.text": "通过 Elastic 代理,可以简单统一的方式将日志、指标和其他类型数据的监测添加到主机。不再需要安装多个 Beats 和其他代理,这简化和加快了将配置部署到整个基础设施的过程。",
"xpack.observability.ingestManager.title": "是否见过我们的新型采集管理器?",
"xpack.observability.landing.breadcrumb": "入门", "xpack.observability.landing.breadcrumb": "入门",
"xpack.observability.news.readFullStory": "详细了解", "xpack.observability.news.readFullStory": "详细了解",
"xpack.observability.news.title": "最近的新闻", "xpack.observability.news.title": "最近的新闻",
@ -17453,12 +17449,6 @@
"xpack.securitySolution.endpoint.details.policyResponse.workflow": "工作流", "xpack.securitySolution.endpoint.details.policyResponse.workflow": "工作流",
"xpack.securitySolution.endpoint.details.policyStatus": "策略响应", "xpack.securitySolution.endpoint.details.policyStatus": "策略响应",
"xpack.securitySolution.endpoint.details.policyStatusValue": "{policyStatus, select, success {成功} warning {警告} failure {失败} other {未知}}", "xpack.securitySolution.endpoint.details.policyStatusValue": "{policyStatus, select, success {成功} warning {警告} failure {失败} other {未知}}",
"xpack.securitySolution.endpoint.ingestManager.createPackagePolicy.endpointConfiguration": "我们将使用建议的默认值保存您的集成。稍后,您可以通过在代理策略中编辑 Endpoint Security 集成对其进行更改。",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionSecurityPolicy": "编辑安全策略",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionTrustedApps": "查看受信任的应用程序",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.menuButton": "操作",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.message": "通过从菜单中选择操作可找到更多高级配置选项",
"xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.trustedAppsMessageReturnBackLabel": "返回以编辑集成",
"xpack.securitySolution.endpoint.ingestToastMessage": "采集管理器在其设置期间失败。", "xpack.securitySolution.endpoint.ingestToastMessage": "采集管理器在其设置期间失败。",
"xpack.securitySolution.endpoint.ingestToastTitle": "应用无法初始化", "xpack.securitySolution.endpoint.ingestToastTitle": "应用无法初始化",
"xpack.securitySolution.endpoint.list.actionmenu": "打开", "xpack.securitySolution.endpoint.list.actionmenu": "打开",

View file

@ -115,7 +115,7 @@ export default function ({ getService }: FtrProviderContext) {
'maps', 'maps',
'uptime', 'uptime',
'siem', 'siem',
'ingestManager', 'fleet',
].sort() ].sort()
); );
}); });

View file

@ -38,7 +38,7 @@ export default function ({ getService }: FtrProviderContext) {
apm: ['all', 'read'], apm: ['all', 'read'],
ml: ['all', 'read'], ml: ['all', 'read'],
siem: ['all', 'read'], siem: ['all', 'read'],
ingestManager: ['all', 'read'], fleet: ['all', 'read'],
stackAlerts: ['all', 'read'], stackAlerts: ['all', 'read'],
actions: ['all', 'read'], actions: ['all', 'read'],
}, },

View file

@ -36,7 +36,7 @@ export default function ({ getService }: FtrProviderContext) {
apm: ['all', 'read'], apm: ['all', 'read'],
ml: ['all', 'read'], ml: ['all', 'read'],
siem: ['all', 'read'], siem: ['all', 'read'],
ingestManager: ['all', 'read'], fleet: ['all', 'read'],
stackAlerts: ['all', 'read'], stackAlerts: ['all', 'read'],
actions: ['all', 'read'], actions: ['all', 'read'],
}, },

View file

@ -15,7 +15,7 @@ export default function ({ getService }: FtrProviderContext) {
fleet_user: { fleet_user: {
permissions: { permissions: {
feature: { feature: {
ingestManager: ['read'], fleet: ['read'],
}, },
spaces: ['*'], spaces: ['*'],
}, },
@ -25,7 +25,7 @@ export default function ({ getService }: FtrProviderContext) {
fleet_admin: { fleet_admin: {
permissions: { permissions: {
feature: { feature: {
ingestManager: ['all'], fleet: ['all'],
}, },
spaces: ['*'], spaces: ['*'],
}, },

View file

@ -26,7 +26,7 @@ export default function ({ getService }: FtrProviderContext) {
fleet_user: { fleet_user: {
permissions: { permissions: {
feature: { feature: {
ingestManager: ['read'], fleet: ['read'],
}, },
spaces: ['*'], spaces: ['*'],
}, },
@ -36,7 +36,7 @@ export default function ({ getService }: FtrProviderContext) {
fleet_admin: { fleet_admin: {
permissions: { permissions: {
feature: { feature: {
ingestManager: ['all'], fleet: ['all'],
}, },
spaces: ['*'], spaces: ['*'],
}, },

View file

@ -98,7 +98,7 @@ export function IngestManagerCreatePackagePolicy({
* Navigates to the Ingest Agent configuration Edit Package Policy page * Navigates to the Ingest Agent configuration Edit Package Policy page
*/ */
async navigateToAgentPolicyEditPackagePolicy(agentPolicyId: string, packagePolicyId: string) { async navigateToAgentPolicyEditPackagePolicy(agentPolicyId: string, packagePolicyId: string) {
await pageObjects.common.navigateToApp('ingestManager', { await pageObjects.common.navigateToApp('fleet', {
hash: `/policies/${agentPolicyId}/edit-integration/${packagePolicyId}`, hash: `/policies/${agentPolicyId}/edit-integration/${packagePolicyId}`,
}); });
await this.ensureOnEditPageOrFail(); await this.ensureOnEditPageOrFail();