Source
void zbx_audit_discovery_rule_update_json_add_filter_conditions(zbx_uint64_t itemid, zbx_uint64_t rule_conditionid,
/*
** 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.
**/
int zbx_audit_item_resource_is_only_item(int resource_type)
{
return AUDIT_RESOURCE_ITEM == resource_type;
}
int zbx_audit_item_resource_is_only_item_prototype(int resource_type)
{
return AUDIT_RESOURCE_ITEM_PROTOTYPE == resource_type;
}
int zbx_audit_item_resource_is_only_item_and_item_prototype(int resource_type)
{
return (AUDIT_RESOURCE_ITEM == resource_type || AUDIT_RESOURCE_ITEM_PROTOTYPE == resource_type);
}
int zbx_audit_item_resource_is_only_lld_rule(int resource_type)
{
return AUDIT_RESOURCE_DISCOVERY_RULE == resource_type;
}
int zbx_audit_item_flag_to_resource_type(int flag)
{
if (ZBX_FLAG_DISCOVERY_NORMAL == flag || ZBX_FLAG_DISCOVERY_CREATED == flag)
{
return AUDIT_RESOURCE_ITEM;
}
else if (ZBX_FLAG_DISCOVERY_PROTOTYPE == flag)
{
return AUDIT_RESOURCE_ITEM_PROTOTYPE;
}
else if (ZBX_FLAG_DISCOVERY_RULE == flag)
{
return AUDIT_RESOURCE_DISCOVERY_RULE;
}