xcat-core/xCAT-web/config/db.php
bp-sawyers 14856756e3 - system p discovery done
- rvitals done
- frame view fixed

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2511 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-11-19 21:26:43 +00:00

48 lines
1.2 KiB
PHP

<?php
// Display/edit tables in the xcat db
$TOPDIR = '..';
require_once "$TOPDIR/lib/functions.php";
insertHeader('xCAT Database', array('db.css'),
array('db.js',"$TOPDIR/jq/jquery.jeditable.mini.js"),
array('config','db'));
echo "<div id=content align=center>\n";
// Display all the table links
echo "<div id=tableNames><h3>Tables</h3>\n";
$tables = getTabNames();
foreach ($tables as $t) {
//if ($i++ > 7) { echo "</tr>\n<tr>"; $i = 1; }
echo "<a href='#$t'>$t</a> ";
}
echo "\n</div>\n";
if(isset($_REQUEST['tab'])) { $tab = $_REQUEST['tab']; }
else { $tab = "nodelist"; }
//$p = "edittab.php?tab=$tab";
echo "<div class=middlepane id=middlepane>Loading $tab ...</div>\n";
//echo "<div class=bottompane></div>\n";
echo "<script type='text/javascript'>\n";
echo " loadTable('$tab');";
echo " bindTableLinks();";
echo "\n</script>\n";
insertFooter();
//-----------------------------------------------------------------------------
// Return the list of database table names
function getTabNames() {
$xml = docmd('tabdump','',NULL);
$tabs = array();
foreach ($xml->children() as $response) foreach ($response->children() as $t) { $tabs[] = (string) $t; }
return $tabs;
}
?>