Source
$data['paging'] = CPagerHelper::paginate($page_num, $data['correlations'], $sortOrder, new CUrl('correlation.php'));
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
require_once dirname(__FILE__).'/include/config.inc.php';
require_once dirname(__FILE__).'/include/forms.inc.php';
require_once dirname(__FILE__).'/include/correlation.inc.php';
$page['title'] = _('Event correlation rules');
$page['file'] = 'correlation.php';
$page['scripts'] = ['multiselect.js', 'textareaflexible.js', 'popup.condition.common.js'];
require_once dirname(__FILE__).'/include/page_header.php';
// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION
$fields = [
'correlationid' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, 'isset({form}) && {form} == "update"'],
'name' => [T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({add}) || isset({update})',
_('Name')
],
'description' => [T_ZBX_STR, O_OPT, null, null, null],
'evaltype' => [T_ZBX_INT, O_OPT, null,
IN([CONDITION_EVAL_TYPE_AND_OR, CONDITION_EVAL_TYPE_AND,
CONDITION_EVAL_TYPE_OR, CONDITION_EVAL_TYPE_EXPRESSION
]),
'isset({add}) || isset({update})'
],
'formula' => [T_ZBX_STR, O_OPT, null, null, 'isset({add}) || isset({update})'],
'status' => [T_ZBX_INT, O_OPT, null,
IN([ZBX_CORRELATION_ENABLED, ZBX_CORRELATION_DISABLED]),
null
],
'g_correlationid' => [T_ZBX_INT, O_OPT, null, DB_ID, 'isset({action})'],
'conditions' => [null, O_OPT, null, null, null],
'new_condition' => [null, O_OPT, null, null, 'isset({add_condition})'],
'operations' => [null, O_OPT, null, null, null],
'edit_operationid' => [T_ZBX_STR, O_OPT, P_ACT, null, null],
// actions
'action' => [T_ZBX_STR, O_OPT, P_SYS|P_ACT,
IN('"correlation.massdelete","correlation.massdisable","correlation.massenable"'),
null
],
'add_condition' => [T_ZBX_STR, O_OPT, P_SYS|P_ACT, null, null],
'add' => [T_ZBX_STR, O_OPT, P_SYS|P_ACT, null, null],
'update' => [T_ZBX_STR, O_OPT, P_SYS|P_ACT, null, null],
'delete' => [T_ZBX_STR, O_OPT, P_SYS|P_ACT, null, null],
'cancel' => [T_ZBX_STR, O_OPT, P_SYS, null, null],