Source
xxxxxxxxxx
* @param {integer?} data_index Optional index, if data with given index exists, then in place update will happen.
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 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
* @var array $data
*/
?>
<script type="text/x-jquery-tmpl" id="scenario-step-row-templated">
<?= (new CRow([
'',
(new CSpan('1:'))->setAttribute('data-row-num', ''),
(new CLink('#{name}', 'javascript:httpconf.steps.open(#{no});')),
'#{timeout}',
(new CSpan('#{url_short}'))->setHint('#{url}', '', true, 'word-break: break-all;')
->setAttribute('data-hintbox', '#{enabled_hint}'),
'#{required}',
'#{status_codes}',
''
]))->toString()
?>
</script>
<script type="text/x-jquery-tmpl" id="scenario-step-row">
<?= (new CRow([
(new CCol((new CDiv())->addClass(ZBX_STYLE_DRAG_ICON)))->addClass(ZBX_STYLE_TD_DRAG_ICON),
(new CSpan('1:'))->setAttribute('data-row-num', ''),
(new CLink('#{name}', 'javascript:httpconf.steps.open(#{no});')),
'#{timeout}',
(new CSpan('#{url_short}'))->setHint('#{url}', '', true, 'word-break: break-all;')
->setAttribute('data-hintbox', '#{enabled_hint}'),
'#{required}',
'#{status_codes}',
(new CCol((new CButton(null, _('Remove')))
->addClass(ZBX_STYLE_BTN_LINK)
->addClass('element-table-remove')
))->addClass(ZBX_STYLE_NOWRAP)
]))
->addClass('sortable')
->toString()
?>
</script>
<script type="text/x-jquery-tmpl" id="scenario-pair-row">
<?= (new CRow([
(new CCol([
(new CDiv())->addClass(ZBX_STYLE_DRAG_ICON)
]))->addClass(ZBX_STYLE_TD_DRAG_ICON),
(new CTextBox(null, '#{name}'))
->setAttribute('placeholder', _('name'))
->setAttribute('data-type', 'name')
->setWidth(ZBX_TEXTAREA_HTTP_PAIR_NAME_WIDTH),
'⇒',
(new CTextBox(null, '#{value}'))
->setAttribute('placeholder', _('value'))
->setAttribute('data-type', 'value')
->setWidth(ZBX_TEXTAREA_HTTP_PAIR_VALUE_WIDTH),
(new CCol(
(new CButton(null, _('Remove')))
->addClass(ZBX_STYLE_BTN_LINK)
->addClass('element-table-remove')
))->addClass(ZBX_STYLE_NOWRAP)
]))
->addClass('sortable')
->toString()
?>
</script>
<script>
const view = {
form_name: null,