Source
$error = _('Item will not be refreshed. Specified update interval requires having at least one either flexible or scheduling interval.');
<?php
/*
** Zabbix
** Copyright (C) 2001-2023 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.
**/
/**
* 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'),