require_once dirname(__FILE__).'/include/config.inc.php';
require_once dirname(__FILE__).'/include/triggers.inc.php';
$page['title'] = _('100 busiest triggers');
$page['file'] = 'toptriggers.php';
$page['scripts'] = ['class.calendar.js', 'gtlc.js'];
require_once dirname(__FILE__).'/include/page_header.php';
'groupids' => [T_ZBX_INT, O_OPT, P_SYS|P_ONLY_ARRAY, DB_ID, null],
'hostids' => [T_ZBX_INT, O_OPT, P_SYS|P_ONLY_ARRAY, DB_ID, null],
'severities' => [T_ZBX_INT, O_OPT, P_SYS|P_ONLY_ARRAY, null, null],
'from' => [T_ZBX_RANGE_TIME, O_OPT, P_SYS, null, null],
'to' => [T_ZBX_RANGE_TIME, O_OPT, P_SYS, null, null],
'filter_rst' => [T_ZBX_STR, O_OPT, P_SYS, null, null],
'filter_set' => [T_ZBX_STR, O_OPT, P_SYS, null, null]
validateTimeSelectorPeriod(getRequest('from'), getRequest('to'));
if (hasRequest('filter_set')) {
CProfile::updateArray('web.toptriggers.filter.severities', getRequest('severities', []), PROFILE_TYPE_STR);
CProfile::updateArray('web.toptriggers.filter.groupids', getRequest('groupids', []), PROFILE_TYPE_STR);
CProfile::updateArray('web.toptriggers.filter.hostids', getRequest('hostids', []), PROFILE_TYPE_STR);
elseif (hasRequest('filter_rst')) {
CProfile::deleteIdx('web.toptriggers.filter.severities');
CProfile::deleteIdx('web.toptriggers.filter.groupids');
CProfile::deleteIdx('web.toptriggers.filter.hostids');
$timeselector_options = [
'profileIdx' => 'web.toptriggers.filter',
'from' => getRequest('from'),