diff options
author | Vladimirs Maksimovs <vladimirs.maksimovs@zabbix.com> | 2020-09-11 15:57:05 +0300 |
---|---|---|
committer | Vladimirs Maksimovs <vladimirs.maksimovs@zabbix.com> | 2020-09-11 15:58:46 +0300 |
commit | 774d3481b0e07e6558cbef5143d5653da6c7d372 (patch) | |
tree | 6c93b3e1ff7b8d2d4f0977f6b68dabb0ab23210a /ui/app/controllers/CControllerPopupTriggerExpr.php | |
parent | bfa1ae96b53cdedbebd8f97a82cc957546586c26 (diff) |
A.F....... [ZBXNEXT-6141] implemented frontend changes for new trigger functions for long term analytics; added new property event_name to Trigger and Trigger prototype API objects
Diffstat (limited to 'ui/app/controllers/CControllerPopupTriggerExpr.php')
-rw-r--r-- | ui/app/controllers/CControllerPopupTriggerExpr.php | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/ui/app/controllers/CControllerPopupTriggerExpr.php b/ui/app/controllers/CControllerPopupTriggerExpr.php index 65de11fcc28..3eb84d98442 100644 --- a/ui/app/controllers/CControllerPopupTriggerExpr.php +++ b/ui/app/controllers/CControllerPopupTriggerExpr.php @@ -22,11 +22,13 @@ class CControllerPopupTriggerExpr extends CController { private $metrics = []; private $param1SecCount = []; + private $param1Period = []; private $param1Sec = []; private $param1Str = []; private $param2SecCount = []; private $param2SecMode = []; private $param3SecVal = []; + private $param3SecPeriod = []; private $param3SecPercent = []; private $paramSecIntCount = []; private $paramForecast = []; @@ -67,6 +69,19 @@ class CControllerPopupTriggerExpr extends CController { ] ]; + $this->param1Period = [ + 'last' => [ + 'C' => _('Last of').' (T)', + 'T' => T_ZBX_INT, + 'A' => true + ], + 'period_shift' => [ + 'C' => _('Period shift'), + 'T' => T_ZBX_INT, + 'A' => true + ] + ]; + $this->param1Sec = [ 'last' => [ 'C' => _('Last of').' (T)', @@ -134,6 +149,29 @@ class CControllerPopupTriggerExpr extends CController { ] ]; + $this->param3SecPeriod = [ + 'last' => [ + 'C' => _('Last of').' (T)', + 'T' => T_ZBX_INT, + 'A' => true + ], + 'v' => [ + 'C' => 'V', + 'T' => T_ZBX_STR, + 'A' => false + ], + 'o' => [ + 'C' => 'O', + 'T' => T_ZBX_STR, + 'A' => false + ], + 'period_shift' => [ + 'C' => _('Period shift'), + 'T' => T_ZBX_INT, + 'A' => true + ] + ]; + $this->param3SecPercent = [ 'last' => [ 'C' => _('Last of').' (T)', @@ -416,6 +454,42 @@ class CControllerPopupTriggerExpr extends CController { 'params' => $this->paramTimeleft, 'allowed_types' => $this->allowedTypesNumeric, 'operators' => ['=', '<>', '>', '<', '>=', '<='] + ], + 'trendavg' => [ + 'description' => _('trendavg() - Average value of a period T with exact period shift'), + 'params' => $this->param1Period, + 'allowed_types' => $this->allowedTypesNumeric, + 'operators' => ['=', '<>', '>', '<', '>=', '<='] + ], + 'trendcount' => [ + 'description' => _('trendcount() - Number of successfully retrieved values V (which fulfill operator O) for period T with exact period shift'), + 'params' => $this->param3SecPeriod, + 'allowed_types' => $this->allowedTypesAny, + 'operators' => ['=', '<>', '>', '<', '>=', '<='] + ], + 'trenddelta' => [ + 'description' => _('trenddelta() - Difference between MAX and MIN value of a period T with exact period shift'), + 'params' => $this->param1Period, + 'allowed_types' => $this->allowedTypesNumeric, + 'operators' => ['=', '<>', '>', '<', '>=', '<='] + ], + 'trendmax' => [ + 'description' => _('trendmax() - Maximum value for period T with exact period shift'), + 'params' => $this->param1Period, + 'allowed_types' => $this->allowedTypesNumeric, + 'operators' => ['=', '<>', '>', '<', '>=', '<='] + ], + 'trendmin' => [ + 'description' => _('trendmin() - Minimum value for period T with exact period shift'), + 'params' => $this->param1Period, + 'allowed_types' => $this->allowedTypesNumeric, + 'operators' => ['=', '<>', '>', '<', '>=', '<='] + ], + 'trendsum' => [ + 'description' => _('trendsum() - Sum of values of a period T with exact period shift'), + 'params' => $this->param1Period, + 'allowed_types' => $this->allowedTypesNumeric, + 'operators' => ['=', '<>', '>', '<', '>=', '<='] ] ]; |