Skip to content
Snippets Groups Projects
Commit 92b6afba authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Print out the control net IP in the node info page. Helpful for

widearea nodes.
parent 15b00725
No related branches found
No related tags found
No related merge requests found
...@@ -1064,8 +1064,11 @@ function SHOWIMAGEID($imageid, $edit) { ...@@ -1064,8 +1064,11 @@ function SHOWIMAGEID($imageid, $edit) {
# #
function SHOWNODE($node_id) { function SHOWNODE($node_id) {
$query_result = $query_result =
DBQueryFatal("select n.*,r.vname,r.pid,r.eid from nodes as n ". DBQueryFatal("select n.*,r.vname,r.pid,r.eid,i.IP from nodes as n ".
"left join reserved as r on n.node_id=r.node_id ". "left join reserved as r on n.node_id=r.node_id ".
"left join node_types as t on t.type=n.type ".
"left join interfaces as i on i.card=t.control_net ".
" and i.node_id=n.node_id ".
"where n.node_id='$node_id'"); "where n.node_id='$node_id'");
if (mysql_num_rows($query_result) == 0) { if (mysql_num_rows($query_result) == 0) {
...@@ -1095,6 +1098,7 @@ function SHOWNODE($node_id) { ...@@ -1095,6 +1098,7 @@ function SHOWNODE($node_id) {
$state_timestamp = $row[state_timestamp]; $state_timestamp = $row[state_timestamp];
$op_mode = $row[op_mode]; $op_mode = $row[op_mode];
$op_mode_timestamp = $row[op_mode_timestamp]; $op_mode_timestamp = $row[op_mode_timestamp];
$IP = $row[IP];
if (!$def_boot_cmd_line) if (!$def_boot_cmd_line)
$def_boot_cmd_line = "&nbsp"; $def_boot_cmd_line = "&nbsp";
...@@ -1155,6 +1159,11 @@ function SHOWNODE($node_id) { ...@@ -1155,6 +1159,11 @@ function SHOWNODE($node_id) {
<td class=left>$type</td> <td class=left>$type</td>
</tr>\n"; </tr>\n";
echo "<tr>
<td>Control Net IP:</td>
<td class=left>$IP</td>
</tr>\n";
echo "<tr> echo "<tr>
<td>Bios Version:</td> <td>Bios Version:</td>
<td class=left>$bios</td> <td class=left>$bios</td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment