-
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
console: ingest node updates for auto-complete #24100
console: ingest node updates for auto-complete #24100
Conversation
* add bytes processor * add dissect processor * add pipeline processor * add drop processor * add if conditional to each processor * add on_failure to each processor
This looks good to me. One suggestion I have is since if and on_failure are common params to all, the code could make that clearer by defining:
and then using the common definition in all of the other ones like this:
|
I am not familiar with how these constants are used, but wouldn't that result in an object in an object ? (Does that still autocomplete correctly ?) {
"uppercase":{
"__template":{
"field":""
},
"field":"",
"ignore_missing":{
"__one_of":[
false,
true
]
},
"commonPipelineParams":{
"on_failure":[],
"if":""
}
}
} |
💔 Build Failed |
@jakelandis the ... syntax basically takes all the properties of the object that follows it and copies them into the target object, so you wind up with what you had to begin with but without the duplication of code. https://dmitripavlutin.com/object-rest-spread-properties-javascript/ |
You'll need to merge master into this branch to fix the test failure. |
doh! from your example, I read the triple dots as ellipsis, not syntax. My ECMAScript is pretty rusty... TIL, thanks ! Changes implemented on d9128c5 and master merged in. |
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.
As this stands, autocomplete does not work when I load console. Moving the commonPipelineParams definition to the top fixes this issue.
@@ -344,6 +420,10 @@ const pipelineDefinition = { | |||
version: 123, | |||
}; | |||
|
|||
const commonPipelineParams = { |
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.
This needs to be defined above where it is used (just move this to the top). Also, there needs to be a semicolon after the }
closing this object.
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.
Fixed in 11c0ac8
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.
Code LGTM, and tested in the browser and all the new processors autocomplete as expected. Thanks!
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
* add bytes processor * add dissect processor * add pipeline processor * add drop processor * add if conditional to each processor * add on_failure to each processor
Please note this has NOT has been tested, and the PR is based simply on the existing structure.