Commit eb6e4f71 authored by Leigh Stoller's avatar Leigh Stoller

Link in widearea info page, and change the page to sort the nodes in

numeric order by priority instead of name.
parent fc373ace
......@@ -88,8 +88,14 @@ if (mysql_num_rows($query_result) == 0) {
}
echo "<center><b>
View: $view
</b></center><br>\n";
View: $view\n";
if (! strcmp($showtype, "widearea")) {
echo "<br>
<a href=widearea_info.php3>(Widearea Info)</a>\n";
}
echo "</b></center><br>\n";
echo "<table border=2 cellpadding=2 cellspacing=2
align='center'>\n";
......@@ -167,7 +173,7 @@ while ($row = mysql_fetch_array($query_result)) {
}
else {
if ($pid)
echo "<td>&nbsp</td>\n";
echo "<td>No</td>\n";
else
echo "<td>Yes</td>\n";
}
......
......@@ -58,7 +58,9 @@ else
function SPITDATA($table, $title, $showtype, $plain)
{
$query_result1 =
DBQueryFatal("select * from $table order by node_id1");
DBQueryFatal("select t.*,n.priority from $table as t ".
"left join nodes as n on n.node_id=t.node_id1 ".
"order by n.priority");
# PHP arrays are strange wrt "each" function. Need two copies.
$nodenamesrow = array();
......@@ -74,16 +76,18 @@ function SPITDATA($table, $title, $showtype, $plain)
$plr = $row[lossrate];
$start = $row[start_time];
$end = $row[end_time];
$pri = $row[priority];
$glom1 = $node_id1;
$glom2 = $node_id2;
# echo "Got $glom1 to $glom2 in $msectime ms<br>\n";
#echo "Got $glom1 to $glom2 $pri<br>\n";
$nodenamesrow[$glom1] = 1;
$nodenamesrow[$glom2] = 1;
$nodenamescol[$glom1] = 1;
$nodenamescol[$glom2] = 1;
$nodenamesrow[$glom1] = $pri;
$nodenamescol[$glom1] = $pri;
# $nodenamesrow[$glom2] = 1;
# $nodenamescol[$glom2] = 1;
$speeds[ $glom1 . "+" . $glom2 ] = $time * 1000;
$bws[ $glom1 . "+" . $glom2 ] = $bw;
......@@ -94,8 +98,10 @@ function SPITDATA($table, $title, $showtype, $plain)
}
ksort($nodenamesrow);
ksort($nodenamescol);
asort($nodenamesrow, SORT_NUMERIC);
reset($nodenamesrow);
asort($nodenamescol, SORT_NUMERIC);
reset($nodenamescol);
if (! $plain) {
echo "<center>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment