Commit 371a614e authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add "priority" field to nodes table and change the node printouts to

order by type,priority.
parent 6a699765
......@@ -25,7 +25,7 @@ if (! $isadmin) {
#
$query_result = mysql_db_query($TBDBNAME,
"SELECT * FROM nodes WHERE type='pc' OR type='shark' ".
"ORDER BY type");
"ORDER BY type,priority");
if (! $query_result) {
TBERROR("Database Error retrieving node information", 1);
......
......@@ -9,7 +9,7 @@ PAGEHEADER("Utah Testbed Machine Status");
$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 ".
"WHERE type='pc' OR type='shark' ORDER BY type");
"WHERE type='pc' OR type='shark' ORDER BY type,priority");
if (! $query_result) {
$err = mysql_error();
TBERROR("Database Error getting node reservation status: $err\n", 1);
......
......@@ -290,7 +290,7 @@ function SHOWNODES($pid, $eid) {
"FROM nodes LEFT JOIN reserved ".
"ON nodes.node_id=reserved.node_id ".
"WHERE reserved.eid=\"$eid\" and reserved.pid=\"$pid\" ".
"ORDER BY type");
"ORDER BY type,priority");
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