2010-06-16 18:21:58 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Load page
|
|
|
|
*
|
|
|
|
* @param Nothing
|
|
|
|
* @return Nothing
|
|
|
|
*/
|
|
|
|
function loadPage(){
|
|
|
|
// Include CSS and Javascripts
|
|
|
|
echo
|
|
|
|
'<html>
|
|
|
|
<head>
|
|
|
|
<title>xCAT Console</title>
|
|
|
|
<link href="css/jquery.autocomplete.css" rel=stylesheet type="text/css">
|
|
|
|
<link href="css/jquery-ui-1.8.custom.css" rel=stylesheet type="text/css">
|
|
|
|
<link href="css/jquery.dataTables.css" rel=stylesheet type="text/css">
|
|
|
|
<link href="css/superfish.css" rel=stylesheet type="text/css">
|
|
|
|
<link href="css/tree.css" rel=stylesheet type="text/css">
|
|
|
|
<link href="css/style.css" rel=stylesheet type="text/css">
|
2010-07-14 18:06:01 +00:00
|
|
|
<script type="text/javascript" src="js/jquery/jquery-1.4.2.min.js"></script>
|
|
|
|
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.custom.min.js"></script>
|
2010-06-16 18:21:58 +00:00
|
|
|
<script type="text/javascript" src="js/ui.js"></script>
|
|
|
|
</head>';
|
|
|
|
|
|
|
|
// Header menu
|
|
|
|
echo
|
|
|
|
'<body>
|
|
|
|
<div id="header">
|
|
|
|
<ul>
|
|
|
|
<li><img src="images/logo.gif" height="100%"/></li>
|
|
|
|
<li><a href="index.php" class="top_link">Nodes</a></li>
|
|
|
|
<li><a href="configure.php" class="top_link">Configure</a></li>
|
|
|
|
<li><a href="provision.php" class="top_link">Provision</a></li>
|
|
|
|
<li><a href="monitor.php" class="top_link">Monitor</a></li>
|
2010-07-20 07:58:07 +00:00
|
|
|
<li><a href="update.php" class="top_link">Update</a></li>
|
2010-06-16 18:21:58 +00:00
|
|
|
</ul>
|
|
|
|
</div>';
|
|
|
|
|
2010-07-14 20:11:07 +00:00
|
|
|
// Content
|
|
|
|
echo '<div class="content" id="content"></div>';
|
2010-06-16 18:21:58 +00:00
|
|
|
|
|
|
|
// End of page
|
|
|
|
echo
|
|
|
|
'</body>
|
|
|
|
</html>';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Load page content
|
|
|
|
*
|
|
|
|
* @param Nothing
|
|
|
|
* @return Nothing
|
|
|
|
*/
|
|
|
|
function loadContent() {
|
|
|
|
// Initialize page
|
|
|
|
echo
|
|
|
|
'<script language="JavaScript" type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
initPage();
|
|
|
|
});
|
|
|
|
</script>';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Login user into a new session
|
|
|
|
*
|
|
|
|
* @param Nothing
|
|
|
|
* @return Nothing
|
|
|
|
*/
|
|
|
|
function login() {
|
|
|
|
// xcatauth.js will open a dialog box
|
|
|
|
// asking for the user name and password
|
|
|
|
echo
|
|
|
|
'<script src="js/xcatauth.js" type="text/javascript"></script>
|
|
|
|
<div id=logdialog>
|
2010-07-14 18:06:01 +00:00
|
|
|
<p>Give the user name and password for the xCAT management node</p>
|
2010-06-16 18:21:58 +00:00
|
|
|
<form id=loginform>
|
|
|
|
<table cellspacing=3>
|
|
|
|
<tr><td align=right><label for=username>User name:</label></td><td align=left><input id=username type=text name=username></td></tr>
|
|
|
|
<tr><td align=right><label for=password>Password:</label></td><td align=left><input id=password type=password name=password></td></tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
<p><span id=logstatus></span></p>
|
|
|
|
</div>';
|
|
|
|
}
|
|
|
|
?>
|