Skip to content

Commit

Permalink
more renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Nov 11, 2020
1 parent 95e05a7 commit a48b2a6
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 18 deletions.
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
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/public/applications/fleet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,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
12 changes: 6 additions & 6 deletions x-pack/plugins/fleet/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ import { registerPackagePolicyComponent } from './applications/fleet/sections/ag

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.
// eslint-disable-next-line @typescript-eslint/no-empty-interface
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 FleetStart {
registerPackagePolicyComponent: typeof registerPackagePolicyComponent;
Expand Down Expand Up @@ -76,7 +76,7 @@ export class FleetPlugin implements Plugin<FleetSetup, FleetStart, FleetSetupDep
// Set up license service
licenseService.start(deps.licensing.license$);

// Register main Ingest Manager app
// Register main Fleet app
core.application.register({
id: PLUGIN_ID,
category: DEFAULT_APP_CATEGORIES.management,
Expand All @@ -89,12 +89,12 @@ export class FleetPlugin implements Plugin<FleetSetup, FleetStart, FleetSetupDep
FleetStartDeps,
FleetStart
];
const { renderApp, teardownIngestManager } = await import('./applications/fleet/');
const { renderApp, teardownFleet } = await import('./applications/fleet/');
const unmount = renderApp(coreStart, params, deps, startDeps, config, kibanaVersion);

return () => {
unmount();
teardownIngestManager(coreStart);
teardownFleet(coreStart);
};
},
});
Expand All @@ -104,7 +104,7 @@ export class FleetPlugin implements Plugin<FleetSetup, FleetStart, FleetSetupDep
id: 'ingestManager',
category: DEFAULT_APP_CATEGORIES.management,
navLinkStatus: AppNavLinkStatus.hidden,
title: i18n.translate('xpack.ingestManager.appTitle', { defaultMessage: 'Ingest Manager' }),
title: i18n.translate('xpack.fleet.oldAppTitle', { defaultMessage: 'Ingest Manager' }),
async mount(params: AppMountParameters) {
const [coreStart] = await core.getStartServices();
coreStart.application.navigateToApp('fleet', {
Expand Down

0 comments on commit a48b2a6

Please sign in to comment.