diff -crB cgp-HEAD-ff73680/ajax.js cgp/ajax.js *** cgp-HEAD-ff73680/ajax.js 2010-11-05 19:40:00.000000000 +0100 --- cgp/ajax.js 2010-12-14 21:14:48.000000000 +0100 *************** *** 3,15 **** } function rmP(host, plugin) { getData(host, plugin, 'del'); } ! var xmlHttp function getData(obj, id, action) { ! xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; --- 3,17 ---- } function rmP(host, plugin) { + var mydiv=document.getElementById(plugin); + mydiv.style.height='auto'; getData(host, plugin, 'del'); } ! //var xmlHttp function getData(obj, id, action) { ! var xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; *************** *** 17,28 **** var url="plugin.php"; url=url+"?h="+obj+"&p="+id+"&a="+action; ! xmlHttp.onreadystatechange=function(){setData(id)} xmlHttp.open("GET",url,true); xmlHttp.send(null); } ! function setData(obj) { if (xmlHttp.readyState==4) { div = document.getElementById(obj); --- 19,30 ---- var url="plugin.php"; url=url+"?h="+obj+"&p="+id+"&a="+action; ! xmlHttp.onreadystatechange=function(){setData(id, xmlHttp)} xmlHttp.open("GET",url,true); xmlHttp.send(null); } ! function setData(obj,xmlHttp) { if (xmlHttp.readyState==4) { div = document.getElementById(obj); *************** *** 45,47 **** --- 47,95 ---- } return xmlHttp; } + + function openImg(h) { + var content=document.getElementById("content"); + var allDiv=content.getElementsByTagName("div"); + + for (var i=0; i + [ Open all graphs ] - + [ Close all graphs ] - + [ Refresh all opened graphs ] + + EOT; + # first the ones defined in overview foreach($CONFIG['overview'] as $plugin) { if (in_array($plugin, $plugins)) { diff -crB cgp-HEAD-ff73680/inc/collectd.inc.php cgp/inc/collectd.inc.php *** cgp-HEAD-ff73680/inc/collectd.inc.php 2010-11-05 19:40:00.000000000 +0100 --- cgp/inc/collectd.inc.php 2010-12-13 19:29:53.000000000 +0100 *************** *** 60,70 **** $plugindata = collectd_plugindata($host); $plugins = array(); foreach ($plugindata as $item) { if (!in_array($item['p'], $plugins)) $plugins[] = $item['p']; } ! return $plugins; } --- 60,71 ---- $plugindata = collectd_plugindata($host); $plugins = array(); + if ($plugindata) { foreach ($plugindata as $item) { if (!in_array($item['p'], $plugins)) $plugins[] = $item['p']; } ! } return $plugins; } *************** *** 121,127 **** # generate graph url's for a plugin of a host function graphs_from_plugin($host, $plugin) { global $CONFIG; ! $plugindata = collectd_plugindata($host, $plugin); $plugindata = group_plugindata($plugindata); --- 122,128 ---- # generate graph url's for a plugin of a host function graphs_from_plugin($host, $plugin) { global $CONFIG; ! $timestamp=time(); $plugindata = collectd_plugindata($host, $plugin); $plugindata = group_plugindata($plugindata); *************** *** 162,168 **** } if (!isset($items['s'])) $base .= '&s='.$s; ! return $base; } --- 163,172 ---- } if (!isset($items['s'])) $base .= '&s='.$s; ! ! # BDU : Empecher mise en cache ! $timestamp=time(); ! $base.='&ts='.$timestamp; return $base; } diff -crB cgp-HEAD-ff73680/layout/style.css cgp/layout/style.css *** cgp-HEAD-ff73680/layout/style.css 2010-11-05 19:40:00.000000000 +0100 --- cgp/layout/style.css 2010-12-14 21:14:32.000000000 +0100 *************** *** 6,11 **** --- 6,16 ---- #header { background: #4d79b5; padding-left: 10px; + top:0; + left:0; + position:fixed; + height:32px; + width:100%; } #header a{ *************** *** 15,21 **** --- 20,42 ---- text-decoration: none; } + #menugraph { + background: #7ca4da; + top:32px; + left:0; + width:100%; + height:20px; + position:fixed; + font-size: 0.9em; + padding:1px 0 1px 8px; + } + + #menugraph a { + font-size: 0.9em; + } + #content, #footer{ + margin-top:55px; padding: 0px 20px 16px; }