diff options
author | Reinis Detlavs <reinis.detlavs@zabbix.com> | 2022-02-17 11:21:14 +0300 |
---|---|---|
committer | Reinis Detlavs <reinis.detlavs@zabbix.com> | 2022-02-17 11:21:14 +0300 |
commit | 72e3dd8304a6cf8a5c1ff3255bc728cbc14ceb4d (patch) | |
tree | 973b8e463a324d76f74124099d931f4b0c74bf1d /ui | |
parent | 41e0db8cbd3fd97849bfc57f56478057bda0cff6 (diff) | |
parent | 1fe464b8e8f551f6c373fecc5522975fab7b9ef8 (diff) |
..F....... [ZBX-20253] fixed incorrect usage of function "length" in zabbix server trigger creation
Merge in ZBX/zabbix from feature/ZBX-20253-5.4 to release/5.4
* commit '1fe464b8e8f551f6c373fecc5522975fab7b9ef8':
..F....... [ZBX-20253] fixed incorrect usage of function "length" in zabbix server trigger creation
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/controllers/CControllerPopupTriggerExpr.php | 3 | ||||
-rw-r--r-- | ui/app/views/popup.triggerexpr.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ui/app/controllers/CControllerPopupTriggerExpr.php b/ui/app/controllers/CControllerPopupTriggerExpr.php index b7ed8a3c81d..6a50ad94945 100644 --- a/ui/app/controllers/CControllerPopupTriggerExpr.php +++ b/ui/app/controllers/CControllerPopupTriggerExpr.php @@ -655,6 +655,7 @@ class CControllerPopupTriggerExpr extends CController { 'length' => [ 'types' => [ZBX_FUNCTION_TYPE_STRING], 'description' => _('length() - Length of last (most recent) T value in characters'), + 'params' =>$this->param1SecCount, 'allowed_types' => $this->allowedTypesStr, 'operators' => $this->operators ], @@ -1384,7 +1385,7 @@ class CControllerPopupTriggerExpr extends CController { $last_functions = [ 'abs', 'acos', 'ascii', 'asin', 'atan', 'atan2', 'between', 'bitand', 'bitlength', 'bitlshift', 'bitnot', 'bitor', 'bitrshift', 'bitxor', 'bytelength', 'cbrt', 'ceil', 'char', 'concat', 'cos', - 'cosh', 'cot', 'degrees', 'exp', 'expm1', 'floor', 'in', 'insert', 'left', 'log', 'log10', + 'cosh', 'cot', 'degrees', 'exp', 'expm1', 'floor', 'in', 'insert', 'left', 'length', 'log', 'log10', 'ltrim', 'mid', 'mod', 'power', 'radians', 'repeat', 'replace', 'right', 'round', 'signum', 'sin', 'sinh', 'sqrt', 'tan', 'trim', 'truncate' ]; diff --git a/ui/app/views/popup.triggerexpr.php b/ui/app/views/popup.triggerexpr.php index fcd3ceb2d44..31cc74e3bda 100644 --- a/ui/app/views/popup.triggerexpr.php +++ b/ui/app/views/popup.triggerexpr.php @@ -138,7 +138,7 @@ if (array_key_exists('params', $data['functions'][$data['selectedFunction']])) { $count_functions = [ 'acos', 'ascii', 'asin', 'atan', 'atan2', 'between', 'bitand', 'bitlength', 'bitlshift', 'bitnot', 'bitor', 'bitrshift', 'bitxor', 'bytelength', 'cbrt', 'ceil', 'char', 'concat', 'cos', 'cosh', 'cot', 'degrees', 'exp', - 'expm1', 'floor', 'in', 'insert', 'last', 'left', 'log', 'log10', 'ltrim', 'mid', 'mod', 'power', 'radians', + 'expm1', 'floor', 'in', 'insert', 'last', 'left', 'length', 'log', 'log10', 'ltrim', 'mid', 'mod', 'power', 'radians', 'repeat', 'replace', 'right', 'round', 'rtrim', 'signum', 'sin', 'sinh', 'sqrt', 'tan', 'trim', 'truncate' ]; |