Skip to content

Commit

Permalink
[Fleet] Rename ingestManager plugin ID fleet (elastic#83200)
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet authored and chrisronline committed Nov 19, 2020
1 parent b704035 commit ca6ffe3
Show file tree
Hide file tree
Showing 78 changed files with 277 additions and 317 deletions.
8 changes: 4 additions & 4 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ and actions.
|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]
|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
Expand Down Expand Up @@ -413,10 +417,6 @@ Index Management by running this series of requests in Console:
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]
|The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest nodes. Please refer to the Elasticsearch documentation for more details.
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pageLoadAssetSize:
indexManagement: 140608
indexPatternManagement: 154222
infra: 197873
ingestManager: 415829
fleet: 415829
ingestPipelines: 58003
inputControlVis: 172675
inspector: 148711
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async function init() {
indexPatterns: ['read'],
savedObjectsManagement: ['read'],
stackAlerts: ['read'],
ingestManager: ['read'],
fleet: ['read'],
actions: ['read'],
},
},
Expand Down Expand Up @@ -181,7 +181,7 @@ async function init() {
indexPatterns: ['all'],
savedObjectsManagement: ['all'],
stackAlerts: ['all'],
ingestManager: ['all'],
fleet: ['all'],
actions: ['all'],
},
},
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/fleet/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ingest Manager
# Fleet

## Plugin

Expand Down Expand Up @@ -46,6 +46,8 @@ One common development workflow is:
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.

Note: The plugin was previously named Ingest Manager it's possible that some variables are still named with that old plugin name.

### Tests

#### API integration tests
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/constants/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* or more contributor license agreements. Licensed under 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';
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { decodeCloudId } from './decode_cloud_id';

describe('Ingest Manager - decodeCloudId', () => {
describe('Fleet - decodeCloudId', () => {
it('parses various CloudID formats', () => {
const tests = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const getAgent = ({
}
return agent;
};
describe('Ingest Manager - isAgentUpgradeable', () => {
describe('Fleet - isAgentUpgradeable', () => {
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);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { isDiffPathProtocol } from './is_diff_path_protocol';

describe('Ingest Manager - isDiffPathProtocol', () => {
describe('Fleet - isDiffPathProtocol', () => {
it('returns true for different paths', () => {
expect(
isDiffPathProtocol([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { isValidNamespace } from './is_valid_namespace';

describe('Ingest Manager - isValidNamespace', () => {
describe('Fleet - isValidNamespace', () => {
it('returns true for valid namespaces', () => {
expect(isValidNamespace('default').valid).toBe(true);
expect(isValidNamespace('namespace-with-dash').valid).toBe(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { PackagePolicy, PackagePolicyInput } from '../types';
import { storedPackagePoliciesToAgentInputs } from './package_policies_to_agent_inputs';

describe('Ingest Manager - storedPackagePoliciesToAgentInputs', () => {
describe('Fleet - storedPackagePoliciesToAgentInputs', () => {
const mockPackagePolicy: PackagePolicy = {
id: 'some-uuid',
name: 'mock-package-policy',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { installationStatuses } from '../constants';
import { PackageInfo } from '../types';
import { packageToPackagePolicy, packageToPackagePolicyInputs } from './package_to_package_policy';

describe('Ingest Manager - packageToPackagePolicy', () => {
describe('Fleet - packageToPackagePolicy', () => {
const mockPackage: PackageInfo = {
name: 'mock-package',
title: 'Mock package',
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export * from './models';
export * from './rest_spec';

export interface IngestManagerConfigType {
export interface FleetConfigType {
enabled: boolean;
registryUrl?: string;
registryProxyUrl?: string;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/kibana.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "ingestManager",
"id": "fleet",
"version": "kibana",
"server": true,
"ui": true,
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/fleet/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Elastic",
"name": "ingest-manager",
"name": "fleet",
"version": "8.0.0",
"private": true,
"license": "Elastic-License"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface DynamicPagePathValues {
[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
// `pagePathGetters()`, below, needs any modifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import { useCore } from './';

export function useCapabilities() {
const core = useCore();
return core.application.capabilities.ingestManager;
return core.application.capabilities.fleet;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

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() {
const config = useContext(ConfigContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*/

import React, { useContext } from 'react';
import { IngestManagerSetupDeps, IngestManagerStartDeps } from '../../../plugin';
import { FleetSetupDeps, FleetStartDeps } from '../../../plugin';

export const DepsContext = React.createContext<{
setup: IngestManagerSetupDeps;
start: IngestManagerStartDeps;
setup: FleetSetupDeps;
start: FleetStartDeps;
} | null>(null);

export function useSetupDeps() {
Expand Down
20 changes: 8 additions & 12 deletions x-pack/plugins/fleet/public/applications/fleet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ import { EuiErrorBoundary, EuiPanel, EuiEmptyPrompt, EuiCode } from '@elastic/eu
import { CoreStart, AppMountParameters } from 'src/core/public';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
import { EuiThemeProvider } from '../../../../xpack_legacy/common';
import {
IngestManagerSetupDeps,
IngestManagerConfigType,
IngestManagerStartDeps,
} from '../../plugin';
import { FleetSetupDeps, FleetConfigType, FleetStartDeps } from '../../plugin';
import { PAGE_ROUTING_PATHS } from './constants';
import { DefaultLayout, WithoutHeaderLayout } from './layouts';
import { Loading, Error } from './components';
Expand Down Expand Up @@ -241,9 +237,9 @@ const IngestManagerApp = ({
}: {
basepath: string;
coreStart: CoreStart;
setupDeps: IngestManagerSetupDeps;
startDeps: IngestManagerStartDeps;
config: IngestManagerConfigType;
setupDeps: FleetSetupDeps;
startDeps: FleetStartDeps;
config: FleetConfigType;
history: AppMountParameters['history'];
kibanaVersion: string;
extensions: UIExtensionsStorage;
Expand Down Expand Up @@ -271,9 +267,9 @@ const IngestManagerApp = ({
export function renderApp(
coreStart: CoreStart,
{ element, appBasePath, history }: AppMountParameters,
setupDeps: IngestManagerSetupDeps,
startDeps: IngestManagerStartDeps,
config: IngestManagerConfigType,
setupDeps: FleetSetupDeps,
startDeps: FleetStartDeps,
config: FleetConfigType,
kibanaVersion: string,
extensions: UIExtensionsStorage
) {
Expand All @@ -296,7 +292,7 @@ export function renderApp(
};
}

export const teardownIngestManager = (coreStart: CoreStart) => {
export const teardownFleet = (coreStart: CoreStart) => {
coreStart.chrome.docTitle.reset();
coreStart.chrome.setBreadcrumbs([]);
licenseService.stop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { hasInvalidButRequiredVar } from './has_invalid_but_required_var';

describe('Ingest Manager - hasInvalidButRequiredVar', () => {
describe('Fleet - hasInvalidButRequiredVar', () => {
it('returns true for invalid & required vars', () => {
expect(
hasInvalidButRequiredVar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
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', () => {
expect(
isAdvancedVar({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { installationStatuses } from '../../../../../../../common/constants';
import { PackageInfo, NewPackagePolicy, RegistryPolicyTemplate } from '../../../../types';
import { validatePackagePolicy, validationHasErrors } from './validate_package_policy';

describe('Ingest Manager - validatePackagePolicy()', () => {
describe('Fleet - validatePackagePolicy()', () => {
const mockPackage = ({
name: 'mock-package',
title: 'Mock package',
Expand Down Expand Up @@ -496,7 +496,7 @@ describe('Ingest Manager - validatePackagePolicy()', () => {
});
});

describe('Ingest Manager - validationHasErrors()', () => {
describe('Fleet - validationHasErrors()', () => {
it('returns true for stream validation results with errors', () => {
expect(
validationHasErrors({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const AgentUnenrollAgentModal: React.FunctionComponent<Props> = ({
}}
>
<EuiCheckbox
id="ingestManagerForceUnenrollAgents"
id="fleetForceUnenrollAgents"
label={
<FormattedMessage
id="xpack.fleet.unenrollAgents.forceUnenrollCheckboxLabel"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React from 'react';
import { HashRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
import { PAGE_ROUTING_PATHS } from '../../constants';
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 { SetupPage } from './setup_page';
import { AgentDetailsPage } from './agent_details_page';
Expand All @@ -17,8 +17,8 @@ import { ListLayout } from './components/list_layout';

export const FleetApp: React.FunctionComponent = () => {
useBreadcrumbs('fleet');
const core = useCore();
const { agents } = useConfig();
const capabilities = useCapabilities();

const fleetStatus = useFleetStatus();

Expand All @@ -35,7 +35,7 @@ export const FleetApp: React.FunctionComponent = () => {
/>
);
}
if (!core.application.capabilities.ingestManager.read) {
if (!capabilities.read) {
return <NoAccessPage />;
}

Expand Down
6 changes: 3 additions & 3 deletions x-pack/plugins/fleet/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
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) => {
return new IngestManagerPlugin(initializerContext);
return new FleetPlugin(initializerContext);
};

export type { NewPackagePolicy } from './applications/fleet/types';
Expand Down
Loading

0 comments on commit ca6ffe3

Please sign in to comment.