From 884704d847ef170928bd59c725a2ef95a2ee1200 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Wed, 3 Jun 2020 15:15:30 +0200 Subject: [PATCH] relax color rule validation (#67759) --- .../vis_type_timeseries/server/routes/post_vis_schema.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/vis_type_timeseries/server/routes/post_vis_schema.ts b/src/plugins/vis_type_timeseries/server/routes/post_vis_schema.ts index c74d1dd72d761..e8838f57ae365 100644 --- a/src/plugins/vis_type_timeseries/server/routes/post_vis_schema.ts +++ b/src/plugins/vis_type_timeseries/server/routes/post_vis_schema.ts @@ -66,6 +66,7 @@ const backgroundColorRulesItems = schema.object({ id: stringOptionalNullable, background_color: stringOptionalNullable, color: stringOptionalNullable, + operator: stringOptionalNullable, }); const gaugeColorRulesItems = schema.object({ @@ -73,7 +74,7 @@ const gaugeColorRulesItems = schema.object({ text: stringOptionalNullable, id: stringOptionalNullable, operator: stringOptionalNullable, - value: schema.number(), + value: schema.maybe(schema.nullable(schema.number())), }); const metricsItems = schema.object({ field: stringOptionalNullable,