Source
xxxxxxxxxx
* one object where parameter names are keys and parameter values are values. Note that parameter names are unique.
<?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.
**/
/**
* 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 value type used if user has not specified one.
*/
const ZBX_DEFAULT_VALUE_TYPE = ITEM_VALUE_TYPE_TEXT;
/**
* Item types requiring interface.
*
* @var array
*/
protected $items_require_interface = [
ITEM_TYPE_ZABBIX => [
'address' => true,
'port' => true