Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorAndrejs Griščenko <andrejs.griscenko@zabbix.com>2021-05-08 16:59:12 +0300
committerAndrejs Griščenko <andrejs.griscenko@zabbix.com>2021-05-08 17:00:14 +0300
commite5d12586612fda2126b8ab43bd75e6e1cba0f0ff (patch)
tree6b5ecc1db5255692f1af440219f76837e2b60f85 /ui
parent6da917b4478db7811a93ca08e4867ca160d6d5eb (diff)
..F....... [ZBXNEXT-6561] updated the list of functions for testing trigger expression
Diffstat (limited to 'ui')
-rw-r--r--ui/include/triggers.inc.php61
1 files changed, 60 insertions, 1 deletions
diff --git a/ui/include/triggers.inc.php b/ui/include/triggers.inc.php
index 0bf0b09549a..9970d19907e 100644
--- a/ui/include/triggers.inc.php
+++ b/ui/include/triggers.inc.php
@@ -1820,19 +1820,29 @@ function get_item_function_info(string $expr) {
$hist_functions = [
'avg' => $rules['numeric_as_float'],
'count' => $rules['numeric_as_uint'] + $rules['string_as_uint'],
+ 'countunique' => $rules['numeric_as_uint'] + $rules['string_as_uint'],
'change' => $rules['numeric'] + $rules['string_as_0or1'],
'find' => $rules['numeric_as_0or1'] + $rules['string_as_0or1'],
+ 'first' => $rules['numeric'] + $rules['string'],
'forecast' => $rules['numeric_as_float'],
'fuzzytime' => $rules['numeric_as_0or1'],
+ 'kurtosis' => $rules['numeric'] + $rules['string'],
'last' => $rules['numeric'] + $rules['string'],
'length' => $rules['numeric'] + $rules['string'],
'logeventid' => $rules['log_as_0or1'],
'logseverity' => $rules['log_as_uint'],
'logsource' => $rules['log_as_0or1'],
+ 'mad' => $rules['numeric'] + $rules['string'],
'max' => $rules['numeric'],
'min' => $rules['numeric'],
'nodata' => $rules['numeric_as_0or1'] + $rules['string_as_0or1'],
'percentile' => $rules['numeric'],
+ 'skewness' => $rules['numeric'] + $rules['string'],
+ 'stddevpop' => $rules['numeric'] + $rules['string'],
+ 'stddevsamp' => $rules['numeric'] + $rules['string'],
+ 'sumofsquares' => $rules['numeric'] + $rules['string'],
+ 'varpop' => $rules['numeric'] + $rules['string'],
+ 'varsamp' => $rules['numeric'] + $rules['string'],
'sum' => $rules['numeric'],
'timeleft' => $rules['numeric_as_float'],
'trendavg' => $rules['numeric'],
@@ -1844,8 +1854,28 @@ function get_item_function_info(string $expr) {
$math_functions = [
'abs' => ['any' => $rule_float],
+ 'acos' => ['any' => $rule_float],
+ 'ascii' => ['any' => $rule_int],
+ 'asin' => ['any' => $rule_float],
+ 'atan' => ['any' => $rule_float],
+ 'atan2' => ['any' => $rule_float],
'avg' => ['any' => $rule_float],
+ 'between' => ['any' => $rule_float],
'bitand' => ['any' => $rule_int],
+ 'bitlength' => ['any' => $rule_int],
+ 'bitlshift' => ['any' => $rule_int],
+ 'bitnot' => ['any' => $rule_int],
+ 'bitor' => ['any' => $rule_int],
+ 'bitrshift' => ['any' => $rule_int],
+ 'bitxor' => ['any' => $rule_int],
+ 'bytelength' => ['any' => $rule_int],
+ 'cbrt' => ['any' => $rule_float],
+ 'ceil' => ['any' => $rule_int],
+ 'char' => ['any' => $rule_str],
+ 'concat' => ['any' => $rule_str],
+ 'cos' => ['any' => $rule_float],
+ 'cosh' => ['any' => $rule_float],
+ 'cot' => ['any' => $rule_float],
'date' => [
'any' => ['value_type' => 'YYYYMMDD', 'values' => null]
],
@@ -1855,14 +1885,43 @@ function get_item_function_info(string $expr) {
'dayofweek' => [
'any' => ['value_type' => '1-7', 'values' => [1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7]]
],
+ 'degrees' => ['any' => $rule_float],
+ 'e' => ['any' => $rule_float],
+ 'exp' => ['any' => $rule_float],
+ 'expm1' => ['any' => $rule_float],
+ 'floor' => ['any' => $rule_float],
+ 'in' => ['any' => $rule_0or1],
+ 'insert' => ['any' => $rule_str],
+ 'left' => ['any' => $rule_str],
'length' => ['any' => $rule_int],
+ 'log' => ['any' => $rule_float],
+ 'log10' => ['any' => $rule_float],
+ 'ltrim' => ['any' => $rule_str],
'max' => ['any' => $rule_float],
+ 'mid' => ['any' => $rule_str],
'min' => ['any' => $rule_float],
+ 'mod' => ['any' => $rule_float],
'now' => ['any' => $rule_int],
+ 'pi' => ['any' => $rule_float],
+ 'power' => ['any' => $rule_float],
+ 'radians' => ['any' => $rule_float],
+ 'rand' => ['any' => $rule_int],
+ 'repeat' => ['any' => $rule_str],
+ 'replace' => ['any' => $rule_str],
+ 'right' => ['any' => $rule_str],
+ 'round' => ['any' => $rule_float],
+ 'rtrim' => ['any' => $rule_str],
+ 'sin' => ['any' => $rule_float],
+ 'sinh' => ['any' => $rule_float],
+ 'signum' => ['any' => $rule_int],
+ 'sqrt' => ['any' => $rule_float],
'sum' => ['any' => $rule_float],
+ 'tan' => ['any' => $rule_float],
'time' => [
'any' => ['value_type' => 'HHMMSS', 'values' => null]
- ]
+ ],
+ 'trim' => ['any' => $rule_str],
+ 'truncate' => ['any' => $rule_float]
];
$expression_parser = new CExpressionParser(['lldmacros' => true]);