[ML] Add better UI support for runtime fields Transforms (#90363)

* [ML] Add RT support for transforms from index pattern

* [ML] Add support for cloned transform from api

* [ML] Add support for runtime pivot

* [ML] Add support for api created runtime

* [ML] Add preview for expanded row

* [ML] Add runtime fields to dropdown options

* [ML] Add runtime fields to latest

* [ML] Fix duplicate columns

* [ML] Update types and test

* [ML] Add runtime mappings to index pattern on creation

* [ML] Add callout to show unsupported fields in dfa

* [ML] Update types to RuntimeField

* [ML] Fix runtime fields, remove runtime mappings, fix copy to console

* [ML] Fix incompatible kbn field type

* [ML] Add advanced mappings editor

* [ML] Add support for filter terms agg control

* [ML] Fix jest tests hanging

* [ML] Fix translations

* [ML] Fix over-sized buttons for filter range

* [ML] Update runtime mappings schema

* [ML] Update runtime mappings schema

* [ML] Use isRecord for object checks

* [ML] Fix and more message

* [ML] Update schema to correctly match types

* [ML] Update schema to correctly match types

* [ML] Fix pivot duplicates

* [ML] Rename isRecord to isPopulatedObject

* [ML] Remove fit-content

* [ML] Update runtime field type to prevent potential conflicts

* Revert "[ML] Remove fit-content"

This reverts commit 76c9c799

* [ML] Remove misc comment

* [ML] Fix missing typeof

* [ML] Add sorts and constants

* [ML] Add i18n to includedFields description

* [ML] fix imports

* [ML] Only pass runtime mappings if it's latest

* [ML] Fix functional tests
This commit is contained in:
Quynh Nguyen 2021-02-16 20:00:02 -06:00 committed by GitHub
parent 540b1d365d
commit 63ac0f74be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 1224 additions and 145 deletions

View file

@ -64,7 +64,30 @@ export const settingsSchema = schema.object({
docs_per_second: schema.maybe(schema.nullable(schema.number())),
});
export const runtimeMappingsSchema = schema.maybe(
schema.recordOf(
schema.string(),
schema.object({
type: schema.oneOf([
schema.literal('keyword'),
schema.literal('long'),
schema.literal('double'),
schema.literal('date'),
schema.literal('ip'),
schema.literal('boolean'),
]),
script: schema.oneOf([
schema.string(),
schema.object({
source: schema.string(),
}),
]),
})
)
);
export const sourceSchema = schema.object({
runtime_mappings: runtimeMappingsSchema,
index: schema.oneOf([schema.string(), schema.arrayOf(schema.string())]),
query: schema.maybe(schema.recordOf(schema.string(), schema.any())),
});