Source
xxxxxxxxxx
$test_obj = jQuery('.preprocessing-list-item[data-step=<?= $data['step_obj'] ?>]', jQuery('#preprocessing'));
<?php
/*
** Zabbix
** Copyright (C) 2001-2024 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.
**/
/**
* @var CView $this
*/
?>
/**
* Make step result UI element.
*
* @param {array} step Step object returned from server.
*
* @return {jQuery}
*/
function makeStepResult(step) {
if (step.error !== undefined) {
return jQuery(new Template(jQuery('#preprocessing-step-error-icon').html()).evaluate(
{error: step.error || <?= json_encode(htmlspecialchars(_('<empty string>'))) ?>}
));
}
else if (step.result === undefined || step.result === null) {
return jQuery('<span>', {'class': '<?= ZBX_STYLE_GREY ?>'}).text(<?= json_encode(_('No value')) ?>);
}
else if (step.result === '') {
return jQuery('<span>', {'class': '<?= ZBX_STYLE_GREY ?>'}).text(<?= json_encode(_('<empty string>')) ?>);
}
else if (step.warning !== undefined) {
return jQuery(new Template(jQuery('#preprocessing-step-result-warning').html()).evaluate(step));
}
else if (step.result.indexOf("\n") != -1 || step.result.length > 25) {
return jQuery(new Template(jQuery('#preprocessing-step-result').html()).evaluate(step));
}
else {
return jQuery('<span>').text(step.result);
}
}
/**
* Disable item test form.
*/
function disableItemTestForm() {
jQuery('#value, #time, [name^=macros]').prop('disabled', true);
<?php if ($data['is_item_testable']): ?>