Source
->addItem(new CPartial('service.list', array_intersect_key($data, array_flip(['can_monitor_problems', 'path',
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2023 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
*/
$this->addJsFile('layout.mode.js');
$this->addJsFile('class.tagfilteritem.js');
$this->includeJsFile('service.list.js.php');
$this->enableLayoutModes();
$web_layout_mode = $this->getLayoutMode();
$breadcrumbs = [];
$filter = null;
if ($web_layout_mode == ZBX_LAYOUT_NORMAL) {
if (count($data['breadcrumbs']) > 1) {
while ($path_item = array_shift($data['breadcrumbs'])) {
$breadcrumbs[] = (new CSpan())
->addItem(array_key_exists('curl', $path_item)
? new CLink($path_item['name'], $path_item['curl'])
: $path_item['name']
)
->addClass(!$data['breadcrumbs'] ? ZBX_STYLE_SELECTED : null);
}
}
$filter = (new CFilter())
->addVar('action', 'service.list')
->addVar('serviceid', $data['service'] !== null ? $data['service']['serviceid'] : null)
->setResetUrl($data['reset_curl'])
->setProfile('web.service.filter')
->setActiveTab($data['active_tab']);
if ($data['service'] !== null && !$data['is_filtered']) {
$filter
->addTab(
(new CLink(_('Info'), '#tab_info'))
->addClass(ZBX_STYLE_BTN)
->addClass(ZBX_ICON_CIRCLE_INFO),
(new CDiv())