[ML] Adds waiting state for transforms. (#98592)

When no transform nodes are available, existing continuous transform end up in a waiting state. This PR adds support for this state in the transforms UI. Without the fix, transforms in a waiting state would fail to show up in the transform list.
This commit is contained in:
Walter Rafelsberger 2021-04-29 10:17:22 +02:00 committed by GitHub
parent fe48ae396b
commit 42d361c644
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View file

@ -17,6 +17,7 @@ export const transformIdsSchema = schema.arrayOf(
export type TransformIdsSchema = TypeOf<typeof transformIdsSchema>;
// reflects https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/TransformStats.java#L250
export const transformStateSchema = schema.oneOf([
schema.literal(TRANSFORM_STATE.ABORTING),
schema.literal(TRANSFORM_STATE.FAILED),
@ -24,6 +25,7 @@ export const transformStateSchema = schema.oneOf([
schema.literal(TRANSFORM_STATE.STARTED),
schema.literal(TRANSFORM_STATE.STOPPED),
schema.literal(TRANSFORM_STATE.STOPPING),
schema.literal(TRANSFORM_STATE.WAITING),
]);
export const indexPatternTitleSchema = schema.object({

View file

@ -77,7 +77,7 @@ export const APP_CREATE_TRANSFORM_CLUSTER_PRIVILEGES = [
export const APP_INDEX_PRIVILEGES = ['monitor'];
// reflects https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransformStats.java#L243
// reflects https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/TransformStats.java#L250
export const TRANSFORM_STATE = {
ABORTING: 'aborting',
FAILED: 'failed',
@ -85,6 +85,7 @@ export const TRANSFORM_STATE = {
STARTED: 'started',
STOPPED: 'stopped',
STOPPING: 'stopping',
WAITING: 'waiting',
} as const;
const transformStates = Object.values(TRANSFORM_STATE);