$filter_table->setAttribute('width', '100%'); // Verificação de segurança ============================================ //$groupids = checkAccessGroup ('groupid'); //$hostids = checkAccessHost('hostid'); $hostprof_wdgt = new CWidget(); // Formulario de Filtro comuns ================================================= // FIM Combos de filtro ========================================================= $filter_form = new CForm(); $filter_form->setMethod('get'); $filter_form->setAttribute('name', 'zbx_filter'); $filter_form->setAttribute('id', 'zbx_filter'); // Botões do formulario de filtro ---------------------------------------------- $reset = new CButton('reset', _('Reset')); $reset->onClick("javascript: clearAllForm('zbx_filter');"); $filter = new CButton('filter', _zeT("Update Filter")); $filter->onClick("javascript: submit();"); $footer_col = new CCol(array($filter, SPACE, $reset), 'center'); $footer_col->setColSpan(4); $filter_table->addRow($footer_col); $filter_form->addItem($filter_table); // $filter_form->addVar('report_timesince', date('YmdHis', $report_timesince)); // $filter_form->addVar('report_timetill', date('YmdHis', $report_timetill)); $hostprof_wdgt->addFlicker($filter_form, true); // FIM Formulario de Filtro ========================================================= insert_js($script); $numrows = new CDiv(); $numrows->setAttribute('name', 'numrows'); $report = array(); $hostprof_wdgt->addHeader($numrows); $r_form = new CForm(); // Combo com os formatos de exibição ---------------------------------------
$hostids = checkAccessHost('hostid'); // --------------------------- Fim Filtro --------------------------------------------------------------------- $options = array(); $options['templated_hosts'] = 1; $hosts = API::Host()->get($options); $filtroSegHosts = " hos.status <> 1 AND " . dbConditionInt('hos.hostid', zbx_objectValues($hosts, 'hostid')); $rep2_wdgt = new CWidget(); $rep2_wdgt->addPageHeader(_zeT('Not Supported Items Report')); $filter_form = new CForm(); $filter_form->setMethod('get'); $filter_form->setAttribute('name', 'zbx_filter'); $filter_form->setAttribute('id', 'zbx_filter'); $filter = new CButton('filter', _("Filter")); $filter->onClick("javascript: submit();"); $reset = new CButton('reset', _('Reset')); $reset->onClick("javascript: clearAllForm('zbx_filter');"); $footer_col = new CCol(array($filter, SPACE, $reset), 'center'); $footer_col->setColSpan(4); $filter_table->addRow($footer_col); $filter_form->addItem($filter_table); // $filterForm = get_report2_filter($config, $PAGE_GROUPS, $PAGE_HOSTS); $rep2_wdgt->addFlicker($filter_form, true); if (isset($hostid)) { $sql_from = ''; $sql_where = ''; if (0 == $config) { if ($_REQUEST['groupid'] > 0) { $sql_from .= ',hosts_groups hg '; $sql_where .= ' AND hg.hostid=h.hostid AND hg.groupid=' . $_REQUEST['groupid']; } if ($_REQUEST['hostid'] > 0) {
} $r_form = new CForm('get'); $r_form->addVar('fullscreen', $_REQUEST['fullscreen']); $r_form->addVar('stime', get_request('stime')); $r_form->addVar('period', get_request('period')); // add host and group filters to the form if ($source == EVENT_SOURCE_TRIGGERS & $mode == "report") { $r_form->addVar('form_refresh', get_request('form_refresh')); $r_form->addVar('p_mode', $mode); $r_form->addVar('p_triggerid', $triggerid); $r_form->addVar('p_check_range', $check_range); $r_form->addVar('p_stime', $stime); $r_form->addItem(array(SPACE . _zeT('Number of Incidents') . " >=" . SPACE, new CNumericBox('p_min_events', $min_events, 6))); $r_form->addItem(array(SPACE . _('Interval') . SPACE, new CNumericBox('p_check_range', $check_range, 2))); $btnSubmit = new CButton('filter', _("Apply")); $btnSubmit->onClick("javascript: submit();"); $r_form->addItem($btnSubmit); } else { $r_form->addItem(array(_('Group') . SPACE, $pageFilter->getGroupsCB(true))); $r_form->addItem(array(SPACE . _('Host') . SPACE, $pageFilter->getHostsCB(true))); } $tmp = _zeT('Event Management'); if ($reference > 0) { $triggerInfo = API::Trigger()->get(array('output' => array('triggerid', 'description'), 'triggerids' => $reference, 'expandDescription' => true)); $tmp .= " - " . $triggerInfo[0]['description'] . " [" . zbx_date2str(_('Y.m.d H:i:s'), $stime) . "] "; // var_dump($triggerInfo); } $events_wdgt->addHeader($tmp, $r_form); $events_wdgt->addHeaderRowNumber(); // FILTER {{{ $filterForm = null;