We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
current version of code:
kibana/x-pack/legacy/plugins/alerting/server/lib/transform_action_params.ts
Lines 7 to 23 in 19c85d6
Arrays end up getting treated as objects, where the indices become string keys. Those objects end up failing schema validation.
On a lark, I re-wrote the function like this, which seemed to work for my purpose, but didn't run any tests:
import Mustache from 'mustache'; import { isString, cloneDeep } from 'lodash'; import { AlertActionParams, State, Context } from '../types'; export function transformActionParams(params: AlertActionParams, state: State, context: Context) { return cloneDeep(params, value => { if (!isString(value)) return; return Mustache.render(value, { context, state }); }); }
The text was updated successfully, but these errors were encountered:
Pinging @elastic/kibana-stack-services
Sorry, something went wrong.
Fixes alert mustache templating with arrays
962a377
fixes elastic#44057 Prior to this fix, values inside an array were not subject to the mustache transform.
Fixes alert mustache templating with arrays (#44094)
b98954a
* Fixes alert mustache templating with arrays fixes #44057 Prior to this fix, values inside an array were not subject to the mustache transform.
Fixes alert mustache templating with arrays (elastic#44094)
c240df3
* Fixes alert mustache templating with arrays fixes elastic#44057 Prior to this fix, values inside an array were not subject to the mustache transform.
Fixes alert mustache templating with arrays (#44094) (#44120)
c827609
pmuellr
Successfully merging a pull request may close this issue.
current version of code:
kibana/x-pack/legacy/plugins/alerting/server/lib/transform_action_params.ts
Lines 7 to 23 in 19c85d6
Arrays end up getting treated as objects, where the indices become string keys. Those objects end up failing schema validation.
On a lark, I re-wrote the function like this, which seemed to work for my purpose, but didn't run any tests:
The text was updated successfully, but these errors were encountered: