[Canvas][Docs] Adds var and var_set to expression function reference (#74291) (#75832)

This commit is contained in:
Catherine Liu 2020-08-24 17:41:45 -07:00 committed by GitHub
parent 0097123d7e
commit 792308b157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 6 deletions

View file

@ -13,7 +13,7 @@ A *** denotes a required argument.
A † denotes an argument can be passed multiple times.
<<a_fns>> | B | <<c_fns>> | <<d_fns>> | <<e_fns>> | <<f_fns>> | <<g_fns>> | <<h_fns>> | <<i_fns>> | <<j_fns>> | K | <<l_fns>> | <<m_fns>> | <<n_fns>> | O | <<p_fns>> | Q | <<r_fns>> | <<s_fns>> | <<t_fns>> | <<u_fns>> | V | W | X | Y | Z
<<a_fns>> | B | <<c_fns>> | <<d_fns>> | <<e_fns>> | <<f_fns>> | <<g_fns>> | <<h_fns>> | <<i_fns>> | <<j_fns>> | K | <<l_fns>> | <<m_fns>> | <<n_fns>> | O | <<p_fns>> | Q | <<r_fns>> | <<s_fns>> | <<t_fns>> | <<u_fns>> | <<v_fns>> | W | X | Y | Z
[float]
[[a_fns]]
@ -2871,3 +2871,56 @@ Default: `""`
|===
*Returns:* `string`
[float]
[[v_fns]]
== V
[float]
[[var_fn]]
=== `var`
Updates the Kibana global context.
*Accepts:* `any`
[cols="3*^<"]
|===
|Argument |Type |Description
|_Unnamed_ ***
Alias: `name`
|`string`
|Specify the name of the variable.
|===
*Returns:* Depends on your input and arguments
[float]
[[var_set_fn]]
=== `var_set`
Updates the Kibana global context.
*Accepts:* `any`
[cols="3*^<"]
|===
|Argument |Type |Description
|_Unnamed_ ***
Alias: `name`
|`string`
|Specify the name of the variable.
|`value`
Alias: `val`
|`any`
|Specify the value for the variable. When unspecified, the input context is used.
|===
*Returns:* Depends on your input and arguments

View file

@ -34,7 +34,7 @@ export type ExpressionFunctionVar = ExpressionFunctionDefinition<
export const variable: ExpressionFunctionVar = {
name: 'var',
help: i18n.translate('expressions.functions.var.help', {
defaultMessage: 'Updates kibana global context',
defaultMessage: 'Updates the Kibana global context.',
}),
args: {
name: {
@ -42,7 +42,7 @@ export const variable: ExpressionFunctionVar = {
aliases: ['_'],
required: true,
help: i18n.translate('expressions.functions.var.name.help', {
defaultMessage: 'Specify name of the variable',
defaultMessage: 'Specify the name of the variable.',
}),
},
},

View file

@ -35,7 +35,7 @@ export type ExpressionFunctionVarSet = ExpressionFunctionDefinition<
export const variableSet: ExpressionFunctionVarSet = {
name: 'var_set',
help: i18n.translate('expressions.functions.varset.help', {
defaultMessage: 'Updates kibana global context',
defaultMessage: 'Updates the Kibana global context.',
}),
args: {
name: {
@ -43,14 +43,14 @@ export const variableSet: ExpressionFunctionVarSet = {
aliases: ['_'],
required: true,
help: i18n.translate('expressions.functions.varset.name.help', {
defaultMessage: 'Specify name of the variable',
defaultMessage: 'Specify the name of the variable.',
}),
},
value: {
aliases: ['val'],
help: i18n.translate('expressions.functions.varset.val.help', {
defaultMessage:
'Specify value for the variable. If not provided input context will be used',
'Specify the value for the variable. When unspecified, the input context is used.',
}),
},
},