Source
<button type="button" class="<?= ZBX_STYLE_BTN_LINK ?>" id="items_#{number}_remove" data-remove="#{number}" onclick="view.removeItem(this);"><?= _('Remove') ?></button>
<?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
*/
?>
<script type="text/x-jquery-tmpl" id="tmpl-item-row-<?= GRAPH_TYPE_NORMAL ?>">
<tr id="items_#{number}" class="sortable">
<!-- icon + hidden -->
<?php if ($readonly): ?>
<td>
<?php else: ?>
<td class="<?= ZBX_STYLE_TD_DRAG_ICON ?>">
<div class="<?= ZBX_STYLE_DRAG_ICON ?>"></div>
<span class="ui-icon ui-icon-arrowthick-2-n-s move"></span>
<?php endif ?>
<input type="hidden" id="items_#{number}_gitemid" name="items[#{number}][gitemid]" value="#{gitemid}">
<input type="hidden" id="items_#{number}_itemid" name="items[#{number}][itemid]" value="#{itemid}">
<input type="hidden" id="items_#{number}_sortorder" name="items[#{number}][sortorder]" value="#{sortorder}">
<input type="hidden" id="items_#{number}_flags" name="items[#{number}][flags]" value="#{flags}">
<input type="hidden" id="items_#{number}_type" name="items[#{number}][type]" value="<?= GRAPH_ITEM_SIMPLE ?>">
<input type="hidden" id="items_#{number}_calc_fnc" name="items[#{number}][calc_fnc]" value="#{calc_fnc}">
<input type="hidden" id="items_#{number}_drawtype" name="items[#{number}][drawtype]" value="#{drawtype}">
<input type="hidden" id="items_#{number}_yaxisside" name="items[#{number}][yaxisside]" value="#{yaxisside}">
</td>
<!-- row number -->
<td>
<span id="items_#{number}_number" class="items_number">#{number_nr}:</span>
</td>
<!-- name -->
<td>
<?php if ($readonly): ?>
<span id="items_#{number}_name">#{name}</span>
<?php else: ?>
<a href="javascript:void(0)"><span id="items_#{number}_name">#{name}</span></a>
<?php endif ?>
</td>
<!-- function -->
<td>
<?= (new CSelect('items[#{number}][calc_fnc]'))
->setValue('#{calc_fnc}')
->addOptions(CSelect::createOptionsFromArray([
CALC_FNC_ALL => _('all'),
CALC_FNC_MIN => _('min'),
CALC_FNC_AVG => _('avg'),
CALC_FNC_MAX => _('max')
]))
?>
</td>
<!-- drawtype -->
<td>
<?= (new CSelect('items[#{number}][drawtype]'))
->setValue('#{drawtype}')
->addOptions(CSelect::createOptionsFromArray($graph_item_drawtypes))
?>
</td>
<!-- yaxisside -->
<td>
<?= (new CSelect('items[#{number}][yaxisside]'))
->setValue('#{yaxisside}')
->addOptions(CSelect::createOptionsFromArray([
GRAPH_YAXIS_SIDE_LEFT => _('Left'),
GRAPH_YAXIS_SIDE_RIGHT => _('Right')
]))
?>
</td>