Source
foreach (['xpath://div['.CXPathHelper::fromClass('filter-space').']', 'class:host-dashboard-navigation', 'class:dashboard'] as $selector) {
<?php
/*
** 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/>.
**/
require_once dirname(__FILE__) . '/../../include/CWebTest.php';
define('CURRENT_YEAR', date("Y"));
/**
* @onBefore prepareHostDashboardsData
*
* @backup hosts
*/
class testDashboardsHostDashboardPage extends CWebTest {
const HOST_NAME = 'Host for Host Dashboards';
const TEMPLATE_NAME = 'Template for '.self::HOST_NAME;
const COUNT_MANY = 20;
public function prepareHostDashboardsData() {
$data = [
'host_name' => self::HOST_NAME,
'dashboards' => [
[
'name' => 'Dashboard 1',
'pages' => [
[
'name' => 'Page 1',
'widgets' => [
[
'type' => 'svggraph',
'name' => 'Graph widget',
'width' => 6,
'height' => 4,
'fields' => [
[
'type' => ZBX_WIDGET_FIELD_TYPE_INT32,
'name' => '*',
'value' => 0
]
]
]
]
],
[
'name' => 'Page 2'
]
]
]
]
];