-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Add Anomaly charts embeddables to Dashboard from Anomaly Explorer page #95623
Changes from 39 commits
0f5046f
c542ca5
1e708e1
a6ae3ce
705d84c
861d28f
97c5890
b68e736
54b62f8
ce813f0
2b669c8
dad2872
95587c7
cdee080
343bb61
99982e0
b680c38
fc3ec9e
a7cbcd0
2c5e8de
f2a91bb
6c9bd89
d71da6f
21cb5de
14d5acd
56a3e1b
abed912
c1a3c62
d979425
078ba80
1968113
2847d28
88047d7
47dccf9
937a84e
33cbbff
4b21deb
25c1df6
b7f8427
dbd5e91
83c6974
e901434
653d612
47ecb4d
d8de444
2e0bb30
422c705
5efc9e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,21 +5,25 @@ | |
* 2.0. | ||
*/ | ||
|
||
import { estypes } from '@elastic/elasticsearch'; | ||
import { isPopulatedObject } from './object_utils'; | ||
import { RUNTIME_FIELD_TYPES } from '../../../../../src/plugins/data/common'; | ||
import type { RuntimeField, RuntimeMappings } from '../types/fields'; | ||
import { RUNTIME_FIELD_TYPES, RuntimeType } from '../../../../../src/plugins/data/common'; | ||
import type { RuntimeMappings } from '../types/fields'; | ||
|
||
type RuntimeType = typeof RUNTIME_FIELD_TYPES[number]; | ||
|
||
export function isRuntimeField(arg: unknown): arg is RuntimeField { | ||
export function isRuntimeField(arg: unknown): arg is estypes.RuntimeField { | ||
return ( | ||
((isPopulatedObject(arg, ['type']) && Object.keys(arg).length === 1) || | ||
(isPopulatedObject(arg, ['type', 'script']) && | ||
Object.keys(arg).length === 2 && | ||
isPopulatedObject(arg) && | ||
((Object.keys(arg).length === 1 && arg.hasOwnProperty('type')) || | ||
(Object.keys(arg).length === 2 && | ||
arg.hasOwnProperty('type') && | ||
arg.hasOwnProperty('script') && | ||
(typeof arg.script === 'string' || | ||
(isPopulatedObject(arg.script, ['source']) && | ||
(isPopulatedObject(arg.script) && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like a master rebase/merge went wrong here, the removed code is actually the newer one, see this PR again: https://github.com/elastic/kibana/pull/95651/files#diff-7dfaf266f36a691f0ea87f071af9f1915e031dffb83ad4c35281b932114deb07R16 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for catching that. I have updated it here |
||
Object.keys(arg.script).length === 1 && | ||
arg.script.hasOwnProperty('source') && | ||
typeof arg.script.source === 'string')))) && | ||
// replace this with estypes.RuntimeType once fixed | ||
// https://github.com/elastic/elastic-client-generator/issues/258 | ||
RUNTIME_FIELD_TYPES.includes(arg.type as RuntimeType) | ||
); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect something went wrong with a master rebase/merge. The removed lines are actually the newer code merged as part of this PR: https://github.com/elastic/kibana/pull/95651/files#diff-02075861bae59012670e1e16f2017e22cfca82cf3d7a210eb9c66e96503252d1R10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated here
dbd5e91
(#95623)