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

PHP zbx_jsvalue函数代码示例

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

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



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


示例16: make_refresh_menu

function make_refresh_menu($pmid, $dollid, $cur_interval, $params = null, &$menu, &$submenu, $menu_type = 1)
{
    if ($menu_type == 1) {
        $intervals = array('10' => 10, '30' => 30, '60' => 60, '120' => 120, '600' => 600, '900' => 900);
        $title = _('Refresh time in seconds');
    } elseif ($menu_type == 2) {
        $intervals = array('x0.25' => 0.25, 'x0.5' => 0.5, 'x1' => 1, 'x1.5' => 1.5, 'x2' => 2, 'x3' => 3, 'x4' => 4, 'x5' => 5);
        $title = _('Refresh time multiplier');
    }
    $menu['menu_' . $dollid][] = array($title, null, null, array('outer' => array('pum_oheader'), 'inner' => array('pum_iheader')));
    foreach ($intervals as $key => $value) {
        $menu['menu_' . $dollid][] = array($key, '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:itnihao,项目名称:Zabbix_,代码行数:15,代码来源:func.inc.php


示例17: _

         } else {
             $statusCaption = _('Monitored');
             $statusClass = 'enabled';
         }
         $statusScript = 'return Confirm(' . zbx_jsvalue(_('Disable host?')) . ');';
         $statusUrl = 'hosts.php?hosts' . SQUAREBRACKETS . '=' . $host['hostid'] . '&go=disable' . url_param('groupid');
         break;
     case HOST_STATUS_NOT_MONITORED:
         $statusCaption = _('Not monitored');
         $statusUrl = 'hosts.php?hosts' . SQUAREBRACKETS . '=' . $host['hostid'] . '&go=activate' . url_param('groupid');
         $statusScript = 'return Confirm(' . zbx_jsvalue(_('Enable host?')) . ');';
         $statusClass = 'disabled';
         break;
     default:
         $statusCaption = _('Unknown');
         $statusScript = 'return Confirm(' . zbx_jsvalue(_('Disable host?')) . ');';
         $statusUrl = 'hosts.php?hosts' . SQUAREBRACKETS . '=' . $host['hostid'] . '&go=disable' . url_param('groupid');
         $statusClass = 'unknown';
 }
 $status = new CLink($statusCaption, $statusUrl, $statusClass, $statusScript);
 if (empty($host['parentTemplates'])) {
     $hostTemplates = '-';
 } else {
     $hostTemplates = array();
     order_result($host['parentTemplates'], 'name');
     foreach ($host['parentTemplates'] as $template) {
         $caption = array();
         $caption[] = new CLink(CHtml::encode($template['name']), 'templates.php?form=update&templateid=' . $template['templateid'], 'unknown');
         if (!empty($templates[$template['templateid']]['parentTemplates'])) {
             order_result($templates[$template['templateid']]['parentTemplates'], 'name');
             $caption[] = ' (';
开发者ID:micromachine,项目名称:RackTables-ZABBIX-bridge,代码行数:31,代码来源:hosts.php


示例18: CWidget

$dashboardWidget = new CWidget('dashboard_wdgt');
$dashboardWidget->setClass('header');
$dashboardWidget->addHeader(_('PERSONAL DASHBOARD'), array(new CIcon(_s('Configure (Filter %s)', $dashconf['filterEnable'] ? _('Enabled') : _('Disabled')), $dashconf['filterEnable'] ? 'iconconfig_hl' : 'iconconfig', "document.location = 'dashconf.php';"), SPACE, get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen']))));
// js menu arrays
$menu = array();
$submenu = array();
make_graph_menu($menu, $submenu);
make_sysmap_menu($menu, $submenu);
make_screen_menu($menu, $submenu);
make_refresh_menu('mainpage', 'hat_syssum', CProfile::get('web.dashboard.rf_rate.hat_syssum', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_hoststat', CProfile::get('web.dashboard.rf_rate.hat_hoststat', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_stszbx', CProfile::get('web.dashboard.rf_rate.hat_stszbx', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_lastiss', CProfile::get('web.dashboard.rf_rate.hat_lastiss', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_webovr', CProfile::get('web.dashboard.rf_rate.hat_webovr', 60), null, $menu, $submenu);
make_refresh_menu('mainpage', 'hat_dscvry', CProfile::get('web.dashboard.rf_rate.hat_dscvry', 60), null, $menu, $submenu);
insert_js('var page_menu=' . zbx_jsvalue($menu) . ";\n" . 'var page_submenu=' . zbx_jsvalue($submenu) . ";\n");
/*
 * Left column
 */
$leftColumn = array();
// favorite graphs
$graph_menu = get_icon('menu', array('menu' => 'graphs'));
$fav_grph = new CUIWidget('hat_favgrph', make_favorite_graphs(), CProfile::get('web.dashboard.hats.hat_favgrph.state', 1));
$fav_grph->setHeader(_('Favourite graphs'), array($graph_menu));
$fav_grph->setFooter(new CLink(_('Graphs') . ' &raquo;', 'charts.php', 'highlight'), true);
$leftColumn[] = $fav_grph;
// favorite screens
$screen_menu = get_icon('menu', array('menu' => 'screens'));
$fav_scr = new CUIWidget('hat_favscr', make_favorite_screens(), CProfile::get('web.dashboard.hats.hat_favscr.state', 1));
$fav_scr->setHeader(_('Favourite screens'), array($screen_menu));
$fav_scr->setFooter(new CLink(_('Screens') . ' &raquo;', 'screens.php', 'highlight'), true);
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:dashboard.php


示例19: pager

function pager($items, $itemsPerPage, $currentPage, $urlParams = array(), $removeUrlParams = array())
{
    $startPage = 1;
    $pagesCount = floor($items / $itemsPerPage) + 1;
    $endPage = $pagesCount;
    $url = new Curl();
    $pageLine = array();
    if (is_array($urlParams) && $urlParams) {
        foreach ($urlParams as $key => $value) {
            $url->setArgument($key, $value);
        }
    }
    $removeUrlParams = array_merge($removeUrlParams, array('go', 'form', 'delete', 'cancel'));
    foreach ($removeUrlParams as $param) {
        $url->removeArgument($param);
    }
    if ($startPage > 1) {
        $url->setArgument('page', 1);
        $pageLine[] = new CLink('<< ' . _x('First', 'page navigation'), $url->getUrl(), null, null, true);
        $pageLine[] = '&nbsp;&nbsp;';
    }
    if ($currentPage > 1) {
        $url->setArgument('page', $currentPage - 1);
        $pageLine[] = new CLink('< ' . _x('Previous', 'page navigation'), $url->getUrl(), null, null, true);
        $pageLine[] = ' | ';
    }
    for ($p = $startPage; $p <= $pagesCount; $p++) {
        if ($p > $endPage) {
            break;
        }
        if ($p == $currentPage) {
            $pagespan = new CSpan($p, 'bold textcolorstyles');
        } else {
            $url->setArgument('page', $p);
            $pagespan = new CLink($p, $url->getUrl(), null, null, true);
        }
        $pageLine[] = $pagespan;
        $pageLine[] = ' | ';
    }
    array_pop($pageLine);
    if ($currentPage < $pagesCount) {
        $pageLine[] = ' | ';
        $url->setArgument('page', $currentPage + 1);
        $pageLine[] = new CLink(_x('Next', 'page navigation') . ' >', $url->getUrl(), null, null, true);
    }
    if ($p < $pagesCount) {
        $pageLine[] = '&nbsp;&nbsp;';
        $url->setArgument('page', $pagesCount);
        $pageLine[] = new CLink(_x('Last', 'page navigation') . ' >>', $url->getUrl(), null, null, true);
    }
    $table = new CTable(null, 'paging');
    $table->addRow(new CCol($pageLine));
    $pageView = array();
    $pageView[] = _('Displaying') . SPACE;
    if ($items > $itemsPerPage) {
        $pageView[] = new CSpan($itemsPerPage * $currentPage, 'info');
        $pageView[] = SPACE . _('to') . SPACE;
    }
    $to = min($itemsPerPage * $currentPage + $itemsPerPage, $items);
    $pageView[] = new CSpan($to, 'info');
    $pageView[] = SPACE . _('of') . SPACE;
    $pageView[] = new CSpan($items, 'info');
    $pageView[] = SPACE . _('found');
    $pageView = new CSpan($pageView);
    zbx_add_post_js('insertInElement("numrows", ' . zbx_jsvalue($pageView->toString()) . ', "div");');
    return $table;
}
开发者ID:OneOaaS,项目名称:zabbix-dashboard-extension,代码行数:67,代码来源:eventlog.php


示例20: setHint

 /**
  * Adds a hint box to the elemt.
  *
  * @param string|array|CTag     $text       hint content
  * @param string                $spanClass  wrap the content in a span element and assign a this class to the span
  * @param bool                  $byClick    if set to true, it will be possible to "freeze" the hint box via a mouse
  *                                          click
  *
  * @return bool
  */
 public function setHint($text, $spanClass = '', $byClick = true)
 {
     if (empty($text)) {
         return false;
     }
     encodeValues($text);
     $text = unpack_object($text);
     $this->addAction('onmouseover', 'hintBox.HintWraper(event, this, ' . zbx_jsvalue($text) . ', "' . $spanClass . '");');
     if ($byClick) {
         $this->addAction('onclick', 'hintBox.showStaticHint(event, this, ' . zbx_jsvalue($text) . ', "' . $spanClass . '");');
     }
     return true;
 }
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:23,代码来源:CTag.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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