Commit 779af1df authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add pid/eid hyperlinks to node info page. Remove extraneous stuff from

the node control page. Add verbose option to add sharks to list; off
by default.
parent a0309334
......@@ -20,6 +20,17 @@ if (! $isadmin) {
USERERROR("You do not have admin privledges!", 1);
}
if ($verbose) {
echo "<b><a href=nodecontrol_list.php3>
Less Clutter</a>
</b><br><br>\n";
}
else {
echo "<b><a href='nodecontrol_list.php3?verbose=1'>
Add Clutter</a>
</b><br><br>\n";
}
#
# Suck out info for all the nodes.
#
......@@ -28,7 +39,7 @@ $query_result =
"left join reserved on nodes.node_id=reserved.node_id ".
"WHERE role='testnode' ORDER BY priority");
echo "<table border=2 cellpadding=0 cellspacing=2
echo "<table border=2 cellpadding=2 cellspacing=1
align='center'>\n";
echo "<tr>
......@@ -37,60 +48,37 @@ echo "<tr>
<td align=center>PID</td>
<td align=center>EID</td>
<td align=center>Default<br>OSID</td>
<td align=center>Default<br>Path</td>
<td align=center>Default<br>Cmdline</td>
<td align=center>Next<br>OSID</td>
<td align=center>Next<br>Path</td>
<td align=center>Next<br>Cmdline</td>
</tr>\n";
while ($row = mysql_fetch_array($query_result)) {
$node_id = $row[node_id];
$type = $row[type];
$def_boot_osid = $row[def_boot_osid];
$def_boot_path = $row[def_boot_path];
$def_boot_cmd_line = $row[def_boot_cmd_line];
$next_boot_osid = $row[next_boot_osid];
$next_boot_path = $row[next_boot_path];
$next_boot_cmd_line = $row[next_boot_cmd_line];
$pid = $row[pid];
$eid = $row[eid];
if (!$def_boot_cmd_line)
$def_boot_cmd_line = "&nbsp";
if (!$def_boot_path)
$def_boot_path = "&nbsp";
if (!$next_boot_path)
$next_boot_path = "&nbsp";
if (!$next_boot_cmd_line)
$next_boot_cmd_line = "&nbsp";
if (!$pid)
$pid = "--";
if (!$eid)
$eid = "--";
if ($type == "dnard" && !$verbose)
continue;
echo "<tr>
<td><A href='shownode.php3?node_id=$node_id'>$node_id</a></td>
<td>$type</td>
<td>$pid</td>
<td><A href='shownode.php3?node_id=$node_id'>$node_id</a></td>\n
<td>$type</td>\n";
if ($pid) {
echo "<td>$pid</td>
<td>$eid</td>\n";
if ($def_boot_osid && TBOSInfo($def_boot_osid, $osname, $ospid))
echo "<td>$osname</td>\n";
else
echo "<td>&nbsp</td>\n";
}
else {
echo "<td>--</td>
<td>--</td>\n";
}
echo " <td>$def_boot_path</td>
<td>$def_boot_cmd_line</td>\n";
if ($next_boot_osid && TBOSInfo($next_boot_osid, $osname, $ospid)) {
if ($def_boot_osid && TBOSInfo($def_boot_osid, $osname, $ospid))
echo "<td>$osname</td>\n";
}
else
echo "<td>&nbsp</td>\n";
echo " <td>$next_boot_path</td>
<td>$next_boot_cmd_line</td>
</tr>\n";
echo "</tr>\n";
}
echo "</table>\n";
......
......@@ -1005,7 +1005,7 @@ function SHOWIMAGEID($imageid, $edit) {
#
function SHOWNODE($node_id) {
$query_result =
DBQueryFatal("select n.*,r.vname from nodes as n ".
DBQueryFatal("select n.*,r.vname,r.pid,r.eid from nodes as n ".
"left join reserved as r on n.node_id=r.node_id ".
"where n.node_id='$node_id'");
......@@ -1018,6 +1018,8 @@ function SHOWNODE($node_id) {
$node_id = $row[node_id];
$type = $row[type];
$vname = $row[vname];
$pid = $row[pid];
$eid = $row[eid];
$bios = $row[bios_version];
$def_boot_osid = $row[def_boot_osid];
$def_boot_path = $row[def_boot_path];
......@@ -1062,6 +1064,19 @@ function SHOWNODE($node_id) {
</tr>\n";
}
if ($pid) {
echo "<tr>
<td>Project: </td>
<td class=\"left\">
<A href='showproject.php3?pid=$pid'>$pid</td>
</tr>\n";
echo "<tr>
<td>Experiment:</td>
<td><A href='showexp.php3?pid=$pid&eid=$eid'>$eid</A></td>
</tr>\n";
}
echo "<tr>
<td>Node Type:</td>
<td class=left>$type</td>
......
Supports Markdown
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