Source
$this->page->login()->open(($data['object'] === 'Hosts') ? 'zabbix.php?action=host.list' : 'templates.php');
<?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.
**/
require_once dirname(__FILE__).'/../common/testMultiselectDialogs.php';
/**
* Test for assuring that bug from ZBX-23302 is not reproducing, respectively
* that multiselects' dialogs do not contain any errors before and after filling.
*/
class testMultiselectsErrorsHostsTemplates extends testMultiselectDialogs {
const HOST = 'Template inheritance test host';
const TEMPLATE = 'AIX by Zabbix agent';
public static function getCheckDialogsData() {
return [
// #0.
[
[
'object' => 'Hosts',
'checked_multiselects' => [
['Host groups' => 'Host groups'],
['Templates' => 'Templates', 'Host group' => 'Host groups'],
['Proxy' => 'Proxies']
],
// Fill this filter to enable 'Proxy' multiselect.
'filter' => ['Monitored by' => 'Proxy'],
'filled_multiselects' => [
['Proxy' => 'Active proxy 1']
]
]
],
// #1.
[
[
'object' => 'Hosts',
'sub_object' => 'Items' ,
'checked_multiselects' => [
['Value mapping' => 'Value mapping']
],
'filled_multiselects' => [
['Value mapping' => 'Template value mapping']
]
]
],
// #2.
[
[
'object' => 'Hosts',
'sub_object' => 'Triggers'
]
],
// #3.
[
[
'object' => 'Hosts',
'sub_object' => 'Graphs'
]
],
// #4.
[
[
'object' => 'Hosts',
'sub_object' => 'Discovery'
]
],
// #5.
[
[
'object' => 'Hosts',
'sub_object' => 'Web'
]
],