Source
$error = _('Item will not be refreshed. Specified update interval requires having at least one either flexible or scheduling interval.');
<?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/>.
**/
/**
* Convert windows events type constant in to the string representation
*
* @param int $logtype
* @return string
*/
function get_item_logtype_description($logtype) {
switch ($logtype) {
case ITEM_LOGTYPE_INFORMATION:
return _('Information');
case ITEM_LOGTYPE_WARNING:
return _('Warning');
case ITEM_LOGTYPE_ERROR:
return _('Error');
case ITEM_LOGTYPE_FAILURE_AUDIT:
return _('Failure Audit');
case ITEM_LOGTYPE_SUCCESS_AUDIT:
return _('Success Audit');
case ITEM_LOGTYPE_CRITICAL:
return _('Critical');
case ITEM_LOGTYPE_VERBOSE:
return _('Verbose');
default:
return _('Unknown');
}
}
/**
* Convert windows events type constant in to the CSS style name
*
* @param int $logtype
* @return string
*/
function get_item_logtype_style($logtype) {
switch ($logtype) {
case ITEM_LOGTYPE_INFORMATION:
case ITEM_LOGTYPE_SUCCESS_AUDIT:
case ITEM_LOGTYPE_VERBOSE:
return ZBX_STYLE_LOG_INFO_BG;
case ITEM_LOGTYPE_WARNING:
return ZBX_STYLE_LOG_WARNING_BG;
case ITEM_LOGTYPE_ERROR:
case ITEM_LOGTYPE_FAILURE_AUDIT:
return ZBX_STYLE_LOG_HIGH_BG;
case ITEM_LOGTYPE_CRITICAL:
return ZBX_STYLE_LOG_DISASTER_BG;
default:
return ZBX_STYLE_LOG_NA_BG;
}
}
/**
* Get item type string name by item type number, or array of all item types if null passed.
*
* @param int|null $type
*
* @return array|string
*/
function item_type2str($type = null) {
$types = [
ITEM_TYPE_ZABBIX => _('Zabbix agent'),
ITEM_TYPE_ZABBIX_ACTIVE => _('Zabbix agent (active)'),
ITEM_TYPE_SIMPLE => _('Simple check'),
ITEM_TYPE_SNMP => _('SNMP agent'),
ITEM_TYPE_SNMPTRAP => _('SNMP trap'),
ITEM_TYPE_INTERNAL => _('Zabbix internal'),
ITEM_TYPE_TRAPPER => _('Zabbix trapper'),
ITEM_TYPE_EXTERNAL => _('External check'),
ITEM_TYPE_DB_MONITOR => _('Database monitor'),
ITEM_TYPE_HTTPAGENT => _('HTTP agent'),
ITEM_TYPE_IPMI => _('IPMI agent'),