Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
eb6e4f71
Commit
eb6e4f71
authored
Aug 19, 2002
by
Leigh B. Stoller
Browse files
Link in widearea info page, and change the page to sort the nodes in
numeric order by priority instead of name.
parent
fc373ace
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/nodecontrol_list.php3
View file @
eb6e4f71
...
...
@@ -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>
 
</td>
\n
"
;
echo
"<td>
No
</td>
\n
"
;
else
echo
"<td>Yes</td>
\n
"
;
}
...
...
www/widearea_info.php3
View file @
eb6e4f71
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment