Commit 1f557dfd authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add virtual node name to table (when reserved of course) as per Dave's

request.
parent a012993a
......@@ -24,7 +24,9 @@ if (!isset($node_id) ||
# Check to make sure that this is a valid nodeid
#
$query_result =
DBQueryFatal("SELECT * FROM nodes WHERE node_id='$node_id'");
DBQueryFatal("select n.*,r.vname from nodes as n ".
"left join reserved as r on n.node_id=r.node_id ".
"where n.node_id='$node_id'");
if (mysql_num_rows($query_result) == 0) {
USERERROR("The node $node_id is not a valid nodeid!", 1);
}
......@@ -43,6 +45,7 @@ if (! $isadmin) {
$node_id = $row[node_id];
$type = $row[type];
$vname = $row[vname];
$def_boot_osid = $row[def_boot_osid];
$def_boot_path = $row[def_boot_path];
$def_boot_cmd_line = $row[def_boot_cmd_line];
......@@ -94,6 +97,15 @@ echo "<tr>
</td>
</tr>\n";
if ($vname) {
echo "<tr>
<td>Virtual Name:</td>
<td class=left>
<input type=readonly name=vname value='$vname'>
</td>
</tr>\n";
}
echo "<tr>
<td>Node Type:</td>
<td class=\"left\">
......
......@@ -882,7 +882,9 @@ function SHOWIMAGEID($imageid, $edit) {
#
function SHOWNODE($node_id) {
$query_result =
DBQueryFatal("SELECT * FROM nodes WHERE node_id='$node_id'");
DBQueryFatal("select n.*,r.vname from nodes as n ".
"left join reserved as r on n.node_id=r.node_id ".
"where n.node_id='$node_id'");
if (mysql_num_rows($query_result) == 0) {
TBERROR("The node $node_id is not a valid nodeid!", 1);
......@@ -892,6 +894,7 @@ function SHOWNODE($node_id) {
$node_id = $row[node_id];
$type = $row[type];
$vname = $row[vname];
$bios = $row[bios_version];
$def_boot_osid = $row[def_boot_osid];
$def_boot_path = $row[def_boot_path];
......@@ -928,7 +931,14 @@ function SHOWNODE($node_id) {
echo "<tr>
<td>Node ID:</td>
<td class=left>$node_id</td>
</tr>\n";
</tr>\n";
if ($vname) {
echo "<tr>
<td>Virtual Name:</td>
<td class=left>$vname</td>
</tr>\n";
}
echo "<tr>
<td>Node Type:</td>
......
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