• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_header_host_table函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_header_host_table函数的典型用法代码示例。如果您正苦于以下问题:PHP get_header_host_table函数的具体用法?PHP get_header_host_table怎么用?PHP get_header_host_table使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: dirname

** 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__) . '/js/configuration.triggers.edit.js.php';
$triggersWidget = new CWidget();
// append host summary to widget header
if (!empty($this->data['hostid'])) {
    if (!empty($this->data['parent_discoveryid'])) {
        $triggersWidget->addItem(get_header_host_table('triggers', $this->data['hostid'], $this->data['parent_discoveryid']));
    } else {
        $triggersWidget->addItem(get_header_host_table('triggers', $this->data['hostid']));
    }
}
if (!empty($this->data['parent_discoveryid'])) {
    $triggersWidget->addPageHeader(_('CONFIGURATION OF TRIGGER PROTOTYPES'));
} else {
    $triggersWidget->addPageHeader(_('CONFIGURATION OF TRIGGERS'));
}
// create form
$triggersForm = new CForm();
$triggersForm->setName('triggersForm');
$triggersForm->addVar('hostid', $this->data['hostid']);
$triggersForm->addVar('action', $this->data['action']);
if ($this->data['parent_discoveryid']) {
    $triggersForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
}
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:configuration.triggers.massupdate.php


示例2: count

 if (isset($_REQUEST['filter_with_triggers']) && !zbx_empty($_REQUEST['filter_with_triggers']) && $_REQUEST['filter_with_triggers'] != -1) {
     $options['with_triggers'] = $_REQUEST['filter_with_triggers'];
 }
 if (isset($_REQUEST['filter_ipmi_sensor']) && !zbx_empty($_REQUEST['filter_ipmi_sensor'])) {
     $options['filter']['ipmi_sensor'] = $_REQUEST['filter_ipmi_sensor'];
 }
 $afterFilter = count($options, COUNT_RECURSIVE);
 //} Items Filter
 if ($preFilter == $afterFilter) {
     $items = array();
 } else {
     $items = CItem::get($options);
 }
 // Header Host
 if ($hostid > 0) {
     $tbl_header_host = get_header_host_table($hostid, array('triggers', 'applications', 'graphs'));
     $items_wdgt->addItem($tbl_header_host);
     $show_host = false;
 }
 $form = new CForm();
 $form->setName('items');
 $form->addVar('hostid', $hostid);
 $table = new CTableInfo();
 // Table Header //
 $table->setHeader(array(new CCheckBox('all_items', null, "checkAll('" . $form->GetName() . "','all_items','group_itemid');"), S_WIZARD, $show_host ? S_HOST : null, make_sorting_header(S_DESCRIPTION, 'description'), S_TRIGGERS, make_sorting_header(S_KEY, 'key_'), make_sorting_header(S_INTERVAL, 'delay'), make_sorting_header(S_HISTORY, 'history'), make_sorting_header(S_TRENDS, 'trends'), make_sorting_header(S_TYPE, 'type'), make_sorting_header(S_STATUS, 'status'), S_APPLICATIONS, S_ERROR));
 // SET VALUES FOR SUBFILTERS {
 // if any of subfilters = false then item shouldnt be shown
 foreach ($items as $num => $item) {
     $item['hostids'] = zbx_objectValues($item['hosts'], 'hostid');
     $item['subfilters'] = array();
     $item['subfilters']['subfilter_hosts'] = empty($_REQUEST['subfilter_hosts']) || (bool) array_intersect($_REQUEST['subfilter_hosts'], $item['hostids']);
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:items.php


示例3: 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.
**/
$itemWidget = new CWidget();
if (!empty($this->data['hostid'])) {
    if (!empty($this->data['parent_discoveryid'])) {
        $itemWidget->addItem(get_header_host_table(!empty($this->data['is_discovery_rule']) ? 'discoveries' : 'items', $this->data['hostid'], $this->data['parent_discoveryid']));
    } else {
        $itemWidget->addItem(get_header_host_table(!empty($this->data['is_discovery_rule']) ? 'discoveries' : 'items', $this->data['hostid']));
    }
}
$itemWidget->addPageHeader($this->data['page_header']);
// create form
$itemForm = new CForm();
$itemForm->setName('itemForm');
$itemForm->addVar('form', $this->data['form']);
$itemForm->addVar('hostid', $this->data['hostid']);
if (!empty($this->data['parent_discoveryid'])) {
    $itemForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
}
if (!empty($this->data['itemid'])) {
    $itemForm->addVar('itemid', $this->data['itemid']);
}
// create form list
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.item.edit.php


示例4: CWidget

**
** 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.
**/
$widget = (new CWidget())->setTitle(_('Item prototypes'))->setControls((new CForm('get'))->cleanItems()->addVar('parent_discoveryid', $this->data['parent_discoveryid'])->addItem((new CList())->addItem(new CSubmit('form', _('Create item prototype')))))->addItem(get_header_host_table('items', $this->data['hostid'], $this->data['parent_discoveryid']));
// create form
$itemForm = (new CForm())->setName('items')->addVar('hostid', $this->data['hostid'])->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
// create table
$itemTable = (new CTableInfo())->setHeader([(new CColHeader((new CCheckBox('all_items'))->onClick("checkAll('" . $itemForm->getName() . "', 'all_items', 'group_itemid');")))->addClass(ZBX_STYLE_CELL_WIDTH), make_sorting_header(_('Name'), 'name', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Key'), 'key_', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Interval'), 'delay', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('History'), 'history', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Trends'), 'trends', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Type'), 'type', $this->data['sort'], $this->data['sortorder']), _('Applications'), make_sorting_header(_('Status'), 'status', $this->data['sort'], $this->data['sortorder'])]);
foreach ($this->data['items'] as $item) {
    $description = [];
    if (!empty($item['templateid'])) {
        $template_host = get_realhost_by_itemid($item['templateid']);
        $templateDiscoveryRuleId = get_realrule_by_itemid_and_hostid($this->data['parent_discoveryid'], $template_host['hostid']);
        $description[] = (new CLink($template_host['name'], '?parent_discoveryid=' . $templateDiscoveryRuleId))->addClass(ZBX_STYLE_LINK_ALT)->addClass(ZBX_STYLE_GREY);
        $description[] = NAME_DELIMITER;
    }
    $description[] = new CLink($item['name_expanded'], '?form=update&itemid=' . $item['itemid'] . '&parent_discoveryid=' . $this->data['parent_discoveryid']);
    $status = (new CLink(itemIndicator($item['status']), '?group_itemid=' . $item['itemid'] . '&parent_discoveryid=' . $this->data['parent_discoveryid'] . '&action=' . ($item['status'] == ITEM_STATUS_DISABLED ? 'itemprototype.massenable' : 'itemprototype.massdisable')))->addClass(ZBX_STYLE_LINK_ACTION)->addClass(itemIndicatorStyle($item['status']))->addSID();
    if (!empty($item['applications'])) {
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.item.prototype.list.php


示例5: CWidget

** 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.
**/
$widget = (new CWidget())->setTitle(_('Web monitoring'));
// append host summary to widget header
if (!empty($this->data['hostid'])) {
    $widget->addItem(get_header_host_table('web', $this->data['hostid']));
}
// create form
$httpForm = (new CForm())->setName('httpForm')->addVar('form', $this->data['form'])->addVar('hostid', $this->data['hostid'])->addVar('steps', $this->data['steps'])->addVar('templated', $this->data['templated']);
if (!empty($this->data['httptestid'])) {
    $httpForm->addVar('httptestid', $this->data['httptestid']);
}
/*
 * Scenario tab
 */
$httpFormList = new CFormList('httpFormList');
// Parent http tests
if (!empty($this->data['templates'])) {
    $httpFormList->addRow(_('Parent web scenarios'), $this->data['templates']);
}
// Name
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.httpconf.edit.php


示例6: CSubmit

} else {
    $createForm->addVar('hostid', $this->data['hostid']);
    if (!empty($this->data['hostid'])) {
        $createForm->addItem(new CSubmit('form', _('Create graph')));
    } else {
        $createGraphButton = new CSubmit('form', _('Create graph (select host first)'));
        $createGraphButton->setEnabled(false);
        $createForm->addItem($createGraphButton);
    }
    $graphWidget->addPageHeader(_('CONFIGURATION OF GRAPHS'), $createForm);
    $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)));
    $graphWidget->addHeader(_('Graphs'), $filterForm);
    if (!empty($this->data['hostid'])) {
        $graphWidget->addItem(get_header_host_table('graphs', $this->data['hostid']));
    }
}
$graphWidget->addHeaderRowNumber();
// create form
$graphForm = new CForm();
$graphForm->setName('graphForm');
$graphForm->addVar('hostid', $this->data['hostid']);
if (!empty($this->data['parent_discoveryid'])) {
    $graphForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
}
// create table
$graphTable = new CTableInfo(!empty($this->data['parent_discoveryid']) ? _('No graph prototypes found.') : _('No graphs found.'));
$graphTable->setHeader(array(new CCheckBox('all_graphs', null, "checkAll('" . $graphForm->getName() . "', 'all_graphs', 'group_graphid');"), $this->data['displayNodes'] ? _('Node') : null, !empty($this->data['hostid']) ? null : _('Hosts'), make_sorting_header(_('Name'), 'name'), _('Width'), _('Height'), make_sorting_header(_('Graph type'), 'graphtype')));
foreach ($this->data['graphs'] as $graph) {
    $graphid = $graph['graphid'];
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.graph.list.php


示例7: CWidget

** 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.
**/
$itemWidget = new CWidget();
if (!empty($this->data['hostid'])) {
    $itemWidget->addItem(get_header_host_table('discoveries', $this->data['hostid'], isset($this->data['parent_discoveryid']) ? $this->data['parent_discoveryid'] : null));
}
$itemWidget->addPageHeader($this->data['page_header']);
// create form
$itemForm = new CForm();
$itemForm->setName('itemForm');
$itemForm->addVar('form', $this->data['form']);
$itemForm->addVar('hostid', $this->data['hostid']);
if (!empty($this->data['parent_discoveryid'])) {
    $itemForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
}
if (!empty($this->data['itemid'])) {
    $itemForm->addVar('itemid', $this->data['itemid']);
}
// create form list
$itemFormList = new CFormList('itemFormList');
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:configuration.host.discovery.edit.php


示例8: dirname

** 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.
**/
$discoveryRule = $data['discovery_rule'];
$hostPrototype = $data['host_prototype'];
$parentHost = $data['parent_host'];
require_once dirname(__FILE__) . '/js/configuration.host.edit.js.php';
require_once dirname(__FILE__) . '/js/configuration.host.prototype.edit.js.php';
$widget = new CWidget(null, 'hostprototype-edit');
$widget->addPageHeader(_('CONFIGURATION OF HOST PROTOTYPES'));
$widget->addItem(get_header_host_table('hosts', $discoveryRule['hostid'], $discoveryRule['itemid']));
$divTabs = new CTabView();
if (!isset($_REQUEST['form_refresh'])) {
    $divTabs->setSelected(0);
}
$frmHost = new CForm();
$frmHost->setName('hostPrototypeForm.');
$frmHost->addVar('form', get_request('form', 1));
$frmHost->addVar('parent_discoveryid', $discoveryRule['itemid']);
$hostList = new CFormList('hostlist');
if ($hostPrototype['templateid'] && $data['parents']) {
    $parents = array();
    foreach (array_reverse($data['parents']) as $parent) {
        $parents[] = new CLink($parent['parentHost']['name'], '?form=update&hostid=' . $parent['hostid'] . '&parent_discoveryid=' . $parent['discoveryRule']['itemid'], 'highlight underline weight_normal');
        $parents[] = SPACE . RARR . SPACE;
    }
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.host.prototype.edit.php


示例9: CWidget

**
** 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.
**/
$widget = (new CWidget())->setTitle(_('Discovery rules'))->setControls((new CForm('get'))->cleanItems()->addVar('hostid', $this->data['hostid'])->addItem((new CList())->addItem(new CSubmit('form', _('Create discovery rule')))))->addItem(get_header_host_table('discoveries', $this->data['hostid']));
// create form
$discoveryForm = (new CForm())->setName('discovery')->addVar('hostid', $this->data['hostid']);
// create table
$discoveryTable = (new CTableInfo())->setHeader([(new CColHeader((new CCheckBox('all_items'))->onClick("checkAll('" . $discoveryForm->getName() . "', 'all_items', 'g_hostdruleid');")))->addClass(ZBX_STYLE_CELL_WIDTH), make_sorting_header(_('Name'), 'name', $this->data['sort'], $this->data['sortorder']), _('Items'), _('Triggers'), _('Graphs'), $data['host']['flags'] == ZBX_FLAG_DISCOVERY_NORMAL ? _('Hosts') : null, make_sorting_header(_('Key'), 'key_', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Interval'), 'delay', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Type'), 'type', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Status'), 'status', $this->data['sort'], $this->data['sortorder']), $data['showInfoColumn'] ? _('Info') : null]);
foreach ($data['discoveries'] as $discovery) {
    // description
    $description = [];
    if ($discovery['templateid']) {
        $dbTemplate = get_realhost_by_itemid($discovery['templateid']);
        $description[] = (new CLink($dbTemplate['name'], '?hostid=' . $dbTemplate['hostid']))->addClass(ZBX_STYLE_LINK_ALT)->addClass(ZBX_STYLE_GREY);
        $description[] = NAME_DELIMITER;
    }
    $description[] = new CLink($discovery['name_expanded'], '?form=update&itemid=' . $discovery['itemid']);
    // status
    $status = (new CLink(itemIndicator($discovery['status'], $discovery['state']), '?hostid=' . $_REQUEST['hostid'] . '&g_hostdruleid=' . $discovery['itemid'] . '&action=' . ($discovery['status'] == ITEM_STATUS_DISABLED ? 'discoveryrule.massenable' : 'discoveryrule.massdisable')))->addClass(ZBX_STYLE_LINK_ACTION)->addClass(itemIndicatorStyle($discovery['status'], $discovery['state']))->addSID();
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.host.discovery.list.php


示例10: dirname

** 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__) . '/js/configuration.triggers.edit.js.php';
$triggersWidget = (new CWidget())->setTitle(_('Trigger prototypes'));
// append host summary to widget header
$triggersWidget->addItem(get_header_host_table('trigger_prototypes', $data['hostid'], $data['parent_discoveryid']));
$triggersForm = (new CForm())->setName('triggersForm')->addVar('action', $data['action'])->addVar('parent_discoveryid', $data['parent_discoveryid']);
foreach ($data['g_triggerid'] as $triggerid) {
    $triggersForm->addVar('g_triggerid[' . $triggerid . ']', $triggerid);
}
$triggersFormList = (new CFormList('triggersFormList'))->addRow([_('Severity'), SPACE, (new CVisibilityBox('visible[priority]', 'priority_div', _('Original')))->setChecked(isset($data['visible']['priority']))], (new CDiv(new CSeverity(['name' => 'priority', 'value' => $data['priority']])))->setId('priority_div'));
// append dependencies to form list
$dependenciesTable = (new CTable())->setAttribute('style', 'width: 100%;')->setHeader([_('Name'), _('Action')]);
foreach ($data['dependencies'] as $dependency) {
    $triggersForm->addVar('dependencies[]', $dependency['triggerid'], 'dependencies_' . $dependency['triggerid']);
    $depTriggerDescription = CHtml::encode(implode(', ', zbx_objectValues($dependency['hosts'], 'name')) . NAME_DELIMITER . $dependency['description']);
    if ($dependency['flags'] == ZBX_FLAG_DISCOVERY_PROTOTYPE) {
        $description = (new CLink($depTriggerDescription, 'trigger_prototypes.php?form=update' . url_param('parent_discoveryid') . '&triggerid=' . $dependency['triggerid']))->setAttribute('target', '_blank');
    } elseif ($dependency['flags'] == ZBX_FLAG_DISCOVERY_NORMAL) {
        $description = (new CLink($depTriggerDescription, 'triggers.php?form=update&triggerid=' . $dependency['triggerid']))->setAttribute('target', '_blank');
    }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.trigger.prototype.massupdate.php


示例11: 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.
**/
$widget = (new CWidget())->setTitle(_('Screens'));
$controls = new CList();
if (!$data['templateid']) {
    $controls->addItem(new CComboBox('config', 'screens.php', 'redirect(this.options[this.selectedIndex].value);', ['screens.php' => _('Screens'), 'slides.php' => _('Slide shows')]));
}
$controls->addItem(new CSubmit('form', _('Create screen')));
$createForm = (new CForm('get'))->cleanItems();
if ($data['templateid']) {
    $createForm->addVar('templateid', $data['templateid']);
    $widget->addItem(get_header_host_table('screens', $data['templateid']));
} else {
    $controls->addItem((new CButton('form', _('Import')))->onClick('redirect("screen.import.php?rules_preset=screen")'));
}
$createForm->addItem($controls);
$widget->setControls($createForm);
// filter
if (!$data['templateid']) {
    $widget->addItem((new CFilter('web.screenconf.filter.state'))->addColumn((new CFormList())->addRow(_('Name like'), (new CTextBox('filter_name', $data['filter']['name']))->setWidth(ZBX_TEXTAREA_FILTER_STANDARD_WIDTH))));
}
// create form
$screenForm = (new CForm())->setName('screenForm')->addVar('templateid', $data['templateid']);
// create table
$screenTable = (new CTableInfo())->setHeader([(new CColHeader((new CCheckBox('all_screens'))->onClick("checkAll('" . $screenForm->getName() . "', 'all_screens', 'screens');")))->addClass(ZBX_STYLE_CELL_WIDTH), make_sorting_header(_('Name'), 'name', $data['sort'], $data['sortorder']), _('Dimension (cols x rows)'), _('Actions')]);
foreach ($data['screens'] as $screen) {
    $user_type = CWebUser::getType();
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:monitoring.screen.list.php


示例12: CSubmit

**
** 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.
**/
if ($this->data['hostid'] == 0) {
    $create_button = (new CSubmit('form', _('Create application (select host first)')))->setEnabled(false);
} else {
    $create_button = new CSubmit('form', _('Create application'));
}
$widget = (new CWidget())->setTitle(_('Applications'))->setControls((new CForm('get'))->cleanItems()->addItem((new CList())->addItem([_('Group'), SPACE, $this->data['pageFilter']->getGroupsCB()])->addItem([_('Host'), SPACE, $this->data['pageFilter']->getHostsCB()])->addItem($create_button)))->addItem(get_header_host_table('applications', $this->data['hostid']));
// create form
$form = (new CForm())->setName('application_form');
// create table
$applicationTable = (new CTableInfo())->setHeader([(new CColHeader((new CCheckBox('all_applications'))->onClick("checkAll('" . $form->getName() . "', 'all_applications', 'applications');")))->addClass(ZBX_STYLE_CELL_WIDTH), $this->data['hostid'] > 0 ? null : _('Host'), make_sorting_header(_('Application'), 'name', $this->data['sort'], $this->data['sortorder']), _('Items'), $data['showInfoColumn'] ? _('Info') : null]);
$current_time = time();
foreach ($this->data['applications'] as $application) {
    $info_icons = [];
    // inherited app, display the template list
    if ($application['templateids'] && !empty($application['sourceTemplates'])) {
        $name = [];
        CArrayHelper::sort($application['sourceTemplates'], ['name']);
        foreach ($application['sourceTemplates'] as $template) {
            $name[] = (new CLink($template['name'], 'applications.php?hostid=' . $template['hostid']))->addClass(ZBX_STYLE_LINK_ALT)->addClass(ZBX_STYLE_GREY);
            $name[] = ', ';
        }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.application.list.php


示例13: dirname

**
** 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.
**/
$discoveryRule = $data['discovery_rule'];
$hostPrototype = $data['host_prototype'];
$parentHost = $data['parent_host'];
require_once dirname(__FILE__) . '/js/configuration.host.edit.js.php';
require_once dirname(__FILE__) . '/js/configuration.host.prototype.edit.js.php';
$widget = (new CWidget())->setTitle(_('Host prototypes'))->addItem(get_header_host_table('hosts', $discoveryRule['hostid'], $discoveryRule['itemid']));
$divTabs = new CTabView();
if (!isset($_REQUEST['form_refresh'])) {
    $divTabs->setSelected(0);
}
$frmHost = (new CForm())->setName('hostPrototypeForm.')->addVar('form', getRequest('form', 1))->addVar('parent_discoveryid', $discoveryRule['itemid'])->addVar('tls_accept', $parentHost['tls_accept']);
$hostList = new CFormList('hostlist');
if ($hostPrototype['templateid'] && $data['parents']) {
    $parents = [];
    foreach (array_reverse($data['parents']) as $parent) {
        $parents[] = new CLink($parent['parentHost']['name'], '?form=update&hostid=' . $parent['hostid'] . '&parent_discoveryid=' . $parent['discoveryRule']['itemid']);
        $parents[] = SPACE . '⇒' . SPACE;
    }
    array_pop($parents);
    $hostList->addRow(_('Parent discovery rules'), $parents);
}
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.host.prototype.edit.php


示例14: DBend

    $result = DBend($result);
    if ($result) {
        uncheckTableRows();
    }
    show_messages($result, _('Template deleted'), _('Cannot delete template'));
}
/*
 * Display
 */
$templateWidget = new CWidget();
$pageFilter = new CPageFilter(array('config' => array('individual' => 1), 'groups' => array('templated_hosts' => true, 'editable' => true), 'groupid' => getRequest('groupid')));
$_REQUEST['groupid'] = $pageFilter->groupid;
if (isset($_REQUEST['form'])) {
    $templateWidget->addPageHeader(_('CONFIGURATION OF TEMPLATES'));
    if ($templateId = getRequest('templateid', 0)) {
        $templateWidget->addItem(get_header_host_table('', $templateId));
    }
    $data = array();
    if ($templateId) {
        $dbTemplates = API::Template()->get(array('templateids' => $templateId, 'selectGroups' => API_OUTPUT_EXTEND, 'selectParentTemplates' => array('templateid', 'name'), 'selectMacros' => API_OUTPUT_EXTEND, 'output' => API_OUTPUT_EXTEND));
        $data['dbTemplate'] = reset($dbTemplates);
        $data['original_templates'] = array();
        foreach ($data['dbTemplate']['parentTemplates'] as $parentTemplate) {
            $data['original_templates'][$parentTemplate['templateid']] = $parentTemplate['templateid'];
        }
    } else {
        $data['original_templates'] = array();
    }
    // description
    $data['description'] = $templateId && !hasRequest('form_refresh') ? $data['dbTemplate']['description'] : getRequest('description');
    $templateIds = getRequest('templates', hasRequest('form_refresh') ? array() : $data['original_templates']);
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:templates.php


示例15: dirname

** 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__) . '/js/configuration.host.edit.js.php';
$widget = (new CWidget())->setTitle(_('Hosts'))->addItem(get_header_host_table('', $data['hostid']));
$divTabs = new CTabView();
if (!hasRequest('form_refresh')) {
    $divTabs->setSelected(0);
}
$frmHost = (new CForm())->setName('hostsForm')->addVar('form', $data['form'])->addVar('clear_templates', $data['clear_templates'])->addVar('flags', $data['flags'])->addVar('tls_connect', $data['tls_connect'])->addVar('tls_accept', $data['tls_accept'])->setAttribute('id', 'hostForm');
if ($data['hostid'] != 0) {
    $frmHost->addVar('hostid', $data['hostid']);
}
if ($data['clone_hostid'] != 0) {
    $frmHost->addVar('clone_hostid', $data['clone_hostid']);
}
if ($data['groupid'] != 0) {
    $frmHost->addVar('groupid', $data['groupid']);
}
$hostList = new CFormList('hostlist');
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.host.edit.php


示例16: CWidget

** 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.
**/
$applicationWidget = new CWidget();
$applicationWidget->addPageHeader(_('CONFIGURATION OF APPLICATIONS'));
// append host summary to widget header
$applicationWidget->addItem(get_header_host_table('applications', $this->data['hostid']));
// create form
$applicationForm = new CForm();
$applicationForm->setName('applicationForm');
$applicationForm->addVar('form', $this->data['form']);
$applicationForm->addVar('groupid', $this->data['groupid']);
$applicationForm->addVar('hostid', $this->data['hostid']);
if (!empty($this->data['applicationid'])) {
    $applicationForm->addVar('applicationid', $this->data['applicationid']);
}
// create form list
$applicationFormList = new CFormList('applicationFormList');
$nameTextBox = new CTextBox('appname', $this->data['appname'], ZBX_TEXTBOX_STANDARD_SIZE);
$nameTextBox->attr('autofocus', 'autofocus');
$applicationFormList->addRow(_('Name'), $nameTextBox);
// append tabs to form
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.application.edit.php


示例17: CForm

 /* TABLE */
 // Triggers Header
 $r_form = new CForm(null, 'get');
 $r_form->addItem(array(S_GROUP . SPACE, $pageFilter->getGroupsCB()));
 $r_form->addItem(array(SPACE . S_HOST . SPACE, $pageFilter->getHostsCB()));
 $numrows = new CDiv();
 $numrows->setAttribute('name', 'numrows');
 $tr_link = new CLink($showdisabled ? S_HIDE_DISABLED_TRIGGERS : S_SHOW_DISABLED_TRIGGERS, 'triggers.php?showdisabled=' . ($showdisabled ? 0 : 1));
 $triggers_wdgt->addHeader(S_TRIGGERS_BIG, $r_form);
 $triggers_wdgt->addHeader($numrows, array('[ ', $tr_link, ' ]'));
 // ----------------
 $form = new CForm('triggers.php', 'post');
 $table = new CTableInfo(S_NO_TRIGGERS_DEFINED);
 // Header Host
 if ($_REQUEST['hostid'] > 0) {
     $tbl_header_host = get_header_host_table($_REQUEST['hostid'], array('items', 'applications', 'graphs'));
     $triggers_wdgt->addItem($tbl_header_host);
 }
 $form->setName('triggers');
 $form->addVar('hostid', $_REQUEST['hostid']);
 $table->setHeader(array(new CCheckBox('all_triggers', NULL, "checkAll('" . $form->getName() . "','all_triggers','g_triggerid');"), make_sorting_header(S_SEVERITY, 'priority'), make_sorting_header(S_STATUS, 'status'), $_REQUEST['hostid'] > 0 ? NULL : S_HOST, make_sorting_header(S_NAME, 'description'), S_EXPRESSION, S_ERROR));
 // get Triggers
 $triggers = array();
 $sortfield = getPageSortField('description');
 $sortorder = getPageSortOrder();
 if ($pageFilter->hostsSelected) {
     $options = array('editable' => 1, 'output' => API_OUTPUT_SHORTEN, 'filter' => array(), 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'limit' => $config['search_limit'] + 1);
     if ($showdisabled == 0) {
         $options['filter']['status'] = TRIGGER_STATUS_ENABLED;
     }
     if ($pageFilter->hostid > 0) {
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:triggers.php


示例18: CWidget

** (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.
**/
$triggersWidget = new CWidget();
// append host summary to widget header
if (!empty($this->data['hostid'])) {
    $hostTableElement = $this->data['elements_field'] == 'group_graphid' ? 'graphs' : 'trigger';
    $triggersWidget->addItem(get_header_host_table($hostTableElement, $this->data['hostid']));
}
if (!empty($this->data['title'])) {
    $triggersWidget->addPageHeader($this->data['title']);
}
// create form
$triggersForm = new CForm();
$triggersForm->setName('triggersForm');
$triggersForm->addVar($this->data['elements_field'], $this->data['elements']);
$triggersForm->addVar('hostid', $this->data['hostid']);
$triggersForm->addVar('go', 'copy_to');
// create form list
$triggersFormList = new CFormList('triggersFormList');
// append copy types to form list
$copyTypeComboBox = new CComboBox('copy_type', $this->data['copy_type'], 'submit()');
$copyTypeComboBox->addItem(0, _('Hosts'));
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.copy.elements.php


示例19: CButtonCancel

    $frmApp->addItemToBottomRow(new CButtonCancel(url_param("config") . url_param("hostid") . url_param('groupid')));
    $app_wdgt->addItem($frmApp);
} else {
    $form = new CForm(null, 'get');
    $form->addItem(array(S_GROUP . SPACE, $pageFilter->getGroupsCB()));
    $form->addItem(array(SPACE . S_HOST . SPACE, $pageFilter->getHostsCB()));
    $numrows = new CDiv();
    $numrows->setAttribute('name', 'numrows');
    $app_wdgt->addHeader(S_APPLICATIONS_BIG, $form);
    $app_wdgt->addHeader($numrows);
    $form = new CForm();
    $table = new CTableInfo('...');
    if ($pageFilter->hostsSelected) {
        // Header Host
        if ($_REQUEST['hostid'] > 0) {
            $tbl_header_host = get_header_host_table($_REQUEST['hostid'], array('items', 'triggers', 'graphs'));
            $app_wdgt->addItem($tbl_header_host);
        }
        $form->setName('applications');
        $form->addVar('groupid', $_REQUEST['groupid']);
        $form->addVar('hostid', $_REQUEST['hostid']);
        $table->setHeader(array(new CCheckBox('all_applications', NULL, "checkAll('" . $form->getName() . "','all_applications','applications');"), $_REQUEST['hostid'] > 0 ? null : S_HOST, make_sorting_header(S_APPLICATION, 'name'), S_SHOW));
        $sortfield = getPageSortField('name');
        $sortorder = getPageSortOrder();
        $options = array('output' => API_OUTPUT_SHORTEN, 'editable' => 1, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'limit' => $config['search_limit'] + 1);
        if ($pageFilter->hostid > 0) {
            $options['hostids'] = $pageFilter->hostid;
        } else {
            if ($pageFilter->groupid > 0) {
                $options['groupids'] = $pageFilter->groupid;
            }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:applications.php


示例20: array

    }
    // get templates data
    $data['linkedTemplates'] = null;
    if (!empty($data['templates'])) {
        $getLinkedTemplates = API::Template()->get(array('templateids' => $data['templates'], 'output' => array('templateid', 'name')));
        foreach ($getLinkedTemplates as $getLinkedTemplate) {
            $data['linkedTemplates'][] = array('id' => $getLinkedTemplate['templateid'], 'name' => $getLinkedTemplate['name']);
        }
    }
    $hostForm = new CView('configuration.host.massupdate', $data);
    $hostsWidget->addItem($hostForm->render());
} elseif (isset($_REQUEST['form'])) {
    $hostsWidget->addPageHeader(_('CONFIGURATION OF HOSTS'));
    $data = array();
    if ($hostId = get_request('hostid', 0)) {
        $hostsWi 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_header_image函数代码示例发布时间:2022-05-15
下一篇:
PHP get_header函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap