Source
$header[] = CSlaHelper::getPeriodTag((int) $data['sla']['period'], $period['period_from'], $period['period_to'],
<?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('class.calendar.js');
$this->includeJsFile('slareport.list.js.php');
$filter = (new CFilter())
->addVar('action', 'slareport.list')
->setResetUrl((new CUrl('zabbix.php'))->setArgument('action', 'slareport.list'))
->setProfile('web.slareport.list.filter')
->setActiveTab($data['active_tab'])
->addFilterTab(_('Filter'), [
(new CFormGrid())
->addClass(CFormGrid::ZBX_STYLE_FORM_GRID_LABEL_WIDTH_TRUE)
->addItem([
new CLabel(_('SLA'), 'filter_slaid_ms'),
new CFormField(
(new CMultiSelect([
'name' => 'filter_slaid',
'object_name' => 'sla',
'data' => $data['sla'] !== null
? [CArrayHelper::renameKeys($data['sla'], ['slaid' => 'id'])]
: [],
'multiple' => false,
'popup' => [
'parameters' => [
'srctbl' => 'sla',
'srcfld1' => 'slaid',
'dstfrm' => 'zbx_filter',
'dstfld1' => 'filter_slaid',
'enabled_only' => 1
]
]
]))->setWidth(ZBX_TEXTAREA_FILTER_STANDARD_WIDTH)
),
new CLabel(_('Service'), 'filter_serviceid_ms'),
new CFormField(
(new CMultiSelect([
'name' => 'filter_serviceid',