--- projects/cms/source/reports/php/latest/latest.php 2005/05/04 14:14:25 1.49 +++ projects/cms/source/reports/php/latest/latest.php 2005/06/29 10:26:40 1.50 @@ -157,6 +157,9 @@ function showDisks($diskRoot, $units, $input) { $total = "$diskRoot.p$i.attributes.total"; $graph = preg_replace("/_/", "$hex_underscore", $mount); $graph = preg_replace("/\//", "$hex_slash", $graph); + $graph = preg_replace("/\\\\/", "$hex_bslash", $graph); + $graph = preg_replace("/ /", "$hex_space", $graph); + $graph = preg_replace("/:/", "$hex_colon", $graph); $totalinodes = getPregMatch("$diskRoot.p$i.attributes.totalinodes", $input); $freeinodes = getPregMatch("$diskRoot.p$i.attributes.freeinodes", $input); showBar("$name ($mount)
space used", $used, $total, $units, $input, "disk-$graph"); @@ -180,9 +183,14 @@ function showDiskIO($diskRoot, $input) { while(1) { $name = getPregMatch("$diskRoot.p$i.attributes.name", $input); if ($name) { + $graph = preg_replace("/\//", "$hex_slash", $name); + $graph = preg_replace("/_/", "$hex_underscore", $graph); + $graph = preg_replace("/\\\\/", "$hex_bslash", $graph); + $graph = preg_replace("/ /", "$hex_space", $graph); + $graph = preg_replace("/:/", "$hex_colon", $graph); print "
(Disk $name)
"; - showStat("Read bytes (per sec)", "$diskRoot.p$i.attributes.rbytes", $input, "diskio-$name"); - showStat("Write bytes (per sec)", "$diskRoot.p$i.attributes.wbytes", $input, "diskio-$name"); + showStat("Read bytes (per sec)", "$diskRoot.p$i.attributes.rbytes", $input, "diskio-$graph"); + showStat("Write bytes (per sec)", "$diskRoot.p$i.attributes.wbytes", $input, "diskio-$graph"); print "
\n"; } else { @@ -201,9 +209,18 @@ function showNet($netRoot, $input) { while(1) { $name = getPregMatch("$netRoot.p$i.attributes.name", $input); if ($name) { + $graph = preg_replace("/\//", "$hex_slash", $name); + $graph = preg_replace("/_/", "$hex_underscore", $graph); + $graph = preg_replace("/\\\\/", "$hex_bslash", $graph); + $graph = preg_replace("/ /", "$hex_space", $graph); + $graph = preg_replace("/:/", "$hex_colon", $graph); + $graph = preg_replace("/\(/", "$hex_lbracket", $graph); + $graph = preg_replace("/\)/", "$hex_rbracket", $graph); + $graph = preg_replace("/\+/", "$hex_plus", $graph); + $graph = preg_replace("/#/", "$hex_hash", $graph); print "
(Network Interface $name)
"; - showStat("Received bytes (per sec)", "$netRoot.p$i.attributes.rx", $input, "net-$name"); - showStat("Transfered bytes (per sec)", "$netRoot.p$i.attributes.tx", $input, "net-$name"); + showStat("Received bytes (per sec)", "$netRoot.p$i.attributes.rx", $input, "net-$graph"); + showStat("Transfered bytes (per sec)", "$netRoot.p$i.attributes.tx", $input, "net-$graph"); print "
\n"; } else {