本文整理汇总了PHP中CWidget::show方法的典型用法代码示例。如果您正苦于以下问题:PHP CWidget::show方法的具体用法?PHP CWidget::show怎么用?PHP CWidget::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWidget
的用法示例。
在下文中一共展示了CWidget::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CComboBox
$groups = API::HostGroup()->get(array('output' => API_OUTPUT_EXTEND));
order_result($groups, 'name');
$group_combo = new CComboBox('group', $_REQUEST['group'], 'javascript: submit();');
foreach ($groups as $group) {
$group_combo->addItem($group['groupid'], $group['name']);
}
$item_combo = new CComboBox('item', $_REQUEST['item'], 'javascript: submit();');
if (isset($_REQUEST['group'])) {
$items = get_items_by_groupid($_REQUEST['group']);
foreach ($items as $item) {
$item_combo->addItem($item, $item);
}
}
$rightForm = new CForm('get');
$rightForm->addItem(array(_('Group') . SPACE, $group_combo));
$rightForm->addItem(array(SPACE . _('Item') . SPACE, $item_combo));
$sortWidget->addPageHeader(_('SORT HOSTVALUE') . SPACE . '[' . zbx_date2str(_('d M Y H:i:s')) . ']');
$sortWidget->addHeader(_('Sort hostvalue'), $rightForm);
$sortTable = new CTableInfo(_('No hostitem found.'));
$sortTable->setHeader(array(_('Host'), _('Last Time'), make_sorting_header(_('Last Value'), 'lastvalue'), make_sorting_header(_('Prev Value'), 'prevvalue'), _('Graph')));
if (isset($_REQUEST['group']) && isset($_REQUEST['item'])) {
$items = API::Item()->get(array('output' => array('hostid', 'lastclock', 'lastvalue', 'prevvalue', 'itemid'), 'groupids' => $_REQUEST['group'], 'filter' => array('key_' => $_REQUEST['item'])));
order_result($items, $sortfield, $sortorder);
foreach ($items as $item) {
$host = get_host_by_hostid($item['hostid']);
$sortTable->addRow(array($host['name'], date('Y-m-d H:i:s', $item['lastclock']), $item['lastvalue'], $item['prevvalue'], new CLink(_('Show'), 'history.php?action=showgraph&itemid=' . $item['itemid'])));
}
}
$sortWidget->addItem($sortTable);
$sortWidget->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
示例2: CCheckBox
// SPACE added to extend CB width in Chrome
$cbMain = new CCheckBox('maintenance', $maintenance, null, '1');
if (!$filterEnable) {
$cbMain->setAttribute('disabled', 'disabled');
}
$dashForm->addRow(S_HOSTS, array($cbMain, S_SHOW_HOSTS_IN_MAINTENANCE));
// Trigger
$severity = zbx_toHash($severity);
$trgSeverities = array();
$severities = array(TRIGGER_SEVERITY_NOT_CLASSIFIED, TRIGGER_SEVERITY_INFORMATION, TRIGGER_SEVERITY_WARNING, TRIGGER_SEVERITY_AVERAGE, TRIGGER_SEVERITY_HIGH, TRIGGER_SEVERITY_DISASTER);
foreach ($severities as $snum => $sever) {
$cb = new CCheckBox('trgSeverity[' . $sever . ']', isset($severity[$sever]), '', 1);
$cb->setEnabled($filterEnable);
$trgSeverities[] = array($cb, getSeverityCaption($sever));
$trgSeverities[] = BR();
}
array_pop($trgSeverities);
$dashForm->addRow(S_TRIGGERS_WITH_SEVERITY, $trgSeverities);
$config = select_config();
$cb = new CComboBox('extAck', $extAck);
$cb->addItems(array(EXTACK_OPTION_ALL => S_O_ALL, EXTACK_OPTION_BOTH => S_O_SEPARATED, EXTACK_OPTION_UNACK => S_O_UNACKNOWLEDGED_ONLY));
$cb->setEnabled($filterEnable && $config['event_ack_enable']);
if (!$config['event_ack_enable']) {
$cb->setAttribute('title', S_EVENT_ACKNOWLEDGING_DISABLED);
}
$dashForm->addRow(S_PROBLEM_DISPLAY, $cb);
//-----
$dashForm->addItemToBottomRow(new CButton('save', S_SAVE));
$dashboard_wdgt->addItem($dashForm);
$dashboard_wdgt->show();
include_once 'include/page_footer.php';
示例3: unset
$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';
示例4: CRow
$row = new CRow(array(SPACE, $config['event_ack_enable'] ? $ack_cb_col : null, $status, $clock, zbx_date2age($row_event['clock']), zbx_date2age($next_clock, $row_event['clock']), $config['event_ack_enable'] ? $ack : NULL, is_show_all_nodes() ? SPACE : null, $empty_col), 'odd_row');
$row->setAttribute('data-parentid', $trigger['triggerid']);
$row->addStyle('display: none;');
$table->addRow($row);
if ($i > $config['event_show_max']) {
break;
}
}
}
}
//----- GO ------
$footer = null;
if ($config['event_ack_enable']) {
$goBox = new CComboBox('go');
$goBox->addItem('bulkacknowledge', S_BULK_ACKNOWLEDGE);
// goButton name is necessary!!!
$goButton = new CButton('goButton', S_GO . ' (0)');
$goButton->setAttribute('id', 'goButton');
$show_event_col ? zbx_add_post_js('chkbxRange.pageGoName = "events";') : zbx_add_post_js('chkbxRange.pageGoName = "triggers";');
$footer = get_table_header(array($goBox, $goButton));
}
//----
$table = array($paging, $table, $paging, $footer);
$m_form->addItem($table);
$trigg_wdgt->addItem($m_form);
$trigg_wdgt->show();
zbx_add_post_js('blink.init();');
zbx_add_post_js("var switcher = new CSwitcher('{$switcherName}');");
$jsmenu = new CPUMenu(null, 170);
$jsmenu->InsertJavaScript();
include_once 'include/page_footer.php';
示例5: array
if ($host['status'] == HOST_STATUS_MONITORED) {
$monitoredHostIds[$host['hostid']] = true;
}
}
}
if ($monitoredHostIds) {
$monitoredHosts = API::Host()->get(array('output' => array('hostid'), 'selectGroups' => array('groupid'), 'hostids' => array_keys($monitoredHostIds), 'preservekeys' => true));
}
foreach ($triggers as $trigger) {
foreach ($trigger['hosts'] as $host) {
if ($host['status'] == HOST_STATUS_MONITORED) {
// Pass a monitored 'hostid' and corresponding first 'groupid' to menu pop-up "Events" link.
$trigger['hostid'] = $host['hostid'];
$trigger['groupid'] = $monitoredHosts[$trigger['hostid']]['groups'][0]['groupid'];
break;
} else {
// Unmonitored will have disabled "Events" link and there is no 'groupid' or 'hostid'.
$trigger['hostid'] = 0;
$trigger['groupid'] = 0;
}
}
$hostId = $trigger['hosts'][0]['hostid'];
$hostName = new CSpan($trigger['hosts'][0]['name'], 'link_menu menu-host' . ($hosts[$hostId]['status'] == HOST_STATUS_NOT_MONITORED ? ' not-monitored' : ''));
$hostName->setMenuPopup(CMenuPopupHelper::getHost($hosts[$hostId], $scripts[$hostId]));
$triggerDescription = new CSpan($trigger['description'], 'link_menu');
$triggerDescription->setMenuPopup(CMenuPopupHelper::getTrigger($trigger));
$table->addRow(array($hostName, $triggerDescription, getSeverityCell($trigger['priority']), $trigger['cnt_event']));
}
$rprt_wdgt->addItem($table);
$rprt_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
示例6: CLink
}
} else {
if (empty($apps)) {
$url = '?open=1&applicationid=0';
} else {
if (isset($apps[0])) {
$url = '?close=1' . url_param($tmp_apps, false, 'apps');
} else {
$url = '?close=1&applicationid=0' . url_param($tmp_apps, false, 'apps');
}
}
}
$url .= url_param('groupid') . url_param('hostid') . url_param('fullscreen') . url_param('select');
$link = new CLink($img, $url);
$col = new CCol(array(bold('- ' . 'other' . ' -'), SPACE . '(' . _n('%1$s Item', '%1$s Items', $db_host['item_cnt']) . ')'));
$col->setColSpan(5);
// host JS menu link
$hostSpan = null;
if ($_REQUEST['hostid'] == 0) {
$hostSpan = new CSpan($host['name'], 'link_menu menu-host');
$scripts = $hostScripts[$host['hostid']];
$hostSpan->setAttribute('data-menu', hostMenuData($host, $scripts));
}
$table->addRow(array($link, get_node_name_by_elid($db_host['hostid']), $hostSpan, $col));
foreach ($app_rows as $row) {
$table->addRow($row);
}
}
$latest_wdgt->addItem($table);
$latest_wdgt->show();
require_once 'include/page_footer.php';
示例7: count
$hosts_count = CTemplate::get($params);
$overalCount = $hosts_count['rowscount'];
$viewCount = count($templates);
$header = array(is_show_all_nodes() ? new CCol(S_NODE) : null, new CCol(S_TEMPLATES), new CCol(S_ITEMS), new CCol(S_TRIGGERS), new CCol(S_GRAPHS));
$table = new CTableInfo();
$table->setHeader($header);
foreach ($templates as $num => $template) {
$templateid = $template['hostid'];
$groupid = isset($hostsgroups[$templateid]) ? $hostsgroups[$templateid] : 0;
$link = 'groupid=' . $groupid . '&hostid=' . $templateid;
$caption = make_decoration($template['host'], $search);
$table->addRow(array(get_node_name_by_elid($templateid), new CLink($caption, 'hosts.php?config=3&hostid=' . $templateid), new CLink(S_GO, 'items.php?' . $link), new CLink(S_GO, 'triggers.php?' . $link), new CLink(S_GO, 'graphs.php?' . $link)));
}
$table->setFooter(new CCol(S_DISPLAYING . SPACE . $viewCount . SPACE . S_OF_SMALL . SPACE . $overalCount . SPACE . S_FOUND_SMALL));
$wdgt_templates = new CWidget('search_templates', $table);
$wdgt_templates->addHeader(S_TEMPLATES, SPACE);
$right_tab->addRow($wdgt_templates);
}
//----------------
$td_l = new CCol($left_tab);
$td_l->setAttribute('valign', 'top');
$td_r = new CCol($right_tab);
$td_r->setAttribute('valign', 'top');
$outer_table = new CTable();
$outer_table->setAttribute('border', 0);
$outer_table->setCellPadding(1);
$outer_table->setCellSpacing(1);
$outer_table->addRow(array($td_l, $td_r));
$search_wdgt->addItem($outer_table);
$search_wdgt->show();
include_once 'include/page_footer.php';
示例8: CLink
$proxy = get_host_by_hostid($rule_data["proxy_hostid"]);
array_push($description, $proxy["host"], ":");
}
array_push($description, new CLink($rule_data['name'], "?form=update&druleid=" . $rule_data['druleid']));
$tblDiscovery->addRow(array(new CCheckBox('g_druleid[' . $rule_data["druleid"] . ']', null, null, $rule_data["druleid"]), $description, $rule_data['iprange'], $rule_data['delay'], implode(', ', $checks), $status));
}
// pagination at the top and the bottom of the page
$tblDiscovery->addRow(new CCol($paging));
$dscry_wdgt->addItem($paging);
// gobox
$goBox = new CComboBox('go');
$goOption = new CComboItem('activate', S_ENABLE_SELECTED);
$goOption->setAttribute('confirm', S_ENABLE_SELECTED_DISCOVERY_RULES);
$goBox->addItem($goOption);
$goOption = new CComboItem('disable', S_DISABLE_SELECTED);
$goOption->setAttribute('confirm', S_DISABLE_SELECTED_DISCOVERY_RULES);
$goBox->addItem($goOption);
$goOption = new CComboItem('delete', S_DELETE_SELECTED);
$goOption->setAttribute('confirm', S_DELETE_SELECTED_DISCOVERY_RULES);
$goBox->addItem($goOption);
// goButton name is necessary!!!
$goButton = new CButton('goButton', S_GO . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "g_druleid";');
$tblDiscovery->setFooter(new CCol(array($goBox, $goButton)));
//----
$form->addItem($tblDiscovery);
$dscry_wdgt->addItem($form);
}
$dscry_wdgt->show();
include_once 'include/page_footer.php';
示例9: valueDistributionFormForMultiplePeriods
switch ($config) {
default:
case 1:
$rep_form = valueDistributionFormForMultiplePeriods($validItems);
break;
case 2:
$rep_form = valueDistributionFormForMultipleItems($validItems, $validPeriods);
break;
case 3:
$rep_form = valueComparisonFormForMultiplePeriods();
break;
}
$rep6_wdgt->addFlicker($rep_form, CProfile::get('web.report6.filter.state', 1));
if (isset($_REQUEST['report_show'])) {
$items = $config == 3 ? array(array('itemid' => get_request('itemid'))) : get_request('items');
if ($isValid && ($config != 3 ? $validItems : true) && ($config == 2 ? $validPeriods : true)) {
$src = 'chart_bar.php?' . 'config=' . $config . url_param('title') . url_param('xlabel') . url_param('ylabel') . url_param('scaletype') . url_param('avgperiod') . url_param('showlegend') . url_param('sorttype') . url_param('report_timesince') . url_param('report_timetill') . url_param('periods') . url_param($items, false, 'items') . url_param('hostids') . url_param('groupids') . url_param('palette') . url_param('palettetype');
$rep_tab->addRow(new CImg($src, 'report'));
}
}
$outer_table = new CTable();
$outer_table->setAttribute('border', 0);
$outer_table->setAttribute('width', '100%');
$outer_table->setCellPadding(1);
$outer_table->setCellSpacing(1);
$tmp_row = new CRow($rep_tab);
$tmp_row->setAttribute('align', 'center');
$outer_table->addRow($tmp_row);
$rep6_wdgt->addItem($outer_table);
$rep6_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
示例10: getPagingLine
order_result($actions, 'clock', ZBX_SORT_DOWN);
$paging = getPagingLine($actions);
//---------
foreach ($actions as $num => $row) {
if (empty($row['details'])) {
$details = array();
$sql = 'SELECT table_name,field_name,oldvalue,newvalue ' . ' FROM auditlog_details ' . ' WHERE auditid=' . $row['auditid'];
$db_details = DBselect($sql);
while ($db_detail = DBfetch($db_details)) {
$details[] = array($db_detail['table_name'] . '.' . $db_detail['field_name'] . ': ' . $db_detail['oldvalue'] . ' => ' . $db_detail['newvalue'], BR());
}
} else {
$details = $row['details'];
}
$table->addRow(array(zbx_date2str(S_AUDITLOGS_RECORD_DATE_FORMAT, $row['clock']), $row['alias'], $row['ip'], $row['resourcetype'], $row['action'], $row['resourceid'], $row['resourcename'], new CCol($details, 'wraptext')));
}
// PAGING FOOTER
$table = array($paging, $table, $paging);
//---------
$audit_wdgt->addItem($table);
$audit_wdgt->show();
// NAV BAR
$timeline = array('period' => $effectiveperiod, 'starttime' => date('YmdHis', $starttime), 'usertime' => null);
if (isset($_REQUEST['stime'])) {
$timeline['usertime'] = date('YmdHis', zbxDateToTime($_REQUEST['stime']) + $timeline['period']);
}
$dom_graph_id = 'events';
$objData = array('id' => 'timeline_1', 'domid' => $dom_graph_id, 'loadSBox' => 0, 'loadImage' => 0, 'loadScroll' => 1, 'dynamic' => 0, 'mainObject' => 1);
zbx_add_post_js('timeControl.addObject("' . $dom_graph_id . '",' . zbx_jsvalue($timeline) . ',' . zbx_jsvalue($objData) . ');');
zbx_add_post_js('timeControl.processObjects();');
include_once 'include/page_footer.php';
示例11: CLink
$style = 'unknown';
$url = 'templates.php?form=update&templateid=' . $linkedToHost['objectid'];
break;
default:
$style = null;
$url = 'hosts.php?form=update&hostid=' . $linkedToHost['objectid'] . '&groupid=' . $_REQUEST['groupid'];
}
if ($linkedToOutput) {
$linkedToOutput[] = ', ';
}
$linkedToOutput[] = new CLink($linkedToHost['name'], $url, $style);
}
$table->addRow(array(new CCheckBox('templates[' . $template['templateid'] . ']', null, null, $template['templateid']), $templatesOutput, $applications, $items, $triggers, $graphs, $screens, $discoveries, $httpTests, $linkedTemplatesOutput ? new CCol($linkedTemplatesOutput, 'wraptext') : '-', $linkedToOutput ? new CCol($linkedToOutput, 'wraptext') : '-'));
}
$goBox = new CComboBox('action');
$goBox->addItem('template.export', _('Export selected'));
$goOption = new CComboItem('template.massdelete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected templates?'));
$goBox->addItem($goOption);
$goOption = new CComboItem('template.massdeleteclear', _('Delete selected with linked elements'));
$goOption->setAttribute('confirm', _('Delete and clear selected templates? (Warning: all linked hosts will be cleared!)'));
$goBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "templates";');
$footer = get_table_header(array($goBox, $goButton));
$form->addItem(array($paging, $table, $paging, $footer));
$templateWidget->addItem($form);
}
$templateWidget->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
示例12: CDiv
$openState = CProfile::get('web.latest.toggle_other', null, $host['hostid']);
$toggle = new CDiv(null, 'app-list-toggle icon-plus-9x9');
if ($openState) {
$toggle->addClass('icon-minus-9x9');
}
$toggle->setAttribute('data-app-id', '0_' . $host['hostid']);
$toggle->setAttribute('data-open-state', $openState);
$hostName = null;
if (!$singleHostSelected) {
$hostName = new CSpan($host['name'], 'link_menu menu-host' . ($host['status'] == HOST_STATUS_NOT_MONITORED ? ' not-monitored' : ''));
$hostName->setMenuPopup(CMenuPopupHelper::getHost($host, $hostScripts[$host['hostid']]));
}
// add toggle row
$table->addRow(array($toggle, '', $hostName, new CCol(array(bold('- ' . 'other' . ' -'), ' (' . _n('%1$s Item', '%1$s Items', $dbHost['item_cnt']) . ')'), null, $filter['showDetails'] ? 10 : 5)), 'odd_row');
// add toggle sub rows
foreach ($appRows as $row) {
$row->setAttribute('parent_app_id', '0_' . $host['hostid']);
$row->addClass('odd_row');
if (!$openState) {
$row->addClass('hidden');
}
$table->addRow($row);
}
}
$goBox = new CComboBox('graphtype', GRAPH_TYPE_STACKED, null, array(GRAPH_TYPE_STACKED => _('Display stacked graph'), GRAPH_TYPE_NORMAL => _('Display graph')));
$goBox->setAttribute('id', 'action');
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$form->addItem(array($table, get_table_header(array($goBox, $goButton))));
$latestWidget->addItem($form);
$latestWidget->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
示例13: CLink
default:
$style = null;
$url = 'hosts.php?form=update&hostid=' . $linked_to_host['hostid'] . '&groupid=' . $_REQUEST['groupid'];
break;
}
$linked_to_output[] = new CLink($linked_to_host['name'], $url, $style);
$linked_to_output[] = ', ';
}
array_pop($linked_to_output);
$table->addRow(array(new CCheckBox('templates[' . $template['templateid'] . ']', NULL, NULL, $template['templateid']), $templates_output, $applications, $items, $triggers, $graphs, $screens, $discoveries, empty($linked_templates_output) ? '-' : new CCol($linked_templates_output, 'wraptext'), empty($linked_to_output) ? '-' : new CCol($linked_to_output, 'wraptext')));
}
// GO{
$goBox = new CComboBox('go');
$goBox->addItem('export', _('Export selected'));
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected templates?'));
$goBox->addItem($goOption);
$goOption = new CComboItem('delete_and_clear', _('Delete selected with linked elements'));
$goOption->setAttribute('confirm', _('Delete and clear selected templates? (Warning: all linked hosts will be cleared!)'));
$goBox->addItem($goOption);
// goButton name is necessary!!!
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "templates";');
$footer = get_table_header(array($goBox, $goButton));
// }GO
$form->addItem(array($paging, $table, $paging, $footer));
$template_wdgt->addItem($form);
}
$template_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
示例14: foreach
$table->setHeader(array(is_show_all_nodes() ? make_sorting_header(S_NODE, 'hostid') : null, make_sorting_header(S_HOST, 'host'), S_GROUP, make_sorting_header(S_NAME, 'pr_name'), make_sorting_header(S_OS, 'pr_os'), make_sorting_header(S_SERIALNO, 'pr_serialno'), make_sorting_header(S_TAG, 'pr_tag'), make_sorting_header(S_MACADDRESS, 'pr_macaddress')));
} else {
$table->setHeader(array(is_show_all_nodes() ? make_sorting_header(S_NODE, 'hostid') : null, make_sorting_header(S_HOST, 'host'), S_GROUP, make_sorting_header(S_DEVICE_OS_SHORT, 'pre_device_os_short'), make_sorting_header(S_DEVICE_HW_ARCH, 'pre_device_hw_arch'), make_sorting_header(S_DEVICE_TYPE, 'pre_device_type'), make_sorting_header(S_DEVICE_STATUS, 'pre_device_status')));
}
foreach ($hosts as $host) {
$host_groups = array();
foreach ($host['groups'] as $group) {
$host_groups[] = $group['name'];
}
natcasesort($host_groups);
$host_groups = implode(', ', $host_groups);
$row = array(get_node_name_by_elid($host['hostid']), new CLink($host['host'], '?hostid=' . $host['hostid'] . url_param('groupid') . '&prof_type=' . $_REQUEST['prof_type']), $host_groups);
if (0 == $_REQUEST['prof_type']) {
$row[] = zbx_str2links($host['profile']['name']);
$row[] = zbx_str2links($host['profile']['os']);
$row[] = zbx_str2links($host['profile']['serialno']);
$row[] = zbx_str2links($host['profile']['tag']);
$row[] = zbx_str2links($host['profile']['macaddress']);
} else {
$row[] = zbx_str2links($host['profile_ext']['device_os_short']);
$row[] = zbx_str2links($host['profile_ext']['device_hw_arch']);
$row[] = zbx_str2links($host['profile_ext']['device_type']);
$row[] = zbx_str2links($host['profile_ext']['device_status']);
}
$table->addRow($row);
}
$table = array($paging, $table, $paging);
$hostprof_wdgt->addItem($table);
}
$hostprof_wdgt->show();
include_once 'include/page_footer.php';
示例15: unset
$trigger_data = CTrigger::get($options);
if (empty($trigger_data)) {
unset($_REQUEST['triggerid']);
} else {
$trigger_data = reset($trigger_data);
$host = reset($trigger_data['hosts']);
$trigger_data['hostid'] = $host['hostid'];
$trigger_data['host'] = $host['host'];
}
}
if (isset($_REQUEST['triggerid'])) {
$rep2_wdgt->addHeader(array(new CLink($trigger_data['host'], '?filter_groupid=' . $_REQUEST['groupid'] . '&filter_hostid=' . $trigger_data['hostid']), ' : ', expand_trigger_description_by_data($trigger_data)), SPACE);
$table = new CTableInfo(null, 'graph');
$table->addRow(new CImg('chart4.php?triggerid=' . $_REQUEST['triggerid']));
$rep2_wdgt->addItem($table);
$rep2_wdgt->show();
} else {
if (isset($_REQUEST['hostid'])) {
$r_form = new CForm();
$r_form->setMethod('get');
$cmbConf = new CComboBox('config', $config, 'submit()');
$cmbConf->addItem(0, S_BY_HOST);
$cmbConf->addItem(1, S_BY_TRIGGER_TEMPLATE);
$r_form->addItem($cmbConf);
$rep2_wdgt->addHeader(S_REPORT_BIG, array(S_MODE . SPACE, $r_form));
// FILTER
$filterForm = get_report2_filter($config, $PAGE_GROUPS, $PAGE_HOSTS);
$rep2_wdgt->addFlicker($filterForm, CProfile::get('web.avail_report.filter.state', 0));
//-------
$options = array('output' => array('triggerid', 'description', 'expression', 'value'), 'expandDescription' => true, 'expandData' => true, 'monitored' => true, 'filter' => array());
if (0 == $config) {