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$this->addJsFile('js/gtlc.js'); 23$this->addJsFile('js/flickerfreescreen.js'); 24 25$widget = (new CWidget()) 26 ->setTitle(_('Status of discovery')) 27 ->setControls( 28 (new CForm('get')) 29 ->cleanItems() 30 ->addVar('action', 'discovery.view') 31 ->addVar('fullscreen', $data['fullscreen']) 32 ->addItem((new CList()) 33 ->addItem([ 34 new CLabel(_('Discovery rule'), 'druleid'), 35 (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), 36 $data['pageFilter']->getDiscoveryCB() 37 ]) 38 ->addItem(get_icon('fullscreen', ['fullscreen' => $data['fullscreen']])) 39 ) 40 ); 41 42$discovery_table = CScreenBuilder::getScreen([ 43 'resourcetype' => SCREEN_RESOURCE_DISCOVERY, 44 'mode' => SCREEN_MODE_JS, 45 'dataId' => 'discovery', 46 'data' => [ 47 'druleid' => $data['druleid'], 48 'sort' => $data['sort'], 49 'sortorder' => $data['sortorder'] 50 ] 51])->get(); 52 53$widget->addItem($discovery_table)->show(); 54