Source
($status['has_status'] && array_key_exists('vps_total', $status)) ? round($status['vps_total'], 2) : '',
<?php
/*
** Zabbix
** 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 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 CPartial $this
* @var array $data
*/
$status = $data['system_info']['status'];
$info_table = (new CTableInfo())
->setHeader([_('Parameter'), _('Value'), _('Details')])
->setHeadingColumn(0)
->addClass(ZBX_STYLE_LIST_TABLE_STICKY_HEADER)
->addRow([
_('Zabbix server is running'),
(new CSpan($status['is_running'] ? _('Yes') : _('No')))
->addClass($status['is_running'] ? ZBX_STYLE_GREEN : ZBX_STYLE_RED),
$data['system_info']['server_details']
]);
if ($data['user_type'] == USER_TYPE_SUPER_ADMIN) {
$info_table
->addRow([
_('Number of hosts (enabled/disabled)'),
$status['has_status'] ? $status['hosts_count'] : '',
$status['has_status']
? [
(new CSpan($status['hosts_count_monitored']))->addClass(ZBX_STYLE_GREEN), ' / ',
(new CSpan($status['hosts_count_not_monitored']))->addClass(ZBX_STYLE_RED)
]
: ''
])
->addRow([
_('Number of templates'),
$status['has_status'] ? $status['hosts_count_template'] : '',
''
])
->addRow([
(new CSpan(_('Number of items (enabled/disabled/not supported)')))
->setTitle(_('Only items assigned to enabled hosts are counted')),
$status['has_status'] ? $status['items_count'] : '',
$status['has_status']
? [
(new CSpan($status['items_count_monitored']))->addClass(ZBX_STYLE_GREEN),