$msg[] = _s('IT service data storage period (in days) "%1$s".', getRequest('hk_services')); $msg[] = _s('Audit data storage period (in days) "%1$s".', getRequest('hk_audit')); $msg[] = _s('User session data storage period (in days) "%1$s".', getRequest('hk_sessions')); $msg[] = _s('History data storage period (in days) "%1$s".', getRequest('hk_history')); $msg[] = _s('Trend data storage period (in days) "%1$s".', getRequest('hk_trends')); add_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_ZABBIX_CONFIG, implode('; ', $msg)); } DBend($result); } $form = new CForm(); $form->cleanItems(); $cmbConf = new CComboBox('configDropDown', 'adm.housekeeper.php', 'redirect(this.options[this.selectedIndex].value);'); $cmbConf->addItems(array('adm.gui.php' => _('GUI'), 'adm.housekeeper.php' => _('Housekeeping'), 'adm.images.php' => _('Images'), 'adm.iconmapping.php' => _('Icon mapping'), 'adm.regexps.php' => _('Regular expressions'), 'adm.macros.php' => _('Macros'), 'adm.valuemapping.php' => _('Value mapping'), 'adm.workingtime.php' => _('Working time'), 'adm.triggerseverities.php' => _('Trigger severities'), 'adm.triggerdisplayoptions.php' => _('Trigger displaying options'), 'adm.other.php' => _('Other'))); $form->addItem($cmbConf); $cnf_wdgt = new CWidget(null, 'hk'); $cnf_wdgt->addPageHeader(_('CONFIGURATION OF HOUSEKEEPING'), $form); $data['form_refresh'] = getRequest('form_refresh', 0); if ($data['form_refresh']) { $data['config']['hk_events_mode'] = getRequest('hk_events_mode'); $data['config']['hk_events_trigger'] = isset($_REQUEST['hk_events_trigger']) ? getRequest('hk_events_trigger') : $data['config']['hk_events_trigger']; $data['config']['hk_events_internal'] = isset($_REQUEST['hk_events_internal']) ? getRequest('hk_events_internal') : $data['config']['hk_events_internal']; $data['config']['hk_events_discovery'] = isset($_REQUEST['hk_events_discovery']) ? getRequest('hk_events_discovery') : $data['config']['hk_events_discovery']; $data['config']['hk_events_autoreg'] = isset($_REQUEST['hk_events_autoreg']) ? getRequest('hk_events_autoreg') : $data['config']['hk_events_autoreg']; $data['config']['hk_services_mode'] = getRequest('hk_services_mode'); $data['config']['hk_services'] = isset($_REQUEST['hk_services']) ? getRequest('hk_services') : $data['config']['hk_services']; $data['config']['hk_audit_mode'] = getRequest('hk_audit_mode'); $data['config']['hk_audit'] = isset($_REQUEST['hk_audit']) ? getRequest('hk_audit') : $data['config']['hk_audit']; $data['config']['hk_sessions_mode'] = getRequest('hk_sessions_mode'); $data['config']['hk_sessions'] = isset($_REQUEST['hk_sessions']) ? getRequest('hk_sessions') : $data['config']['hk_sessions']; $data['config']['hk_history_mode'] = getRequest('hk_history_mode'); $data['config']['hk_history_global'] = getRequest('hk_history_global');
$row->addItem(new CCol(SPACE, getSeverityStyle($i))); } $col = new CTable('', 'blink overview-mon-severities'); $col->addRow($row); // double div necassary for FireFox $col = new CCol(new CDiv(new CDiv($col), 'overview-mon-severities-container')); $hintTable->addRow(array($col, _s('Age less than %s', convertUnitsS($config['blink_period'])))); } $hintTable->addRow(array(new CCol(SPACE), _('No trigger'))); } else { $hintTable->addRow(array(new CCol(SPACE), _('OK or no trigger'))); } $help = new CHelp('web.view.php', 'right'); $help->setHint($hintTable, '', '', true, false); // header right $overviewWidget->addPageHeader(_('OVERVIEW'), array(get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen'])), SPACE, $help)); // header left $styleComboBox = new CComboBox('view_style', $this->data['view_style'], 'submit()'); $styleComboBox->addItem(STYLE_TOP, _('Top')); $styleComboBox->addItem(STYLE_LEFT, _('Left')); $hostLocationForm = new CForm('get'); $hostLocationForm->addVar('groupid', $this->data['groupid']); $hostLocationForm->additem(array(_('Hosts location'), SPACE, $styleComboBox)); $overviewWidget->addHeader($hostLocationForm); if ($config['dropdown_first_entry'] || $this->data['pageFilter']->applicationsSelected || $this->data['pageFilter']->groupsSelected) { if ($this->data['type'] == SHOW_DATA) { $dataTable = getItemsDataOverview(array_keys($this->data['pageFilter']->hosts), $this->data['pageFilter']->application, $this->data['view_style']); } elseif ($this->data['type'] == SHOW_TRIGGERS) { global $page; $dataTable = getTriggersOverview(array_keys($this->data['pageFilter']->hosts), $this->data['pageFilter']->application, $page['file'], $this->data['view_style']); }
** 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. **/ $itemsWidget = new CWidget(); $discoveryRule = $this->data['discovery_rule']; // create new item button $createForm = new CForm('get'); $createForm->cleanItems(); $createForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']); $createForm->addItem(new CSubmit('form', _('Create host prototype'))); $itemsWidget->addPageHeader(_('CONFIGURATION OF HOST PROTOTYPES'), $createForm); // header $itemsWidget->addHeader(array(_('Host prototypes of') . SPACE, new CSpan($this->data['discovery_rule']['name'], 'parent-discovery'))); $itemsWidget->addHeaderRowNumber(); $itemsWidget->addItem(get_header_host_table('hosts', $discoveryRule['hostid'], $this->data['parent_discoveryid'])); // create form $itemForm = new CForm(); $itemForm->setName('hosts'); $itemForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']); // create table $hostTable = new CTableInfo(_('No host prototypes found.')); $sortLink = new CUrl(); $sortLink->setArgument('parent_discoveryid', $this->data['parent_discoveryid']); $sortLink = $sortLink->getUrl(); $hostTable->setHeader(array(new CCheckBox('all_hosts', null, "checkAll('" . $itemForm->getName() . "', 'all_hosts', 'group_hostid');"), make_sorting_header(_('Name'), 'name', $sortLink), _('Templates'), make_sorting_header(_('Status'), 'status', $sortLink))); foreach ($this->data['hostPrototypes'] as $hostPrototype) {
<?php /* ** Zabbix ** Copyright (C) 2001-2014 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__) . '/include/config.inc.php'; require_once dirname(__FILE__) . '/include/blocks.inc.php'; $page['title'] = _('Status of Zabbix'); $page['file'] = 'report1.php'; $page['hist_arg'] = array(); require_once dirname(__FILE__) . '/include/page_header.php'; $reportWidget = new CWidget(); $reportWidget->addPageHeader(_('STATUS OF ZABBIX')); $reportWidget->addItem(make_status_of_zbx()); $reportWidget->show(); require_once dirname(__FILE__) . '/include/page_footer.php';
** 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. **/ $usersWidget = new CWidget(); // append page header to widget $createForm = new CForm('get'); $createForm->cleanItems(); $configurationComboBox = new CComboBox('config', 'users.php', 'javascript: redirect(this.options[this.selectedIndex].value);'); $configurationComboBox->addItem('usergrps.php', _('User groups')); $configurationComboBox->addItem('users.php', _('Users')); $createForm->addItem(array($configurationComboBox, new CSubmit('form', _('Create user')))); $usersWidget->addPageHeader(_('CONFIGURATION OF USERS'), $createForm); // append form header to widget $userGroupListForm = new CForm('get'); $userGroupComboBox = new CComboBox('filter_usrgrpid', $_REQUEST['filter_usrgrpid'], 'submit()'); $userGroupComboBox->addItem(0, _('All')); foreach ($this->data['userGroups'] as $userGroup) { $userGroupComboBox->addItem($userGroup['usrgrpid'], $userGroup['name']); } $userGroupListForm->addItem(array(_('User group') . SPACE, $userGroupComboBox)); $usersWidget->addHeader(_('Users'), $userGroupListForm); $usersWidget->addHeaderRowNumber(); // create form $usersForm = new CForm(); $usersForm->setName('userForm'); // create users table $usersTable = new CTableInfo(_('No users found.'));
** ** 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. **/ $discoveryWidget = new CWidget(); // create new discovery rule button $createForm = new CForm('get'); $createForm->cleanItems(); $createForm->addItem(new CSubmit('form', _('Create discovery rule'))); $discoveryWidget->addPageHeader(_('CONFIGURATION OF DISCOVERY RULES'), $createForm); $discoveryWidget->addHeader(_('Discovery rules')); $discoveryWidget->addHeaderRowNumber(); // create form $discoveryForm = new CForm(); $discoveryForm->setName('druleForm'); // create table $discoveryTable = new CTableInfo(_('No discovery rules found.')); $discoveryTable->setHeader(array(new CCheckBox('all_drules', null, "checkAll('" . $discoveryForm->getName() . "', 'all_drules', 'g_druleid');"), make_sorting_header(_('Name'), 'name', $this->data['sort'], $this->data['sortorder']), _('IP range'), _('Delay'), _('Checks'), _('Status'))); foreach ($data['drules'] as $drule) { array_push($drule['description'], new CLink($drule['name'], '?form=update&druleid=' . $drule['druleid'])); $status = new CCol(new CLink(discovery_status2str($drule['status']), '?g_druleid[]=' . $drule['druleid'] . '&action=' . ($drule['status'] == DRULE_STATUS_ACTIVE ? 'drule.massdisable' : 'drule.massenable'), discovery_status2style($drule['status']))); $discoveryTable->addRow(array(new CCheckBox('g_druleid[' . $drule['druleid'] . ']', null, null, $drule['druleid']), $drule['description'], $drule['iprange'], $drule['delay'], !empty($drule['checks']) ? implode(', ', $drule['checks']) : '', $status)); } // create go buttons $goComboBox = new CComboBox('action');
$page['hist_arg'] = array('period'); require_once dirname(__FILE__) . '/include/page_header.php'; // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields = array('period' => array(T_ZBX_STR, O_OPT, P_SYS | P_NZERO, IN('"day","week","month","year"'), NULL)); check_fields($fields); $rprt_wdgt = new CWidget(); $_REQUEST['period'] = getRequest('period', 'day'); $admin_links = CWebUser::$data['type'] == USER_TYPE_ZABBIX_ADMIN || CWebUser::$data['type'] == USER_TYPE_SUPER_ADMIN; $form = new CForm('get'); $cmbPeriod = new CComboBox('period', $_REQUEST['period'], 'submit()'); $cmbPeriod->addItem('day', _('Day')); $cmbPeriod->addItem('week', _('Week')); $cmbPeriod->addItem('month', _('Month')); $cmbPeriod->addItem('year', _('Year')); $form->addItem($cmbPeriod); $rprt_wdgt->addPageHeader(_('MOST BUSY TRIGGERS TOP 100')); $rprt_wdgt->addHeader(_('Report'), $form); $rprt_wdgt->addItem(BR()); $table = new CTableInfo(_('No triggers found.')); $table->setHeader(array(_('Host'), _('Trigger'), _('Severity'), _('Number of status changes'))); switch ($_REQUEST['period']) { case 'week': $time_dif = SEC_PER_WEEK; break; case 'month': $time_dif = SEC_PER_MONTH; break; case 'year': $time_dif = SEC_PER_YEAR; break; case 'day':
** ** 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. **/ $maintenanceWidget = new CWidget(); // create new maintenance button $createForm = new CForm('get'); $createForm->cleanItems(); $createForm->addItem(new CSubmit('form', _('Create maintenance period'))); $maintenanceWidget->addPageHeader(_('CONFIGURATION OF MAINTENANCE PERIODS'), $createForm); // header $filterForm = new CForm('get'); $filterForm->addItem(array(_('Group') . SPACE, $this->data['pageFilter']->getGroupsCB(true))); $maintenanceWidget->addHeader(_('Maintenance periods'), $filterForm); $maintenanceWidget->addHeaderRowNumber(); // create form $maintenanceForm = new CForm(); $maintenanceForm->setName('maintenanceForm'); // create table $maintenanceTable = new CTableInfo(_('No maintenance periods found.')); $maintenanceTable->setHeader(array(new CCheckBox('all_maintenances', null, "checkAll('" . $maintenanceForm->getName() . "', 'all_maintenances', 'maintenanceids');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'name'), make_sorting_header(_('Type'), 'maintenance_type'), _('State'), _('Description'))); foreach ($this->data['maintenances'] as $maintenance) { $maintenanceid = $maintenance['maintenanceid']; switch ($maintenance['status']) { case MAINTENANCE_STATUS_EXPIRED:
** 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__) . '/js/configuration.slideconf.edit.js.php'; $slideWidget = new CWidget(); $slideWidget->addPageHeader(_('CONFIGURATION OF SLIDE SHOWS')); // create form $slideForm = new CForm(); $slideForm->setName('slideForm'); $slideForm->addVar('form', $this->data['form']); $slideForm->addVar('slides', $this->data['slides_without_delay']); if (!empty($this->data['slideshowid'])) { $slideForm->addVar('slideshowid', $this->data['slideshowid']); } // create slide form list $slideFormList = new CFormList('slideFormList'); $slideFormList->addRow(_('Name'), new CTextBox('name', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE)); $slideFormList->addRow(_('Default delay (in seconds)'), new CNumericBox('delay', $this->data['delay'], 5, 'no', false, false)); // append slide table $slideTable = new CTableInfo(_('No slides defined.'), 'formElementTable'); $slideTable->setAttribute('style', 'min-width: 500px;');
break; } } } } // -------- if (isset($_REQUEST['filter_set']) || isset($_REQUEST['filter_rst'])) { CProfile::update('web.events.filter.triggerid', $_REQUEST['triggerid'], PROFILE_TYPE_ID); CProfile::update('web.events.filter.hide_unknown', $_REQUEST['hide_unknown'], PROFILE_TYPE_INT); } // -------------- CProfile::update('web.events.source', $source, PROFILE_TYPE_INT); $events_wdgt = new CWidget(); // PAGE HEADER {{{ $fs_icon = get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen'])); $events_wdgt->addPageHeader(array(S_HISTORY_OF_EVENTS_BIG . SPACE . S_ON_BIG . SPACE, zbx_date2str(S_EVENTS_DATE_FORMAT, time())), $fs_icon); // }}}PAGE HEADER // HEADER {{{ $r_form = new CForm(null, 'get'); $r_form->addVar('fullscreen', $_REQUEST['fullscreen']); $r_form->addVar('triggerid', get_request('triggerid')); $r_form->addVar('stime', get_request('stime')); $r_form->addVar('period', get_request('period')); if (EVENT_SOURCE_TRIGGERS == $source) { $options = array('groups' => array('monitored_hosts' => 1, 'with_items' => 1), 'hosts' => array('monitored_hosts' => 1, 'with_items' => 1), 'triggers' => array(), 'hostid' => get_request('hostid', null), 'groupid' => get_request('groupid', null), 'triggerid' => get_request('triggerid', null)); $pageFilter = new CPageFilter($options); $_REQUEST['groupid'] = $pageFilter->groupid; $_REQUEST['hostid'] = $pageFilter->hostid; if ($pageFilter->triggerid > 0) { $_REQUEST['triggerid'] = $pageFilter->triggerid; }
** 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. **/ $mediaTypeWidget = new CWidget(); $mediaTypeWidget->addPageHeader(_('CONFIGURATION OF MEDIA TYPES')); // create form $mediaTypeForm = new CForm(); $mediaTypeForm->setName('mediaTypeForm'); $mediaTypeForm->addVar('form', $this->data['form']); $mediaTypeForm->addVar('mediatypeid', $this->data['mediatypeid']); // create form list $mediaTypeFormList = new CFormList('mediaTypeFormList'); $nameTextBox = new CTextBox('description', $this->data['description'], ZBX_TEXTBOX_STANDARD_SIZE, false, 100); $nameTextBox->attr('autofocus', 'autofocus'); $mediaTypeFormList->addRow(_('Name'), $nameTextBox); // append type to form list $cmbType = new CComboBox('type', $this->data['type'], 'submit()'); $cmbType->addItems(array(MEDIA_TYPE_EMAIL => _('Email'), MEDIA_TYPE_EXEC => _('Script'), MEDIA_TYPE_SMS => _('SMS'), MEDIA_TYPE_JABBER => _('Jabber'))); $cmbType->addItemsInGroup(_('Commercial'), array(MEDIA_TYPE_EZ_TEXTING => _('Ez Texting'))); $cmbTypeRow = array($cmbType);
require_once dirname(__FILE__) . '/include/page_footer.php'; exit; } $options = array('groups' => array('real_hosts' => 1), 'groupid' => get_request('groupid', null)); $pageFilter = new CPageFilter($options); $_REQUEST['groupid'] = $pageFilter->groupid; $_REQUEST['hostid'] = get_request('hostid', 0); // permission check, imo should be removed in future. if ($_REQUEST['hostid'] > 0) { $res = API::Host()->get(array('real_hosts' => 1, 'hostids' => $_REQUEST['hostid'])); if (empty($res)) { access_deny(); } } $hostinvent_wdgt = new CWidget(); $hostinvent_wdgt->addPageHeader(_('HOST INVENTORIES')); // host details if ($_REQUEST['hostid'] > 0) { $hostinvent_wdgt->addItem(insert_host_inventory_form()); } else { $r_form = new CForm('get'); $r_form->addItem(array(_('Group'), SPACE, $pageFilter->getGroupsCB(true))); $hostinvent_wdgt->addHeader(_('Hosts'), $r_form); // HOST INVENTORY FILTER {{{ if (isset($_REQUEST['filter_set'])) { $_REQUEST['filter_field'] = get_request('filter_field'); $_REQUEST['filter_field_value'] = get_request('filter_field_value'); $_REQUEST['filter_exact'] = get_request('filter_exact'); CProfile::update('web.hostinventories.filter_field', $_REQUEST['filter_field'], PROFILE_TYPE_STR); CProfile::update('web.hostinventories.filter_field_value', $_REQUEST['filter_field_value'], PROFILE_TYPE_STR); CProfile::update('web.hostinventories.filter_exact', $_REQUEST['filter_exact'], PROFILE_TYPE_INT);
** 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__) . '/js/monitoring.triggerComment.js.php'; $commentWidget = new CWidget('triggerComment'); $commentWidget->addPageHeader(_('TRIGGER DESCRIPTION')); // create form $commentForm = new CForm(); $commentForm->setName('commentForm'); $commentForm->addVar('triggerid', $this->data['triggerid']); // create form list $commentFormList = new CFormList('commentFormList'); $commentTextArea = new CTextArea('comments', CMacrosResolverHelper::resolveTriggerDescription($this->data['trigger']), array('rows' => 25, 'width' => ZBX_TEXTAREA_BIG_WIDTH, 'readonly' => $this->data['isCommentExist'])); $commentTextArea->attr('autofocus', 'autofocus'); $commentFormList->addRow(_('Description'), $commentTextArea); // append tabs to form $commentTab = new CTabView(); $commentTab->addTab('commentTab', _s('Description for "%s".', $this->data['trigger']['description']), $commentFormList); $commentForm->addItem($commentTab); // append buttons to form $updateButton = new CSubmit('update', _('Update'));
** 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. **/ include 'include/views/js/configuration.services.edit.js.php'; $servicesParentWidget = new CWidget(); $servicesParentWidget->addPageHeader(_('IT service parent')); // create form $servicesParentForm = new CForm(); $servicesParentForm->setName('servicesForm'); if (!empty($this->data['service'])) { $servicesParentForm->addVar('serviceid', $this->data['service']['serviceid']); } // create table $servicesParentTable = new CTableInfo(); $servicesParentTable->setHeader(array(_('Service'), _('Status calculation'), _('Trigger'))); $prefix = null; // root $description = new CLink(_('root'), '#', null, 'javascript: jQuery(\'#parent_name\', window.opener.document).val(' . zbx_jsvalue(_('root')) . '); jQuery(\'#parentname\', window.opener.document).val(' . zbx_jsvalue(_('root')) . '); jQuery(\'#parentid\', window.opener.document).val(' . zbx_jsvalue(0) . ');
$show_events = $_REQUEST['show_events']; $show_severity = $_REQUEST['show_severity']; $ack_status = $_REQUEST['ack_status']; // -------------- validate_sort_and_sortorder('lastchange', ZBX_SORT_DOWN); $mute = CProfile::get('web.tr_status.mute', 0); if (isset($audio) && !$mute) { play_sound($audio); } $trigg_wdgt = new CWidget(); $r_form = new CForm(null, 'get'); $r_form->addItem(array(S_GROUP . SPACE, $pageFilter->getGroupsCB(true))); $r_form->addItem(array(SPACE . S_HOST . SPACE, $pageFilter->getHostsCB(true))); $r_form->addVar('fullscreen', $_REQUEST['fullscreen']); $fs_icon = get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen'])); $trigg_wdgt->addPageHeader(S_STATUS_OF_TRIGGERS_BIG . ' [' . date(S_DATE_FORMAT_YMDHMS) . ']', array($fs_icon)); $numrows = new CDiv(); $numrows->setAttribute('name', 'numrows'); $trigg_wdgt->addHeader(S_TRIGGERS_BIG, $r_form); $trigg_wdgt->addHeader($numrows); /************************* FILTER **************************/ /***********************************************************/ $filterForm = new CFormTable(null, null, 'get'); //,'tr_status.php?filter_set=1','POST',null,'sform'); $filterForm->setAttribute('name', 'zbx_filter'); $filterForm->setAttribute('id', 'zbx_filter'); $filterForm->addVar('fullscreen', $_REQUEST['fullscreen']); $filterForm->addVar('groupid', $_REQUEST['groupid']); $filterForm->addVar('hostid', $_REQUEST['hostid']); $tr_select = new CComboBox('show_triggers', $show_triggers); $tr_select->addItem(TRIGGERS_OPTION_ALL, S_ANY);
** ** 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. **/ $proxyWidget = new CWidget(); // create new proxy button $createForm = new CForm('get'); $createForm->cleanItems(); $createForm->addItem(new CSubmit('form', _('Create proxy'))); $proxyWidget->addPageHeader(_('CONFIGURATION OF PROXIES'), $createForm); $proxyWidget->addHeader(_('Proxies')); $proxyWidget->addHeaderRowNumber(); // create form $proxyForm = new CForm('get'); $proxyForm->setName('proxyForm'); // create table $proxyTable = new CTableInfo(_('No proxies found.')); $proxyTable->setHeader(array(new CCheckBox('all_hosts', null, "checkAll('" . $proxyForm->getName() . "', 'all_hosts', 'hosts');"), make_sorting_header(_('Name'), 'host', $this->data['sort'], $this->data['sortorder']), _('Mode'), _('Last seen (age)'), _('Host count'), _('Item count'), _('Required performance (vps)'), _('Hosts'))); foreach ($this->data['proxies'] as $proxy) { $hosts = array(); if (!empty($proxy['hosts'])) { $i = 1; foreach ($proxy['hosts'] as $host) { if ($i > $this->data['config']['max_in_table']) { $hosts[] = ' …';
$page['hist_arg'] = array(); require_once dirname(__FILE__) . '/include/page_header.php'; $fields = array('problem_unack_color' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'problem_ack_color' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'ok_unack_color' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'ok_ack_color' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'problem_unack_style' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'problem_ack_style' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'ok_unack_style' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'ok_ack_style' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'ok_period' => array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), 'blink_period' => array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), 'save' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'form' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form_refresh' => array(T_ZBX_INT, O_OPT, null, null, null)); check_fields($fields); if (isset($_REQUEST['save'])) { $configs = array('ok_period' => get_request('ok_period'), 'blink_period' => get_request('blink_period'), 'problem_unack_color' => get_request('problem_unack_color'), 'problem_ack_color' => get_request('problem_ack_color'), 'ok_unack_color' => get_request('ok_unack_color'), 'ok_ack_color' => get_request('ok_ack_color'), 'problem_unack_style' => get_request('problem_unack_style', 0), 'problem_ack_style' => get_request('problem_ack_style', 0), 'ok_unack_style' => get_request('ok_unack_style', 0), 'ok_ack_style' => get_request('ok_ack_style', 0)); $result = update_config($configs); show_messages($result, _('Configuration updated'), _('Cannot update configuration')); } $form = new CForm(); $form->cleanItems(); $cmbConf = new CComboBox('configDropDown', 'adm.triggerdisplayoptions.php', 'redirect(this.options[this.selectedIndex].value);'); $cmbConf->addItems(array('adm.gui.php' => _('GUI'), 'adm.housekeeper.php' => _('Housekeeping'), 'adm.images.php' => _('Images'), 'adm.iconmapping.php' => _('Icon mapping'), 'adm.regexps.php' => _('Regular expressions'), 'adm.macros.php' => _('Macros'), 'adm.valuemapping.php' => _('Value mapping'), 'adm.workingtime.php' => _('Working time'), 'adm.triggerseverities.php' => _('Trigger severities'), 'adm.triggerdisplayoptions.php' => _('Trigger displaying options'), 'adm.other.php' => _('Other'))); $form->addItem($cmbConf); $cnf_wdgt = new CWidget(); $cnf_wdgt->addPageHeader(_('CONFIGURATION OF ZABBIX'), $form); $data = array(); $data['form_refresh'] = get_request('form_refresh', 0); // form has been submitted if ($data['form_refresh']) { $data['ok_period'] = get_request('ok_period'); $data['blink_period'] = get_request('blink_period'); $data['problem_unack_color'] = get_request('problem_unack_color'); $data['problem_ack_color'] = get_request('problem_ack_color'); $data['ok_unack_color'] = get_request('ok_unack_color'); $data['ok_ack_color'] = get_request('ok_ack_color'); $data['problem_unack_style'] = get_request('problem_unack_style'); $data['problem_ack_style'] = get_request('problem_ack_style'); $data['ok_unack_style'] = get_request('ok_unack_style'); $data['ok_ack_style'] = get_request('ok_ack_style'); } else {
/* ** Zabbix ** Copyright (C) 2001-2014 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. **/ $screenWidget = new CWidget(); $screenWidget->addPageHeader(_('CONFIGURATION OF SCREENS')); $screenWidget->addHeader($this->data['screen']['name']); if (!empty($this->data['screen']['templateid'])) { $screenWidget->addItem(get_header_host_table('screens', $this->data['screen']['templateid'])); } $screenWidget->addItem(BR()); $screenBuilder = new CScreenBuilder(array('isFlickerfree' => false, 'screen' => $this->data['screen'], 'mode' => SCREEN_MODE_EDIT, 'updateProfile' => false)); $screenWidget->addItem($screenBuilder->show()); $screenBuilder->insertInitScreenJs($this->data['screenid']); $screenBuilder->insertProcessObjectsJs(); return $screenWidget;
** 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. **/ $hostInventoryWidget = new CWidget(); $rForm = new CForm('get'); $rForm->addItem(array(_('Group'), SPACE, $this->data['pageFilter']->getGroupsCB())); $hostInventoryWidget->addPageHeader(_('HOST INVENTORY'), SPACE); $hostInventoryWidget->addHeader(_('Hosts'), $rForm); $filterTable = new CTable('', 'filter filter-center'); // getting inventory fields to make a drop down $inventoryFields = getHostInventories(true); // 'true' means list should be ordered by title $inventoryFieldsComboBox = new CComboBox('filter_field', $this->data['filterField']); foreach ($inventoryFields as $inventoryField) { $inventoryFieldsComboBox->addItem($inventoryField['db_field'], $inventoryField['title']); } $exactComboBox = new CComboBox('filter_exact', $this->data['filterExact']); $exactComboBox->addItem('0', _('like')); $exactComboBox->addItem('1', _('exactly')); $filterTable->addRow(array(array(array(bold(_('Field')), SPACE, $inventoryFieldsComboBox), array($exactComboBox, new CTextBox('filter_field_value', $this->data['filterFieldValue'], 20)))), 'host-inventories'); $filter = new CSubmit('filter_set', _('Filter')); $filter->useJQueryStyle('main');
** 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__) . '/js/configuration.action.edit.js.php'; $actionWidget = new CWidget(null, 'action-edit'); $actionWidget->addPageHeader(_('CONFIGURATION OF ACTIONS')); // create form $actionForm = new CForm(); $actionForm->setName('action.edit'); $actionForm->addVar('form', $this->data['form']); $actionForm->addVar('form_refresh', $this->data['form_refresh']); $actionForm->addVar('eventsource', $this->data['eventsource']); if (!empty($this->data['actionid'])) { $actionForm->addVar('actionid', $this->data['actionid']); } /* * Action tab */ $actionFormList = new CFormList('actionlist'); $nameTextBox = new CTextBox('name', $this->data['action']['name'], ZBX_TEXTBOX_STANDARD_SIZE); $nameTextBox->attr('autofocus', 'autofocus');
} else { if (isset($_REQUEST['delete'])) { $del_groups = get_request('del_groups', array()); foreach ($del_groups as $gnum => $groupid) { if (!isset($_REQUEST['groupids'][$groupid])) { continue; } unset($_REQUEST['groupids'][$groupid]); } } } } $dashboard_wdgt = new CWidget(); // Header $dashboard_wdgt->setClass('header'); $dashboard_wdgt->addPageHeader(S_DASHBOARD_CONFIGURATION_BIG, SPACE); //------------- // GROUPS $dashForm = new CFormTable(S_FILTER); $dashForm->addVar('form_refresh', 1); $dashForm->setName('dashconf'); $dashForm->setAttribute('id', 'dashform'); if (isset($_REQUEST['form_refresh'])) { $filterEnable = get_request('filterEnable', 0); $groupids = get_request('groupids', array()); $groupids = zbx_toHash($groupids); $grpswitch = get_request('grpswitch', 0); $maintenance = get_request('maintenance', 0); $extAck = get_request('extAck', 0); $severity = get_request('trgSeverity', array()); $severity = array_keys($severity);
** (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. **/ $itemWidget = new CWidget(); if (!empty($this->data['hostid'])) { $itemWidget->addItem(get_header_host_table('items', $this->data['hostid'])); } $itemWidget->addPageHeader(_('CONFIGURATION OF ITEMS')); // create form $itemForm = new CForm(); $itemForm->setName('itemForm'); $itemForm->addVar('group_itemid', $this->data['group_itemid']); $itemForm->addVar('hostid', $this->data['hostid']); $itemForm->addVar('go', 'copy_to'); // create form list $itemFormList = new CFormList('itemFormList'); // append type to form list $copyTypeComboBox = new CComboBox('copy_type', $this->data['copy_type'], 'submit()'); $copyTypeComboBox->addItem(0, _('Hosts')); $copyTypeComboBox->addItem(1, _('Host groups')); $itemFormList->addRow(_('Target type'), $copyTypeComboBox); // append targets to form list $targetList = array();
** 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__) . '/js/configuration.triggers.edit.js.php'; $triggersWidget = new CWidget(); // append host summary to widget header if (!empty($this->data['hostid'])) { if (!empty($this->data['parent_discoveryid'])) { $triggersWidget->addItem(get_header_host_table('triggers', $this->data['hostid'], $this->data['parent_discoveryid'])); } else { $triggersWidget->addItem(get_header_host_table('triggers', $this->data['hostid'])); } } if (!empty($this->data['parent_discoveryid'])) { $triggersWidget->addPageHeader(_('CONFIGURATION OF TRIGGER PROTOTYPES')); } else { $triggersWidget->addPageHeader(_('CONFIGURATION OF TRIGGERS')); } // create form $triggersForm = new CForm(); $triggersForm->setName('triggersForm'); $triggersForm->addVar('hostid', $this->data['hostid']); $triggersForm->addVar('action', $this->data['action']); if ($this->data['parent_discoveryid']) { $triggersForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']); } foreach ($this->data['g_triggerid'] as $triggerid) { $triggersForm->addVar('g_triggerid[' . $triggerid . ']', $triggerid); } // create form list
require_once dirname(__FILE__) . '/include/page_header.php'; // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields = array('groupid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), 'groupby' => array(T_ZBX_STR, O_OPT, P_SYS, DB_ID, NULL)); check_fields($fields); validate_sort_and_sortorder('host_count', ZBX_SORT_DOWN); if (PAGE_TYPE_JS == $page['type'] || PAGE_TYPE_HTML_BLOCK == $page['type']) { require_once dirname(__FILE__) . '/include/page_footer.php'; exit; } $options = array('groups' => array('real_hosts' => 1), 'groupid' => get_request('groupid', null)); $pageFilter = new CPageFilter($options); $_REQUEST['groupid'] = $pageFilter->groupid; $_REQUEST['groupby'] = get_request('groupby', ''); $groupFieldTitle = ''; $hostinvent_wdgt = new CWidget(); $hostinvent_wdgt->addPageHeader(_('HOST INVENTORY OVERVIEW')); // getting inventory fields to make a drop down $inventoryFields = getHostInventories(true); // 'true' means list should be ordered by title $inventoryFieldsComboBox = new CComboBox('groupby', $_REQUEST['groupby'], 'submit()'); $inventoryFieldsComboBox->addItem('', _('not selected')); foreach ($inventoryFields as $inventoryField) { $inventoryFieldsComboBox->addItem($inventoryField['db_field'], $inventoryField['title'], $_REQUEST['groupby'] === $inventoryField['db_field'] ? 'yes' : null); if ($_REQUEST['groupby'] === $inventoryField['db_field']) { $groupFieldTitle = $inventoryField['title']; } } $r_form = new CForm('get'); $r_form->addItem(array(_('Group'), SPACE, $pageFilter->getGroupsCB(true), SPACE)); $r_form->addItem(array(_('Grouping by'), SPACE, $inventoryFieldsComboBox)); $hostinvent_wdgt->addHeader(_('Hosts'), $r_form);
** (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. **/ $mediaTypeWidget = new CWidget(); // create new media type button $createForm = new CForm('get'); $createForm->addItem(new CSubmit('form', _('Create media type'))); $mediaTypeWidget->addPageHeader(_('CONFIGURATION OF MEDIA TYPES'), $createForm); $mediaTypeWidget->addHeader(_('Media types')); $mediaTypeWidget->addHeaderRowNumber(); // create form $mediaTypeForm = new CForm(); $mediaTypeForm->setName('mediaTypesForm'); // create table $mediaTypeTable = new CTableInfo(_('No media types found.')); $mediaTypeTable->setHeader(array(new CCheckBox('all_media_types', null, "checkAll('" . $mediaTypeForm->getName() . "', 'all_media_types', 'mediatypeids');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'description'), make_sorting_header(_('Type'), 'type'), _('Status'), _('Used in actions'), _('Details'))); foreach ($this->data['mediatypes'] as $mediaType) { switch ($mediaType['typeid']) { case MEDIA_TYPE_EMAIL: $details = _('SMTP server') . NAME_DELIMITER . '"' . $mediaType['smtp_server'] . '", ' . _('SMTP helo') . NAME_DELIMITER . '"' . $mediaType['smtp_helo'] . '", ' . _('SMTP email') . NAME_DELIMITER . '"' . $mediaType['smtp_email'] . '"'; break; case MEDIA_TYPE_EXEC: $details = _('Script name') . NAME_DELIMITER . '"' . $mediaType['exec_path'] . '"';
** 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. **/ $proxyWidget = new CWidget(); $proxyWidget->addPageHeader(_('CONFIGURATION OF PROXIES')); // create form $proxyForm = new CForm(); $proxyForm->setName('proxyForm'); $proxyForm->addVar('form', $this->data['form']); $proxyForm->addVar('form_refresh', $this->data['form_refresh']); if (!empty($this->data['proxyid'])) { $proxyForm->addVar('proxyid', $this->data['proxyid']); } // create form list $proxyFormList = new CFormList('proxyFormList'); $nameTextBox = new CTextBox('host', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE, 'no', 64); $nameTextBox->attr('autofocus', 'autofocus'); $proxyFormList->addRow(_('Proxy name'), $nameTextBox); // append status to form list $statusBox = new CComboBox('status', $this->data['status'], 'submit()');
$problemTrigger['description'] = $triggers[$problemTrigger['triggerid']]['description']; } unset($problemTrigger); } unset($serviceSla); $treeData = array(); createServiceMonitoringTree($services, $slaData, $period, $treeData); $tree = new CServiceTree('service_status_tree', $treeData, array('caption' => _('Service'), 'status' => _('Status'), 'reason' => _('Reason'), 'sla' => _('Problem time'), 'sla2' => nbsp(_('SLA') . ' / ' . _('Acceptable SLA')))); if ($tree) { // creates form for choosing a preset interval $r_form = new CForm(); $r_form->setAttribute('class', 'nowrap'); $r_form->setMethod('get'); $r_form->setAttribute('name', 'period_choice'); $r_form->addVar('fullscreen', $_REQUEST['fullscreen']); $period_combo = new CComboBox('period', $period, 'javascript: submit();'); foreach ($periods as $key => $val) { $period_combo->addItem($key, $val); } $r_form->addItem(array(_('Period') . SPACE, $period_combo)); $srv_wdgt = new CWidget('hat_services', 'service-list service-mon'); $srv_wdgt->addPageHeader(_('IT SERVICES'), get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen']))); $srv_wdgt->addHeader(_('IT services'), $r_form); $srv_wdgt->addItem(BR()); $srv_wdgt->addItem($tree->getHTML()); $srv_wdgt->show(); } else { error(_('Cannot format Tree. Check logic structure in service links.')); } } require_once dirname(__FILE__) . '/include/page_footer.php';
$result = false; DBend(false); error($e->getMessage()); show_error_message(_('Cannot update macros')); } } /* * Display */ $form = new CForm(); $form->cleanItems(); $cmbConf = new CComboBox('configDropDown', 'adm.macros.php', 'redirect(this.options[this.selectedIndex].value);'); $cmbConf->addItems(array('adm.gui.php' => _('GUI'), 'adm.housekeeper.php' => _('Housekeeping'), 'adm.images.php' => _('Images'), 'adm.iconmapping.php' => _('Icon mapping'), 'adm.regexps.php' => _('Regular expressions'), 'adm.macros.php' => _('Macros'), 'adm.valuemapping.php' => _('Value mapping'), 'adm.workingtime.php' => _('Working time'), 'adm.triggerseverities.php' => _('Trigger severities'), 'adm.triggerdisplayoptions.php' => _('Trigger displaying options'), 'adm.other.php' => _('Other'))); $form->addItem($cmbConf); $cnf_wdgt = new CWidget(); $cnf_wdgt->addPageHeader(_('CONFIGURATION OF MACROS'), $form); $data = array(); $data['form_refresh'] = get_request('form_refresh', 0); $data['macros'] = array(); if ($data['form_refresh']) { $data['macros'] = get_request('macros', array()); } else { $data['macros'] = API::UserMacro()->get(array('output' => API_OUTPUT_EXTEND, 'globalmacro' => 1)); } if (empty($data['macros'])) { $data['macros'] = array(0 => array('macro' => '', 'value' => '')); } if ($result) { $data['macros'] = order_macros($data['macros'], 'macro'); } $macrosForm = new CView('administration.general.macros.edit', $data);
} if (get_request('hostid') && !API::Host()->isReadable(array($_REQUEST['hostid']))) { access_deny(); } validate_sort_and_sortorder('name', ZBX_SORT_DOWN); $options = array('groups' => array('real_hosts' => true, 'with_httptests' => true), 'hosts' => array('with_monitored_items' => true, 'with_httptests' => true), 'hostid' => get_request('hostid', null), 'groupid' => get_request('groupid', null)); $pageFilter = new CPageFilter($options); $_REQUEST['groupid'] = $pageFilter->groupid; $_REQUEST['hostid'] = $pageFilter->hostid; $displayNodes = is_array(get_current_nodeid()) && $pageFilter->groupid == 0 && $pageFilter->hostid == 0; $r_form = new CForm('get'); $r_form->addVar('fullscreen', $_REQUEST['fullscreen']); $r_form->addItem(array(_('Group') . SPACE, $pageFilter->getGroupsCB(true))); $r_form->addItem(array(SPACE . _('Host') . SPACE, $pageFilter->getHostsCB(true))); $httpmon_wdgt = new CWidget(); $httpmon_wdgt->addPageHeader(_('STATUS OF WEB MONITORING'), get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen']))); $httpmon_wdgt->addHeader(_('Web scenarios'), $r_form); $httpmon_wdgt->addHeaderRowNumber(); // TABLE $table = new CTableInfo(_('No web scenarios found.')); $table->SetHeader(array($displayNodes ? _('Node') : null, $_REQUEST['hostid'] == 0 ? make_sorting_header(_('Host'), 'hostname') : null, make_sorting_header(_('Name'), 'name'), _('Number of steps'), _('Last check'), _('Status'))); $paging = null; if ($pageFilter->hostsSelected) { $options = array('output' => array('httptestid'), 'templated' => false, 'filter' => array('status' => HTTPTEST_STATUS_ACTIVE), 'limit' => $config['search_limit'] + 1); if ($pageFilter->hostid > 0) { $options['hostids'] = $pageFilter->hostid; } elseif ($pageFilter->groupid > 0) { $options['groupids'] = $pageFilter->groupid; } $httpTests = API::HttpTest()->get($options); $paging = getPagingLine($httpTests);
** ** 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. **/ $discoveryWidget = new CWidget('hat_discovery'); // create header form $discoveryHeaderForm = new CForm('get'); $discoveryHeaderForm->setName('slideHeaderForm'); $discoveryHeaderForm->addVar('fullscreen', $this->data['fullscreen']); $discoveryWidget->addPageHeader(_('STATUS OF DISCOVERY'), get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen']))); $discoveryRulesComboBox = $this->data['pageFilter']->getDiscoveryCB(); $discoveryHeaderForm->addItem(array(_('Discovery rule') . SPACE, $discoveryRulesComboBox)); $discoveryWidget->addHeader(_('Discovery rules'), $discoveryHeaderForm); // create table $discoveryTable = new CTableInfo(_('No discovered devices found.')); $discoveryTable->makeVerticalRotation(); $discoveredDeviceCol = make_sorting_header(_('Discovered device'), 'ip', $this->data['sort'], $this->data['sortorder']); $discoveredDeviceCol->addClass('left'); $header = array($discoveredDeviceCol, new CCol(_('Monitored host'), 'left'), new CCol(array(_('Uptime') . '/', _('Downtime')), 'left')); foreach ($this->data['services'] as $name => $foo) { $header[] = new CCol($name, 'vertical_rotation'); } $discoveryTable->setHeader($header, 'vertical_header'); foreach ($this->data['drules'] as $drule) { $discovery_info = array();