Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[7.x] [Ingest Manager] Replace AgentAssetType enum with new approach (#82387) #82673

Merged
merged 1 commit into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions x-pack/plugins/ingest_manager/common/constants/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const requiredPackages = {
Endpoint: 'endpoint',
} as const;

export const agentAssetTypes = {
Input: 'input',
} as const;

export const dataTypes = {
Logs: 'logs',
Metrics: 'metrics',
Expand Down
10 changes: 4 additions & 6 deletions x-pack/plugins/ingest_manager/common/types/models/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
// Follow pattern from https://github.com/elastic/kibana/pull/52447
// TODO: Update when https://github.com/elastic/kibana/issues/53021 is closed
import { SavedObject, SavedObjectAttributes, SavedObjectReference } from 'src/core/public';
import { dataTypes, requiredPackages } from '../../constants';
import { agentAssetTypes, dataTypes, requiredPackages } from '../../constants';
import { ValueOf } from '../../types';

export enum InstallationStatus {
installed = 'installed',
Expand All @@ -27,7 +28,8 @@ export type EpmPackageInstallStatus = 'installed' | 'installing';

export type DetailViewPanelName = 'overview' | 'usages' | 'settings';
export type ServiceName = 'kibana' | 'elasticsearch';
export type AssetType = KibanaAssetType | ElasticsearchAssetType | AgentAssetType;
export type AgentAssetType = typeof agentAssetTypes;
export type AssetType = KibanaAssetType | ElasticsearchAssetType | ValueOf<AgentAssetType>;

export enum KibanaAssetType {
dashboard = 'dashboard',
Expand All @@ -47,10 +49,6 @@ export enum ElasticsearchAssetType {

export type DataType = typeof dataTypes;

export enum AgentAssetType {
input = 'input',
}

export type RegistryRelease = 'ga' | 'beta' | 'experimental';

// Fields common to packages that come from direct upload and the registry
Expand Down