Skip to content
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
16 changes: 15 additions & 1 deletion x-pack/plugins/ml/common/types/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface ModuleJob {

export interface ModuleDatafeed {
id: string;
job_id: string;
config: Omit<Datafeed, 'datafeed_id'>;
}

Expand Down Expand Up @@ -48,14 +49,27 @@ export interface Module {
title: string;
description: string;
type: string;
logoFile: string;
logoFile?: string;
logo?: Logo;
defaultIndexPattern: string;
query: any;
jobs: ModuleJob[];
datafeeds: ModuleDatafeed[];
kibana: KibanaObjects;
}

export interface FileBasedModule extends Omit<Module, 'jobs' | 'datafeeds' | 'kibana'> {
jobs: Array<{ file: string; id: string }>;
datafeeds: Array<{ file: string; job_id: string; id: string }>;
kibana: {
search: Array<{ file: string; id: string }>;
visualization: Array<{ file: string; id: string }>;
dashboard: Array<{ file: string; id: string }>;
};
}

export type Logo = { icon: string } | null;

export interface ResultItem {
id: string;
success?: boolean;
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/ml/common/types/saved_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

export type JobType = 'anomaly-detector' | 'data-frame-analytics';
export const ML_SAVED_OBJECT_TYPE = 'ml-job';
export const ML_MODULE_SAVED_OBJECT_TYPE = 'ml-module';

export interface SavedObjectResult {
[jobId: string]: { success: boolean; error?: any };
Expand Down
Loading