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


PHP zbx_jsvalue函数代码示例

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


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

示例1: getOnActionJS

 public function getOnActionJS()
 {
     if (count($this->items) <= 0) {
         return NULL;
     }
     return 'return show_popup_menu(event,' . zbx_jsvalue($this->items) . ',' . zbx_jsvalue($this->width) . ');';
 }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:7,代码来源:class.cpumenu.php

示例2: get

 /**
  * Process screen.
  *
  * @return CDiv (screen inside container)
  */
 public function get()
 {
     $this->dataId = 'graph_full';
     $containerId = 'graph_container';
     // time control
     $graphDims = getGraphDims($this->graphid);
     if ($graphDims['graphtype'] == GRAPH_TYPE_PIE || $graphDims['graphtype'] == GRAPH_TYPE_EXPLODED) {
         $loadSBox = 0;
         $src = 'chart6.php';
     } else {
         $loadSBox = 1;
         $src = 'chart2.php';
     }
     $src .= '?graphid=' . $this->graphid . '&period=' . $this->timeline['period'] . '&stime=' . $this->timeline['stimeNow'] . $this->getProfileUrlParams();
     $this->timeline['starttime'] = date(TIMESTAMP_FORMAT, get_min_itemclock_by_graphid($this->graphid));
     $timeControlData = array('id' => $this->getDataId(), 'containerid' => $containerId, 'src' => $src, 'objDims' => $graphDims, 'loadSBox' => $loadSBox, 'loadImage' => 1, 'dynamic' => 1, 'periodFixed' => CProfile::get($this->profileIdx . '.timelinefixed', 1), 'sliderMaximumTimePeriod' => ZBX_MAX_PERIOD);
     // output
     if ($this->mode == SCREEN_MODE_JS) {
         $timeControlData['dynamic'] = 0;
         $timeControlData['loadSBox'] = 0;
         return 'timeControl.addObject("' . $this->getDataId() . '", ' . zbx_jsvalue($this->timeline) . ', ' . zbx_jsvalue($timeControlData) . ')';
     } else {
         if ($this->mode == SCREEN_MODE_SLIDESHOW) {
             insert_js('timeControl.addObject("' . $this->getDataId() . '", ' . zbx_jsvalue($this->timeline) . ', ' . zbx_jsvalue($timeControlData) . ');');
         } else {
             zbx_add_post_js('timeControl.addObject("' . $this->getDataId() . '", ' . zbx_jsvalue($this->timeline) . ', ' . zbx_jsvalue($timeControlData) . ');');
         }
         return $this->getOutput(new CDiv(null, 'center', $containerId), true, array('graphid' => $this->graphid));
     }
 }
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:35,代码来源:CScreenChart.php

示例3: toString

 public function toString($destroy = true)
 {
     if (count($this->tabs) == 1) {
         $this->setAttribute('class', 'min-width ui-tabs ui-widget ui-widget-content ui-corner-all widget');
         $header = reset($this->headers);
         $header = new CDiv($header);
         $header->addClass('ui-corner-all ui-widget-header header');
         $header->setAttribute('id', 'tab_' . key($this->headers));
         $this->addItem($header);
         $tab = reset($this->tabs);
         $tab->addClass('ui-tabs ui-tabs-panel ui-widget ui-widget-content ui-corner-all widget');
         $this->addItem($tab);
     } else {
         $headersList = new CList();
         foreach ($this->headers as $id => $header) {
             $tabLink = new CLink($header, '#' . $id, null, null, false);
             $tabLink->setAttribute('id', 'tab_' . $id);
             $headersList->addItem($tabLink);
         }
         $this->addItem($headersList);
         $this->addItem($this->tabs);
         $options = array();
         if (!is_null($this->selectedTab)) {
             $options['selected'] = $this->selectedTab;
         }
         if ($this->rememberTab) {
             $options['cookie'] = array();
         }
         zbx_add_post_js('jQuery("#' . $this->id . '").tabs(' . zbx_jsvalue($options, true) . ').show();');
     }
     return parent::toString($destroy);
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:32,代码来源:class.ctabview.php

示例4: make_refresh_menu

function make_refresh_menu($pmid, $dollid, $cur_interval, $params = null, &$menu, &$submenu)
{
    $menu['menu_' . $dollid][] = array(S_REFRESH, null, null, array('outer' => array('pum_oheader'), 'inner' => array('pum_iheader')));
    $intervals = array('10', '30', '60', '120', '600', '900');
    foreach ($intervals as $key => $value) {
        $menu['menu_' . $dollid][] = array(S_EVERY . SPACE . $value . SPACE . S_SECONDS_SMALL, 'javascript: setRefreshRate(' . zbx_jsvalue($pmid) . ',' . zbx_jsvalue($dollid) . ',' . $value . ',' . zbx_jsvalue($params) . ');' . 'void(0);', null, array('outer' => $value == $cur_interval ? 'pum_b_submenu' : 'pum_o_submenu', 'inner' => array('pum_i_submenu')));
    }
    $submenu['menu_' . $dollid][] = array();
}
开发者ID:rennhak,项目名称:zabbix,代码行数:9,代码来源:func.inc.php

示例5: setMessage

 public function setMessage($value = null)
 {
     if (is_null($value)) {
         $value = _('Are you sure you want perform this action?');
     }
     // if message will contain single quotes, it will break everything, so it must be escaped
     $this->msg = zbx_jsvalue($value, false, false);
     $this->setAction(null);
     return $this;
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:10,代码来源:CButtonQMessage.php

示例6: setMessage

 public function setMessage($value = null)
 {
     if (is_null($value)) {
         $value = _('Are you sure you want perform this action?');
     }
     if (!is_string($value)) {
         return $this->error(_s('Incorrect value for setMessage(): "%s".', $value));
     }
     // if message will contain single quotes, it will break everything, so it must be escaped
     $this->msg = zbx_jsvalue($value, false, false);
     $this->setAction(null);
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:12,代码来源:class.cbuttonqmessage.php

示例7: toString

 public function toString($destroy = true)
 {
     if (!isset($this->attributes['checked'])) {
         foreach ($this->object_name as $obj_name) {
             if (empty($obj_name)) {
                 continue;
             }
             zbx_add_post_js('visibility_status_changeds(false, ' . zbx_jsvalue($obj_name) . ', ' . zbx_jsvalue($this->replace_to) . ');');
         }
     }
     return parent::toString($destroy);
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:12,代码来源:CVisibilityBox.php

示例8: get

 /**
  * Process screen.
  *
  * @return CDiv (screen inside container)
  */
 public function get()
 {
     $this->dataId = 'graph_' . $this->screenitem['screenitemid'] . '_' . $this->screenitem['screenid'];
     $resourceid = !empty($this->screenitem['real_resourceid']) ? $this->screenitem['real_resourceid'] : $this->screenitem['resourceid'];
     $containerid = 'graph_container_' . $this->screenitem['screenitemid'] . '_' . $this->screenitem['screenid'];
     $graphDims = getGraphDims();
     $graphDims['graphHeight'] = $this->screenitem['height'];
     $graphDims['width'] = $this->screenitem['width'];
     // get time control
     $timeControlData = array('id' => $this->getDataId(), 'containerid' => $containerid, 'objDims' => $graphDims, 'loadImage' => 1, 'periodFixed' => CProfile::get('web.screens.timelinefixed', 1), 'sliderMaximumTimePeriod' => ZBX_MAX_PERIOD);
     // host feature
     if ($this->screenitem['dynamic'] == SCREEN_DYNAMIC_ITEM && !empty($this->hostid)) {
         $newitemid = get_same_item_for_host($resourceid, $this->hostid);
         $resourceid = !empty($newitemid) ? $newitemid : '';
     }
     if ($this->mode == SCREEN_MODE_PREVIEW && !empty($resourceid)) {
         $this->action = 'history.php?action=showgraph&itemid=' . $resourceid . '&period=' . $this->timeline['period'] . '&stime=' . $this->timeline['stimeNow'] . $this->getProfileUrlParams();
     }
     if (!zbx_empty($resourceid) && $this->mode != SCREEN_MODE_EDIT) {
         if ($this->mode == SCREEN_MODE_PREVIEW) {
             $timeControlData['loadSBox'] = 1;
         }
     }
     $timeControlData['src'] = zbx_empty($resourceid) ? 'chart3.php?' : 'chart.php?itemid=' . $resourceid . '&' . $this->screenitem['url'] . '&width=' . $this->screenitem['width'] . '&height=' . $this->screenitem['height'];
     $timeControlData['src'] .= $this->mode == SCREEN_MODE_EDIT ? '&period=3600&stime=' . date(TIMESTAMP_FORMAT, time()) : '&period=' . $this->timeline['period'] . '&stime=' . $this->timeline['stimeNow'];
     $timeControlData['src'] .= $this->getProfileUrlParams();
     // output
     if ($this->mode == SCREEN_MODE_JS) {
         return 'timeControl.addObject("' . $this->getDataId() . '", ' . zbx_jsvalue($this->timeline) . ', ' . zbx_jsvalue($timeControlData) . ')';
     } else {
         if ($this->mode == SCREEN_MODE_SLIDESHOW) {
             insert_js('timeControl.addObject("' . $this->getDataId() . '", ' . zbx_jsvalue($this->timeline) . ', ' . zbx_jsvalue($timeControlData) . ');');
         } else {
             zbx_add_post_js('timeControl.addObject("' . $this->getDataId() . '", ' . zbx_jsvalue($this->timeline) . ', ' . zbx_jsvalue($timeControlData) . ');');
         }
         if ($this->mode == SCREEN_MODE_EDIT || $this->mode == SCREEN_MODE_SLIDESHOW) {
             $item = new CDiv();
         } elseif ($this->mode == SCREEN_MODE_PREVIEW) {
             $item = new CLink(null, 'history.php?action=showgraph&itemid=' . $resourceid . '&period=' . $this->timeline['period'] . '&stime=' . $this->timeline['stimeNow']);
         }
         $item->setAttribute('id', $containerid);
         return $this->getOutput($item);
     }
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:49,代码来源:CScreenSimpleGraph.php

示例9: get_js_sizeable_graph

function get_js_sizeable_graph($dom_graph_id, $url)
{
    return new CScript('
	<script language="JavaScript" type="text/javascript">
	<!--
		A_SBOX["' . $dom_graph_id . '"] = new Object;
		A_SBOX["' . $dom_graph_id . '"].shiftT = 17;
		A_SBOX["' . $dom_graph_id . '"].shiftL = 10;

		var ZBX_G_WIDTH;
		if(window.innerWidth) ZBX_G_WIDTH=window.innerWidth; 
		else ZBX_G_WIDTH=document.body.clientWidth;
		
		ZBX_G_WIDTH-= 80;

		insert_sizeable_graph(' . zbx_jsvalue($dom_graph_id) . ',' . zbx_jsvalue($url) . ');
	-->
	</script>');
}
开发者ID:rennhak,项目名称:zabbix,代码行数:19,代码来源:js.inc.php

示例10: array

include_once 'include/page_header.php';
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array('dstfrm' => array(T_ZBX_STR, O_MAND, P_SYS, NOT_EMPTY, null), 'config' => array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1,2,3'), NULL), 'gid' => array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0, 65535), null), 'list_name' => array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY, 'isset({save})&&isset({gid})'), 'caption' => array(T_ZBX_STR, O_OPT, null, null, null), 'itemid' => array(T_ZBX_INT, O_OPT, null, DB_ID . '({}!=0)', 'isset({save})'), 'color' => array(T_ZBX_CLR, O_OPT, null, null, 'isset({save})'), 'calc_fnc' => array(T_ZBX_INT, O_OPT, null, IN('0,1,2,4,7,9'), 'isset({save})'), 'axisside' => array(T_ZBX_INT, O_OPT, null, IN(GRAPH_YAXIS_SIDE_LEFT . ',' . GRAPH_YAXIS_SIDE_RIGHT), null), 'add' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'save' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'form' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form_refresh' => array(T_ZBX_STR, O_OPT, null, null, null));
check_fields($fields);
$_REQUEST['caption'] = get_request('caption', '');
$_REQUEST['axisside'] = get_request('axisside', GRAPH_YAXIS_SIDE_LEFT);
if (zbx_empty($_REQUEST['caption']) && isset($_REQUEST['itemid']) && $_REQUEST['itemid'] > 0) {
    $_REQUEST['caption'] = item_description(get_item_by_itemid($_REQUEST['itemid']));
}
insert_js_function('add_bitem');
insert_js_function('update_bitem');
if (isset($_REQUEST['save']) && !isset($_REQUEST['gid'])) {
    insert_js("add_bitem('" . $_REQUEST['dstfrm'] . "'," . zbx_jsvalue($_REQUEST['caption']) . ",'" . $_REQUEST['itemid'] . "','" . $_REQUEST['color'] . "'," . $_REQUEST['calc_fnc'] . "," . $_REQUEST['axisside'] . ");\n");
}
if (isset($_REQUEST['save']) && isset($_REQUEST['gid'])) {
    insert_js("update_bitem('" . $_REQUEST['dstfrm'] . "','" . $_REQUEST['list_name'] . "','" . $_REQUEST['gid'] . "'," . zbx_jsvalue($_REQUEST['caption']) . ",'" . $_REQUEST['itemid'] . "','" . $_REQUEST['color'] . "'," . $_REQUEST['calc_fnc'] . "," . $_REQUEST['axisside'] . ");\n");
} else {
    echo SBR;
    $frmGItem = new CFormTable(S_NEW_ITEM_FOR_THE_GRAPH);
    $frmGItem->setName('graph_item');
    $frmGItem->setHelp('web.graph.item.php');
    $frmGItem->addVar('dstfrm', $_REQUEST['dstfrm']);
    $config = get_request('config', 1);
    $gid = get_request('gid', null);
    $list_name = get_request('list_name', null);
    $caption = get_request('caption', '');
    $itemid = get_request('itemid', 0);
    $color = get_request('color', '009900');
    $calc_fnc = get_request('calc_fnc', 2);
    $axisside = get_request('axisside', GRAPH_YAXIS_SIDE_LEFT);
    $description = '';
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:popup_bitem.php

示例11: insertScreenScrollJs

 /**
  * Insert javascript to create scroll in time control.
  *
  * @static
  *
  * @param array $options
  * @param array $options['timeline']
  * @param string $options['profileIdx']
  */
 public static function insertScreenScrollJs(array $options = array())
 {
     $options['timeline'] = empty($options['timeline']) ? '' : $options['timeline'];
     $options['profileIdx'] = empty($options['profileIdx']) ? '' : $options['profileIdx'];
     $timeControlData = array('id' => 'scrollbar', 'loadScroll' => 1, 'mainObject' => 1, 'periodFixed' => CProfile::get($options['profileIdx'] . '.timelinefixed', 1), 'sliderMaximumTimePeriod' => ZBX_MAX_PERIOD);
     zbx_add_post_js('timeControl.addObject("scrollbar", ' . zbx_jsvalue($options['timeline']) . ', ' . zbx_jsvalue($timeControlData) . ');');
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:16,代码来源:CScreenBuilder.php

示例12: CScreenBase

 * Graph in
 */
$graphInScreen = new CScreenBase(array('resourcetype' => SCREEN_RESOURCE_GRAPH, 'mode' => SCREEN_MODE_PREVIEW, 'dataId' => 'graph_in', 'profileIdx' => 'web.httptest', 'profileIdx2' => get_request('httptestid'), 'period' => get_request('period'), 'stime' => get_request('stime')));
$graphInScreen->timeline['starttime'] = date(TIMESTAMP_FORMAT, get_min_itemclock_by_itemid($itemIds));
$src = 'chart3.php?height=150' . '&name=' . $httpTest['name'] . '&http_item_type=' . HTTPSTEP_ITEM_TYPE_IN . '&httptestid=' . $httpTest['httptestid'] . '&graphtype=' . GRAPH_TYPE_STACKED . '&period=' . $graphInScreen->timeline['period'] . '&stime=' . $graphInScreen->timeline['stime'] . '&profileIdx=' . $graphInScreen->profileIdx . '&profileIdx2=' . $graphInScreen->profileIdx2;
$graphInContainer = new CDiv(new CLink(null, $src), 'flickerfreescreen', 'flickerfreescreen_graph_in');
$graphInContainer->setAttribute('style', 'position: relative');
$graphInContainer->setAttribute('data-timestamp', time());
$graphTable->addRow(array(bold(_('Speed')), $graphInContainer));
$timeControlData = array('id' => 'graph_in', 'containerid' => 'flickerfreescreen_graph_in', 'src' => $src, 'objDims' => $graphDims, 'loadSBox' => 1, 'loadImage' => 1, 'periodFixed' => CProfile::get('web.httptest.timelinefixed', 1), 'sliderMaximumTimePeriod' => ZBX_MAX_PERIOD);
zbx_add_post_js('timeControl.addObject("graph_in", ' . zbx_jsvalue($graphInScreen->timeline) . ', ' . zbx_jsvalue($timeControlData) . ');');
$graphInScreen->insertFlickerfreeJs();
/*
 * Graph time
 */
$graphTimeScreen = new CScreenBase(array('resourcetype' => SCREEN_RESOURCE_GRAPH, 'mode' => SCREEN_MODE_PREVIEW, 'dataId' => 'graph_time', 'profileIdx' => 'web.httptest', 'profileIdx2' => get_request('httptestid'), 'period' => get_request('period'), 'stime' => get_request('stime')));
$src = 'chart3.php?height=150' . '&name=' . $httpTest['name'] . '&http_item_type=' . HTTPSTEP_ITEM_TYPE_TIME . '&httptestid=' . $httpTest['httptestid'] . '&graphtype=' . GRAPH_TYPE_STACKED . '&period=' . $graphTimeScreen->timeline['period'] . '&stime=' . $graphTimeScreen->timeline['stime'] . '&profileIdx=' . $graphTimeScreen->profileIdx . '&profileIdx2=' . $graphTimeScreen->profileIdx2;
$graphTimeContainer = new CDiv(new CLink(null, $src), 'flickerfreescreen', 'flickerfreescreen_graph_time');
$graphTimeContainer->setAttribute('style', 'position: relative');
$graphTimeContainer->setAttribute('data-timestamp', time());
$graphTable->addRow(array(bold(_('Response time')), $graphTimeContainer));
$timeControlData = array('id' => 'graph_time', 'containerid' => 'flickerfreescreen_graph_time', 'src' => $src, 'objDims' => $graphDims, 'loadSBox' => 1, 'loadImage' => 1, 'periodFixed' => CProfile::get('web.httptest.timelinefixed', 1), 'sliderMaximumTimePeriod' => ZBX_MAX_PERIOD);
zbx_add_post_js('timeControl.addObject("graph_time", ' . zbx_jsvalue($graphInScreen->timeline) . ', ' . zbx_jsvalue($timeControlData) . ');');
$graphTimeScreen->insertFlickerfreeJs();
// scroll
CScreenBuilder::insertScreenScrollJs(array('timeline' => $graphInScreen->timeline));
CScreenBuilder::insertScreenRefreshTimeJs();
CScreenBuilder::insertProcessObjectsJs();
$graphsWidget->addItem($graphTable);
$graphsWidget->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:httpdetails.php

示例13: array

 $hosts_list = array();
 foreach ($trigger['hosts'] as $num => $trigger_host) {
     $menus = '';
     $host_nodeid = id2nodeid($trigger_host['hostid']);
     if (isset($scripts_by_hosts[$trigger_host['hostid']])) {
         foreach ($scripts_by_hosts[$trigger_host['hostid']] as $id => $script) {
             $script_nodeid = id2nodeid($script['scriptid']);
             if (bccomp($host_nodeid, $script_nodeid) == 0) {
                 $menus .= "['" . $script['name'] . "',\"javascript: openWinCentered('scripts_exec.php?execute=1&hostid=" . $trigger_host['hostid'] . "&scriptid=" . $script['scriptid'] . "','" . S_TOOLS . "',760,540,'titlebar=no, resizable=yes, scrollbars=yes, dialog=no');\", null,{'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}],";
             }
         }
     }
     if (!empty($scripts_by_hosts)) {
         $menus = "[" . zbx_jsvalue(S_TOOLS) . ",null,null,{'outer' : ['pum_oheader'],'inner' : ['pum_iheader']}]," . $menus;
     }
     $menus .= "[" . zbx_jsvalue(S_LINKS) . ",null,null,{'outer' : ['pum_oheader'],'inner' : ['pum_iheader']}],";
     $menus .= "['" . S_LATEST_DATA . "',\"javascript: redirect('latest.php?hostid=" . $trigger_host['hostid'] . "')\", null,{'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}],";
     $menus = rtrim($menus, ',');
     $menus = 'show_popup_menu(event,[' . $menus . '],180);';
     $maint_span = null;
     if ($trigger_host['maintenance_status']) {
         $text = $trigger_host['maintenance_type'] ? S_NO_DATA_MAINTENANCE : S_NORMAL_MAINTENANCE;
         $text = ' [' . $text . ']';
         $maint_span = new CSpan($text, 'orange pointer');
         $maintenanceOptions = array('maintenanceids' => $trigger_host['maintenanceid'], 'output' => API_OUTPUT_EXTEND);
         $maintenances = CMaintenance::get($maintenanceOptions);
         $maintenance = reset($maintenances);
         $maint_hint = new CSpan($maintenance['name'] . ($maintenance['description'] == '' ? '' : ': ' . $maintenance['description']));
         $maint_span->setHint($maint_hint);
     }
     $hosts_span = new CSpan($trigger_host['host'], 'link_menu');
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:tr_status.php

示例14: array

         break;
     case OPERATION_TYPE_TEMPLATE_ADD:
     case OPERATION_TYPE_TEMPLATE_REMOVE:
         if (!isset($this->data['new_operation']['optemplate'])) {
             $this->data['new_operation']['optemplate'] = array();
         }
         $templateList = new CTable();
         $templateList->setAttribute('id', 'opTemplateList');
         $templateList->addRow(new CRow(new CCol(array(new CMultiSelect(array('name' => 'discoveryTemplates', 'objectName' => 'templates', 'objectOptions' => array('editable' => true))), new CButton('add', _('Add'), 'return addDiscoveryTemplates();', 'link_menu')), null, 2), null, 'opTemplateListFooter'));
         // load templates
         $templateIds = isset($this->data['new_operation']['optemplate']) ? zbx_objectValues($this->data['new_operation']['optemplate'], 'templateid') : array();
         if ($templateIds) {
             $templates = API::Template()->get(array('templateids' => $templateIds, 'output' => array('templateid', 'name')));
             order_result($templates, 'name');
             $jsInsert = '';
             $jsInsert .= 'addPopupValues(' . zbx_jsvalue(array('object' => 'dsc_templateid', 'values' => $templates)) . ');';
             zbx_add_post_js($jsInsert);
         }
         $caption = OPERATION_TYPE_TEMPLATE_ADD == $this->data['new_operation']['operationtype'] ? _('Link with templates') : _('Unlink from templates');
         $newOperationsTable->addRow(array($caption, new CDiv($templateList, 'objectgroup inlineblock border_dotted ui-corner-all')));
         break;
 }
 // append operation conditions to form list
 if ($this->data['eventsource'] == 0) {
     if (!isset($this->data['new_operation']['opconditions'])) {
         $this->data['new_operation']['opconditions'] = array();
     } else {
         zbx_rksort($this->data['new_operation']['opconditions']);
     }
     $allowed_opconditions = get_opconditions_by_eventsource($this->data['eventsource']);
     $grouped_opconditions = array();
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.action.edit.php

示例15: CLink

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


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