Commit f5dac55c authored by Mike Hibler's avatar Mike Hibler
Browse files

Stick in some "order by type,node_id" clauses when presenting tables of nodes.

Unfortunately, doesn't give the obvious result for sharks since we changed
sh01 -> sh1, so no they are ordered: sh1, sh10 ... sh19, sh2, sh20, sh3, ...
parent 6e57f371
......@@ -28,7 +28,7 @@ echo "<center><h1>
# Suck out info for all the nodes.
#
$query_result = mysql_db_query($TBDBNAME,
"SELECT * from nodes where type='pc' or type='shark'");
"SELECT * FROM nodes WHERE type='pc' OR type='shark' ORDER BY type,node_id");
if (! $query_result) {
TBERROR("Database Error retrieving node information", 1);
}
......
......@@ -4,15 +4,16 @@ include("defs.php3");
#
# Standard Testbed Header
#
PAGEHEADER("Utah Testbed Machine Statu");
PAGEHEADER("Utah Testbed Machine Status");
echo "<center>
<h1>Utah Testbed Machine Status</h1>
</center>\n";
$query_result = mysql_db_query($TBDBNAME,
"SELECT n.node_id, n.type, j.eid from nodes ".
"as n left join reserved AS j ON n.node_id = j.node_id");
"SELECT n.node_id, n.type, j.eid FROM nodes ".
"AS n LEFT JOIN reserved AS j ON n.node_id = j.node_id ".
"WHERE type='pc' OR type='shark' ORDER BY type,node_id");
if (! $query_result) {
$err = mysql_error();
TBERROR("Database Error getting node reservation status: $err\n", 1);
......
......@@ -146,7 +146,8 @@ if (mysql_num_rows($reserved_result)) {
"SELECT nodes.* ".
"FROM nodes LEFT JOIN reserved ".
"ON nodes.node_id=reserved.node_id ".
"WHERE reserved.eid=\"$exp_eid\" and reserved.pid=\"$exp_pid\"");
"WHERE reserved.eid=\"$exp_eid\" and reserved.pid=\"$exp_pid\" ".
"ORDER BY type,node_id");
while ($row = mysql_fetch_array($query_result)) {
$node_id = $row[node_id];
......
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