Source
error(_s('Incorrect value for field "%1$s": %2$s.', _('Max repetition count'), _s('value must be no greater than "%1$s"', ZBX_MAX_INT32)));
<?php
/*
** 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 Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* Class shares common properties, constants and methods for different controllers used for item tests.
*/
abstract class CControllerPopupItemTest extends CController {
/**
* Types of preprocessing tests, depending on type of item.
*/
const ZBX_TEST_TYPE_ITEM = 0;
const ZBX_TEST_TYPE_ITEM_PROTOTYPE = 1;
const ZBX_TEST_TYPE_LLD = 2;
/**
* Max-length of input fields that can contain resolved macro values. Used in views for input fields.
*
* @var int
*/
public const INPUT_MAX_LENGTH = 2048;
/**
* Define a set of item types allowed to test and item properties needed to collect for each item type.
*
* @var array
*/
private static $testable_item_types = [ITEM_TYPE_ZABBIX, ITEM_TYPE_SIMPLE, ITEM_TYPE_INTERNAL, ITEM_TYPE_EXTERNAL,
ITEM_TYPE_DB_MONITOR, ITEM_TYPE_HTTPAGENT, ITEM_TYPE_SSH, ITEM_TYPE_TELNET, ITEM_TYPE_JMX,
ITEM_TYPE_CALCULATED, ITEM_TYPE_SNMP, ITEM_TYPE_SCRIPT, ITEM_TYPE_BROWSER
];
/**
* Item value type used if user has not specified one.
*/
const ZBX_DEFAULT_VALUE_TYPE = ITEM_VALUE_TYPE_TEXT;
public const TEST_WITH_SERVER = 0;
public const TEST_WITH_PROXY = 1;
/**
* Item types requiring interface.
*
* @var array
*/
protected $items_require_interface = [
ITEM_TYPE_ZABBIX => [
'address' => true,
'port' => true
],
ITEM_TYPE_IPMI => [