当前位置: 首页>>代码示例>>PHP>>正文


PHP CView::render方法代码示例

本文整理汇总了PHP中CView::render方法的典型用法代码示例。如果您正苦于以下问题:PHP CView::render方法的具体用法?PHP CView::render怎么用?PHP CView::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CView的用法示例。


在下文中一共展示了CView::render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: redirect

    $data['screen'] = get_slideshow_by_slideshowid($data['elementId'], PERM_READ);
    if (!$data['screen']) {
        // Redirect to slide show list.
        ob_end_clean();
        redirect('slideconf.php');
    }
}
$data['fullscreen'] = getRequest('fullscreen');
if ($data['screen']) {
    // get groups and hosts
    if (check_dynamic_items($data['elementId'], 1)) {
        $data['isDynamicItems'] = true;
        $data['pageFilter'] = new CPageFilter(['groups' => ['monitored_hosts' => true, 'with_items' => true], 'hosts' => ['monitored_hosts' => true, 'with_items' => true, 'DDFirstLabel' => _('not selected')], 'hostid' => getRequest('hostid'), 'groupid' => getRequest('groupid')]);
        $data['groupid'] = $data['pageFilter']->groupid;
        $data['hostid'] = $data['pageFilter']->hostid;
    }
    // get element
    $data['element'] = get_slideshow_by_slideshowid($data['elementId'], PERM_READ);
    $data['screen']['editable'] = (bool) get_slideshow_by_slideshowid($data['elementId'], PERM_READ_WRITE);
    if ($data['screen']['delay'] > 0) {
        $data['element']['delay'] = $data['screen']['delay'];
    }
    show_messages();
}
// refresh
$data['refreshMultiplier'] = CProfile::get('web.slides.rf_rate.' . WIDGET_SLIDESHOW, 1, $data['elementId']);
// render view
$slidesView = new CView('monitoring.slides', $data);
$slidesView->render();
$slidesView->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:slides.php

示例2: dirname

    require_once dirname(__FILE__) . '/include/page_footer.php';
    exit;
}
/*
 * Display
 */
$data = array('hostid' => getRequest('hostid', 0), 'fullscreen' => $_REQUEST['fullscreen'], 'screenid' => getRequest('screenid', CProfile::get('web.hostscreen.screenid', null)), 'period' => getRequest('period'), 'stime' => getRequest('stime'));
CProfile::update('web.hostscreen.screenid', $data['screenid'], PROFILE_TYPE_ID);
// get screen list
$data['screens'] = API::TemplateScreen()->get(array('hostids' => $data['hostid'], 'output' => API_OUTPUT_EXTEND));
$data['screens'] = zbx_toHash($data['screens'], 'screenid');
order_result($data['screens'], 'name');
// get screen
$screenid = null;
if (!empty($data['screens'])) {
    $screen = !isset($data['screens'][$data['screenid']]) ? reset($data['screens']) : $data['screens'][$data['screenid']];
    if (!empty($screen['screenid'])) {
        $screenid = $screen['screenid'];
    }
}
$data['screen'] = API::TemplateScreen()->get(array('screenids' => $screenid, 'hostids' => $data['hostid'], 'output' => API_OUTPUT_EXTEND, 'selectScreenItems' => API_OUTPUT_EXTEND));
$data['screen'] = reset($data['screen']);
// get host
if (!empty($data['screen']['hostid'])) {
    $data['host'] = get_host_by_hostid($data['screen']['hostid']);
}
// render view
$screenView = new CView('monitoring.hostscreen', $data);
$screenView->render();
$screenView->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:host_screen.php

示例3: DBfetchArray

        case AUDIT_ACTION_ENABLE:
            $action = _('Enabled');
            break;
        case AUDIT_ACTION_DISABLE:
            $action = _('Disabled');
            break;
        default:
            $action = _('Unknown action');
    }
    $audit['action'] = $action;
    $audit['resourcetype'] = audit_resource2str($audit['resourcetype']);
    if (empty($audit['details'])) {
        $audit['details'] = DBfetchArray(DBselect('SELECT ad.table_name,ad.field_name,ad.oldvalue,ad.newvalue' . ' FROM auditlog_details ad' . ' WHERE ad.auditid=' . zbx_dbstr($audit['auditid'])));
    }
    $data['actions'][$audit['auditid']] = $audit;
}
if (!empty($data['actions'])) {
    order_result($data['actions'], 'clock', ZBX_SORT_DOWN);
}
// get paging
$data['paging'] = getPagingLine($data['actions'], ZBX_SORT_DOWN, new CUrl('auditlogs.php'));
// get timeline
unset($sqlWhere['from'], $sqlWhere['till']);
$sql = 'SELECT MIN(a.clock) AS clock' . ' FROM auditlog a,users u' . ' WHERE a.userid=u.userid' . implode('', $sqlWhere);
$firstAudit = DBfetch(DBselect($sql, $config['search_limit'] + 1));
$data['timeline'] = ['period' => $effectivePeriod, 'starttime' => date(TIMESTAMP_FORMAT, $firstAudit ? $firstAudit['clock'] : null), 'usertime' => isset($_REQUEST['stime']) ? date(TIMESTAMP_FORMAT, zbxDateToTime($data['stime']) + $effectivePeriod) : null];
// render view
$auditView = new CView('administration.auditlogs.list', $data);
$auditView->render();
$auditView->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:auditlogs.php

示例4: CForm

        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);
$cnf_wdgt->addItem($macrosForm->render());
$cnf_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:adm.macros.php

示例5: unset

                $isValid = $triggerFunctionValidator->validate(['function' => $expressionData['function'], 'functionName' => $expressionData['functionName'], 'functionParamList' => $expressionData['functionParamList'], 'valueType' => $data['itemValueType']]);
                if (!$isValid) {
                    unset($data['insert']);
                    throw new Exception($triggerFunctionValidator->getError());
                }
            } else {
                unset($data['insert']);
                throw new Exception($triggerExpression->error);
            }
            // quote function param
            if (isset($data['insert'])) {
                foreach ($data['params'] as $pnum => $param) {
                    $data['params'][$pnum] = quoteFunctionParam($param);
                }
            }
        } else {
            unset($data['insert']);
            throw new Exception(_('Item not selected'));
        }
    } catch (Exception $e) {
        error($e->getMessage());
        show_error_message(_('Cannot insert trigger expression'));
    }
} elseif (hasErrorMesssages()) {
    show_messages();
}
// render view
$expressionView = new CView('configuration.triggers.expression', $data);
$expressionView->render();
$expressionView->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:popup_trexpr.php

示例6: DBstart

        $messageFailed = _('Cannot change authentication method to HTTP');
        DBstart();
        $result = update_config($config);
        if ($result) {
            // reset all sessions
            if ($isAuthenticationTypeChanged) {
                $result &= DBexecute('UPDATE sessions SET status=' . ZBX_SESSION_PASSIVE . ' WHERE sessionid<>' . zbx_dbstr(CWebUser::$data['sessionid']));
            }
            $isAuthenticationTypeChanged = false;
            add_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_ZABBIX_CONFIG, $messageSuccess);
        }
        $result = DBend($result);
        show_messages($result, $messageSuccess, $messageFailed);
    }
}
show_messages();
/*
 * Display
 */
$data = array('form_refresh' => getRequest('form_refresh'), 'config' => $config, 'is_authentication_type_changed' => $isAuthenticationTypeChanged, 'user' => getRequest('user', CWebUser::$data['alias']), 'user_password' => getRequest('user_password', ''), 'user_list' => null, 'change_bind_password' => getRequest('change_bind_password'));
// get tab title
$data['title'] = authentication2str($config['authentication_type']);
// get user list
if (getUserGuiAccess(CWebUser::$data['userid']) == GROUP_GUI_ACCESS_INTERNAL) {
    $data['user_list'] = DBfetchArray(DBselect('SELECT u.alias,u.userid FROM users u ORDER BY u.alias'));
}
// render view
$authenticationView = new CView('administration.authentication.edit', $data);
$authenticationView->render();
$authenticationView->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:authentication.php

示例7: dirname

<?php

/*
** Zabbix
** Copyright (C) 2001-2013 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/gettextwrapper.inc.php';
require_once dirname(__FILE__) . '/include/func.inc.php';
require_once dirname(__FILE__) . '/include/defines.inc.php';
require_once dirname(__FILE__) . '/include/classes/class.cview.php';
$browserWarningForm = new CView('general.browserwarning');
$browserWarningForm->render();
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:26,代码来源:browserwarning.php

示例8: CForm

 * Display
 */
$form = new CForm();
$form->cleanItems();
$cmbConf = new CComboBox('configDropDown', 'adm.triggerseverities.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 TRIGGER SEVERITIES'), $form);
$data = array();
$data['form_refresh'] = getRequest('form_refresh', 0);
if ($data['form_refresh']) {
    $data['config']['severity_name_0'] = getRequest('severity_name_0');
    $data['config']['severity_color_0'] = getRequest('severity_color_0', '');
    $data['config']['severity_name_1'] = getRequest('severity_name_1');
    $data['config']['severity_color_1'] = getRequest('severity_color_1', '');
    $data['config']['severity_name_2'] = getRequest('severity_name_2');
    $data['config']['severity_color_2'] = getRequest('severity_color_2', '');
    $data['config']['severity_name_3'] = getRequest('severity_name_3');
    $data['config']['severity_color_3'] = getRequest('severity_color_3', '');
    $data['config']['severity_name_4'] = getRequest('severity_name_4');
    $data['config']['severity_color_4'] = getRequest('severity_color_4', '');
    $data['config']['severity_name_5'] = getRequest('severity_name_5');
    $data['config']['severity_color_5'] = getRequest('severity_color_5', '');
} else {
    $data['config'] = select_config(false);
}
$triggerSeverityForm = new CView('administration.general.triggerSeverity.edit', $data);
$cnf_wdgt->addItem($triggerSeverityForm->render());
$cnf_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:adm.triggerseverities.php

示例9: CDiv

            $menu_selected = true;
            $sub_menu_div->setAttribute('style', 'display: block;');
            insert_js('MMenu.def_label = ' . zbx_jsvalue($label));
        } else {
            $sub_menu_div->setAttribute('style', 'display: none;');
        }
        $menu_divs[] = $sub_menu_div;
    }
    $sub_menu_div = new CDiv(SPACE);
    $sub_menu_div->setAttribute('id', 'sub_empty');
    $sub_menu_div->setAttribute('style', 'display: ' . ($menu_selected ? 'none;' : 'block;'));
    $menu_divs[] = $sub_menu_div;
    $search_div = null;
    if ($page['file'] != 'index.php' && CWebUser::$data['userid'] > 0) {
        $searchForm = new CView('general.search');
        $search_div = $searchForm->render();
    }
    $sub_menu_table->addRow(array($menu_divs, $search_div));
    $page_menu->addItem($sub_menu_table);
    $page_menu->show();
}
// create history
if (isset($page['hist_arg']) && CWebUser::$data['alias'] != ZBX_GUEST_USER && $page['type'] == PAGE_TYPE_HTML && !defined('ZBX_PAGE_NO_MENU')) {
    $table = new CTable(null, 'history left');
    $table->addRow(new CRow(array(new CCol(_('History') . ':', 'caption'), get_user_history())));
    $table->show();
} elseif ($page['type'] == PAGE_TYPE_HTML && !defined('ZBX_PAGE_NO_MENU')) {
    echo SBR;
}
// unset multiple variables
unset($ZBX_MENU, $table, $top_page_row, $menu_table, $node_form, $main_menu_row, $db_nodes, $node_data, $sub_menu_table, $sub_menu_rows);
开发者ID:hujingguang,项目名称:work,代码行数:31,代码来源:page_header.php

示例10: array

    }
    // new operation
    if (!empty($data['new_operation'])) {
        if (!is_array($data['new_operation'])) {
            $data['new_operation'] = array('action' => 'create', 'operationtype' => 0, 'esc_period' => 0, 'esc_step_from' => 1, 'esc_step_to' => 1, 'evaltype' => 0);
        }
    }
    // render view
    $actionView = new CView('configuration.action.edit', $data);
    $actionView->render();
    $actionView->show();
} else {
    $data = array('eventsource' => getRequest('eventsource', CProfile::get('web.actionconf.eventsource', EVENT_SOURCE_TRIGGERS)), 'displayNodes' => is_array(get_current_nodeid()));
    $sortfield = getPageSortField('name');
    $data['actions'] = API::Action()->get(array('output' => API_OUTPUT_EXTEND, 'filter' => array('eventsource' => array($data['eventsource'])), 'selectConditions' => API_OUTPUT_EXTEND, 'selectOperations' => API_OUTPUT_EXTEND, 'editable' => true, 'sortfield' => $sortfield, 'limit' => $config['search_limit'] + 1));
    // sorting && paging
    order_result($data['actions'], $sortfield, getPageSortOrder());
    $data['paging'] = getPagingLine($data['actions'], array('actionid'));
    // nodes
    if ($data['displayNodes']) {
        foreach ($data['actions'] as &$action) {
            $action['nodename'] = get_node_name_by_elid($action['actionid'], true);
        }
        unset($action);
    }
    // render view
    $actionView = new CView('configuration.action.list', $data);
    $actionView->render();
    $actionView->show();
}
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:hujingguang,项目名称:work,代码行数:31,代码来源:actionconf.php

示例11: CTextBox

    $cmbIPMIAuthtype = new CTextBox('ipmi_authtype_name', ipmiAuthTypes($dbHost['ipmi_authtype']), ZBX_TEXTBOX_SMALL_SIZE, true);
    $ipmiList->addRow(_('Authentication algorithm'), $cmbIPMIAuthtype);
    $cmbIPMIPrivilege = new CTextBox('ipmi_privilege_name', ipmiPrivileges($dbHost['ipmi_privilege']), ZBX_TEXTBOX_SMALL_SIZE, true);
    $ipmiList->addRow(_('Privilege level'), $cmbIPMIPrivilege);
}
$ipmiList->addRow(_('Username'), new CTextBox('ipmi_username', $ipmi_username, ZBX_TEXTBOX_SMALL_SIZE, $isDiscovered));
$ipmiList->addRow(_('Password'), new CTextBox('ipmi_password', $ipmi_password, ZBX_TEXTBOX_SMALL_SIZE, $isDiscovered));
$divTabs->addTab('ipmiTab', _('IPMI'), $ipmiList);
/*
 * Macros
 */
if (empty($macros)) {
    $macros = array(array('macro' => '', 'value' => ''));
}
$macrosView = new CView('common.macros', array('macros' => $macros, 'readonly' => $isDiscovered));
$divTabs->addTab('macroTab', _('Macros'), $macrosView->render());
$inventoryFormList = new CFormList('inventorylist');
// radio buttons for inventory type choice
$inventoryMode = isset($dbHost['inventory']['inventory_mode']) ? $dbHost['inventory']['inventory_mode'] : HOST_INVENTORY_DISABLED;
$inventoryDisabledBtn = new CRadioButton('inventory_mode', HOST_INVENTORY_DISABLED, null, 'host_inventory_radio_' . HOST_INVENTORY_DISABLED, $inventoryMode == HOST_INVENTORY_DISABLED);
$inventoryDisabledBtn->setEnabled(!$isDiscovered);
$inventoryManualBtn = new CRadioButton('inventory_mode', HOST_INVENTORY_MANUAL, null, 'host_inventory_radio_' . HOST_INVENTORY_MANUAL, $inventoryMode == HOST_INVENTORY_MANUAL);
$inventoryManualBtn->setEnabled(!$isDiscovered);
$inventoryAutomaticBtn = new CRadioButton('inventory_mode', HOST_INVENTORY_AUTOMATIC, null, 'host_inventory_radio_' . HOST_INVENTORY_AUTOMATIC, $inventoryMode == HOST_INVENTORY_AUTOMATIC);
$inventoryAutomaticBtn->setEnabled(!$isDiscovered);
$inventoryTypeRadioButton = array($inventoryDisabledBtn, new CLabel(_('Disabled'), 'host_inventory_radio_' . HOST_INVENTORY_DISABLED), $inventoryManualBtn, new CLabel(_('Manual'), 'host_inventory_radio_' . HOST_INVENTORY_MANUAL), $inventoryAutomaticBtn, new CLabel(_('Automatic'), 'host_inventory_radio_' . HOST_INVENTORY_AUTOMATIC));
$inventoryFormList->addRow(SPACE, new CDiv($inventoryTypeRadioButton, 'jqueryinputset'));
$hostInventoryTable = DB::getSchema('host_inventory');
$hostInventoryFields = getHostInventories();
foreach ($hostInventoryFields as $inventoryNo => $inventoryInfo) {
    if (!isset($host_inventory[$inventoryInfo['db_field']])) {
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.host.edit.php

示例12: array

        $data['applications'] = API::Application()->get(array('applicationids' => $applicationIds, 'output' => API_OUTPUT_EXTEND, 'selectItems' => array('itemid'), 'selectHost' => array('hostid', 'name')));
        order_result($data['applications'], $sortField, $sortOrder);
        // fetch template application source parents
        $applicationSourceParentIds = getApplicationSourceParentIds($applicationIds);
        $parentAppIds = array();
        foreach ($applicationSourceParentIds as $applicationParentIds) {
            foreach ($applicationParentIds as $parentId) {
                $parentAppIds[$parentId] = $parentId;
            }
        }
        if ($parentAppIds) {
            $parentTemplates = DBfetchArrayAssoc(DBselect('SELECT a.applicationid,h.hostid,h.name' . ' FROM applications a,hosts h' . ' WHERE a.hostid=h.hostid' . ' AND ' . dbConditionInt('a.applicationid', $parentAppIds)), 'applicationid');
            foreach ($data['applications'] as &$application) {
                if ($application['templateids'] && isset($applicationSourceParentIds[$application['applicationid']])) {
                    foreach ($applicationSourceParentIds[$application['applicationid']] as $parentAppId) {
                        $application['sourceTemplates'][] = $parentTemplates[$parentAppId];
                    }
                }
            }
        }
    } else {
        $data['applications'] = array();
    }
    // get paging
    $data['paging'] = getPagingLine($data['applications'], $sortOrder);
    // render view
    $applicationView = new CView('configuration.application.list', $data);
    $applicationView->render();
    $applicationView->show();
}
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:applications.php

示例13: CList

$help_hint = (new CList())->addClass(ZBX_STYLE_NOTIF_BODY)->addStyle('min-width: ' . ZBX_OVERVIEW_HELP_MIN_WIDTH . 'px')->addItem([(new CDiv())->addClass(ZBX_STYLE_NOTIF_INDIC)->addClass(getSeverityStyle(null, false)), new CTag('h4', true, _('OK')), (new CTag('p', true, ''))->addClass(ZBX_STYLE_GREY)]);
for ($severity = TRIGGER_SEVERITY_NOT_CLASSIFIED; $severity < TRIGGER_SEVERITY_COUNT; $severity++) {
    $help_hint->addItem([(new CDiv())->addClass(ZBX_STYLE_NOTIF_INDIC)->addClass(getSeverityStyle($severity)), new CTag('h4', true, getSeverityName($severity, $data['config'])), (new CTag('p', true, _('PROBLEM')))->addClass(ZBX_STYLE_GREY)]);
}
// blinking preview in help popup (only if blinking is enabled)
if ($data['config']['blink_period'] > 0) {
    $indic_container = (new CDiv())->addClass(ZBX_STYLE_NOTIF_INDIC_CONTAINER)->addItem((new CDiv())->addClass(ZBX_STYLE_NOTIF_INDIC)->addClass(getSeverityStyle(null, false))->addClass('blink'));
    for ($severity = TRIGGER_SEVERITY_NOT_CLASSIFIED; $severity < TRIGGER_SEVERITY_COUNT; $severity++) {
        $indic_container->addItem((new CDiv())->addClass(ZBX_STYLE_NOTIF_INDIC)->addClass(getSeverityStyle($severity))->addClass('blink'));
    }
    $indic_container->addItem((new CTag('p', true, _s('Age less than %s', convertUnitsS($data['config']['blink_period']))))->addClass(ZBX_STYLE_GREY));
    $help_hint->addItem($indic_container);
}
// header right
$help = get_icon('overviewhelp');
$help->setHint($help_hint);
$widget = (new CWidget())->setTitle(_('Overview'))->setControls((new CForm('get'))->cleanItems()->addItem((new CList())->addItem([_('Group'), SPACE, $this->data['pageFilter']->getGroupsCB()])->addItem([_('Type'), SPACE, new CComboBox('type', $this->data['type'], 'submit()', [SHOW_TRIGGERS => _('Triggers'), SHOW_DATA => _('Data')])])->addItem([_('Hosts location'), SPACE, new CComboBox('view_style', $this->data['view_style'], 'submit()', [STYLE_TOP => _('Top'), STYLE_LEFT => _('Left')])])->addItem(get_icon('fullscreen', ['fullscreen' => $this->data['fullscreen']]))->addItem($help)));
// filter
$filter = $this->data['filter'];
$filterFormView = new CView('common.filter.trigger', ['overview' => true, 'filter' => ['filterid' => 'web.overview.filter.state', 'showTriggers' => $filter['showTriggers'], 'ackStatus' => $filter['ackStatus'], 'showSeverity' => $filter['showSeverity'], 'statusChange' => $filter['statusChange'], 'statusChangeDays' => $filter['statusChangeDays'], 'txtSelect' => $filter['txtSelect'], 'application' => $filter['application'], 'inventory' => $filter['inventory'], 'showMaintenance' => $filter['showMaintenance'], 'hostId' => $this->data['hostid'], 'groupId' => $this->data['groupid'], 'fullScreen' => $this->data['fullscreen']], 'config' => $data['config']]);
$filterForm = $filterFormView->render();
$widget->addItem($filterForm);
// data table
if ($data['pageFilter']->groupsSelected) {
    global $page;
    $dataTable = getTriggersOverview($this->data['hosts'], $this->data['triggers'], $page['file'], $this->data['view_style']);
} else {
    $dataTable = new CTableInfo();
}
$widget->addItem($dataTable);
return $widget;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:monitoring.overview.triggers.php

示例14: DBend

    }
    $result = DBend($result);
    show_messages($result, _('Configuration updated'), _('Cannot update configuration'));
}
/*
 * Display
 */
$form = new CForm();
$form->cleanItems();
$cmbConf = new CComboBox('configDropDown', 'adm.other.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(_('OTHER CONFIGURATION PARAMETERS'), $form);
$data = array();
if (hasRequest('form_refresh')) {
    $data['config']['discovery_groupid'] = getRequest('discovery_groupid');
    $data['config']['alert_usrgrpid'] = getRequest('alert_usrgrpid');
    $data['config']['refresh_unsupported'] = getRequest('refresh_unsupported');
    $data['config']['snmptrap_logging'] = getRequest('snmptrap_logging');
} else {
    $data['config'] = select_config(false);
}
$data['discovery_groups'] = API::HostGroup()->get(array('output' => array('usrgrpid', 'name'), 'filter' => array('flags' => ZBX_FLAG_DISCOVERY_NORMAL), 'editable' => true));
order_result($data['discovery_groups'], 'name');
$data['alert_usrgrps'] = DBfetchArray(DBselect('SELECT u.usrgrpid,u.name FROM usrgrp u'));
order_result($data['alert_usrgrps'], 'name');
$otherForm = new CView('administration.general.other.edit', $data);
$cnf_wdgt->addItem($otherForm->render());
$cnf_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:adm.other.php

示例15: unset

                    $haystack = mb_strtolower($data['hosts'][$num]['inventory'][$data['filterField']]);
                    if ($haystack !== $needle) {
                        unset($data['hosts'][$num]);
                    }
                }
            }
            $sort_fields = ['pr_name' => 'name', 'pr_type' => 'type', 'pr_os' => 'os', 'pr_serialno_a' => 'serialno_a', 'pr_tag' => 'tag', 'pr_macaddress_a' => 'macaddress_a'];
            if (array_key_exists($sortField, $sort_fields)) {
                // copying an inventory field into the upper array level for sorting
                foreach ($data['hosts'] as &$host) {
                    $host[$sortField] = $host['inventory'][$sort_fields[$sortField]];
                }
                unset($host);
            }
            $limit = $data['config']['search_limit'] + 1;
            order_result($data['hosts'], $sortField, $sortOrder);
            if ($sortOrder == ZBX_SORT_UP) {
                $data['hosts'] = array_slice($data['hosts'], 0, $limit);
            } else {
                $data['hosts'] = array_slice($data['hosts'], -$limit, $limit);
            }
            order_result($data['hosts'], $sortField, $sortOrder);
        }
    }
    $url = (new CUrl('hostinventories.php'))->setArgument('groupid', $data['pageFilter']->groupid);
    $data['paging'] = getPagingLine($data['hosts'], $sortOrder, $url);
    $hostinventoriesView = new CView('inventory.host.list', $data);
    $hostinventoriesView->render();
    $hostinventoriesView->show();
}
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:hostinventories.php


注:本文中的CView::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。