mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
make EntityDefinition 'type' a plain string instead of an enum (#187451)
make EntityDefinition 'type' a plain string instead of an enum
This commit is contained in:
parent
93e127e44d
commit
19db776f4f
2 changed files with 1 additions and 11 deletions
|
@ -8,17 +8,8 @@
|
|||
import { z } from 'zod';
|
||||
import moment from 'moment';
|
||||
|
||||
export enum EntityType {
|
||||
service = 'service',
|
||||
host = 'host',
|
||||
pod = 'pod',
|
||||
node = 'node',
|
||||
}
|
||||
|
||||
export const arrayOfStringsSchema = z.array(z.string());
|
||||
|
||||
export const entityTypeSchema = z.nativeEnum(EntityType);
|
||||
|
||||
export enum BasicAggregations {
|
||||
avg = 'avg',
|
||||
max = 'max',
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import { z } from 'zod';
|
||||
import {
|
||||
arrayOfStringsSchema,
|
||||
entityTypeSchema,
|
||||
keyMetricSchema,
|
||||
metadataSchema,
|
||||
filterSchema,
|
||||
|
@ -20,7 +19,7 @@ export const entityDefinitionSchema = z.object({
|
|||
id: z.string().regex(/^[\w-]+$/),
|
||||
name: z.string(),
|
||||
description: z.optional(z.string()),
|
||||
type: entityTypeSchema,
|
||||
type: z.string(),
|
||||
filter: filterSchema,
|
||||
indexPatterns: arrayOfStringsSchema,
|
||||
identityFields: z.array(identityFieldsSchema),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue