Source
* Create a CLinkAction element with hint-boxed table that contains hosts of particular host group and number of all
<?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
*/
// indicator of sort field
$sort_div = (new CSpan())->addClass(ZBX_STYLE_ARROW_UP);
$table = (new CTableInfo())
->setHeader([
[_('Host group'), $sort_div],
_('Without problems'),
_('With problems'),
_('Total')
])
->setHeadingColumn(0);
$url_group = $data['allowed_ui_problems']
? (new CUrl('zabbix.php'))
->setArgument('action', 'problem.view')
->setArgument('filter_name', '')
->setArgument('show', TRIGGERS_OPTION_RECENT_PROBLEM)
->setArgument('hostids', $data['filter']['hostids'])
->setArgument('name', $data['filter']['problem'])
->setArgument('show_suppressed', ($data['filter']['show_suppressed'] == ZBX_PROBLEM_SUPPRESSED_TRUE)
? ZBX_PROBLEM_SUPPRESSED_TRUE
: null
)
: null;
$url_host = $data['allowed_ui_problems']
? (new CUrl('zabbix.php'))
->setArgument('action', 'problem.view')
->setArgument('filter_name', '')
->setArgument('show', TRIGGERS_OPTION_RECENT_PROBLEM)
->setArgument('name', $data['filter']['problem'])
->setArgument('show_suppressed', ($data['filter']['show_suppressed'] == ZBX_PROBLEM_SUPPRESSED_TRUE)
? ZBX_PROBLEM_SUPPRESSED_TRUE
: null
)
: null;
foreach ($data['groups'] as $group) {
$problematic_count_key = ($data['filter']['ext_ack'] == EXTACK_OPTION_UNACK)