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


PHP CWidget::addItem方法代码示例

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


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

示例1: dirname

** 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'));
$updateButton->setEnabled(!$this->data['isCommentExist']);
if ($this->data['isCommentExist']) {
    $editButton = new CButton('edit', _('Edit'));
    $editButton->setEnabled($this->data['isTriggerEditable']);
} else {
    $editButton = null;
}
$commentForm->addItem(makeFormFooter($updateButton, array($editButton, new CButtonCancel('&triggerid=' . $this->data['triggerid']))));
$commentWidget->addItem($commentForm);
return $commentWidget;
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:monitoring.triggerComment.php

示例2: CCol

        $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']);
    }
} else {
    $dataTable = new CTableInfo(_('No items found.'));
}
$overviewWidget->addItem($dataTable);
return $overviewWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:monitoring.overview.php

示例3: CWidget

** 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) {
    // name
    $name = array();
    if ($hostPrototype['templateid']) {
        $sourceTemplate = $hostPrototype['sourceTemplate'];
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.host.prototype.list.php

示例4: dirname

<?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';
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:report1.php

示例5: CCheckBox

    }
    if ($user['type'] == USER_TYPE_SUPER_ADMIN) {
        $userTypeStyle = 'disabled';
    }
    // gui access style
    $guiAccessStyle = 'green';
    if ($user['gui_access'] == GROUP_GUI_ACCESS_INTERNAL) {
        $guiAccessStyle = 'orange';
    }
    if ($user['gui_access'] == GROUP_GUI_ACCESS_DISABLED) {
        $guiAccessStyle = 'disabled';
    }
    // append user to table
    $usersTable->addRow(array(new CCheckBox('group_userid[' . $userId . ']', null, null, $userId), new CLink($user['alias'], 'users.php?form=update&userid=' . $userId), $user['name'], $user['surname'], user_type2str($user['type']), $usersGroups, $online, $blocked, new CSpan(user_auth_type2str($user['gui_access']), $guiAccessStyle), $user['debug_mode'] == GROUP_DEBUG_MODE_ENABLED ? new CSpan(_('Enabled'), 'orange') : new CSpan(_('Disabled'), 'green'), $user['users_status'] == 1 ? new CSpan(_('Disabled'), 'red') : new CSpan(_('Enabled'), 'green')));
}
// append Go buttons
$goComboBox = new CComboBox('action');
$goOption = new CComboItem('user.massunblock', _('Unblock selected'));
$goOption->setAttribute('confirm', _('Unblock selected users?'));
$goComboBox->addItem($goOption);
$goOption = new CComboItem('user.massdelete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected users?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "group_userid";');
// append table to form
$usersForm->addItem(array($this->data['paging'], $usersTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton))));
// append form to widget
$usersWidget->addItem($usersForm);
return $usersWidget;
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:administration.users.list.php

示例6: array

$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');
$reset = new CSubmit('filter_rst', _('Reset'));
$reset->useJQueryStyle();
$divButtons = new CDiv(array($filter, SPACE, $reset));
$divButtons->setAttribute('style', 'padding: 4px 0px;');
$footerCol = new CCol($divButtons, 'controls');
$filterTable->addRow($footerCol);
$filterForm = new CForm('get');
$filterForm->setAttribute('name', 'zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$filterForm->addItem($filterTable);
$hostInventoryWidget->addFlicker($filterForm, CProfile::get('web.hostinventories.filter.state', 0));
$hostInventoryWidget->addHeaderRowNumber();
$table = new CTableInfo(_('No hosts found.'));
$table->setHeader(array(make_sorting_header(_('Host'), 'name', $this->data['sort'], $this->data['sortorder']), _('Group'), make_sorting_header(_('Name'), 'pr_name', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Type'), 'pr_type', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('OS'), 'pr_os', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Serial number A'), 'pr_serialno_a', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Tag'), 'pr_tag', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('MAC address A'), 'pr_macaddress_a', $this->data['sort'], $this->data['sortorder'])));
foreach ($this->data['hosts'] as $host) {
    $hostGroups = array();
    foreach ($host['groups'] as $group) {
        $hostGroups[] = $group['name'];
    }
    natsort($hostGroups);
    $hostGroups = implode(', ', $hostGroups);
    $row = array(new CLink($host['name'], '?hostid=' . $host['hostid'] . url_param('groupid'), $host['status'] == HOST_STATUS_NOT_MONITORED ? 'not-monitored' : ''), $hostGroups, zbx_str2links($host['inventory']['name']), zbx_str2links($host['inventory']['type']), zbx_str2links($host['inventory']['os']), zbx_str2links($host['inventory']['serialno_a']), zbx_str2links($host['inventory']['tag']), zbx_str2links($host['inventory']['macaddress_a']));
    $table->addRow($row);
}
$table = array($this->data['paging'], $table, $this->data['paging']);
$hostInventoryWidget->addItem($table);
return $hostInventoryWidget;
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:inventory.host.list.php

示例7: array

    if (isset($row['serviceupid'])) {
        $services[$row['serviceupid']]['childs'][] = array('id' => $row['serviceid'], 'soft' => 0, 'linkid' => 0);
    }
    if (isset($row['servicedownid'])) {
        $services[$row['serviceid']]['childs'][] = array('id' => $row['servicedownid'], 'soft' => 1, 'linkid' => $row['linkid']);
    }
}
$treeServ = array();
createServiceTree($services, $treeServ);
//return into $treeServ parametr
//permission issue
$treeServ = del_empty_nodes($treeServ);
//----
if (isset($_REQUEST['msg']) && !empty($_REQUEST['msg'])) {
    show_messages(true, $_REQUEST['msg']);
}
//show_table_header(S_IT_SERVICES_BIG);
$tree = new CTree('service_conf_tree', $treeServ, array('caption' => bold(S_SERVICE), 'algorithm' => bold(S_STATUS_CALCULATION), 'description' => bold(S_TRIGGER)));
if ($tree) {
    $serv_wdgt = new CWidget();
    $serv_wdgt->addHeader(S_IT_SERVICES_BIG, SPACE);
    $serv_wdgt->addItem($tree->getHTML());
    $serv_wdgt->show();
} else {
    error(S_CANT_FORMAT_TREE);
}
$tr_ov_menu[] = array('test1', null, null, array('outer' => array('pum_oheader'), 'inner' => array('pum_iheader')));
$tr_ov_menu[] = array('test2', null, null, array('outer' => array('pum_oheader'), 'inner' => array('pum_iheader')));
$jsmenu = new CPUMenu($tr_ov_menu, 170);
$jsmenu->InsertJavaScript();
include_once "include/page_footer.php";
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:services.php

示例8: CWidget

/*
** 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;
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:30,代码来源:configuration.screen.constructor.list.php

示例9: array

            $operationConditionValueComboBox->addItem(0, _('Not Ack'));
            $operationConditionValueComboBox->addItem(1, _('Ack'));
            $rowCondition[] = $operationConditionValueComboBox;
        }
        $newOperationConditionTable->addRow($rowCondition);
        $newOperationConditionFooter = array(new CSubmit('add_opcondition', _('Add'), null, 'link_menu'), SPACE . SPACE, new CSubmit('cancel_new_opcondition', _('Cancel'), null, 'link_menu'));
        $newOperationsTable->addRow(array(_('Operation condition'), new CDiv(array($newOperationConditionTable, $newOperationConditionFooter), 'objectgroup inlineblock border_dotted ui-corner-all')));
    }
    $footer = array(new CSubmit('add_operation', $this->data['new_operation']['action'] == 'update' ? _('Update') : _('Add'), null, 'link_menu'), SPACE . SPACE, new CSubmit('cancel_new_operation', _('Cancel'), null, 'link_menu'));
    $operationFormList->addRow(_('Operation details'), new CDiv(array($newOperationsTable, $footer), 'objectgroup inlineblock border_dotted ui-corner-all'));
}
// append tabs to form
$actionTabs = new CTabView();
if (!isset($_REQUEST['form_refresh'])) {
    $actionTabs->setSelected(0);
}
$actionTabs->addTab('actionTab', _('Action'), $actionFormList);
$actionTabs->addTab('conditionTab', _('Conditions'), $conditionFormList);
$actionTabs->addTab('operationTab', _('Operations'), $operationFormList);
$actionForm->addItem($actionTabs);
// append buttons to form
$others = array();
if (!empty($this->data['actionid'])) {
    $others[] = new CButton('clone', _('Clone'));
    $others[] = new CButtonDelete(_('Delete current action?'), url_param('form') . url_param('eventsource') . url_param('actionid'));
}
$others[] = new CButtonCancel(url_param('actiontype'));
$actionForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), $others));
// append form to widget
$actionWidget->addItem($actionForm);
return $actionWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.action.edit.php

示例10: CTableInfo

// 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:
            $maintenanceStatus = new CSpan(_x('Expired', 'maintenance status'), 'red');
            break;
        case MAINTENANCE_STATUS_APPROACH:
            $maintenanceStatus = new CSpan(_x('Approaching', 'maintenance status'), 'blue');
            break;
        case MAINTENANCE_STATUS_ACTIVE:
            $maintenanceStatus = new CSpan(_x('Active', 'maintenance status'), 'green');
            break;
    }
    $maintenanceTable->addRow(array(new CCheckBox('maintenanceids[' . $maintenanceid . ']', null, null, $maintenanceid), $this->data['displayNodes'] ? $maintenance['nodename'] : null, new CLink($maintenance['name'], 'maintenance.php?form=update&maintenanceid=' . $maintenanceid), $maintenance['maintenance_type'] ? _('No data collection') : _('With data collection'), $maintenanceStatus, $maintenance['description']));
}
// create go button
$goComboBox = new CComboBox('go');
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected maintenance periods?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "maintenanceids";');
// append table to form
$maintenanceForm->addItem(array($this->data['paging'], $maintenanceTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton))));
// append form to widget
$maintenanceWidget->addItem($maintenanceForm);
return $maintenanceWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.maintenance.list.php

示例11: CNumericBox

foreach ($this->data['slides'] as $step => $slides) {
    $name = '';
    if (!empty($slides['screenid'])) {
        $screen = get_screen_by_screenid($slides['screenid']);
        if (!empty($screen['name'])) {
            $name = $screen['name'];
        }
    }
    $delay = new CNumericBox('slides[' . $step . '][delay]', !empty($slides['delay']) ? $slides['delay'] : '', 5, 'no', true, false);
    $delay->setAttribute('placeholder', _('default'));
    $removeButton = new CButton('remove_' . $step, _('Remove'), 'javascript: removeSlide(this);', 'link_menu');
    $removeButton->setAttribute('remove_slide', $step);
    $row = new CRow(array(new CSpan(null, 'ui-icon ui-icon-arrowthick-2-n-s move'), new CSpan($i++ . ':', 'rowNum', 'current_slide_' . $step), $name, $delay, $removeButton), 'sortable', 'slides_' . $step);
    $slideTable->addRow($row);
}
$addButtonColumn = new CCol(empty($this->data['work_slide']) ? new CButton('add', _('Add'), 'return PopUp("popup.php?srctbl=screens&srcfld1=screenid&dstfrm=' . $slideForm->getName() . '&multiselect=1", 450, 450)', 'link_menu') : null, null, 5);
$addButtonColumn->setAttribute('style', 'vertical-align: middle;');
$slideTable->addRow(new CRow($addButtonColumn, null, 'screenListFooter'));
$slideFormList->addRow(_('Slides'), new CDiv($slideTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
// append tabs to form
$slideTab = new CTabView();
$slideTab->addTab('slideTab', _('Slide'), $slideFormList);
$slideForm->addItem($slideTab);
// append buttons to form
if (empty($this->data['slideshowid'])) {
    $slideForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButtonCancel()));
} else {
    $slideForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete slide show?'), url_param('form') . url_param('slideshowid') . url_param('config')), new CButtonCancel())));
}
$slideWidget->addItem($slideForm);
return $slideWidget;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.slideconf.edit.php

示例12: CForm

    if (!isset($_REQUEST['stepid'])) {
        insert_js('add_httpstep(' . zbx_jsvalue($_REQUEST['dstfrm']) . ',' . zbx_jsvalue($_REQUEST['name']) . ',' . zbx_jsvalue($_REQUEST['timeout']) . ',' . zbx_jsvalue($_REQUEST['url']) . ',' . zbx_jsvalue($_REQUEST['posts']) . ',' . zbx_jsvalue($_REQUEST['variables']) . ',' . zbx_jsvalue($_REQUEST['required']) . ',' . zbx_jsvalue($_REQUEST['status_codes']) . ");\n");
    } else {
        insert_js('update_httpstep(' . zbx_jsvalue($_REQUEST['dstfrm']) . ',' . zbx_jsvalue($_REQUEST['list_name']) . ',' . zbx_jsvalue($_REQUEST['stepid']) . ',' . zbx_jsvalue($_REQUEST['name']) . ',' . zbx_jsvalue($_REQUEST['timeout']) . ',' . zbx_jsvalue($_REQUEST['url']) . ',' . zbx_jsvalue($_REQUEST['posts']) . ',' . zbx_jsvalue($_REQUEST['variables']) . ',' . zbx_jsvalue($_REQUEST['required']) . ',' . zbx_jsvalue($_REQUEST['status_codes']) . ");\n");
    }
} else {
    $httpPopupForm = new CForm();
    $httpPopupForm->addVar('dstfrm', get_request('dstfrm', null));
    $httpPopupForm->addVar('stepid', get_request('stepid', null));
    $httpPopupForm->addVar('list_name', get_request('list_name', null));
    $httpPopupForm->addVar('templated', get_request('templated', null));
    $httpPopupForm->addVar('old_name', get_request('old_name', null));
    $httpPopupForm->addVar('steps_names', get_request('steps_names', null));
    $httpPopupFormList = new CFormList('httpPopupFormList');
    $httpPopupFormList->addRow(_('Name'), new CTextBox('name', get_request('name', ''), ZBX_TEXTBOX_STANDARD_SIZE, get_request('templated', null), 64));
    $httpPopupFormList->addRow(_('URL'), new CTextBox('url', get_request('url', ''), ZBX_TEXTBOX_STANDARD_SIZE));
    $httpPopupFormList->addRow(_('Post'), new CTextArea('posts', get_request('posts', '')));
    $httpPopupFormList->addRow(_('Variables'), new CTextArea('variables', get_request('variables', '')));
    $httpPopupFormList->addRow(_('Timeout'), new CNumericBox('timeout', get_request('timeout', 15), 5));
    $httpPopupFormList->addRow(_('Required string'), new CTextBox('required', get_request('required', ''), ZBX_TEXTBOX_STANDARD_SIZE));
    $httpPopupFormList->addRow(_('Required status codes'), new CTextBox('status_codes', get_request('status_codes', ''), ZBX_TEXTBOX_STANDARD_SIZE));
    // append tabs to form
    $httpPopupTab = new CTabView();
    $httpPopupTab->addTab('scenarioStepTab', _('Step of scenario'), $httpPopupFormList);
    $httpPopupForm->addItem($httpPopupTab);
    // append buttons to form
    $stepid = get_request('stepid', null);
    $httpPopupForm->addItem(makeFormFooter(new CSubmit('save', isset($stepid) ? _('Update') : _('Add')), new CButtonCancel(null, 'close_window();')));
    $httpPopupWidget->addItem($httpPopupForm);
}
return $httpPopupWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.httpconf.popup.php

示例13: CLink

                    $ack = new CLink(S_YES, 'acknow.php?eventid=' . $event['eventid'] . '&backurl=' . $page['file']);
                } else {
                    $ack = new CLink(S_NO, 'acknow.php?eventid=' . $event['eventid'] . '&backurl=' . $page['file'], 'on');
                }
            }
            $description = expand_trigger_description_by_data(zbx_array_merge($trigger, array('clock' => $event['clock'])), ZBX_FLAG_EVENT);
            $tr_desc = new CSpan($description, 'pointer');
            $tr_desc->addAction('onclick', "create_mon_trigger_menu(event, " . " new Array({'triggerid': '" . $trigger['triggerid'] . "', 'lastchange': '" . $event['clock'] . "'})," . zbx_jsvalue($items, true) . ");");
            // Duration
            $tr_event = $event + $trigger;
            if ($next_event = get_next_event($tr_event, $events, $_REQUEST['hide_unknown'])) {
                $event['duration'] = zbx_date2age($tr_event['clock'], $next_event['clock']);
            } else {
                $event['duration'] = zbx_date2age($tr_event['clock']);
            }
            $table->addRow(array(new CLink(zbx_date2str(S_EVENTS_ACTION_TIME_FORMAT, $event['clock']), 'tr_events.php?triggerid=' . $event['objectid'] . '&eventid=' . $event['eventid'], 'action'), is_show_all_nodes() ? get_node_name_by_elid($event['objectid']) : null, $_REQUEST['hostid'] == 0 ? $host['host'] : null, new CSpan($tr_desc, 'link_menu'), new CCol(trigger_value2str($event['value']), get_trigger_value_style($event['value'])), new CCol(get_severity_description($trigger['priority']), get_severity_style($trigger['priority'], $event['value'])), $event['duration'], $config['event_ack_enable'] ? $ack : NULL, $actions));
        }
    }
    $table = array($paging, $table, $paging);
    $jsmenu = new CPUMenu(null, 170);
    $jsmenu->InsertJavaScript();
}
$events_wdgt->addItem($table);
// NAV BAR
$timeline = array('period' => $effectiveperiod, 'starttime' => date('YmdHis', $starttime), 'usertime' => date('YmdHis', $till));
$dom_graph_id = 'scroll_events_id';
$objData = array('id' => 'timeline_1', '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();');
$events_wdgt->show();
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:events.php

示例14: array

$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);
    } else {
        $_REQUEST['filter_field'] = CProfile::get('web.hostinventories.filter_field');
        $_REQUEST['filter_field_value'] = CProfile::get('web.hostinventories.filter_field_value');
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:hostinventories.php

示例15: array

$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 {
    $config = select_config(false);
    $data['ok_period'] = $config['ok_period'];
    $data['blink_period'] = $config['blink_period'];
    $data['problem_unack_color'] = $config['problem_unack_color'];
    $data['problem_ack_color'] = $config['problem_ack_color'];
    $data['ok_unack_color'] = $config['ok_unack_color'];
    $data['ok_ack_color'] = $config['ok_ack_color'];
    $data['problem_unack_style'] = $config['problem_unack_style'];
    $data['problem_ack_style'] = $config['problem_ack_style'];
    $data['ok_unack_style'] = $config['ok_unack_style'];
    $data['ok_ack_style'] = $config['ok_ack_style'];
}
$triggerDisplayingForm = new CView('administration.general.triggerDisplayOptions.edit', $data);
$cnf_wdgt->addItem($triggerDisplayingForm->render());
$cnf_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:adm.triggerdisplayoptions.php


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