[or-cvs] r14997: (ticket:102) Adding bandwidth display options (torstatus/trunk/web)

kasimir at seul.org kasimir at seul.org
Fri Jun 6 21:53:05 UTC 2008


Author: kasimir
Date: 2008-06-06 17:53:05 -0400 (Fri, 06 Jun 2008)
New Revision: 14997

Modified:
   torstatus/trunk/web/router_detail.php
Log:
(ticket:102) Adding bandwidth display options

Modified: torstatus/trunk/web/router_detail.php
===================================================================
--- torstatus/trunk/web/router_detail.php	2008-06-06 19:28:03 UTC (rev 14996)
+++ torstatus/trunk/web/router_detail.php	2008-06-06 21:53:05 UTC (rev 14997)
@@ -398,6 +398,24 @@
 </tr>
 <tr>
 <td class='TRS' style="text-align: center;">
+<div style="text-align: left;">
+<?php
+if ($_GET['showbandwidth'] == "true")
+{
+	// Print the bandwidth
+	echo "Write history bandwidth (in bytes per second):<br/>";
+	foreach (unserialize($record['WriteHistorySERDATA']) as $bwvalue)
+	{
+		echo "$bwvalue<br/>";
+	}
+	echo "Ending at " . $record['WriteHistoryLAST'] . " with " . $record['WriteHistoryINC'] . " second intervals.";
+}
+else
+{
+	?><a href="?FP=<?php echo $Fingerprint; ?>&showbandwidth=true">(show bandwidth values)</a><?php
+}
+?>
+</div>
 <?php if ($usePerlGraphs == 1) { ?>
 <img src="/cgi-bin/perlgraph/plot.pl?plottype=rtw" alt="Write History" /><br/>
 <?php } else { ?>
@@ -405,6 +423,24 @@
 <?php } ?>
 </td>
 <td class='TRSB' style="text-align: center;">
+<div style="text-align: left;">
+<?php
+if ($_GET['showbandwidth'] == "true")
+{
+	// Print the bandwidth
+	echo "Read history bandwidth (in bytes per second):<br/>";
+	foreach (unserialize($record['ReadHistorySERDATA']) as $bwvalue)
+	{
+		echo "$bwvalue<br/>";
+	}
+	echo "Ending at " . $record['ReadHistoryLAST'] . " with " . $record['ReadHistoryINC'] . " second intervals.";
+}
+else
+{
+	?>&nbsp;<?php
+}
+?>
+</div>
 <?php if ($usePerlGraphs == 1) { ?>
 <img src="/cgi-bin/perlgraph/plot.pl?plottype=rtr" alt="Read History" /><br/>
 <?php } else { ?>



More information about the tor-commits mailing list