mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ML] Transforms: Adds retention policy options to transform UI. (#91162)
Adds retention policy options to the transform UI.
This commit is contained in:
parent
3fe5228731
commit
073cd4d508
14 changed files with 614 additions and 128 deletions
|
@ -51,6 +51,13 @@ export type PivotConfig = TypeOf<typeof pivotSchema>;
|
|||
|
||||
export type LatestFunctionConfig = TypeOf<typeof latestFunctionSchema>;
|
||||
|
||||
export const retentionPolicySchema = schema.object({
|
||||
time: schema.object({
|
||||
field: schema.string(),
|
||||
max_age: schema.string(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const settingsSchema = schema.object({
|
||||
max_page_search_size: schema.maybe(schema.number()),
|
||||
// The default value is null, which disables throttling.
|
||||
|
@ -94,6 +101,7 @@ export const putTransformsRequestSchema = schema.object(
|
|||
* Latest and pivot are mutually exclusive, i.e. exactly one must be specified in the transform configuration
|
||||
*/
|
||||
latest: schema.maybe(latestFunctionSchema),
|
||||
retention_policy: schema.maybe(retentionPolicySchema),
|
||||
settings: schema.maybe(settingsSchema),
|
||||
source: sourceSchema,
|
||||
sync: schema.maybe(syncSchema),
|
||||
|
|
|
@ -9,7 +9,7 @@ import { schema, TypeOf } from '@kbn/config-schema';
|
|||
|
||||
import { TransformPivotConfig } from '../types/transform';
|
||||
|
||||
import { settingsSchema, sourceSchema, syncSchema } from './transforms';
|
||||
import { retentionPolicySchema, settingsSchema, sourceSchema, syncSchema } from './transforms';
|
||||
|
||||
// POST _transform/{transform_id}/_update
|
||||
export const postTransformsUpdateRequestSchema = schema.object({
|
||||
|
@ -22,6 +22,7 @@ export const postTransformsUpdateRequestSchema = schema.object({
|
|||
})
|
||||
),
|
||||
frequency: schema.maybe(schema.string()),
|
||||
retention_policy: schema.maybe(retentionPolicySchema),
|
||||
settings: schema.maybe(settingsSchema),
|
||||
source: schema.maybe(sourceSchema),
|
||||
sync: schema.maybe(syncSchema),
|
||||
|
|
|
@ -33,6 +33,8 @@ export interface TransformStats {
|
|||
attributes: Record<string, any>;
|
||||
};
|
||||
stats: {
|
||||
delete_time_in_ms: number;
|
||||
documents_deleted: number;
|
||||
documents_indexed: number;
|
||||
documents_processed: number;
|
||||
index_failures: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue