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


PHP CWidget::addHeader方法代码示例

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


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

示例1: array

    // if elementid is used to fetch an element, saving it in profile
    if (!$this->data['use_screen_name']) {
        CProfile::update('web.screens.elementid', $screen['screenid'], PROFILE_TYPE_ID);
    }
    // page header
    $screenWidget->addPageHeader(_('SCREENS'), array($headerForm, SPACE, get_icon('favourite', array('fav' => 'web.favorite.screenids', 'elname' => 'screenid', 'elid' => $screen['screenid'])), SPACE, get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen']))));
    $screenWidget->addItem(BR());
    // append screens combobox to page header
    $headerForm = new CForm('get');
    $headerForm->setName('headerForm');
    $headerForm->addVar('fullscreen', $this->data['fullscreen']);
    $elementsComboBox = new CComboBox('elementid', $screen['screenid'], 'submit()');
    foreach ($this->data['screens'] as $dbScreen) {
        $elementsComboBox->addItem($dbScreen['screenid'], htmlspecialchars(get_node_name_by_elid($dbScreen['screenid'], null, NAME_DELIMITER) . $dbScreen['name']));
    }
    $headerForm->addItem(array(_('Screens') . SPACE, $elementsComboBox));
    if (check_dynamic_items($screen['screenid'], 0)) {
        $pageFilter = new CPageFilter(array('groups' => array('monitored_hosts' => true, 'with_items' => true), 'hosts' => array('monitored_hosts' => true, 'with_items' => true, 'DDFirstLabel' => _('Default')), 'hostid' => get_request('hostid', null), 'groupid' => get_request('groupid', null)));
        $_REQUEST['groupid'] = $pageFilter->groupid;
        $_REQUEST['hostid'] = $pageFilter->hostid;
        $headerForm->addItem(array(SPACE, _('Group'), SPACE, $pageFilter->getGroupsCB(true)));
        $headerForm->addItem(array(SPACE, _('Host'), SPACE, $pageFilter->getHostsCB(true)));
    }
    $screenWidget->addHeader($screen['name'], $headerForm);
    // append screens to widget
    $screenBuilder = new CScreenBuilder(array('screenid' => $screen['screenid'], 'mode' => SCREEN_MODE_PREVIEW, 'profileIdx' => 'web.screens', 'profileIdx2' => $screen['screenid'], 'groupid' => get_request('groupid'), 'hostid' => get_request('hostid'), 'period' => $this->data['period'], 'stime' => $this->data['stime']));
    $screenWidget->addItem($screenBuilder->show());
    CScreenBuilder::insertScreenStandardJs(array('timeline' => $screenBuilder->timeline, 'profileIdx' => $screenBuilder->profileIdx));
    $screenWidget->addItem(BR());
}
return $screenWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:monitoring.screen.php

示例2: CWidget

** 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.
**/
zbx_add_post_js('jqBlink.blink();');
$overviewWidget = new CWidget();
$typeComboBox = new CComboBox('type', $this->data['type'], 'submit()');
$typeComboBox->addItem(SHOW_TRIGGERS, _('Triggers'));
$typeComboBox->addItem(SHOW_DATA, _('Data'));
$headerForm = new CForm('get');
$headerForm->addItem(array(_('Group'), SPACE, $this->data['pageFilter']->getGroupsCB(true)));
$headerForm->addItem(array(SPACE, _('Application'), SPACE, $this->data['pageFilter']->getApplicationsCB(true)));
$headerForm->addItem(array(SPACE, _('Type'), SPACE, $typeComboBox));
$overviewWidget->addHeader(_('Overview'), $headerForm);
$hintTable = new CTableInfo();
$hintTable->setAttribute('style', 'width: 200px');
if ($this->data['type'] == SHOW_TRIGGERS) {
    $hintTable->addRow(array(new CCol(SPACE, 'normal'), _('OK')));
}
for ($i = 0; $i < TRIGGER_SEVERITY_COUNT; $i++) {
    $hintTable->addRow(array(getSeverityCell($i), _('PROBLEM')));
}
$config = select_config();
if ($this->data['type'] == SHOW_TRIGGERS) {
    // blinking preview in help popup (only if blinking is enabled)
    if ($config['blink_period'] > 0) {
        $row = new CRow(null);
        $row->addItem(new CCol(SPACE, 'normal'));
        for ($i = 0; $i < TRIGGER_SEVERITY_COUNT; $i++) {
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:monitoring.overview.php

示例3: CWidget

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

示例4: dirname

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':
    default:
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:report5.php

示例5: CForm

$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.'));
$usersTable->setHeader(array(new CCheckBox('all_users', null, "checkAll('" . $usersForm->getName() . "', 'all_users', 'group_userid');"), make_sorting_header(_('Alias'), 'alias', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_x('Name', 'user first name'), 'name', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Surname'), 'surname', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('User type'), 'type', $this->data['sort'], $this->data['sortorder']), _('Groups'), _('Is online?'), _('Login'), _('Frontend access'), _('Debug mode'), _('Status')));
foreach ($this->data['users'] as $user) {
    $userId = $user['userid'];
    $session = $this->data['usersSessions'][$userId];
    // online time
    if ($session['lastaccess']) {
        $onlineTime = $user['autologout'] == 0 || ZBX_USER_ONLINE_TIME < $user['autologout'] ? ZBX_USER_ONLINE_TIME : $user['autologout'];
        $online = $session['lastaccess'] + $onlineTime >= time() ? new CCol(_('Yes') . ' (' . zbx_date2str(DATE_TIME_FORMAT_SECONDS, $session['lastaccess']) . ')', 'enabled') : new CCol(_('No') . ' (' . zbx_date2str(DATE_TIME_FORMAT_SECONDS, $session['lastaccess']) . ')', 'disabled');
    } else {
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:administration.users.list.php

示例6: getHostInventories

$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);
$hostinvent_wdgt->addItem(BR());
$table = new CTableInfo(_('No hosts defined.'));
$table->setHeader(array(make_sorting_header($groupFieldTitle === '' ? _('Field') : $groupFieldTitle, 'inventory_field'), make_sorting_header(_('Host count'), 'host_count')));
// to show a report, we will need a host group and a field to aggregate
if ($pageFilter->groupsSelected && $groupFieldTitle !== '') {
    $options = array('output' => array('hostid', 'name'), 'selectInventory' => array($_REQUEST['groupby']), 'withInventory' => true);
    if ($pageFilter->groupid > 0) {
        $options['groupids'] = $pageFilter->groupid;
    }
    $hosts = API::Host()->get($options);
    // aggregating data by chosen field value
    $report = array();
    foreach ($hosts as $host) {
        if ($host['inventory'][$_REQUEST['groupby']] !== '') {
            $lowerValue = zbx_strtolower($host['inventory'][$_REQUEST['groupby']]);
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:hostinventoriesoverview.php

示例7: CWidget

** 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');
$goOption = new CComboItem('drule.massenable', _('Enable selected'));
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.discovery.list.php

示例8: array

$rep2_wdgt->addPageHeader(S_AVAILABILITY_REPORT_BIG);
//	show_report2_header($config, $PAGE_GROUPS, $PAGE_HOSTS);
if (isset($_REQUEST['triggerid'])) {
    $options = array('triggerids' => $_REQUEST['triggerid'], 'output' => API_OUTPUT_EXTEND, 'select_hosts' => API_OUTPUT_EXTEND, 'nodeids' => get_current_nodeid(true));
    $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);
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:report2.php

示例9: CForm

    $hostsWidget->addItem($hostForm->render());
    $rootClass = 'host-edit';
    if (get_request('hostid') && $dbHost['flags'] == ZBX_FLAG_DISCOVERY_CREATED) {
        $rootClass .= ' host-edit-discovered';
    }
    $hostsWidget->setRootClass($rootClass);
} else {
    $displayNodes = is_array(get_current_nodeid()) && $pageFilter->groupid == 0;
    $frmForm = new CForm();
    $frmForm->cleanItems();
    $frmForm->addItem(new CDiv(array(new CSubmit('form', _('Create host')), new CButton('form', _('Import'), 'redirect("conf.import.php?rules_preset=host")'))));
    $frmForm->addItem(new CVar('groupid', $_REQUEST['groupid'], 'filter_groupid_id'));
    $hostsWidget->addPageHeader(_('CONFIGURATION OF HOSTS'), $frmForm);
    $frmGroup = new CForm('get');
    $frmGroup->addItem(array(_('Group') . SPACE, $pageFilter->getGroupsCB(true)));
    $hostsWidget->addHeader(_('Hosts'), $frmGroup);
    $hostsWidget->addHeaderRowNumber();
    $hostsWidget->setRootClass('host-list');
    // filter
    $filterTable = new CTable('', 'filter');
    $filterTable->addRow(array(array(array(bold(_('Name')), SPACE . _('like') . NAME_DELIMITER), new CTextBox('filter_host', $_REQUEST['filter_host'], 20)), array(array(bold(_('DNS')), SPACE . _('like') . NAME_DELIMITER), new CTextBox('filter_dns', $_REQUEST['filter_dns'], 20)), array(array(bold(_('IP')), SPACE . _('like') . NAME_DELIMITER), new CTextBox('filter_ip', $_REQUEST['filter_ip'], 20)), array(bold(_('Port') . NAME_DELIMITER), new CTextBox('filter_port', $_REQUEST['filter_port'], 20))));
    $filter = new CButton('filter', _('Filter'), "javascript: create_var('zbx_filter', 'filter_set', '1', true); chkbxRange.clearSelectedOnFilterChange();");
    $filter->useJQueryStyle('main');
    $reset = new CButton('reset', _('Reset'), "javascript: clearAllForm('zbx_filter');");
    $reset->useJQueryStyle();
    $divButtons = new CDiv(array($filter, SPACE, $reset));
    $divButtons->setAttribute('style', 'padding: 4px 0;');
    $filterTable->addRow(new CCol($divButtons, 'center', 4));
    $filterForm = new CForm('get');
    $filterForm->setAttribute('name', 'zbx_filter');
    $filterForm->setAttribute('id', 'zbx_filter');
开发者ID:micromachine,项目名称:RackTables-ZABBIX-bridge,代码行数:31,代码来源:hosts.php

示例10: mysql_error

$sql = "SELECT priority FROM logs.logs GROUP BY priority;";
$results = mysql_query($sql, $db);
echo mysql_error($db);
$level = array(" - Any - ");
while ($row = mysql_fetch_assoc($results)) {
    $level[$row['priority']] = $row['priority'];
}
$r_form->addItem(array(SPACE . _('Server') . SPACE, new CComboBox('server', $selected_server, 'javascript: submit();', $servers), SPACE . _('Server') . SPACE, new CComboBox('priority', $selectedPriority, 'javascript: submit();', $level)));
// add host and group filters to the form
//if ($source == EVENT_SOURCE_TRIGGERS) {
//    $r_form->addItem(array(
//        SPACE . _('Host') . SPACE,
//        $pageFilter->getHostsCB(true)
//    ));
//}
$eventsWidget->addHeader(_('Events'), $r_form);
$eventsWidget->addHeaderRowNumber();
$filterForm = null;
//
//if ($source == EVENT_SOURCE_TRIGGERS) {
$filterForm = new CFormTable(null, null, 'get');
$eventsWidget->addFlicker(null, CProfile::get('web.events.filter.state', 0));
$scroll = new CDiv();
$scroll->setAttribute('id', 'scrollbar_cntr');
$eventsWidget->addFlicker($scroll, CProfile::get('web.events.filter.state', 1));
/*
 * Display
 */
$table = new CTableInfo(_('No events found.'), 'tableinfo Eventlog');
if (isset($_REQUEST['period'])) {
    $_REQUEST['period'] = getRequest('period', ZBX_PERIOD_DEFAULT);
开发者ID:OneOaaS,项目名称:zabbix-dashboard-extension,代码行数:31,代码来源:eventlog.php

示例11: dirname

            echo 'page_submenu["menu_screens"] = ' . zbx_jsvalue(make_screen_submenu()) . ';';
        }
    }
}
if ($page['type'] == PAGE_TYPE_JS || $page['type'] == PAGE_TYPE_HTML_BLOCK) {
    require_once dirname(__FILE__) . '/include/page_footer.php';
    exit;
}
// js templates
require_once dirname(__FILE__) . '/include/views/js/general.script.confirm.js.php';
/*
 * Display
 */
$dashboardWidget = new CWidget('dashboard_wdgt');
$dashboardWidget->setClass('header');
$dashboardWidget->addHeader(_('PERSONAL DASHBOARD'), array(new CIcon(_s('Configure (Filter %s)', $dashconf['filterEnable'] ? _('Enabled') : _('Disabled')), $dashconf['filterEnable'] ? 'iconconfig_hl' : 'iconconfig', "document.location = 'dashconf.php';"), SPACE, get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen']))));
// js menu arrays
$menu = array();
$submenu = array();
make_graph_menu($menu, $submenu);
make_sysmap_menu($menu, $submenu);
make_screen_menu($menu, $submenu);
make_refresh_menu('mainpage', 'hat_syssum', CProfile::get('web.dashboard.rf_rate.hat_syssum', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_hoststat', CProfile::get('web.dashboard.rf_rate.hat_hoststat', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_stszbx', CProfile::get('web.dashboard.rf_rate.hat_stszbx', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_lastiss', CProfile::get('web.dashboard.rf_rate.hat_lastiss', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_webovr', CProfile::get('web.dashboard.rf_rate.hat_webovr', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_dscvry', CProfile::get('web.dashboard.rf_rate.hat_dscvry', 60), null, $menu, $submenu);
insert_js('var page_menu=' . zbx_jsvalue($menu) . ";\n" . 'var page_submenu=' . zbx_jsvalue($submenu) . ";\n");
/*
 * Left column
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:dashboard.php

示例12: CWidget

$actionWidget = new CWidget();
// create new action button
$createForm = new CForm('get');
$createForm->cleanItems();
$createForm->addVar('eventsource', $this->data['eventsource']);
$createForm->addItem(new CSubmit('form', _('Create action')));
$actionWidget->addPageHeader(_('CONFIGURATION OF ACTIONS'), $createForm);
// create widget header
$sourceComboBox = new CComboBox('eventsource', $this->data['eventsource'], 'submit()');
$sourceComboBox->addItem(EVENT_SOURCE_TRIGGERS, _('Triggers'));
$sourceComboBox->addItem(EVENT_SOURCE_DISCOVERY, _('Discovery'));
$sourceComboBox->addItem(EVENT_SOURCE_AUTO_REGISTRATION, _('Auto registration'));
$sourceComboBox->addItem(EVENT_SOURCE_INTERNAL, _x('Internal', 'event source'));
$filterForm = new CForm('get');
$filterForm->addItem(array(_('Event source'), SPACE, $sourceComboBox));
$actionWidget->addHeader(_('Actions'), $filterForm);
$actionWidget->addHeaderRowNumber();
// create form
$actionForm = new CForm();
$actionForm->setName('actionForm');
// create table
$actionTable = new CTableInfo(_('No actions found.'));
$actionTable->setHeader(array(new CCheckBox('all_items', null, "checkAll('" . $actionForm->getName() . "', 'all_items', 'g_actionid');"), make_sorting_header(_('Name'), 'name', $this->data['sort'], $this->data['sortorder']), _('Conditions'), _('Operations'), make_sorting_header(_('Status'), 'status', $this->data['sort'], $this->data['sortorder'])));
foreach ($this->data['actions'] as $action) {
    $conditions = array();
    order_result($action['filter']['conditions'], 'conditiontype', ZBX_SORT_DOWN);
    foreach ($action['filter']['conditions'] as $condition) {
        $conditions[] = get_condition_desc($condition['conditiontype'], $condition['operator'], $condition['value']);
        $conditions[] = BR();
    }
    sortOperations($this->data['eventsource'], $action['operations']);
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.action.list.php

示例13: CWidget

** 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.
**/
$slideWidget = new CWidget();
// create new hostgroup button
$createForm = new CForm('get');
$createForm->cleanItems();
$createForm->addItem(new CSubmit('form', _('Create slide show')));
$slideWidget->addPageHeader(_('CONFIGURATION OF SLIDE SHOWS'), $createForm);
$slideWidget->addHeader(_('Slide shows'));
$slideWidget->addHeaderRowNumber();
// create form
$slideForm = new CForm();
$slideForm->setName('slideForm');
// create table
$slidesTable = new CTableInfo(_('No slide shows found.'));
$slidesTable->setHeader(array(new CCheckBox('all_shows', null, "checkAll('" . $slideForm->getName() . "', 'all_shows', 'shows');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'name'), make_sorting_header(_('Delay'), 'delay'), make_sorting_header(_('Count of slides'), 'cnt')));
foreach ($this->data['slides'] as $slide) {
    $slidesTable->addRow(array(new CCheckBox('shows[' . $slide['slideshowid'] . ']', null, null, $slide['slideshowid']), $this->data['displayNodes'] ? $slide['nodename'] : null, new CLink($slide['name'], '?form=update&slideshowid=' . $slide['slideshowid'], 'action'), $slide['delay'], $slide['cnt']));
}
// create go button
$goComboBox = new CComboBox('go');
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected slide shows?'));
$goComboBox->addItem($goOption);
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.slideconf.list.php

示例14: array

if ($this->data['slideshows']) {
    $favouriteIcon = $this->data['screen'] ? get_icon('favourite', array('fav' => 'web.favorite.screenids', 'elname' => 'slideshowid', 'elid' => $this->data['elementId'])) : new CIcon(_('Favourites'), 'iconplus');
    $refreshIcon = new CIcon(_('Menu'), 'iconmenu');
    if ($this->data['screen']) {
        $refreshIcon->setMenuPopup(CMenuPopupHelper::getRefresh(WIDGET_SLIDESHOW, 'x' . $this->data['refreshMultiplier'], true, array('elementid' => $this->data['elementId'])));
    }
    $slideshowWidget->addPageHeader(_('SLIDE SHOWS'), array($slideHeaderForm, SPACE, $favouriteIcon, SPACE, $refreshIcon, SPACE, get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen']))));
    $slideshowForm = new CForm('get');
    $slideshowForm->setName('slideForm');
    $slideshowForm->addVar('fullscreen', $this->data['fullscreen']);
    $slideshowsComboBox = new CComboBox('elementid', $this->data['elementId'], 'submit()');
    foreach ($this->data['slideshows'] as $slideshow) {
        $slideshowsComboBox->addItem($slideshow['slideshowid'], $slideshow['name']);
    }
    $slideshowForm->addItem(array(_('Slide show') . SPACE, $slideshowsComboBox));
    $slideshowWidget->addHeader($this->data['slideshows'][$this->data['elementId']]['name'], $slideshowForm);
    if ($this->data['screen']) {
        if (isset($this->data['isDynamicItems'])) {
            $slideshowForm->addItem(array(SPACE, _('Group'), SPACE, $this->data['pageFilter']->getGroupsCB()));
            $slideshowForm->addItem(array(SPACE, _('Host'), SPACE, $this->data['pageFilter']->getHostsCB()));
        }
        $scrollDiv = new CDiv();
        $scrollDiv->setAttribute('id', 'scrollbar_cntr');
        $slideshowWidget->addFlicker($scrollDiv, CProfile::get('web.slides.filter.state', 1));
        $slideshowWidget->addFlicker(BR(), CProfile::get('web.slides.filter.state', 1));
        $slideshowWidget->addItem(new CSpan(_('Loading...'), 'textcolorstyles'));
    } else {
        $slideshowWidget->addItem(new CTableInfo(_('No slides found.')));
    }
} else {
    $slideshowWidget->addPageHeader(_('SLIDE SHOWS'), array($slideHeaderForm, SPACE, get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen']))));
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:monitoring.slides.php

示例15: 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


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