1<?php 2/* 3** Zabbix 4** Copyright (C) 2001-2021 Zabbix SIA 5** 6** This program is free software; you can redistribute it and/or modify 7** it under the terms of the GNU General Public License as published by 8** the Free Software Foundation; either version 2 of the License, or 9** (at your option) any later version. 10** 11** This program is distributed in the hope that it will be useful, 12** but WITHOUT ANY WARRANTY; without even the implied warranty of 13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14** GNU General Public License for more details. 15** 16** You should have received a copy of the GNU General Public License 17** along with this program; if not, write to the Free Software 18** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19**/ 20 21 22/** 23 * @var CView $this 24 */ 25 26$this->addJsFile('gtlc.js'); 27$this->addJsFile('flickerfreescreen.js'); 28$this->addJsFile('layout.mode.js'); 29$this->addJsFile('multiselect.js'); 30 31 32$this->enableLayoutModes(); 33$web_layout_mode = $this->getLayoutMode(); 34 35(new CWidget()) 36 ->setTitle(_('Web monitoring')) 37 ->setWebLayoutMode($web_layout_mode) 38 ->setControls( 39 (new CTag('nav', true, get_icon('kioskmode', ['mode' => $web_layout_mode]))) 40 ->setAttribute('aria-label', _('Content controls')) 41 ) 42 ->addItem((new CFilter((new CUrl('zabbix.php'))->setArgument('action', 'web.view'))) 43 ->setProfile($data['profileIdx']) 44 ->setActiveTab($data['active_tab']) 45 ->addFormItem((new CVar('action', 'web.view'))->removeId()) 46 ->addFilterTab(_('Filter'), [ 47 (new CFormList()) 48 ->addRow((new CLabel(_('Host groups'), 'filter_groupids__ms')), 49 (new CMultiSelect([ 50 'multiple' => true, 51 'name' => 'filter_groupids[]', 52 'object_name' => 'hostGroup', 53 'data' => $data['filter']['groupids'], 54 'popup' => [ 55 'parameters' => [ 56 'srctbl' => 'host_groups', 57 'srcfld1' => 'groupid', 58 'dstfrm' => 'zbx_filter', 59 'dstfld1' => 'filter_groupids_', 60 'with_httptests' => true, 61 'real_hosts' => true, 62 'enrich_parent_groups' => true 63 ] 64 ] 65 ]))->setWidth(ZBX_TEXTAREA_FILTER_STANDARD_WIDTH) 66 ) 67 ->addRow((new CLabel(_('Hosts'), 'filter_hostids__ms')), 68 (new CMultiSelect([ 69 'multiple' => true, 70 'name' => 'filter_hostids[]', 71 'object_name' => 'hosts', 72 'data' => $data['filter']['hostids'], 73 'popup' => [ 74 'parameters' => [ 75 'srctbl' => 'hosts', 76 'srcfld1' => 'hostid', 77 'dstfrm' => 'zbx_filter', 78 'dstfld1' => 'filter_hostids_', 79 'with_monitored_items' => true, 80 'with_httptests' => true 81 ] 82 ] 83 ]))->setWidth(ZBX_TEXTAREA_FILTER_STANDARD_WIDTH) 84 ) 85 ]) 86 ) 87 ->addItem($data['screen_view']) 88 ->show(); 89