Source
<?= renderTagTableRow('#{rowNum}', ['tag' => '', 'value' => ''], ['field_name' => 'optag', 'add_post_js' => false]) ?>
<?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
*/
?>
<script type="text/x-jquery-tmpl" id="lldoverride-row-templated">
<?= (new CRow([
'',
(new CSpan('1:'))->setAttribute('data-row-num', ''),
(new CCol((new CLink('#{name}', 'javascript:lldoverrides.overrides.open(#{no});')))),
'#{stop_verbose}',
(new CCol(
(new CButtonLink(_('Remove')))
->addClass('element-table-remove')
->setEnabled(false)
))->addClass(ZBX_STYLE_NOWRAP)
]))->toString()
?>
</script>
<script type="text/x-jquery-tmpl" id="lldoverride-row">
<?= (new CRow([
(new CCol((new CDiv())->addClass(ZBX_STYLE_DRAG_ICON)))->addClass(ZBX_STYLE_TD_DRAG_ICON),
(new CCol((new CSpan('1:'))->setAttribute('data-row-num', '')))
->setWidth('15'),
(new CCol((new CLink('#{name}', 'javascript:lldoverrides.overrides.open(#{no});'))))
->setWidth('350'),
(new CCol('#{stop_verbose}'))
->setWidth('100'),
(new CCol(
(new CButtonLink(_('Remove')))->addClass('element-table-remove')
))
->addClass(ZBX_STYLE_NOWRAP)
->setWidth('50')
]))
->toString()
?>
</script>
<script type="text/x-jquery-tmpl" id="override-filters-row">
<?=
(new CRow([[
new CSpan('#{formulaId}'),
new CVar('overrides_filters[#{rowNum}][formulaid]', '#{formulaId}')
],
(new CTextBox('overrides_filters[#{rowNum}][macro]', '', false,
DB::getFieldLength('lld_override_condition', 'macro')))
->setWidth(ZBX_TEXTAREA_MACRO_WIDTH)
->addClass(ZBX_STYLE_UPPERCASE)
->addClass('macro')
->setAttribute('placeholder', '{#MACRO}')
->setAttribute('data-formulaid', '#{formulaId}'),
(new CSelect('overrides_filters[#{rowNum}][operator]'))
->setValue(CONDITION_OPERATOR_REGEXP)
->addClass('js-operator')
->addOptions(CSelect::createOptionsFromArray([
CONDITION_OPERATOR_REGEXP => _('matches'),
CONDITION_OPERATOR_NOT_REGEXP => _('does not match'),
CONDITION_OPERATOR_EXISTS => _('exists'),
CONDITION_OPERATOR_NOT_EXISTS => _('does not exist')
])),
(new CDiv(
(new CTextBox('overrides_filters[#{rowNum}][value]', '', false,
DB::getFieldLength('lld_override_condition', 'value')))
->addClass('js-value')
->setWidth(ZBX_TEXTAREA_MACRO_VALUE_WIDTH)
->setAttribute('placeholder', _('regular expression'))
))->setWidth(ZBX_TEXTAREA_MACRO_VALUE_WIDTH),
(new CCol(
(new CButton('overrides_filters#{rowNum}_remove', _('Remove')))
->addClass(ZBX_STYLE_BTN_LINK)
->addClass('element-table-remove')
))->addClass(ZBX_STYLE_NOWRAP)
]))
->addClass('form_row')
->toString()
?>
</script>