Source
'Proxy version is outdated, only data collection and remote execution is available with server version %1$s.',
<?php declare(strict_types = 0);
/*
** 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
*/
$this->includeJsFile('administration.proxy.list.js.php');
$filter = (new CFilter())
->addVar('action', 'proxy.list')
->setResetUrl(
(new CUrl('zabbix.php'))->setArgument('action', 'proxy.list')
)
->setProfile('web.proxies.filter')
->setActiveTab($data['active_tab'])
->addFilterTab(_('Filter'), [
(new CFormGrid())
->addClass(CFormGrid::ZBX_STYLE_FORM_GRID_LABEL_WIDTH_TRUE)
->addItem([
new CLabel(_('Name'), 'filter_name'),
new CFormField(
(new CTextBox('filter_name', $data['filter']['name']))
->setWidth(ZBX_TEXTAREA_FILTER_SMALL_WIDTH)
->setAttribute('autofocus', 'autofocus')
)
]),
(new CFormGrid())
->addClass(CFormGrid::ZBX_STYLE_FORM_GRID_LABEL_WIDTH_TRUE)
->addItem([
new CLabel(_('Mode')),
new CFormField(
(new CRadioButtonList('filter_operating_mode', (int) $data['filter']['operating_mode']))
->addValue(_('Any'), -1)
->addValue(_('Active'), PROXY_OPERATING_MODE_ACTIVE)
->addValue(_('Passive'), PROXY_OPERATING_MODE_PASSIVE)
->setModern(true)
)
]),
(new CFormGrid())
->addClass(CFormGrid::ZBX_STYLE_FORM_GRID_LABEL_WIDTH_TRUE)
->addItem([
new CLabel(_('Version')),
new CFormField(
(new CRadioButtonList('filter_version', (int) $data['filter']['version']))
->addValue(_('Any'), -1)
->addValue(_('Current'), ZBX_PROXY_VERSION_CURRENT)
->addValue(_('Outdated'), ZBX_PROXY_VERSION_ANY_OUTDATED)
->setModern(true)
)
])
]);
$form = (new CForm())
->setId('proxy-list')
->setName('proxy_list');
$view_url = (new CUrl('zabbix.php'))
->setArgument('action', 'proxy.list')
->getUrl();
$proxy_list = (new CTableInfo())
->setHeader([
(new CColHeader(
(new CCheckBox('all_hosts'))->onClick("checkAll('".$form->getName()."', 'all_hosts', 'proxyids');")
))->addClass(ZBX_STYLE_CELL_WIDTH),
make_sorting_header(_('Name'), 'name', $data['sort'], $data['sortorder'], $view_url),
make_sorting_header(_('Mode'), 'operating_mode', $data['sort'], $data['sortorder'], $view_url),
make_sorting_header(_('Encryption'), 'tls_accept', $data['sort'], $data['sortorder'], $view_url),
_('State'),
make_sorting_header(_('Version'), 'version', $data['sort'], $data['sortorder'], $view_url),
make_sorting_header(_('Last seen (age)'), 'lastaccess', $data['sort'], $data['sortorder'], $view_url),
_('Item count'),
_('Required vps'),
(new CColHeader(_('Hosts')))->setColSpan(2)
])
->setPageNavigation($data['paging']);