Source
<?php
/*
** Zabbix
** Copyright (C) 2001-2025 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.
**/
/**
* Controller for the "Problems" asynchronous refresh page.
*/
class CControllerProblemViewRefresh extends CControllerProblemView {
protected function init(): void {
$this->disableCsrfValidation();
}
protected function checkInput(): bool {
$fields = [
'action' => 'string',
'sort' => 'in clock,host,severity,name',
'sortorder' => 'in '.ZBX_SORT_DOWN.','.ZBX_SORT_UP,
'page' => 'ge 1',
'show' => 'in '.TRIGGERS_OPTION_RECENT_PROBLEM.','.TRIGGERS_OPTION_IN_PROBLEM.','.TRIGGERS_OPTION_ALL,
'groupids' => 'array_id',
'hostids' => 'array_id',
'triggerids' => 'array_id',
'name' => 'string',
'severities' => 'array',
'age_state' => 'in 0,1',
'age' => 'int32',
'inventory' => 'array',
'evaltype' => 'in '.TAG_EVAL_TYPE_AND_OR.','.TAG_EVAL_TYPE_OR,
'tags' => 'array',
'show_tags' => 'in '.SHOW_TAGS_NONE.','.SHOW_TAGS_1.','.SHOW_TAGS_2.','.SHOW_TAGS_3,
'show_symptoms' => 'in 0,1',
'show_suppressed' => 'in 0,1',
'unacknowledged' => 'in 0,1',
'compact_view' => 'in 0,1',
'show_timeline' => 'in '.ZBX_TIMELINE_OFF.','.ZBX_TIMELINE_ON,
'details' => 'in 0,1',
'highlight_row' => 'in 0,1',
'show_opdata' => 'in '.OPERATIONAL_DATA_SHOW_NONE.','.OPERATIONAL_DATA_SHOW_SEPARATELY.','.OPERATIONAL_DATA_SHOW_WITH_PROBLEM,
'tag_name_format' => 'in '.TAG_NAME_FULL.','.TAG_NAME_SHORTENED.','.TAG_NAME_NONE,
'tag_priority' => 'string',
'from' => 'range_time',
'to' => 'range_time',
'filter_counters' => 'in 1'
];