Commit 7d37518a authored by Leigh Stoller's avatar Leigh Stoller

Show the parents of an osid. Needed to fix an include in other files.

parent e73f8191
......@@ -24,7 +24,7 @@
include("defs.php3");
include_once("imageid_defs.php");
include_once("osinfo_defs.php");
include("osiddefs.php3");
include_once("osiddefs.php3");
#
# No PAGEHEADER since we spit out a Location header later. See below.
......
......@@ -25,7 +25,7 @@ include("defs.php3");
include_once("imageid_defs.php");
include_once("osinfo_defs.php");
include_once("node_defs.php");
include("osiddefs.php3");
include_once("osiddefs.php3");
#
# Only known and logged in users.
......
......@@ -25,7 +25,7 @@ include("defs.php3");
include_once("imageid_defs.php");
include_once("osinfo_defs.php");
include_once("node_defs.php");
include("osiddefs.php3");
include_once("osiddefs.php3");
#
# XXX
......
<?php
#
# Copyright (c) 2000-2008, 2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -23,7 +23,7 @@
#
include("defs.php3");
include_once("osinfo_defs.php");
include("osiddefs.php3");
include_once("osiddefs.php3");
include("form_defs.php");
#
......
......@@ -514,6 +514,27 @@ class OSinfo
<td class=left>$uuid</td>
</tr>\n";
if ($def_parentosid) {
$parent_result =
DBQueryFatal("select m.parent_osid,o.osname,o.pid ".
" from os_submap as m ".
"left join os_info as o on o.osid=m.parent_osid ".
"where m.osid='$osid'");
if (mysql_num_rows($parent_result)) {
while ($prow = mysql_fetch_array($parent_result)) {
$posid = $prow["parent_osid"];
$posname = $prow["osname"];
echo "<tr>";
echo " <td>Parent $posid:</td>";
echo " <td class=left>";
echo " <a href='showosinfo.php3?osid=$posid'>";
echo "$posname</a></td>\n";
echo "</tr>\n";
}
}
}
echo "</table>\n";
}
......
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