Source
<?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
* @var array $data
*/
$rules_table = (new CTable())
->setId('rules_table')
->addClass(ZBX_STYLE_TABLE_INITIAL_WIDTH);
$titles = [
'template_groups' => _('Template groups'),
'host_groups' => _('Host groups'),
'hosts' => _('Hosts'),
'templates' => _('Templates'),
'valueMaps' => _('Value mappings'),
'templateDashboards' => _('Template dashboards'),
'templateLinkage' => _('Template linkage'),
'items' => _('Items'),
'discoveryRules' => _('Discovery rules'),
'triggers' => _('Triggers'),
'graphs' => _('Graphs'),
'httptests' => _('Web scenarios'),
'maps' => _('Maps'),
'images' => _('Images'),
'mediaTypes' => _('Media types')
];
switch ($data['rules_preset']) {
case 'map':
$doc_url = CDocHelper::POPUP_MAPS_IMPORT;
break;
case 'template':
$doc_url = CDocHelper::POPUP_TEMPLATE_IMPORT;
break;
case 'host':
$doc_url = CDocHelper::POPUP_HOST_IMPORT;
break;
case 'mediatype':
$doc_url = CDocHelper::POPUP_MEDIA_IMPORT;
break;
}
$col_update = false;
$col_create = false;
$col_delete = false;
foreach ($titles as $key => $title) {