Source
'message' => _('Item contains user-defined macros with secret values. Values of these macros should be entered manually.')
<?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/>.
**/
/**
* @var CView $this
*/
$form = (new CForm())
->setId('preprocessing-test-form')
->setName('preprocessing_test_form');
if ($data['show_prev']) {
$form
->addVar('upd_last', '')
->addVar('upd_prev', '');
}
foreach ($data['inputs']['item'] as $name => $value) {
if (in_array($name, ['query_fields', 'headers', 'parameters'])) {
foreach ($value as $num => $row) {
$form->addVar($name.'['.$num.'][name]', $row['name']);
$form->addVar($name.'['.$num.'][value]', $row['value']);
}
}
else {
$form->addItem((new CInput('hidden', $name, $value))->removeId());
}
}
foreach ($data['inputs']['host'] as $name => $value) {
if ($name === 'proxyid') {
continue;
}
if ($name === 'interface') {
// SNMPv3 additional details about interface.
if (array_key_exists('useip', $value)) {
$form->addVar('interface[useip]', $value['useip']);
}
if (array_key_exists('interfaceid', $value)) {
$form->addVar('interface[interfaceid]', $value['interfaceid']);
}
continue;
}
$form->addItem((new CInput('hidden', $name, $value))->removeId());
}