Commit 4935776f authored by Robert Ricci's avatar Robert Ricci

Add appropriate links to edit location of new nodes.

parent 6643b096
......@@ -65,7 +65,7 @@ foreach ($HTTP_GET_VARS as $key => $value) {
#
$query_result = DBQueryFatal("SELECT new_node_id, node_id, type, IP, " .
"DATE_FORMAT(created,'%M %e %H:%i:%s') as created, dmesg, " .
"identifier " .
"identifier, building " .
"FROM new_nodes WHERE new_node_id='$id'");
if (mysql_num_rows($query_result) != 1) {
......@@ -117,6 +117,17 @@ $row = mysql_fetch_array($query_result)
<th>Created</th>
<td><?= $row['created'] ?></td>
</tr>
<tr>
<th>Location</th>
<td>
<? if ($row['building']) {
echo "Set (<a href=setnodeloc.php3?node_id=$id&isnewid=1>Change</a>)\n";
} else {
echo "Unset (<a href=setnodeloc.php3?node_id=$id&isnewid=1>Set</a>)\n";
}
?>
</td>
</tr>
<tr>
<th>dmesg Output</th>
<td><?= $row['dmesg'] ?></td>
......@@ -183,7 +194,6 @@ while ($row = mysql_fetch_array($query_result)) {
</center>
<?
echo "<a href=setnodeloc.php3?node_id=$id&isnewid=1>Set Node Location</a>\n";
#
# Standard Testbed Footer
......
......@@ -252,7 +252,7 @@ if ($renumber) {
$query_result = DBQueryFatal("SELECT n.new_node_id, node_id, n.type, IP, " .
"DATE_FORMAT(created,'%M %e %H:%i:%s') as created, i.MAC, " .
"i.switch_id, i.switch_card, i.switch_port, n.temporary_IP, n.dmesg, " .
"n.identifier " .
"n.identifier, n.building " .
"FROM new_nodes AS n " .
"LEFT JOIN node_types AS t on n.type=t.type " .
"LEFT JOIN new_interfaces AS i ON n.new_node_id=i.new_node_id " .
......@@ -293,6 +293,7 @@ function deselectAll(form) {
<th>Temporary IP</th>
<th>Created</th>
<th>Warnings</th>
<th>Location</th>
</tr>
<?
......@@ -307,6 +308,7 @@ while ($row = mysql_fetch_array($query_result)) {
$tempIP = $row["temporary_IP"];
$dmesg = $row["dmesg"];
$identifier = $row["identifier"];
$building = $row["building"];
if ($row["switch_id"]) {
$port = "$row[switch_id].$row[switch_card]/$row[switch_port]";
} else {
......@@ -337,13 +339,20 @@ while ($row = mysql_fetch_array($query_result)) {
} else {
echo " <td><img src=\"greenball.gif\"></td>\n";
}
echo " <td><a href=setnodeloc.php3?node_id=$id&isnewid=1>";
if ($building) {
echo " <img src=\"greenball.gif\" border=0>";
} else {
echo " <img src=\"redball.gif\" border=0>";
}
echo "</a></td>\n";
echo " </tr>\n";
}
?>
<tr>
<td align="center" colspan=12>
<td align="center" colspan=13>
<input type="button" name="SelectAll" value="Select All"
onClick="selectAll(document.nodeform.elements['selected[]'])">
&nbsp;
......
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