當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CWidget::addHeaderRowNumber方法代碼示例

本文整理匯總了PHP中CWidget::addHeaderRowNumber方法的典型用法代碼示例。如果您正苦於以下問題:PHP CWidget::addHeaderRowNumber方法的具體用法?PHP CWidget::addHeaderRowNumber怎麽用?PHP CWidget::addHeaderRowNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CWidget的用法示例。


在下文中一共展示了CWidget::addHeaderRowNumber方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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']) {
開發者ID:SandipSingh14,項目名稱:Zabbix_,代碼行數:31,代碼來源:configuration.host.prototype.list.php

示例2: CView

        $hosts_wdgt->addItem(get_header_host_table('', $_REQUEST['hostid']));
    }
    $hostForm = new CView('configuration.host.edit');
    $hosts_wdgt->addItem($hostForm->render());
    $hosts_wdgt->setRootClass('host-edit');
} else {
    $frmForm = new CForm();
    $frmForm->cleanItems();
    $buttons = new CDiv(array(new CSubmit('form', _('Create host')), new CButton('form', _('Import'), 'redirect("conf.import.php?rules_preset=host")')));
    $frmForm->addItem($buttons);
    $frmForm->addItem(new CVar('groupid', $_REQUEST['groupid'], 'filter_groupid_id'));
    $hosts_wdgt->addPageHeader(_('CONFIGURATION OF HOSTS'), $frmForm);
    $frmGroup = new CForm('get');
    $frmGroup->addItem(array(_('Group') . SPACE, $pageFilter->getGroupsCB()));
    $hosts_wdgt->addHeader(_('Hosts'), $frmGroup);
    $hosts_wdgt->addHeaderRowNumber();
    $hosts_wdgt->setRootClass('host-list');
    // filter
    $filter_table = new CTable('', 'filter');
    $filter_table->addRow(array(array(array(bold(_('Name')), SPACE . _('like') . ': '), new CTextBox('filter_host', $_REQUEST['filter_host'], 20)), array(array(bold(_('DNS')), SPACE . _('like') . ': '), new CTextBox('filter_dns', $_REQUEST['filter_dns'], 20)), array(array(bold(_('IP')), SPACE . _('like') . ': '), new CTextBox('filter_ip', $_REQUEST['filter_ip'], 20)), array(bold(_('Port') . ': '), new CTextBox('filter_port', $_REQUEST['filter_port'], 20))));
    $filter = new CButton('filter', _('Filter'), "javascript: create_var('zbx_filter', 'filter_set', '1', true);");
    $filter->useJQueryStyle('main');
    $reset = new CButton('reset', _('Reset'), "javascript: clearAllForm('zbx_filter');");
    $reset->useJQueryStyle();
    $div_buttons = new CDiv(array($filter, SPACE, $reset));
    $div_buttons->setAttribute('style', 'padding: 4px 0;');
    $filter_table->addRow(new CCol($div_buttons, 'center', 4));
    $filter_form = new CForm('get');
    $filter_form->setAttribute('name', 'zbx_filter');
    $filter_form->setAttribute('id', 'zbx_filter');
    $filter_form->addItem($filter_table);
開發者ID:quanta-computing,項目名稱:debian-packages,代碼行數:31,代碼來源:hosts.php

示例3: CWidget

** 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'));
$goOption->setAttribute('confirm', _('Enable selected discovery rules?'));
開發者ID:TonywalkerCN,項目名稱:Zabbix,代碼行數:31,代碼來源:configuration.discovery.list.php

示例4: CComboBox

$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 {
        $online = new CCol(_('No'), 'disabled');
開發者ID:TonywalkerCN,項目名稱:Zabbix,代碼行數:31,代碼來源:administration.users.list.php

示例5: 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.
**/
$sysmapWidget = new CWidget();
// create header buttons
$createForm = new CForm('get');
$createForm->cleanItems();
$createForm->addItem(new CSubmit('form', _('Create map')));
$createForm->addItem(new CButton('form', _('Import'), 'redirect("conf.import.php?rules_preset=map")'));
$sysmapWidget->addPageHeader(_('CONFIGURATION OF NETWORK MAPS'), $createForm);
// create form
$sysmapForm = new CForm();
$sysmapForm->setName('frm_maps');
$sysmapWidget->addHeader(_('Maps'));
$sysmapWidget->addHeaderRowNumber();
// create table
$sysmapTable = new CTableInfo(_('No maps found.'));
$sysmapTable->setHeader(array(new CCheckBox('all_maps', null, "checkAll('" . $sysmapForm->getName() . "', 'all_maps', 'maps');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'name'), make_sorting_header(_('Width'), 'width'), make_sorting_header(_('Height'), 'height'), _('Edit')));
foreach ($this->data['maps'] as $map) {
    $sysmapTable->addRow(array(new CCheckBox('maps[' . $map['sysmapid'] . ']', null, null, $map['sysmapid']), $this->data['displayNodes'] ? $map['nodename'] : null, new CLink($map['name'], 'sysmap.php?sysmapid=' . $map['sysmapid']), $map['width'], $map['height'], new CLink(_('Edit'), 'sysmaps.php?form=update&sysmapid=' . $map['sysmapid'] . '#form')));
}
// create go button
$goComboBox = new CComboBox('go');
$goComboBox->addItem('export', _('Export selected'));
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected maps?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "maps";');
開發者ID:SandipSingh14,項目名稱:Zabbix_,代碼行數:31,代碼來源:configuration.sysmap.list.php

示例6: 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.
**/
$maintenanceWidget = new CWidget();
// create new maintenance button
$createForm = new CForm('get');
$createForm->cleanItems();
$createForm->addItem(new CSubmit('form', _('Create maintenance period')));
$maintenanceWidget->addPageHeader(_('CONFIGURATION OF MAINTENANCE PERIODS'), $createForm);
// header
$filterForm = new CForm('get');
$filterForm->addItem(array(_('Group') . SPACE, $this->data['pageFilter']->getGroupsCB(true)));
$maintenanceWidget->addHeader(_('Maintenance periods'), $filterForm);
$maintenanceWidget->addHeaderRowNumber();
// create form
$maintenanceForm = new CForm();
$maintenanceForm->setName('maintenanceForm');
// 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;
開發者ID:itnihao,項目名稱:zatree-2.2,代碼行數:31,代碼來源:configuration.maintenance.list.php

示例7: CSubmit

    $createForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
    $triggersWidget->addPageHeader(_('CONFIGURATION OF TRIGGER PROTOTYPES'), $createForm);
} else {
    if (empty($this->data['hostid'])) {
        $createButton = new CSubmit('form', _('Create trigger (select host first)'));
        $createButton->setEnabled(false);
        $createForm->addItem($createButton);
    } else {
        $createForm->addItem(new CSubmit('form', _('Create trigger')));
    }
    $triggersWidget->addPageHeader(_('CONFIGURATION OF TRIGGERS'), $createForm);
}
// create widget header
if (!empty($this->data['parent_discoveryid'])) {
    $triggersWidget->addHeader(array(_('Trigger prototypes of') . SPACE, new CSpan($this->data['discovery_rule']['name'], 'parent-discovery')));
    $triggersWidget->addHeaderRowNumber(array('[ ', new CLink($this->data['showdisabled'] ? _('Hide disabled trigger prototypes') : _('Show disabled trigger prototypes'), 'trigger_prototypes.php?' . 'showdisabled=' . ($this->data['showdisabled'] ? 0 : 1) . '&hostid=' . $this->data['hostid'] . '&parent_discoveryid=' . $this->data['parent_discoveryid']), ' ]'));
} else {
    $filterForm = new CForm('get');
    $filterForm->addItem(array(_('Group') . SPACE, $this->data['pageFilter']->getGroupsCB()));
    $filterForm->addItem(array(SPACE . _('Host') . SPACE, $this->data['pageFilter']->getHostsCB()));
    $triggersWidget->addHeader(_('Triggers'), $filterForm);
    $triggersWidget->addHeaderRowNumber(array('[ ', new CLink($this->data['showdisabled'] ? _('Hide disabled triggers') : _('Show disabled triggers'), 'triggers.php?' . 'hostid=' . $this->data['hostid'] . '&showdisabled=' . ($this->data['showdisabled'] ? 0 : 1)), ' ]'));
}
// create form
$triggersForm = new CForm();
$triggersForm->setName('triggersForm');
$triggersForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
$triggersForm->addVar('hostid', $this->data['hostid']);
// create table
$triggersTable = new CTableInfo(_('No triggers found.'));
$triggersTable->setHeader(array(new CCheckBox('all_triggers', null, "checkAll('" . $triggersForm->getName() . "', 'all_triggers', 'g_triggerid');"), make_sorting_header(_('Severity'), 'priority', $this->data['sort'], $this->data['sortorder']), empty($this->data['hostid']) ? _('Host') : null, make_sorting_header(_('Name'), 'description', $this->data['sort'], $this->data['sortorder']), _('Expression'), make_sorting_header(_('Status'), 'status', $this->data['sort'], $this->data['sortorder']), $data['showInfoColumn'] ? _('Info') : null));
開發者ID:TonywalkerCN,項目名稱:Zabbix,代碼行數:31,代碼來源:configuration.triggers.list.php

示例8: CForm

    $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');
    $filterForm->addItem($filterTable);
開發者ID:micromachine,項目名稱:RackTables-ZABBIX-bridge,代碼行數:31,代碼來源:hosts.php

示例9: CWidget

/*
 * Display
 */
$displayNodes = is_show_all_nodes() && $pageFilter->groupid == 0 && $pageFilter->hostid == 0;
$showTriggers = $_REQUEST['show_triggers'];
$showEvents = $_REQUEST['show_events'];
$showSeverity = $_REQUEST['show_severity'];
$ackStatus = $_REQUEST['ack_status'];
$triggerWidget = new CWidget();
$rightForm = new CForm('get');
$rightForm->addItem(array(_('Group') . SPACE, $pageFilter->getGroupsCB(true)));
$rightForm->addItem(array(SPACE . _('Host') . SPACE, $pageFilter->getHostsCB(true)));
$rightForm->addVar('fullscreen', $_REQUEST['fullscreen']);
$triggerWidget->addPageHeader(_('STATUS OF TRIGGERS') . SPACE . '[' . zbx_date2str(_('d M Y H:i:s')) . ']', get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen'])));
$triggerWidget->addHeader(_('Triggers'), $rightForm);
$triggerWidget->addHeaderRowNumber();
/*
 * Filter
 */
$filterForm = new CFormTable(null, null, 'get');
$filterForm->setAttribute('name', 'zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$filterForm->addVar('fullscreen', $_REQUEST['fullscreen']);
$filterForm->addVar('groupid', $_REQUEST['groupid']);
$filterForm->addVar('hostid', $_REQUEST['hostid']);
$statusComboBox = new CComboBox('show_triggers', $showTriggers);
$statusComboBox->addItem(TRIGGERS_OPTION_ALL, _('Any'));
$statusComboBox->additem(TRIGGERS_OPTION_ONLYTRUE, _('Problem'));
$filterForm->addRow(_('Triggers status'), $statusComboBox);
if ($config['event_ack_enable']) {
    $ackStatusComboBox = new CComboBox('ack_status', $ackStatus);
開發者ID:itnihao,項目名稱:zatree-2.2,代碼行數:31,代碼來源:tr_status.php

示例10: CSubmit

$createForm->addVar('hostid', $this->data['hostid']);
if (empty($this->data['hostid'])) {
    $createButton = new CSubmit('form', _('Create scenario (select host first)'));
    $createButton->setEnabled(false);
    $createForm->addItem($createButton);
} else {
    $createForm->addItem(new CSubmit('form', _('Create scenario')));
    $httpWidget->addItem(get_header_host_table('web', $this->data['hostid']));
}
$httpWidget->addPageHeader(_('CONFIGURATION OF WEB MONITORING'), $createForm);
// header
$filterForm = new CForm('get');
$filterForm->addItem(array(_('Group') . SPACE, $this->data['pageFilter']->getGroupsCB(true)));
$filterForm->addItem(array(SPACE . _('Host') . SPACE, $this->data['pageFilter']->getHostsCB(true)));
$httpWidget->addHeader(_('Scenarios'), $filterForm);
$httpWidget->addHeaderRowNumber(array('[ ', new CLink($this->data['showDisabled'] ? _('Hide disabled scenarios') : _('Show disabled scenarios'), '?showdisabled=' . ($this->data['showDisabled'] ? 0 : 1), null), ' ]'));
// create form
$httpForm = new CForm();
$httpForm->setName('scenarios');
$httpForm->addVar('hostid', $this->data['hostid']);
$httpTable = new CTableInfo(_('No web scenarios found.'));
$httpTable->setHeader(array(new CCheckBox('all_httptests', null, "checkAll('" . $httpForm->getName() . "', 'all_httptests', 'group_httptestid');"), $this->data['displayNodes'] ? _('Node') : null, $this->data['hostid'] == 0 ? make_sorting_header(_('Host'), 'hostname') : null, make_sorting_header(_('Name'), 'name'), _('Number of steps'), _('Update interval'), make_sorting_header(_('Status'), 'status')));
foreach ($this->data['httpTests'] as $httpTestId => $httpTest) {
    $name = array();
    if (isset($this->data['parentTemplates'][$httpTestId])) {
        $template = $this->data['parentTemplates'][$httpTestId];
        $name[] = new CLink($template['name'], '?groupid=0&hostid=' . $template['id'], 'unknown');
        $name[] = NAME_DELIMITER;
    }
    $name[] = new CLink($httpTest['name'], '?form=update' . '&httptestid=' . $httpTest['httptestid'] . '&hostid=' . $httpTest['hostid']);
    $httpTable->addRow(array(new CCheckBox('group_httptestid[' . $httpTest['httptestid'] . ']', null, null, $httpTest['httptestid']), $this->data['displayNodes'] ? $httpTest['nodename'] : null, $this->data['hostid'] > 0 ? null : $httpTest['hostname'], $name, $httpTest['stepscnt'], $httpTest['delay'], new CLink(httptest_status2str($httpTest['status']), '?group_httptestid[]=' . $httpTest['httptestid'] . '&hostid=' . $httpTest['hostid'] . '&go=' . ($httpTest['status'] ? 'activate' : 'disable'), httptest_status2style($httpTest['status']))));
開發者ID:SandipSingh14,項目名稱:Zabbix_,代碼行數:31,代碼來源:configuration.httpconf.list.php

示例11: CWidget

**/
$hostGroupWidget = new CWidget();
// create new hostgroup button
$createForm = new CForm('get');
$createForm->cleanItems();
if (CWebUser::getType() == USER_TYPE_SUPER_ADMIN) {
    $tmpItem = new CSubmit('form', _('Create host group'));
} else {
    $tmpItem = new CSubmit('form', _('Create host group') . SPACE . _('(Only super admins can create groups)'));
    $tmpItem->setEnabled(false);
}
$createForm->addItem($tmpItem);
$hostGroupWidget->addPageHeader(_('CONFIGURATION OF HOST GROUPS'), $createForm);
// header
$hostGroupWidget->addHeader(_('Host groups'));
$hostGroupWidget->addHeaderRowNumber();
// create form
$hostGroupForm = new CForm();
$hostGroupForm->setName('hostgroupForm');
// if any of the groups are about to be deleted, show the status column
$showStatus = false;
foreach ($this->data['groups'] as $hostGroup) {
    if ($hostGroup['groupDiscovery'] && $hostGroup['groupDiscovery']['ts_delete']) {
        $showStatus = true;
        break;
    }
}
// create table
$hostGroupTable = new CTableInfo(_('No host groups found.'));
$hostGroupTable->setHeader(array(new CCheckBox('all_groups', null, "checkAll('" . $hostGroupForm->getName() . "', 'all_groups', 'groups');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'name'), ' # ', _('Members'), $showStatus ? _('Status') : null));
foreach ($this->data['groups'] as $group) {
開發者ID:SandipSingh14,項目名稱:Zabbix_,代碼行數:31,代碼來源:configuration.hostgroups.list.php

示例12: CSubmit

// append host summary to widget header
if (empty($this->data['hostid'])) {
    $createButton = new CSubmit('form', _('Create application (select host first)'));
    $createButton->setEnabled(false);
    $createForm->addItem($createButton);
} else {
    $createForm->addItem(new CSubmit('form', _('Create application')));
    $applicationWidget->addItem(get_header_host_table('applications', $this->data['hostid']));
}
$applicationWidget->addPageHeader(_('CONFIGURATION OF APPLICATIONS'), $createForm);
// create widget header
$filterForm = new CForm('get');
$filterForm->addItem(array(_('Group') . SPACE, $this->data['pageFilter']->getGroupsCB(true)));
$filterForm->addItem(array(SPACE . _('Host') . SPACE, $this->data['pageFilter']->getHostsCB(true)));
$applicationWidget->addHeader(_('Applications'), $filterForm);
$applicationWidget->addHeaderRowNumber();
// create form
$applicationForm = new CForm();
$applicationForm->setName('applicationForm');
$applicationForm->addVar('groupid', $this->data['groupid']);
$applicationForm->addVar('hostid', $this->data['hostid']);
// create table
$applicationTable = new CTableInfo(_('No applications found.'));
$applicationTable->setHeader(array(new CCheckBox('all_applications', null, "checkAll('" . $applicationForm->getName() . "', 'all_applications', 'applications');"), $this->data['displayNodes'] ? _('Node') : null, $this->data['hostid'] > 0 ? null : _('Host'), make_sorting_header(_('Application'), 'name'), _('Show')));
foreach ($this->data['applications'] as $application) {
    // inherited app, display the template list
    if ($application['templateids'] && !empty($application['sourceTemplates'])) {
        $name = array();
        CArrayHelper::sort($application['sourceTemplates'], array('name'));
        foreach ($application['sourceTemplates'] as $template) {
            $name[] = new CLink($template['name'], 'applications.php?hostid=' . $template['hostid'], 'unknown');
開發者ID:itnihao,項目名稱:zatree-2.2,代碼行數:31,代碼來源:configuration.application.list.php

示例13: CComboBox

$r_form->addVar('fullscreen', $_REQUEST['fullscreen']);
$r_form->addVar('stime', get_request('stime'));
$r_form->addVar('period', get_request('period'));
// add host and group filters to the form
if ($source == EVENT_SOURCE_TRIGGERS) {
    $r_form->addItem(array(_('Group') . SPACE, $pageFilter->getGroupsCB(true)));
    $r_form->addItem(array(SPACE . _('Host') . SPACE, $pageFilter->getHostsCB(true)));
}
if ($allow_discovery) {
    $cmbSource = new CComboBox('source', $source, 'submit()');
    $cmbSource->addItem(EVENT_SOURCE_TRIGGERS, _('Trigger'));
    $cmbSource->addItem(EVENT_SOURCE_DISCOVERY, _('Discovery'));
    $r_form->addItem(array(SPACE . _('Source') . SPACE, $cmbSource));
}
$events_wdgt->addHeader(_('Events'), $r_form);
$events_wdgt->addHeaderRowNumber();
// FILTER {{{
$filterForm = null;
if (EVENT_SOURCE_TRIGGERS == $source) {
    $filterForm = new CFormTable(null, null, 'get');
    //,'events.php?filter_set=1','POST',null,'sform');
    $filterForm->setAttribute('name', 'zbx_filter');
    $filterForm->setAttribute('id', 'zbx_filter');
    $filterForm->addVar('triggerid', get_request('triggerid'));
    $filterForm->addVar('stime', get_request('stime'));
    $filterForm->addVar('period', get_request('period'));
    if (isset($_REQUEST['triggerid']) && $_REQUEST['triggerid'] > 0) {
        $dbTrigger = API::Trigger()->get(array('triggerids' => $_REQUEST['triggerid'], 'output' => array('description', 'expression'), 'selectHosts' => array('name'), 'preservekeys' => true, 'expandDescription' => true));
        // check if trigger is accessible
        if ($dbTrigger) {
            $dbTrigger = reset($dbTrigger);
開發者ID:quanta-computing,項目名稱:debian-packages,代碼行數:31,代碼來源:events.php

示例14: CForm

// 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']);
    $operations = array();
開發者ID:TonywalkerCN,項目名稱:Zabbix,代碼行數:31,代碼來源:configuration.action.list.php

示例15: 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.
**/
$userGroupsWidget = new CWidget();
// append page header to widget
$createForm = new CForm('get');
$createForm->cleanItems();
$configurationComboBox = new CComboBox('config', 'usergrps.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 group'))));
$userGroupsWidget->addPageHeader(_('CONFIGURATION OF USER GROUPS'), $createForm);
// append header to widget
$userGroupsWidget->addHeader(_('User groups'));
$userGroupsWidget->addHeaderRowNumber();
// create form
$userGroupsForm = new CForm();
$userGroupsForm->setName('userGroupsForm');
// create user group table
$userGroupTable = new CTableInfo(_('No user groups found.'));
$userGroupTable->setHeader(array(new CCheckBox('all_groups', null, "checkAll('" . $userGroupsForm->getName() . "','all_groups','group_groupid');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'name'), '#', _('Members'), _('Status'), _('Frontend access'), _('Debug mode')));
foreach ($this->data['usergroups'] as $usrgrp) {
    $userGroupId = $usrgrp['usrgrpid'];
    $debugMode = $usrgrp['debug_mode'] == GROUP_DEBUG_MODE_ENABLED ? new CLink(_('Enabled'), 'usergrps.php?go=disable_debug&usrgrpid=' . $userGroupId, 'orange') : new CLink(_('Disabled'), 'usergrps.php?go=enable_debug&usrgrpid=' . $userGroupId, 'enabled');
    // gui access
    $guiAccess = user_auth_type2str($usrgrp['gui_access']);
    $guiAccessStyle = 'enabled';
    if ($usrgrp['gui_access'] == GROUP_GUI_ACCESS_INTERNAL) {
        $guiAccessStyle = 'orange';
    }
開發者ID:SandipSingh14,項目名稱:Zabbix_,代碼行數:31,代碼來源:administration.usergroups.list.php


注:本文中的CWidget::addHeaderRowNumber方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。