标签:monit mouseover file pre window htm const zab new
define(‘ZBX_GRAPH_FONT_NAME‘, ‘DejaVuSans‘); // font file name define(‘ZBX_FONT_NAME‘, ‘DejaVuSans‘);
‘zatree‘=>array( ‘label‘ => _(‘Zatree‘), ‘user_type‘ => USER_TYPE_ZABBIX_USER, ‘default_page_id‘ => 0, ‘force_disable_all_nodes‘ => true, ‘target‘ => true,//新窗口中打开 ‘pages‘ =>array( array(‘url‘ => ‘zabbix.php‘,‘label‘ => _(‘Zatree‘)) ) ), ‘traffic‘=>array( ‘label‘ => _(‘Traffic‘), ‘user_type‘ => USER_TYPE_ZABBIX_USER, ‘default_page_id‘ => 0, ‘force_disable_all_nodes‘ => true, ‘target‘ => true,//新窗口中打开 ‘pages‘ =>array( array(‘url‘ => ‘Traffic/index.html‘,‘label‘ => _(‘traffic‘)) ) ), ‘monitor‘=>array( ‘label‘ => _(‘Monitor‘), ‘user_type‘ => USER_TYPE_ZABBIX_USER, ‘default_page_id‘ => 0, ‘force_disable_all_nodes‘ => true, ‘target‘ => true,//新窗口中打开 ‘pages‘ =>array( array(‘url‘ => ‘Monitor/monitor.php‘,‘label‘ => _(‘Monitor‘)) ) ), 增加新窗口中打开,函数zbx_construct_menu if(isset($menu[‘target‘])){ $mmenu_entry->addAction(‘onclick‘, ‘javascript: window.open(\‘‘.$menu_url.‘\‘);‘); }else{ $mmenu_entry->addAction(‘onclick‘, ‘javascript: redirect(\‘‘.$menu_url.‘\‘);‘); } //前后代码 $menu_url = $sub_menus[$label][$menu[‘default_page_id‘]][‘menu_url‘]; //print_r($menu_url.‘<br>‘); $mmenu_entry = new CCol($menu[‘label‘], $menu_class); $mmenu_entry->setAttribute(‘id‘, $label); if(isset($menu[‘target‘])){ $mmenu_entry->addAction(‘onclick‘, ‘javascript: window.open(\‘‘.$menu_url.‘\‘);‘); }else{ $mmenu_entry->addAction(‘onclick‘, ‘javascript: redirect(\‘‘.$menu_url.‘\‘);‘); } //$mmenu_entry->addAction(‘onclick‘, ‘javascript: redirect(\‘‘.$menu_url.‘\‘);‘); $mmenu_entry->addAction(‘onmouseover‘, ‘javascript: MMenu.mouseOver(\‘‘.$label.‘\‘);‘); $mmenu_entry->addAction(‘onmouseout‘, ‘javascript: MMenu.mouseOut();‘); //前后代码
调整js正常zabbix/php/js/main.js
MMenu增加对应json
menus: {‘empty‘: 0, ‘view‘: 0, ‘cm‘: 0, ‘reports‘: 0, ‘config‘: 0, ‘admin‘: 0, ‘zatree‘:0,‘traffic‘:0,‘monitor‘:0,},
标签:monit mouseover file pre window htm const zab new
原文地址:http://www.cnblogs.com/redheat/p/7069572.html