Synched xCAT-UI 2.6 branch with trunk.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10175 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
+164
-51
@@ -4,7 +4,7 @@
|
||||
font: 12px verdana, arial, helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.ui-dialog label,.ui-dialog input,.ui-dialog p,.ui-dialog button {
|
||||
.ui-dialog label,.ui-dialog input,.ui-dialog p,.ui-dialog button,.ui-dialog td {
|
||||
font: 12px verdana, arial, helvetica, sans-serif;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,46 @@
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/*--------------- login dialog ---------*/
|
||||
#logdialog {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
#logdialog td{
|
||||
width: 110px;
|
||||
height: 30px;
|
||||
color: #0078AE;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#logdialog input{
|
||||
width: 219px;
|
||||
border: solid 1px #0078AE;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#logdialog p{
|
||||
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#logdialog button{
|
||||
font-weight: bold;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
#loginput {
|
||||
background-color: #f5f5f5;
|
||||
height: 260px;
|
||||
}
|
||||
|
||||
#loginfo{
|
||||
text-align:right;
|
||||
color: #f5f5f5;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
/*--------------- Header ---------------*/
|
||||
#header {
|
||||
height: 40px;
|
||||
@@ -123,45 +163,73 @@ body {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#content .ui-widget-header {
|
||||
border-color: #4297D7 #4297D7 #7BB642;
|
||||
border-width: 1px 1px 4px;
|
||||
}
|
||||
|
||||
/*--------------- Groups ---------------*/
|
||||
#groups {
|
||||
width: 150px;
|
||||
vertical-align: top;
|
||||
float: left;
|
||||
position: relative;
|
||||
margin: 15px 0px 15px 15px;
|
||||
}
|
||||
|
||||
#groups ul {
|
||||
list-style: none;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#groups ul h3 {
|
||||
text-transform: uppercase;
|
||||
font: 12px verdana, arial, helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
color: #424242;
|
||||
display: inline-table;
|
||||
}
|
||||
|
||||
#groups a {
|
||||
font: 12px verdana, arial, helvetica, sans-serif;
|
||||
color: #0000FF;
|
||||
display: inline-table;
|
||||
padding: 5px 15px 5px 15px; /* Top right bottom left */
|
||||
padding: 5px 0px 5px 20px; /* Top right bottom left */
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#groups a:hover {
|
||||
color: #FF0000;
|
||||
#groups .grouplabel {
|
||||
padding: 5px 0px 5px 10px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#groups .groupdiv{
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#groups .groupdiv div:hover {
|
||||
background: #E7EBFF;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#groups .selectgroup {
|
||||
background: #E6E6F2;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#groups .actionDiv{
|
||||
text-align: right;
|
||||
padding-right: 5px;
|
||||
border-top: thin solid #E7EBFF;
|
||||
}
|
||||
|
||||
/*--------------- Nodes section ---------------*/
|
||||
#nodes {
|
||||
width: 700px;
|
||||
margin: 20px;
|
||||
display: inline-table;
|
||||
width: 790px;
|
||||
min-height: 570px;
|
||||
margin: 10px 0px 0px 0px;
|
||||
padding: 0px 0px 0px 5px;
|
||||
display: inline-block;
|
||||
border-left: medium solid #E6E6F2;
|
||||
}
|
||||
|
||||
#nodes .summarypie {
|
||||
width: 370px;
|
||||
height: 280px;
|
||||
}
|
||||
|
||||
/*--------------- Info/warning bar ---------------*/
|
||||
@@ -205,6 +273,7 @@ span.ui-icon-info {
|
||||
|
||||
.tab a {
|
||||
cursor: pointer;
|
||||
color: #0000FF;
|
||||
}
|
||||
|
||||
.tab .ui-icon-close {
|
||||
@@ -279,7 +348,7 @@ legend {
|
||||
.tab li {
|
||||
list-style: none;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
margin: 1;
|
||||
}
|
||||
|
||||
.tab textarea {
|
||||
@@ -291,36 +360,56 @@ legend {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
/*--------------- Actions bar ---------------*/
|
||||
/*--------------- menu Div Actions bar ---------------*/
|
||||
.menuDiv {
|
||||
background:none repeat scroll 0 0 #79B7E7;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.sf-menu {
|
||||
background : none repeat scroll 0 0 #79B7E7;
|
||||
border :1px solid #f5f5f5;
|
||||
border-radius :0.5em 0.5em 0.5em 0.5em;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.sf-sub-indicator{
|
||||
right:0;
|
||||
}
|
||||
|
||||
.actionBar {
|
||||
display: inline-table;
|
||||
width:50%;
|
||||
}
|
||||
|
||||
.actionBar div {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
.actionBar span {
|
||||
padding: 0px 10px;
|
||||
.actionBar a {
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.actionBar a {
|
||||
color: #2E6E9E;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
.actionBar a:hover {
|
||||
color: #026890;
|
||||
}
|
||||
|
||||
.actionBar li {
|
||||
list-style: none;
|
||||
padding: 5px;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/*--------------- jQuery datatable ---------------*/
|
||||
.dataTables_wrapper {
|
||||
overflow: auto;
|
||||
width: 700px;
|
||||
margin: 0px auto;
|
||||
width: auto;
|
||||
margin: 10px auto;
|
||||
-moz-border-radius:5px;
|
||||
-webkit-border-radius:5px;
|
||||
border-radius:5px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
/*** Show X entries ***/
|
||||
@@ -333,11 +422,10 @@ legend {
|
||||
|
||||
/*** Search ***/
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
width: 40%;
|
||||
display: block;
|
||||
float: right;
|
||||
text-align: right;
|
||||
padding: 10px 10px;
|
||||
}
|
||||
|
||||
.tab input,select {
|
||||
@@ -364,7 +452,7 @@ legend {
|
||||
|
||||
/*** Table ***/
|
||||
.datatable {
|
||||
width: 660px;
|
||||
width: 100%;
|
||||
border-width: 1px;
|
||||
border-spacing: 0px;
|
||||
border-style: solid;
|
||||
@@ -595,6 +683,47 @@ table a:hover {
|
||||
}
|
||||
|
||||
/*--------------- Provision and monitor forms ---------------*/
|
||||
.rmcnormal {
|
||||
border: 2px outset #7FFFD4;
|
||||
background: #66CD00;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.rmcwarning {
|
||||
background: #FFD700;
|
||||
border: 2px outset #EEEE00;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.rmcerror {
|
||||
background: #FF3030;
|
||||
border: 2px outset #FF4040;
|
||||
}
|
||||
|
||||
.rmcunknown {
|
||||
background: #8B8B7A;
|
||||
border: 2px outset #858585;
|
||||
}
|
||||
|
||||
.rmcnodeli {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rmcsumdiv {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
float: left;
|
||||
margin: 0px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.rmcnodediv {
|
||||
width: 240px;
|
||||
height: 120px;
|
||||
margin: 0px 0px 15px 0px;
|
||||
}
|
||||
|
||||
.provision div,.monitor div {
|
||||
margin: 10px 0;
|
||||
display: block;
|
||||
@@ -609,19 +738,6 @@ table a:hover {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.monitorsumdiv {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
float: left;
|
||||
margin: 0px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.monitornodediv {
|
||||
width: 240px;
|
||||
height: 120px;
|
||||
margin: 0px 0px 15px 0px;
|
||||
}
|
||||
|
||||
/*--------------- Physical layout section ---------------*/
|
||||
.frameDiv {
|
||||
width: 179px;
|
||||
@@ -685,28 +801,25 @@ table a:hover {
|
||||
|
||||
/*--------------- Discovery section ---------------*/
|
||||
.discoverstep {
|
||||
width: 220px;
|
||||
width: 960px;
|
||||
vertical-align: top;
|
||||
float: left;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
background-color: #A9D0F5;
|
||||
padding: 5px 0px;
|
||||
padding: 0px 0px 0px 5px;
|
||||
-moz-border-radius: .5em;
|
||||
-webkit-border-radius: .5em;
|
||||
border-radius: .5em;
|
||||
}
|
||||
|
||||
.discoverstep span {
|
||||
.discovercurrentstep{
|
||||
background-color: yellow;
|
||||
font: normal bold 12px/ 35px verdana, arial, helvetica, sans-serif;
|
||||
padding: 5px;
|
||||
margin: 0px 5px; /* Top right left bottom*/
|
||||
}
|
||||
|
||||
.discovercontent {
|
||||
width: 700px;
|
||||
width: 960px;
|
||||
display: inline-table;
|
||||
padding: 0 0 0 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.discovercontent table{
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Main xCAT page
|
||||
*/
|
||||
require_once "lib/functions.php";
|
||||
require_once "lib/ui.php";
|
||||
|
||||
/* Load page */
|
||||
loadPage();
|
||||
|
||||
/* Login user */
|
||||
if (!isAuthenticated()) {
|
||||
login();
|
||||
} else {
|
||||
loadContent();
|
||||
}
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
@@ -1,13 +1,13 @@
|
||||
/*associate the step name with step number*/
|
||||
var steps = ['Discover hardware',
|
||||
'Cluster patterns',
|
||||
'Supernode numbers',
|
||||
'More cluster patterns',
|
||||
var steps = ['Platform',
|
||||
'Patterns',
|
||||
'Supernode',
|
||||
'More patterns',
|
||||
'Power on hardware',
|
||||
'Discover frames',
|
||||
'Prepare management node',
|
||||
'Update definitions',
|
||||
'Create LPARs',
|
||||
'Management node',
|
||||
'Update',
|
||||
'LPARs',
|
||||
'Complete'];
|
||||
|
||||
/*associate the function with step number*/
|
||||
@@ -70,10 +70,11 @@ function updateDiscoverStep(){
|
||||
for (var index in steps){
|
||||
showString += '<span';
|
||||
if (currentStep == index){
|
||||
showString += ' style="background-color:yellow;"';
|
||||
showString += ' class="discovercurrentstep"';
|
||||
}
|
||||
showString += '>' + steps[index] + '</span><br/>';
|
||||
showString += '>' + steps[index] + '</span>->';
|
||||
}
|
||||
showString = showString.substr(0, showString.length - 2);
|
||||
$('#discoverStepDiv').html(showString);
|
||||
}
|
||||
|
||||
@@ -183,7 +184,7 @@ function createBackButton(){
|
||||
function getDiscoverEnv(envName){
|
||||
if (discoverEnv[envName]){
|
||||
return discoverEnv[envName];
|
||||
}
|
||||
}
|
||||
else{
|
||||
return '';
|
||||
}
|
||||
@@ -330,7 +331,6 @@ function initSelectPlatform(){
|
||||
temp += '<p>This wizard will guide you through the process of defining the naming conventions within' +
|
||||
'your cluster, discovering the hardware on your network, and automatically defining it in the xCAT' +
|
||||
'database.<br/>Choose which type of hardware you want to discover, and then click Next.</p>';
|
||||
|
||||
temp += '<input type="radio" name="platform" disabled="true"><span style="color:gray;"> System x hardware (not implemented yet)</span></input><br/>';
|
||||
temp += '<input type="radio" name="platform" id="ih"> System p hardware (P7 IH)</input><br/>';
|
||||
temp += '<input type="radio" name="platform" id="nonih"> System p hardware (Non P7 IH)</input><br/>';
|
||||
@@ -358,9 +358,9 @@ function initSelectPlatform(){
|
||||
function getPlatform(){
|
||||
var radioValue = $('#discoverContentDiv :checked').attr('id');
|
||||
setDiscoverEnv('machineType', radioValue);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 2: Cluster basic patterns
|
||||
* users can input the switches' name range, the number of port, start ip and port prefix
|
||||
@@ -412,7 +412,6 @@ function initBasicPattern(){
|
||||
showString += '</tbody></table></div>';
|
||||
|
||||
$('#discoverContentDiv').append(showString);
|
||||
|
||||
$('#discoverContentDiv [title]').tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
@@ -639,6 +638,7 @@ function checkSupernode(operType){
|
||||
cmd : 'echo -e "' + args + '" > /tmp/websupernode.txt'
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -671,7 +671,7 @@ function initSiteTable(operType){
|
||||
$('.tooltip').remove();
|
||||
var showDiv = $('<div style="min-height:360px" id="siteDiv"><h2>' + steps[currentStep] + '(Site info)</h2></div>');
|
||||
var statBar = createStatusBar('siteTableStat');
|
||||
statBar.append(createLoader());
|
||||
statBar.find('div').append(createLoader());
|
||||
showDiv.append(statBar);
|
||||
$('#discoverContentDiv').append(showDiv);
|
||||
|
||||
@@ -770,7 +770,7 @@ function showSiteArea(){
|
||||
},
|
||||
|
||||
success : function(data){
|
||||
$('#discoverContentDiv #siteTableStat').html('Current network interface configuration:<br/><pre>' +
|
||||
$('#discoverContentDiv #siteTableStat div').html('Current network interface configuration:<br/><pre>' +
|
||||
data.rsp + '</pre>');
|
||||
}
|
||||
});
|
||||
@@ -810,6 +810,7 @@ function calcEndIp(ipStart, num){
|
||||
ipArray[0] = ipArray[0] + parseInt(sum / 255);
|
||||
return (ipArray.join('.'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 4: check the input are all filled
|
||||
*
|
||||
@@ -887,7 +888,7 @@ function initDiscoverFrames(){
|
||||
+ '</td><td style="width:20px"></td><td id="mtmsTd"></td></tr></table></center>');
|
||||
|
||||
if (getDiscoverEnv('framemtmsmap')){
|
||||
$('#framedisc').html('Mapping the frame name and mtms which discovered by lsslp.<br\>' +
|
||||
$('#framedisc div').html('Mapping the frame name and mtms which discovered by lsslp.<br\>' +
|
||||
'Select the frame name, then select the mtms.');
|
||||
var mapArray = getDiscoverEnv('framemtmsmap').split(':');
|
||||
for(var i in mapArray){
|
||||
@@ -899,7 +900,7 @@ function initDiscoverFrames(){
|
||||
return;
|
||||
}
|
||||
|
||||
statBar.append('Discovering all Frames by lsslp.').append(createLoader());
|
||||
statBar.find('div').append('Discovering all Frames by lsslp.').append(createLoader());
|
||||
//use lsslp to find all bpas in cluster
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
@@ -914,7 +915,7 @@ function initDiscoverFrames(){
|
||||
success : function(data){
|
||||
var tempInfo = data.rsp[0];
|
||||
if (-1 != tempInfo.indexOf('Error')){
|
||||
$('#framedisc').html(tempInfo);
|
||||
$('#framedisc div').html(tempInfo);
|
||||
createDiscoverButtons();
|
||||
return;
|
||||
}
|
||||
@@ -923,19 +924,18 @@ function initDiscoverFrames(){
|
||||
var frameArray = expandNR(getDiscoverEnv('frameName'));
|
||||
//chech the defined number and discovered number
|
||||
if (mtmsArray.length != frameArray.length){
|
||||
$('#framedisc').html('Error: Definded Number is ' + frameArray.length +
|
||||
$('#framedisc div').html('Error: Definded Number is ' + frameArray.length +
|
||||
', but lsslp discovered Number is ' + mtmsArray.length + ', please check your configure!');
|
||||
createDiscoverButtons();
|
||||
return;
|
||||
}
|
||||
|
||||
$('#framedisc').html('Mapping the frame name and mtms which discovered by lsslp.<br\>' +
|
||||
$('#framedisc div').html('Mapping the frame name and mtms which discovered by lsslp.<br\>' +
|
||||
'Select the frame name, then select the mtms.');
|
||||
|
||||
for (var i in frameArray){
|
||||
$('#frameTd').append('<p><input name="frameradio" type="radio" onclick="createMap(this)"><span>' +
|
||||
frameArray[i] + '</span></p>');
|
||||
|
||||
}
|
||||
|
||||
for (var i in mtmsArray){
|
||||
@@ -1081,6 +1081,7 @@ function initConfig(operType){
|
||||
|
||||
createSetupFile();
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 7: create the xcat configure file
|
||||
*
|
||||
@@ -1174,6 +1175,7 @@ function runSetup(){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 7: create the dhcp configure file
|
||||
*
|
||||
@@ -1340,9 +1342,9 @@ function lsslpWriteHMC(){
|
||||
tempSpan.addClass('ui-icon-check');
|
||||
lsslpWriteCec();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -241,9 +241,9 @@ function updateRpm() {
|
||||
});
|
||||
|
||||
$('#update').show();
|
||||
$('#update').empty();
|
||||
$('#update').append("<p>Updating <b>" + rpms + "</b> from <b>" + rpmPath + "</b></p>");
|
||||
$('#update').append("<img id='loadingpic' src='images/loader.gif'>");
|
||||
$('#update div').empty();
|
||||
$('#update div').append("<p>Updating <b>" + rpms + "</b> from <b>" + rpmPath + "</b></p>");
|
||||
$('#update div').append("<img id='loadingpic' src='images/loader.gif'>");
|
||||
$('#rpm button').attr('disabled', 'true');
|
||||
|
||||
// Send the update command to server
|
||||
@@ -276,29 +276,29 @@ function showUpdateResult(data) {
|
||||
if (0 < resArray.length) {
|
||||
// Show last lines
|
||||
if (('' == resArray[resArray.length - 1]) && (resArray.length > 1)) {
|
||||
$('#update').append('<pre>' + resArray[resArray.length - 2] + '</pre>');
|
||||
$('#update div').append('<pre>' + resArray[resArray.length - 2] + '</pre>');
|
||||
} else {
|
||||
$('#update').append('<pre>' + resArray[resArray.length - 1] + '</pre>');
|
||||
$('#update div').append('<pre>' + resArray[resArray.length - 1] + '</pre>');
|
||||
}
|
||||
|
||||
// Create link to show details
|
||||
$('#update').append('<br/><a>Show details</a>');
|
||||
$('#update a').css( {
|
||||
$('#update div').append('<br/><a>Show details</a>');
|
||||
$('#update div a').css( {
|
||||
'color' : '#0000FF',
|
||||
'cursor' : 'pointer'
|
||||
}).bind('click', function() {
|
||||
// Toggle details and change text
|
||||
$('#resDetail').toggle();
|
||||
if ($('#update a').text() == 'Show details') {
|
||||
$('#update a').text('Hide details');
|
||||
if ($('#update div a').text() == 'Show details') {
|
||||
$('#update div a').text('Hide details');
|
||||
} else {
|
||||
$('#update a').text('Show details');
|
||||
$('#update div a').text('Show details');
|
||||
}
|
||||
});
|
||||
|
||||
var resDetail = $('<pre id="resDetail"></pre>');
|
||||
resDetail.hide();
|
||||
$('#update').append(resDetail);
|
||||
$('#update div').append(resDetail);
|
||||
for (temp = 0; temp < resArray.length; temp++) {
|
||||
resDetail.append(resArray[temp] + '<br/>');
|
||||
}
|
||||
|
||||
+182
-3
@@ -126,7 +126,7 @@ bladePlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('bladeProvisionLoader' + inst).hide();
|
||||
statBar.append(loader);
|
||||
statBar.find('div').append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a node on BladeCenter.');
|
||||
@@ -201,5 +201,184 @@ bladePlugin.prototype.loadResources = function() {
|
||||
* @return Nothing
|
||||
*/
|
||||
bladePlugin.prototype.addNode = function() {
|
||||
openDialog('info', 'Under construction');
|
||||
};
|
||||
var nodeTypeSelectDia = $('<div id="nodeTypeSelectDia" class="form"></div>');
|
||||
nodeTypeSelectDia.append('<div><label for="mgt">Node Type :</label><select id="nodeTypeSelect">' +
|
||||
'<option value="mm">AMM Node</option><option value="blade">Blade Node</option></select></div>');
|
||||
//append the mm div
|
||||
var mmStr = '<div id="mmNode">' +
|
||||
'<label>AMM Name: </label><input id="ammName" type="text"></input><br/><br/>' +
|
||||
'<label>AMM IP: </label><input id="ammIp" type="text"></input>' +
|
||||
'</div>';
|
||||
|
||||
//append the blade div
|
||||
var bladeStr = '<div id="bladeNode" style="display:none;">' +
|
||||
'<label>Blade Name: </label><input id="bladeName" type="text"></input><br/><br/>' +
|
||||
'<label>Blade Group: </label><input id="bladeGroup" type="text"></input><br/><br/>' +
|
||||
'<label>Blade ID: </label><input id="bladeId" type="text"></input><br/><br/>' +
|
||||
'<label>Blade Series: </label><input type="radio" name="series" value="js"/>JS<input type="radio" name="series" value="ls"/>LS<br/><br/>' +
|
||||
'<label>Blade MPA: </label><select id="mpaSelect"></select>';
|
||||
nodeTypeSelectDia.append(mmStr);
|
||||
nodeTypeSelectDia.append(bladeStr);
|
||||
|
||||
nodeTypeSelectDia.find('#nodeTypeSelect').bind('change', function(){
|
||||
$('#nodeTypeSelectDia .ui-state-error').remove();
|
||||
$('#mmNode').toggle();
|
||||
$('#bladeNode').toggle();
|
||||
if ('mm' == $(this).val()){
|
||||
return;
|
||||
}
|
||||
|
||||
//get all mm nodes from the server side
|
||||
$('#bladeNode select').empty();
|
||||
$('#bladeNode').append(createLoader());
|
||||
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'lsdef',
|
||||
tgt : '',
|
||||
args : '-t;node;-w;mgt==blade;-w;id==0',
|
||||
msg : ''
|
||||
},
|
||||
success : function(data){
|
||||
var position = 0;
|
||||
var tempStr = '';
|
||||
var options = '';
|
||||
//remove the loading image
|
||||
$('#bladeNode img').remove();
|
||||
|
||||
//check return result
|
||||
if (1 > data.rsp.length){
|
||||
$('#nodeTypeSelectDia').prepend(createWarnBar('Please define MM node first!'));
|
||||
return;
|
||||
}
|
||||
|
||||
//add all mm nodes to select
|
||||
for (var i in data.rsp){
|
||||
tempStr = data.rsp[i];
|
||||
position = tempStr.indexOf(' ');
|
||||
tempStr = tempStr.substring(0, position);
|
||||
options += '<option value="' + tempStr + '">' + tempStr + '</option>';
|
||||
}
|
||||
|
||||
$('#bladeNode select').append(options);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
nodeTypeSelectDia.dialog( {
|
||||
modal : true,
|
||||
width : 400,
|
||||
title : 'Select Node Type',
|
||||
open : function(event, ui) {
|
||||
$(".ui-dialog-titlebar-close").hide();
|
||||
},
|
||||
buttons : {
|
||||
'Ok' : function() {
|
||||
//remove all error bar
|
||||
$('#nodeTypeSelectDia .ui-state-error').remove();
|
||||
|
||||
if ($('#nodeTypeSelect').attr('value') == "mm") {
|
||||
addMmNode();
|
||||
}
|
||||
else {
|
||||
addBladeNode();
|
||||
}
|
||||
},
|
||||
'Cancel' : function() {
|
||||
$(this).remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function addMmNode(){
|
||||
var name = $('#ammName').val();
|
||||
var ip = $('#ammIp').val();
|
||||
|
||||
if ((!name) || (!ip)){
|
||||
$('#nodeTypeSelectDia').prepend(createWarnBar("You are missing some inputs!"));
|
||||
return;
|
||||
}
|
||||
|
||||
//add the loader
|
||||
$('#nodeTypeSelectDia').prepend(createLoader());
|
||||
$('.ui-dialog-buttonpane .ui-button').attr('disabled', true);
|
||||
var argsTmp = '-t;node;-o;' + name +
|
||||
';id=0;nodetype=mm;groups=mm;mgt=blade;mpa=' + name + ';ip=' + ip;
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'chdef',
|
||||
tgt : '',
|
||||
args : argsTmp,
|
||||
msg : ''
|
||||
},
|
||||
success : function(data) {
|
||||
$('#nodeTypeSelectDia').find('img').remove();
|
||||
var messages = data.rsp;
|
||||
var notes = "";
|
||||
for ( var i = 0; i < messages.length; i++) {
|
||||
notes += messages[i];
|
||||
}
|
||||
var info = createInfoBar(notes);
|
||||
$('#nodeTypeSelectDia').prepend(info);
|
||||
$('#nodeTypeSelectDia').dialog("option", "buttons", {
|
||||
"close" : function() {
|
||||
$('#nodeTypeSelectDia').remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addBladeNode(){
|
||||
var name = $('#bladeName').val();
|
||||
var group = $('#bladeGroup').val();
|
||||
var id = $('#bladeId').val();
|
||||
var series = $("#bladeNode :checked").val();
|
||||
var mpa = $('#mpaSelect').val();
|
||||
|
||||
var argsTmp = '-t;node;-o;' + name + ';id=' + id +
|
||||
';nodetype=osi;groups=' + group + ';mgt=blade;mpa=' + mpa + ';serialflow=hard';
|
||||
if (series != 'js') {
|
||||
argsTmp += ';serialspeed=19200;serialport=1';
|
||||
}
|
||||
|
||||
if ((!name) || (!group) || (!id) || (!mpa)){
|
||||
$('#nodeTypeSelectDia').prepend(createWarnBar("You miss some inputs."));
|
||||
return;
|
||||
}
|
||||
|
||||
//add loader and disable buttons
|
||||
$('#nodeTypeSelectDia').prepend(createLoader());
|
||||
$('.ui-dialog-buttonpane .ui-button').attr('disabled', true);
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'chdef',
|
||||
tgt : '',
|
||||
args : argsTmp,
|
||||
msg : ''
|
||||
},
|
||||
success : function(data) {
|
||||
$('#nodeTypeSelectDia').find('img').remove();
|
||||
var messages = data.rsp;
|
||||
var notes = "";
|
||||
for ( var i = 0; i < messages.length; i++) {
|
||||
notes += messages[i];
|
||||
}
|
||||
|
||||
$('#nodeTypeSelectDia').prepend(createInfoBar(notes));
|
||||
$('#nodeTypeSelectDia').dialog("option", "buttons", {
|
||||
"close" : function() {
|
||||
$('#nodeTypeSelectDia').remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@@ -162,7 +162,7 @@ hmcPlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('loader').hide();
|
||||
statBar.append(loader);
|
||||
statBar.find('div').append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a node on System p.');
|
||||
@@ -463,7 +463,7 @@ function pProvisionExisting(data) {
|
||||
else if (cmd == 'nodeset') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
tempTab.find('#statBar').append(prg);
|
||||
tempTab.find('#statBar div').append(prg);
|
||||
|
||||
// If there was an error, do not continue
|
||||
if (prg.html().indexOf('Error') > -1) {
|
||||
@@ -495,7 +495,7 @@ function pProvisionExisting(data) {
|
||||
else if (cmd == 'rnetboot') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
tempTab.find('#statBar').append(prg);
|
||||
tempTab.find('#statBar div').append(prg);
|
||||
tempTab.find('#loader').remove();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ ipmiPlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('ipmiProvisionLoader' + inst).hide();
|
||||
statBar.append(loader);
|
||||
statBar.find('div').append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a node on iDataPlex.');
|
||||
@@ -201,5 +201,97 @@ ipmiPlugin.prototype.loadResources = function() {
|
||||
* @return Nothing
|
||||
*/
|
||||
ipmiPlugin.prototype.addNode = function() {
|
||||
openDialog('info', 'Under construction');
|
||||
};
|
||||
var diaDiv = $('<div id="addIdpDiv" class="form" title="Add iDataPlex Node"></div>');
|
||||
var showStr = '<div><label>Node Name: </label><input type="text"></div>' +
|
||||
'<div><label>Node MAC:</label><input type="text"></div>' +
|
||||
'<div><label>Node IP: </label><input type="text"></div>' +
|
||||
'<div><label>Node Groups : </label><input type="text"></div>' +
|
||||
'<div><label>BMC Name:</label><input type="text"></div>' +
|
||||
'<div><label>BMC IP:</label><input type="text"></div>' +
|
||||
'<div><label>BMC Groups:</label><input type="text"></div>';
|
||||
|
||||
diaDiv.append(showStr);
|
||||
diaDiv.dialog({
|
||||
modal: true,
|
||||
width: 400,
|
||||
close: function(){$(this).remove();},
|
||||
buttons: {
|
||||
"OK" : function(){addidataplexNode();},
|
||||
"Cancel": function(){$(this).dialog('close');}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function addidataplexNode(){
|
||||
var tempArray = new Array();
|
||||
var errormessage = '';
|
||||
var attr = '';
|
||||
var args = '';
|
||||
|
||||
//remove the warning bar
|
||||
$('#addIdpDiv .ui-state-error').remove();
|
||||
|
||||
//get all inputs' value
|
||||
$('#addIdpDiv input').each(function(){
|
||||
attr = $(this).val();
|
||||
if (attr){
|
||||
tempArray.push($(this).val());
|
||||
}
|
||||
else{
|
||||
errormessage = "You are missing some input!";
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if ('' != errormessage){
|
||||
$('#addIdpDiv').prepend(createWarnBar(errormessage));
|
||||
return;
|
||||
}
|
||||
|
||||
//add the loader
|
||||
$('#addIdpDiv').append(createLoader());
|
||||
|
||||
//change the dialog button
|
||||
$('#addIdpDiv').dialog('option', 'buttons', {'Close':function(){$('#addIdpDiv').dialog('close');}});
|
||||
|
||||
//compose all args into chdef for node
|
||||
args = '-t;node;-o;' + tempArray[0] + ';mac=' + tempArray[1] + ';ip=' + tempArray[2] + ';groups=' +
|
||||
tempArray[3] + ';mgt=ipmi;chain="runcmd=bmcsetup";netboot=xnba;nodetype=osi;profile=compute;' +
|
||||
'bmc=' + tempArray[4];
|
||||
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'chdef',
|
||||
tgt : '',
|
||||
args : args,
|
||||
msg : ''
|
||||
}
|
||||
});
|
||||
|
||||
//compose all args into chdef for bmc
|
||||
args = '-t;node;-o;' + tempArray[4] + ';ip=' + tempArray[5] + ';groups=' + tempArray[6];
|
||||
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'chdef',
|
||||
tgt : '',
|
||||
args : args,
|
||||
msg : ''
|
||||
},
|
||||
success: function(data){
|
||||
$('#addIdpDiv img').remove();
|
||||
var message = '';
|
||||
for (var i in data.rsp){
|
||||
message += data.rsp[i];
|
||||
}
|
||||
|
||||
if ('' != message){
|
||||
$('#addIdpDiv').prepend(createInfoBar(message));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -263,7 +263,7 @@ zvmPlugin.prototype.loadClonePage = function(node) {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('');
|
||||
$('#' + statBarId).append(loader);
|
||||
$('#' + statBarId).find('div').append(loader);
|
||||
$('#' + statBarId).show();
|
||||
|
||||
// Disable clone button
|
||||
@@ -309,7 +309,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
|
||||
// Add loader to status bar and hide it
|
||||
var loader = createLoader(node + 'StatusBarLoader').hide();
|
||||
statBar.append(loader);
|
||||
statBar.find('div').append(loader);
|
||||
statBar.hide();
|
||||
|
||||
// Create array of property keys
|
||||
@@ -841,7 +841,7 @@ zvmPlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('zProvisionLoader' + inst).hide();
|
||||
statBar.append(loader);
|
||||
statBar.find('div').append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a node on System z.');
|
||||
|
||||
@@ -364,9 +364,9 @@ function updateZProvisionNewStatus(data) {
|
||||
// If there was an error, do not continue
|
||||
if (rsp.length) {
|
||||
$('#' + loaderId).hide();
|
||||
$('#' + statBarId).append('<p>(Error) Failed to create node definition</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>(Error) Failed to create node definition</pre>');
|
||||
} else {
|
||||
$('#' + statBarId).append('<p>Node definition created for ' + node + '</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>Node definition created for ' + node + '</pre>');
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
@@ -389,9 +389,9 @@ function updateZProvisionNewStatus(data) {
|
||||
// If there was an error, do not continue
|
||||
if (rsp.length) {
|
||||
$('#' + loaderId).hide();
|
||||
$('#' + statBarId).append('<p>(Error) Failed to update /etc/hosts</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>(Error) Failed to update /etc/hosts</pre>');
|
||||
} else {
|
||||
$('#' + statBarId).append('<p>/etc/hosts updated</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>/etc/hosts updated</pre>');
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
@@ -416,7 +416,7 @@ function updateZProvisionNewStatus(data) {
|
||||
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// Get user entry
|
||||
var userEntry = $('#' + tabId + ' textarea').val();
|
||||
@@ -443,14 +443,14 @@ function updateZProvisionNewStatus(data) {
|
||||
else if (cmd == 'mkvm') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// If there was an error, do not continue
|
||||
if (prg.html().indexOf('Error') > -1) {
|
||||
// Try again
|
||||
var tries = parseInt($.cookie('tries4' + tabId));
|
||||
if (tries < 2) {
|
||||
$('#' + statBarId).append('<p>Trying again...</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>Trying again...</pre>');
|
||||
tries = tries + 1;
|
||||
|
||||
// One more try
|
||||
@@ -532,7 +532,7 @@ function updateZProvisionNewStatus(data) {
|
||||
else if (cmd == 'chvm') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// If there was an error, do not continue
|
||||
if (prg.html().indexOf('Error') > -1) {
|
||||
@@ -541,7 +541,7 @@ function updateZProvisionNewStatus(data) {
|
||||
// Try again
|
||||
var tries = parseInt($.cookie('tries4' + tabId));
|
||||
if (tries < 2) {
|
||||
$('#' + statBarId).append('<p>Trying again...</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>Trying again...</pre>');
|
||||
tries = tries + 1;
|
||||
|
||||
// One more try
|
||||
@@ -647,9 +647,9 @@ function updateZProvisionNewStatus(data) {
|
||||
// If there was an error, do not continue
|
||||
if (rsp.length) {
|
||||
$('#' + loaderId).hide();
|
||||
$('#' + statBarId).append('<p>(Error) Failed to set operating system</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>(Error) Failed to set operating system</pre>');
|
||||
} else {
|
||||
$('#' + statBarId).append('<p>Operating system for ' + node + ' set</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>Operating system for ' + node + ' set</pre>');
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
@@ -671,7 +671,7 @@ function updateZProvisionNewStatus(data) {
|
||||
else if (cmd == 'makedhcp') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// Prepare node for boot
|
||||
$.ajax( {
|
||||
@@ -694,7 +694,7 @@ function updateZProvisionNewStatus(data) {
|
||||
else if (cmd == 'nodeset') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// If there was an error
|
||||
// Do not continue
|
||||
@@ -722,9 +722,9 @@ function updateZProvisionNewStatus(data) {
|
||||
else if (cmd == 'rnetboot') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
if (prg.html().indexOf('Error') < 0) {
|
||||
$('#' + statBarId).append('<p>Open a VNC viewer to see the installation progress. It might take a couple of minutes before you can connect.</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>Open a VNC viewer to see the installation progress. It might take a couple of minutes before you can connect.</pre>');
|
||||
}
|
||||
|
||||
// Hide loader
|
||||
@@ -785,7 +785,7 @@ function updateZProvisionExistingStatus(data) {
|
||||
else if (cmd == 'nodeset') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// If there was an error, do not continue
|
||||
if (prg.html().indexOf('Error') > -1) {
|
||||
@@ -819,7 +819,7 @@ function updateZProvisionExistingStatus(data) {
|
||||
else if (cmd == 'rnetboot') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
var loaderId = 'zProvisionLoader' + inst;
|
||||
$('#' + loaderId).remove();
|
||||
@@ -853,7 +853,7 @@ function updateZNodeStatus(data) {
|
||||
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '[A-Za-z0-9._-]+:');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -883,9 +883,9 @@ function updateZCloneStatus(data) {
|
||||
// If there was an error, do not continue
|
||||
if (rsp.length) {
|
||||
$('#' + out2Id).find('img').hide();
|
||||
$('#' + out2Id).append('<p>(Error) Failed to create node definition</p>');
|
||||
$('#' + out2Id).find('div').append('<pre>(Error) Failed to create node definition</pre>');
|
||||
} else {
|
||||
$('#' + out2Id).append('<p>Node definition created for ' + node + '</p>');
|
||||
$('#' + out2Id).find('div').append('<pre>Node definition created for ' + node + '</pre>');
|
||||
|
||||
// If last node definition was created
|
||||
var tmp = inst.split('/');
|
||||
@@ -913,9 +913,9 @@ function updateZCloneStatus(data) {
|
||||
// If there was an error, do not continue
|
||||
if (rsp.length) {
|
||||
$('#' + out2Id).find('img').hide();
|
||||
$('#' + out2Id).append('<p>(Error) Failed to update /etc/hosts</p>');
|
||||
$('#' + out2Id).find('div').append('<pre>(Error) Failed to update /etc/hosts</pre>');
|
||||
} else {
|
||||
$('#' + out2Id).append('<p>/etc/hosts updated</p>');
|
||||
$('#' + out2Id).find('div').append('<pre>/etc/hosts updated</pre>');
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
@@ -937,7 +937,7 @@ function updateZCloneStatus(data) {
|
||||
else if (cmd == 'makedns') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + out2Id).append(prg);
|
||||
$('#' + out2Id).find('div').append(prg);
|
||||
|
||||
// Get clone tab
|
||||
var tabId = out2Id.replace('CloneStatusBar', 'CloneTab');
|
||||
@@ -997,7 +997,7 @@ function updateZCloneStatus(data) {
|
||||
else if (cmd == 'mkvm') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + out2Id).append(prg);
|
||||
$('#' + out2Id).find('div').append(prg);
|
||||
|
||||
// Hide loader
|
||||
$('#' + out2Id).find('img').hide();
|
||||
|
||||
+128
-861
File diff suppressed because it is too large
Load Diff
+344
-479
File diff suppressed because it is too large
Load Diff
@@ -74,12 +74,9 @@ function loadXcatMonSetting(data){
|
||||
|
||||
//create contariner for new contents use for update the monsetting table
|
||||
var newCont =new Object();
|
||||
newCont[0]=rsp[0].split(","); // table header
|
||||
// create container for other monsetting lines not xcatmon
|
||||
newCont[0]=rsp[0].split(","); //table header
|
||||
//create container for other monsetting lines not xcatmon
|
||||
var otherCont =new Array();
|
||||
|
||||
|
||||
|
||||
|
||||
$('#xcatmonTable').append(XcatmonTable.object()); //add table object
|
||||
var m=1; //the count for origCont
|
||||
@@ -108,7 +105,8 @@ function loadXcatMonSetting(data){
|
||||
|
||||
cols.push('<input type="checkbox" name="'+cols[0]+'" title="Click this checkbox will add/remove the app from the configure apps value." />');
|
||||
cols.unshift('<span class="ui-icon ui-icon-close" onclick="deleteRow1(this)"></span>');
|
||||
//add teh column tho the table.
|
||||
|
||||
//add the column tho the table
|
||||
XcatmonTable.add(cols);
|
||||
|
||||
origCont[m++]=cols;
|
||||
@@ -130,6 +128,7 @@ function loadXcatMonSetting(data){
|
||||
apps_flag=1; //set the flag to 1 to avoid this subroute
|
||||
}
|
||||
}
|
||||
|
||||
//get into the ping setting subroute
|
||||
if (!ping_flag){
|
||||
//check the ping-interval config
|
||||
@@ -368,8 +367,6 @@ function loadXcatMonSetting(data){
|
||||
//delete the last "," of the apps value
|
||||
appValue=appValue.substring(0,(appValue.length-1));
|
||||
apps[2]=appValue;
|
||||
|
||||
// tmp =apps;
|
||||
|
||||
//newCont add the apps row
|
||||
newCont[count++]=apps;
|
||||
|
||||
@@ -33,6 +33,6 @@ var hardwareInfo = {
|
||||
'9117-MMB' : [ 'P7-770', '4' ],
|
||||
'9119-FHB' : [ 'P7-795', '42' ],
|
||||
'9179-MHB' : [ 'P7-780', '42' ],
|
||||
'9125-F2C' : [ 'P7-IH', '2'], //fsp
|
||||
'78AC-100' : [ 'P7-IH', '2'] //fsp
|
||||
'9125-F2C' : [ 'Power 775', '2'],
|
||||
'78AC-100' : [ 'Power 775', '2'] //fsp
|
||||
};
|
||||
+871
-477
File diff suppressed because it is too large
Load Diff
@@ -42,10 +42,10 @@ function loadNodesetPage(tgtNodes) {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('nodesetLoader');
|
||||
statBar.append(loader);
|
||||
statBar.find('div').append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Set the boot state for a node range.');
|
||||
var infoBar = createInfoBar('Set the boot state for a node range');
|
||||
nodesetForm.append(infoBar);
|
||||
|
||||
// Create target node or group
|
||||
@@ -249,7 +249,7 @@ function updateNodesetStatus(data) {
|
||||
if (cmd == 'nodeadd') {
|
||||
if (rsp.length) {
|
||||
$('#' + statBarId).find('img').hide();
|
||||
$('#' + statBarId).append('<p>(Error) Failed to create node definition</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>(Error) Failed to create node definition</pre>');
|
||||
} else {
|
||||
// Create target nodes string
|
||||
var tgtNodesStr = '';
|
||||
@@ -277,7 +277,7 @@ function updateNodesetStatus(data) {
|
||||
}
|
||||
}
|
||||
|
||||
$('#' + statBarId).append('<p>Node definition created for ' + tgtNodesStr + '</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>Node definition created for ' + tgtNodesStr + '</pre>');
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
@@ -299,9 +299,9 @@ function updateNodesetStatus(data) {
|
||||
else if (cmd == 'makehosts') {
|
||||
// If no output, no errors occurred
|
||||
if (rsp.length) {
|
||||
$('#' + statBarId).append('<p>(Error) Failed to update /etc/hosts</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>(Error) Failed to update /etc/hosts</pre>');
|
||||
} else {
|
||||
$('#' + statBarId).append('<p>/etc/hosts updated</p>');
|
||||
$('#' + statBarId).find('div').append('<pre>/etc/hosts updated</pre>');
|
||||
}
|
||||
|
||||
// Update DNS
|
||||
@@ -325,7 +325,7 @@ function updateNodesetStatus(data) {
|
||||
else if (cmd == 'makedns') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// Update DHCP
|
||||
$.ajax( {
|
||||
@@ -348,7 +348,7 @@ function updateNodesetStatus(data) {
|
||||
else if (cmd == 'makedhcp') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// Prepare node for boot
|
||||
$.ajax( {
|
||||
@@ -371,7 +371,7 @@ function updateNodesetStatus(data) {
|
||||
else if (cmd == 'nodeset') {
|
||||
// Write ajax response to status bar
|
||||
var prg = writeRsp(rsp, '');
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// Hide loader
|
||||
$('#' + statBarId).find('img').hide();
|
||||
|
||||
@@ -89,6 +89,11 @@ function extractGraphicalData(data){
|
||||
graphicalNodeList[nodeName] = new Object();
|
||||
}
|
||||
|
||||
if('' == nodeName){
|
||||
tempNullNodes = 'all,';
|
||||
break;
|
||||
}
|
||||
|
||||
switch (data.msg.substr(5, 1)){
|
||||
case '0':
|
||||
case '1':{
|
||||
@@ -122,10 +127,6 @@ function extractGraphicalData(data){
|
||||
}
|
||||
|
||||
function createPhysicalLayout(nodeList){
|
||||
bpaList = new Object();
|
||||
fspList = new Object();
|
||||
lparList = new Object();
|
||||
selectNode = new Object();
|
||||
var flag = false;
|
||||
|
||||
//no nodes are selected.
|
||||
@@ -154,6 +155,10 @@ function createPhysicalLayout(nodeList){
|
||||
//there is not graphical data, get the info now
|
||||
if (!flag){
|
||||
graphicalNodeList = new Object();
|
||||
bpaList = new Object();
|
||||
fspList = new Object();
|
||||
lparList = new Object();
|
||||
selectNode = new Object();
|
||||
initGraphicalData(0);
|
||||
}
|
||||
else{
|
||||
@@ -224,6 +229,7 @@ function fillList(nodeName){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* create the physical graphical layout
|
||||
*
|
||||
@@ -243,10 +249,13 @@ function createGraphical(bpa, fsp, area){
|
||||
row = $('<tr></tr>');
|
||||
graphTable.append(row);
|
||||
}
|
||||
|
||||
elementNum ++;
|
||||
|
||||
var td = $('<td style="padding:0;border-color: transparent;"></td>');
|
||||
var frameDiv = $('<div class="frameDiv"></div>');
|
||||
frameDiv.append('<div style="height:27px;" title="' + bpaName + '"><input type="checkbox" class="fspcheckbox" name="check_'+ bpaName +'"></div>');
|
||||
|
||||
//for P7-IH, all the cecs are insert into the frame from down to up, so we had to show the cecs same as the
|
||||
//physical layout.
|
||||
var tempBlankDiv = $('<div></div>');
|
||||
@@ -264,6 +273,7 @@ function createGraphical(bpa, fsp, area){
|
||||
|
||||
tempHeight += coculateBlank(fsp[fspName]['mtm']);
|
||||
}
|
||||
|
||||
//now the tempHeight are all cecs' height, so we should minus bpa div height and cecs' div height
|
||||
tempHeight = 428 - tempHeight;
|
||||
tempBlankDiv.css('height', tempHeight);
|
||||
@@ -350,7 +360,8 @@ function createGraphical(bpa, fsp, area){
|
||||
position: "center right",
|
||||
relative : true,
|
||||
offset : [10, -40],
|
||||
effect: "fade"
|
||||
effect: "fade",
|
||||
opacity: 0.9
|
||||
});
|
||||
|
||||
$('.tooltip a').bind('click', function(){
|
||||
@@ -412,7 +423,6 @@ function updateSelectNodeDiv(){
|
||||
$('#selectNodeDiv').empty();
|
||||
|
||||
//add buttons
|
||||
|
||||
$('#selectNodeDiv').append('Nodes: ');
|
||||
for(var lparName in selectNode){
|
||||
$('#selectNodeDiv').append(lparName + ' ');
|
||||
@@ -593,7 +603,7 @@ function createActionMenu(){
|
||||
* create an action menu
|
||||
*/
|
||||
var actionsDIV = $('<div></div>');
|
||||
var actions = [ [ powerLnk, powerActionMenu ], cloneLnk, deleteLnk, unlockLnk, [ advancedLnk, advancedActionMenu ] ];
|
||||
var actions = [ [ powerLnk, powerActionMenu ], deleteLnk, unlockLnk, [ advancedLnk, advancedActionMenu ] ];
|
||||
var actionMenu = createMenu(actions);
|
||||
actionMenu.superfish();
|
||||
actionsDIV.append(actionMenu);
|
||||
@@ -665,6 +675,7 @@ function createFspTip(fspName, mtm, fsp){
|
||||
else{
|
||||
temp = mtm;
|
||||
}
|
||||
|
||||
if (hardwareInfo[temp]){
|
||||
tip.append('<h3>' + fspName + '(' + hardwareInfo[temp][0] + ')</h3><br/>');
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ function loadNetbootPage(tgtNodes) {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('netbootLoader');
|
||||
statusBar.append(loader);
|
||||
statusBar.find('div').append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Cause the range of nodes to boot to network');
|
||||
|
||||
@@ -53,7 +53,7 @@ function loadUpdatenodePage(tgtNodes) {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('updatenodeLoader');
|
||||
statusBar.append(loader);
|
||||
statusBar.find('div').append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Update nodes in an xCAT environment');
|
||||
|
||||
+54
-226
@@ -43,8 +43,6 @@ function loadImages(data) {
|
||||
// Image attributes
|
||||
var headers = new Object();
|
||||
|
||||
// Clear cookie containing list of images where their attributes need to be updated
|
||||
$.cookie('images2update', '');
|
||||
// Clear hash table containing image attributes
|
||||
origAttrs = '';
|
||||
|
||||
@@ -118,12 +116,9 @@ function loadImages(data) {
|
||||
$('#imagesTab').children().remove();
|
||||
|
||||
// Create info bar for images tab
|
||||
var info = createInfoBar('Click on a cell to edit. Click outside the table to write to the cell. Hit the Escape key to ignore changes. Once you are satisfied with how the table looks, click on Save.');
|
||||
var info = createInfoBar('Click on a cell to edit. Click outside the table to save changes. Hit the Escape key to ignore changes.');
|
||||
$('#imagesTab').append(info);
|
||||
|
||||
// Create action bar
|
||||
var actionBar = $('<div class="actionBar"></div>');
|
||||
|
||||
/**
|
||||
* The following actions are available for images:
|
||||
* copy Linux distribution and edit image properties
|
||||
@@ -149,28 +144,7 @@ function loadImages(data) {
|
||||
loadEditImagePage(tgtImages[i]);
|
||||
}
|
||||
});
|
||||
|
||||
// Create save button
|
||||
var saveBtn = createButton('Save');
|
||||
// Do not show button until table is edited
|
||||
saveBtn.css({
|
||||
'display': 'inline',
|
||||
'margin-left': '550px'
|
||||
}).hide();
|
||||
saveBtn.bind('click', function(event){
|
||||
updateImageAttrs();
|
||||
});
|
||||
|
||||
// Create undo button
|
||||
var undoBtn = createButton('Undo');
|
||||
// Do not show button until table is edited
|
||||
undoBtn.css({
|
||||
'display': 'inline'
|
||||
}).hide();
|
||||
undoBtn.bind('click', function(event){
|
||||
restoreImageAttrs();
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Create an action bar
|
||||
*/
|
||||
@@ -178,8 +152,6 @@ function loadImages(data) {
|
||||
actionsBar.append(copyLinuxBtn);
|
||||
actionsBar.append(newBtn);
|
||||
actionsBar.append(editBtn);
|
||||
actionsBar.append(saveBtn);
|
||||
actionsBar.append(undoBtn);
|
||||
$('#imagesTab').append(actionsBar);
|
||||
|
||||
// Insert table
|
||||
@@ -203,9 +175,6 @@ function loadImages(data) {
|
||||
// Do not make 1st, 2nd, 3rd, 4th, or 5th column editable
|
||||
$('#imagesDataTable td:not(td:nth-child(1),td:nth-child(2))').editable(
|
||||
function(value, settings) {
|
||||
// Change text color to red
|
||||
$(this).css('color', 'red');
|
||||
|
||||
// Get column index
|
||||
var colPos = this.cellIndex;
|
||||
|
||||
@@ -218,15 +187,32 @@ function loadImages(data) {
|
||||
|
||||
// Get image name
|
||||
var image = $(this).parent().find('td:eq(1)').text();
|
||||
|
||||
// Flag image to update
|
||||
flagImage2Update(image);
|
||||
|
||||
// Show table menu actions
|
||||
saveBtn.show();
|
||||
undoBtn.show();
|
||||
|
||||
// Get table headers
|
||||
var headers = $('#imagesDataTable thead tr th');
|
||||
|
||||
return (value);
|
||||
// Get attribute name
|
||||
var attrName = jQuery.trim(headers.eq(colPos).text());
|
||||
// Get column value
|
||||
var value = $(this).text();
|
||||
// Build argument
|
||||
var args = attrName + '=' + value;
|
||||
|
||||
// Send command to change image attributes
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'chdef',
|
||||
tgt : '',
|
||||
args : '-t;osimage;-o;' + image + ';' + args,
|
||||
msg : 'out=imagesTab;tgt=' + image
|
||||
},
|
||||
|
||||
success: showChdefOutput
|
||||
});
|
||||
|
||||
return value;
|
||||
}, {
|
||||
onblur : 'submit', // Clicking outside editable area submits changes
|
||||
type : 'textarea', // Input type to use
|
||||
@@ -249,145 +235,6 @@ function loadImages(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Flag the image in the table to update
|
||||
*
|
||||
* @param image
|
||||
* The image name
|
||||
* @return Nothing
|
||||
*/
|
||||
function flagImage2Update(image) {
|
||||
// Get list containing current images to update
|
||||
var images = $.cookie('images2update');
|
||||
|
||||
// If the node is not in the list
|
||||
if (images.indexOf(image) == -1) {
|
||||
// Add the new node to list
|
||||
images += image + ';';
|
||||
$.cookie('images2update', images);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the image attributes
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
function updateImageAttrs() {
|
||||
// Get the nodes datatable
|
||||
var dTable = $('#imagesDataTable').dataTable();
|
||||
// Get all nodes within the datatable
|
||||
var rows = dTable.fnGetNodes();
|
||||
|
||||
// Get table headers
|
||||
var headers = $('#imagesDataTable thead tr th');
|
||||
|
||||
// Get list of nodes to update
|
||||
var imagesList = $.cookie('images2update');
|
||||
var images = imagesList.split(';');
|
||||
|
||||
// Create the arguments
|
||||
var args;
|
||||
var rowPos, colPos, value;
|
||||
var attrName;
|
||||
// Go through each node where an attribute was changed
|
||||
for (var i in images) {
|
||||
if (images[i]) {
|
||||
args = '';
|
||||
|
||||
// Get the row containing the image name
|
||||
rowPos = findRow(images[i], '#imagesDataTable', 1);
|
||||
$(rows[rowPos]).find('td').each(function (){
|
||||
if ($(this).css('color') == 'red') {
|
||||
// Change color back to normal
|
||||
$(this).css('color', '');
|
||||
|
||||
// Get column position
|
||||
colPos = $(this).parent().children().index($(this));
|
||||
// Get column value
|
||||
value = $(this).text();
|
||||
|
||||
// Get attribute name
|
||||
attrName = jQuery.trim(headers.eq(colPos).text());
|
||||
|
||||
// Build argument string
|
||||
if (args) {
|
||||
// Handle subsequent arguments
|
||||
args += ';' + attrName + '=' + value;
|
||||
} else {
|
||||
// Handle the 1st argument
|
||||
args += attrName + '=' + value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Send command to change image attributes
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'chdef',
|
||||
tgt : '',
|
||||
args : '-t;osimage;-o;' + images[i] + ';' + args,
|
||||
msg : 'out=imagesTab;tgt=' + images[i]
|
||||
},
|
||||
|
||||
success: showChdefOutput
|
||||
});
|
||||
} // End of if
|
||||
} // End of for
|
||||
|
||||
// Clear cookie containing list of images where their attributes need to be updated
|
||||
$.cookie('images2update', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore image attributes to their original content
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
function restoreImageAttrs() {
|
||||
// Get list of images to restore
|
||||
var imagesList = $.cookie('images2update');
|
||||
var images = imagesList.split(';');
|
||||
|
||||
// Get the image datatable
|
||||
var dTable = $('#imagesDataTable').dataTable();
|
||||
// Get table headers
|
||||
var headers = $('#imagesDataTable thead tr th');
|
||||
// Get all nodes within the datatable
|
||||
var rows = dTable.fnGetNodes();
|
||||
|
||||
// Go through each node where an attribute was changed
|
||||
var rowPos, colPos;
|
||||
var attrName, origVal;
|
||||
for (var i in images) {
|
||||
if (images[i]) {
|
||||
// Get the row containing the image name
|
||||
rowPos = findRow(images[i], '#imagesDataTable', 1);
|
||||
$(rows[rowPos]).find('td').each(function (){
|
||||
if ($(this).css('color') == 'red') {
|
||||
// Change color back to normal
|
||||
$(this).css('color', '');
|
||||
|
||||
// Get column position
|
||||
colPos = $(this).parent().children().index($(this));
|
||||
// Get attribute name
|
||||
attrName = jQuery.trim(headers.eq(colPos).text());
|
||||
// Get original content
|
||||
origVal = origAttrs[images[i]][attrName];
|
||||
|
||||
// Update column
|
||||
dTable.fnUpdate(origVal, rowPos, colPos);
|
||||
}
|
||||
});
|
||||
} // End of if
|
||||
} // End of for
|
||||
|
||||
// Clear cookie containing list of images where their attributes need to be updated
|
||||
$.cookie('images2update', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set definable image attributes
|
||||
*
|
||||
@@ -414,12 +261,13 @@ function setImageDefAttrs(data) {
|
||||
// Get attribute name and description
|
||||
key = jQuery.trim(attr.substring(0, attr.indexOf(':')));
|
||||
descr = jQuery.trim(attr.substring(attr.indexOf(':') + 1));
|
||||
|
||||
descr = descr.replace(new RegExp('<', 'g'), '[').replace(new RegExp('>', 'g'), ']');
|
||||
|
||||
// Set hash table where key = attribute name and value = description
|
||||
defAttrs[key] = descr;
|
||||
} else {
|
||||
// Append description to hash table
|
||||
defAttrs[key] = defAttrs[key] + '\n' + attr;
|
||||
defAttrs[key] = defAttrs[key] + '\n' + attr.replace(new RegExp('<', 'g'), '[').replace(new RegExp('>', 'g'), ']');
|
||||
}
|
||||
} // End of if
|
||||
} // End of for
|
||||
@@ -444,6 +292,8 @@ function loadCreateImage() {
|
||||
var showStr = '';
|
||||
var imageOsvers = $.cookie("osvers").split(",");
|
||||
var imageArch = $.cookie("osarchs").split(",");
|
||||
var profileArray = $.cookie("profiles").split(",");
|
||||
var index = 0;
|
||||
|
||||
// Create set properties form
|
||||
var setPropsForm = $('<div class="form" ></div>');
|
||||
@@ -454,24 +304,28 @@ function loadCreateImage() {
|
||||
|
||||
// OS version selector
|
||||
showStr += '<p><label>OS Version:</label><select id="osvers" onchange="hpcShow()">';
|
||||
for ( var i = 0; i < imageOsvers.length; i++) {
|
||||
showStr += '<option value="' + imageOsvers[i] + '">' + imageOsvers[i] + '</option>';
|
||||
for ( index in imageOsvers) {
|
||||
showStr += '<option value="' + imageOsvers[index] + '">' + imageOsvers[index] + '</option>';
|
||||
}
|
||||
showStr += '</select></p>';
|
||||
|
||||
// OS arch selector
|
||||
showStr += '<p><label>OS Architecture:</label><select id="osarch" onchange="hpcShow()">';
|
||||
for ( var i = 0; i < imageArch.length; i++) {
|
||||
showStr += '<option value="' + imageArch[i] + '">' + imageArch[i] + '</option>';
|
||||
for ( index in imageArch) {
|
||||
showStr += '<option value="' + imageArch[index] + '">' + imageArch[index] + '</option>';
|
||||
}
|
||||
showStr += '</select></p>';
|
||||
|
||||
// Netboot interface input
|
||||
showStr += '<p><label>Net Boot Interface:</label><input type="text" id="netbootif"></p>';
|
||||
// Profile selector
|
||||
showStr += '<p><label>Profile:</label><select id="profile" onchange="hpcShow()">' + '<option value="compute">compute</option>' + '<option value="service">service</option></select></p>';
|
||||
showStr += '<p><label>Profile:</label><select id="profile" onchange="hpcShow()">';
|
||||
for( index in profileArray){
|
||||
showStr += '<option value="' + profileArray[index] + '">' + profileArray[index] + '</option>';
|
||||
}
|
||||
showStr += '</select></p>';
|
||||
// Boot method selector
|
||||
showStr += '<p><label>Boot Method:</label><select id="bootmethod">' + '<option value="stateless">stateless</option>' + '<option value="statelite">statelite</option></select></p>';
|
||||
showStr += '<p><label>Boot Method:</label><select id="bootmethod"><option value="stateless">stateless</option></select></p>';
|
||||
setPropsForm.append(showStr);
|
||||
createHpcSelect(setPropsForm);
|
||||
|
||||
@@ -483,39 +337,13 @@ function loadCreateImage() {
|
||||
// If they are valid, show the hpc stack select area.
|
||||
hpcShow();
|
||||
|
||||
$.ajax( {
|
||||
url : 'lib/systemcmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'lsb_release -d;uname -p'
|
||||
},
|
||||
success : function(data) {
|
||||
var tempArray = data.rsp.split("\n");
|
||||
var mnOs = tempArray[0];
|
||||
var mnArch = tempArray[1];
|
||||
tempArray = mnOs.split(" ");
|
||||
|
||||
// Get the the version of MN
|
||||
if (mnOs.indexOf("Red Hat") != -1) {
|
||||
mnOs = "rhels" + tempArray[6];
|
||||
}
|
||||
|
||||
$('#createImageTab option[value=' + mnOs + ']').attr('selected', 'selected');
|
||||
$('#createImageTab option[value=' + mnArch + ']').attr('selected', 'selected');
|
||||
|
||||
// The button used to create images is created here
|
||||
var createImageBtn = createButton("Create Image");
|
||||
createImageBtn.bind('click', function(event) {
|
||||
createImage();
|
||||
});
|
||||
|
||||
$('#createImageTab').append(createImageBtn);
|
||||
|
||||
// Check the option and decide to show the hpcsoft or not
|
||||
hpcShow();
|
||||
}
|
||||
});
|
||||
// The button used to create images is created here
|
||||
var createImageBtn = createButton("Create Image");
|
||||
createImageBtn.bind('click', function(event) {
|
||||
createImage();
|
||||
});
|
||||
|
||||
$('#createImageTab').append(createImageBtn);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -546,6 +374,7 @@ function createHpcSelect(container) {
|
||||
|
||||
container.append(hpcFieldset);
|
||||
}
|
||||
|
||||
var softwareList = {
|
||||
"rsct" : [ "rsct.core.utils", "rsct.core", "src" ],
|
||||
"pe" : [ "IBMJava2-142-ppc64-JRE", "ibm_lapi_ip_rh6p", "ibm_lapi_us_rh6p", "IBM_pe_license", "ibm_pe_rh6p", "ppe_pdb_ppc64_rh600", "sci_ppc_32bit_rh600", "sci_ppc_64bit_rh600", "vac.cmp",
|
||||
@@ -662,7 +491,6 @@ function rpmCopyCheck(data) {
|
||||
*/
|
||||
function genRpmCmd(softwareName) {
|
||||
var cmdString;
|
||||
var packageLength;
|
||||
cmdString = "rpm -q ";
|
||||
for (var i in softwareList[softwareName]) {
|
||||
cmdString += softwareList[softwareName][i] + " ";
|
||||
@@ -775,7 +603,7 @@ function loadEditImagePage(tgtImage) {
|
||||
setPropsForm.append(infoBar);
|
||||
|
||||
// Create an input for each definable attribute
|
||||
var div, label, input, descr, value;
|
||||
var div, label, input, value;
|
||||
// Set node attribute
|
||||
origAttrs[tgtImage]['imagename'] = tgtImage;
|
||||
for (var key in defAttrs) {
|
||||
@@ -1043,7 +871,7 @@ function loadCopyCdPage() {
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('');
|
||||
statBar.append(loader);
|
||||
statBar.find('div').append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Copy Linux distributions and service levels from CDs or DVDs to the install directory.');
|
||||
@@ -1154,13 +982,13 @@ function loadCopyCdPage() {
|
||||
var tabId = statBarId.replace('copyLinuxStatusBar', 'copyLinuxTab');
|
||||
|
||||
// Go through output and append to paragraph
|
||||
var prg = $('<p></p>');
|
||||
var prg = $('<pre></pre>');
|
||||
for (var i in out) {
|
||||
if (out[i].length > 6) {
|
||||
prg.append(out[i] + '<br>');
|
||||
prg.append(out[i] + '<br/>');
|
||||
}
|
||||
}
|
||||
$('#' + statBarId).append(prg);
|
||||
$('#' + statBarId).find('div').append(prg);
|
||||
|
||||
// Hide loader
|
||||
$('#' + statBarId).find('img').hide();
|
||||
|
||||
+69
-19
@@ -304,7 +304,38 @@ DataTable.prototype.add = function(rowCont) {
|
||||
* @return Status bar
|
||||
*/
|
||||
function createStatusBar(barId) {
|
||||
var statusBar = $('<div class="ui-state-highlight ui-corner-all" id="' + barId + '"></div>').css('padding', '10px');
|
||||
var statusBar = $('<div class="ui-state-highlight ui-corner-all" id="' + barId + '"></div>').css({
|
||||
'margin-bottom': '5px',
|
||||
'min-height': '30px'
|
||||
});
|
||||
|
||||
// Create info icon
|
||||
var icon = $('<span class="ui-icon ui-icon-circle-check"></span>').css({
|
||||
'display': 'inline-block',
|
||||
'margin': '10px 5px'
|
||||
});
|
||||
|
||||
// Create message section
|
||||
var msg = $('<div></div>').css({
|
||||
'display': 'inline-block',
|
||||
'margin': '10px 0px',
|
||||
'width': '90%'
|
||||
});
|
||||
|
||||
// Create hide button
|
||||
var hide = $('<span class="ui-icon ui-icon-minus"></span>').css({
|
||||
'display': 'inline-block',
|
||||
'float': 'right',
|
||||
'margin': '10px 5px',
|
||||
'cursor': 'pointer'
|
||||
}).click(function() {
|
||||
// Remove info box on-click
|
||||
$(this).parent().hide();
|
||||
});
|
||||
|
||||
statusBar.append(icon);
|
||||
statusBar.append(msg);
|
||||
statusBar.append(hide);
|
||||
return statusBar;
|
||||
}
|
||||
|
||||
@@ -409,7 +440,6 @@ function createMenu(items) {
|
||||
'border-left' : '1px solid #BDBDBD'
|
||||
});
|
||||
}
|
||||
|
||||
menu.append(item);
|
||||
}
|
||||
|
||||
@@ -431,10 +461,12 @@ function initPage() {
|
||||
includeJs("js/jquery/superfish.min.js");
|
||||
includeJs("js/jquery/hoverIntent.min.js");
|
||||
includeJs("js/jquery/jquery.jstree.min.js");
|
||||
includeJs("js/jquery/jquery.flot.min.js");
|
||||
includeJs("js/jquery/tooltip.min.js");
|
||||
includeJs("js/jquery/jquery.serverBrowser.min.js");
|
||||
|
||||
includeJs("js/jquery/jquery.jqplot.min.js");
|
||||
includeJs("js/jquery/jqplot.pieRenderer.min.js");
|
||||
includeJs("js/jquery/jqplot.dateAxisRenderer.min.js");
|
||||
|
||||
// Page plugins
|
||||
includeJs("js/configure/configure.js");
|
||||
includeJs("js/monitor/monitor.js");
|
||||
@@ -456,16 +488,7 @@ function initPage() {
|
||||
|
||||
// Show the page
|
||||
$("#content").children().remove();
|
||||
if (page == 'index.php') {
|
||||
includeJs("js/jquery/jquery.topzindex.min.js");
|
||||
includeJs("js/nodes/nodeset.js");
|
||||
includeJs("js/nodes/rnetboot.js");
|
||||
includeJs("js/nodes/updatenode.js");
|
||||
includeJs("js/nodes/physical.js");
|
||||
includeJs("js/nodes/mtm.js");
|
||||
headers.eq(0).css('background-color', '#A9D0F5');
|
||||
loadNodesPage();
|
||||
} else if (page == 'configure.php') {
|
||||
if (page == 'configure.php') {
|
||||
includeJs("js/configure/update.js");
|
||||
includeJs("js/configure/discover.js");
|
||||
headers.eq(1).css('background-color', '#A9D0F5');
|
||||
@@ -480,7 +503,18 @@ function initPage() {
|
||||
includeJs("js/monitor/gangliamon.js");
|
||||
headers.eq(3).css('background-color', '#A9D0F5');
|
||||
loadMonitorPage();
|
||||
} else if (page == 'guide.php') {
|
||||
includeJs("js/guide/guide.js");
|
||||
headers.eq(4).css('background-color', '#A9D0F5');
|
||||
loadGuidePage();
|
||||
} else {
|
||||
// Load nodes page by default
|
||||
includeJs("js/jquery/jquery.topzindex.min.js");
|
||||
includeJs("js/nodes/nodeset.js");
|
||||
includeJs("js/nodes/rnetboot.js");
|
||||
includeJs("js/nodes/updatenode.js");
|
||||
includeJs("js/nodes/physical.js");
|
||||
includeJs("js/nodes/mtm.js");
|
||||
headers.eq(0).css('background-color', '#A9D0F5');
|
||||
loadNodesPage();
|
||||
}
|
||||
@@ -520,17 +554,18 @@ function includeJs(file) {
|
||||
*/
|
||||
function writeRsp(rsp, pattern) {
|
||||
// Create paragraph to hold ajax response
|
||||
var prg = $('<p></p>');
|
||||
var prg = $('<pre></pre>');
|
||||
|
||||
for ( var i in rsp) {
|
||||
if (rsp[i]) {
|
||||
// Create regular expression for given pattern
|
||||
// Replace pattern with break
|
||||
if (pattern) {
|
||||
rsp[i] = rsp[i].replace(new RegExp(pattern, 'g'), '<br>');
|
||||
rsp[i] = rsp[i].replace(new RegExp(pattern, 'g'), '<br/>');
|
||||
prg.append(rsp[i]);
|
||||
} else {
|
||||
prg.append(rsp[i]);
|
||||
prg.append('<br>');
|
||||
prg.append('<br/>');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -582,19 +617,34 @@ function openDialog(type, msg) {
|
||||
*/
|
||||
function createIFrame(src) {
|
||||
// Put an iframe inside an info box
|
||||
var infoBar = $('<div class="ui-state-highlight ui-corner-all"></div>');
|
||||
var infoBar = $('<div class="ui-state-highlight ui-corner-all"></div>').css({
|
||||
'margin-bottom': '5px'
|
||||
});
|
||||
|
||||
// Create info and close icons
|
||||
var icon = $('<span class="ui-icon ui-icon-info"></span>').css({
|
||||
'display': 'inline-block',
|
||||
'margin': '10px 5px'
|
||||
});
|
||||
var close = $('<span class="ui-icon ui-icon-close"></span>').css({
|
||||
'display': 'inline-block',
|
||||
'float': 'right',
|
||||
'margin': '10px 5px'
|
||||
}).click(function() {
|
||||
// Remove info box on-click
|
||||
$(this).parent().remove();
|
||||
});
|
||||
|
||||
var iframe = $('<iframe></iframe>').attr('src', src).css({
|
||||
'display': 'inline-block',
|
||||
'border': '0px',
|
||||
'margin': '10px 0px',
|
||||
'width': '95%'
|
||||
'width': '90%'
|
||||
});
|
||||
|
||||
infoBar.append(icon);
|
||||
infoBar.append(iframe);
|
||||
infoBar.append(close);
|
||||
|
||||
return infoBar;
|
||||
}
|
||||
|
||||
+47
-25
@@ -2,28 +2,39 @@
|
||||
* Open login dialog
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$("#logdialog").dialog( {
|
||||
modal : true,
|
||||
closeOnEscape : false,
|
||||
closebutton : false,
|
||||
height : 300,
|
||||
width : 350,
|
||||
autoOpen : true,
|
||||
buttons : {
|
||||
"Log in" : authenticate
|
||||
},
|
||||
open : function(type, dialog) {
|
||||
if (document.location.protocol == "http:") {
|
||||
$("#logstatus").html("You are using an unencrypted session!");
|
||||
$("#logstatus").css("color", "#ff0000");
|
||||
}
|
||||
if ($("#username").val() == "") {
|
||||
$("#username").focus();
|
||||
} else {
|
||||
$("#password").focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#header').remove();
|
||||
$('#content').remove();
|
||||
|
||||
var winheight = document.body.clientHeight;
|
||||
var diaheight = $('#logdialog').css('height');
|
||||
diaheight = diaheight.substr(0, diaheight.length - 2);
|
||||
diaheight = Number(diaheight);
|
||||
|
||||
// the window's height is to small to show the dialog
|
||||
var tempheight = 0;
|
||||
if ((winheight - 50) < diaheight){
|
||||
tempheight = 0;
|
||||
} else {
|
||||
tempheight = parseInt((winheight - diaheight - 50) / 2);
|
||||
}
|
||||
|
||||
$('#logdialog').css('margin', tempheight + 'px auto');
|
||||
$('button').bind('click', function(){
|
||||
authenticate();
|
||||
});
|
||||
|
||||
$('button').button();
|
||||
|
||||
if (document.location.protocol == "http:") {
|
||||
$("#logstatus").html("You are using an unencrypted session!");
|
||||
$("#logstatus").css("color", "#ff0000");
|
||||
}
|
||||
|
||||
if ($("#username").val() == "") {
|
||||
$("#username").focus();
|
||||
} else {
|
||||
$("#password").focus();
|
||||
}
|
||||
|
||||
// When enter is hit while in username, advance to password
|
||||
$("#username").keydown(function(event) {
|
||||
@@ -54,10 +65,21 @@ function onlogin(data, txtStatus) {
|
||||
$("#password").val("");
|
||||
if (data.authenticated == "yes") {
|
||||
$("#logstatus").text("Login successful");
|
||||
$("#logdialog").dialog("close");
|
||||
|
||||
// Remembered what page they were trying to go to
|
||||
window.location = 'index.php';
|
||||
// Not the first time to log
|
||||
if ($.cookie('logonflag')){
|
||||
// Remembered what page they were trying to go to
|
||||
window.location = window.location.pathname;
|
||||
} else {
|
||||
window.location = 'guide.php';
|
||||
}
|
||||
|
||||
// Set the logonflag
|
||||
$.cookie('logonflag', 'yes', {
|
||||
path : '/xcat',
|
||||
expires : 100
|
||||
});
|
||||
|
||||
} else {
|
||||
$("#logstatus").text("Authentication failure");
|
||||
$("#logstatus").css("color", "#FF0000");
|
||||
|
||||
@@ -110,6 +110,7 @@ function submit_request($req, $skipVerify, $opts_array){
|
||||
} else {
|
||||
// Print out output by default
|
||||
echo $tmp . '<br/>';
|
||||
ob_flush();
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
+20
-13
@@ -12,13 +12,14 @@ function loadPage(){
|
||||
<head>
|
||||
<title>xCAT Console</title>
|
||||
<link rel="shortcut icon" href="images/favicon.ico">
|
||||
<link href="css/jquery-ui-1.8.7.custom.css" rel=stylesheet type="text/css">
|
||||
<link href="css/jquery-ui-1.8.12.start.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/jstree.css" rel=stylesheet type="text/css">
|
||||
<link href="css/jquery.jqplot.css" rel=stylesheet type="text/css">
|
||||
<link href="css/style.css" rel=stylesheet type="text/css">
|
||||
<script type="text/javascript" src="js/jquery/jquery-1.4.4.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.7.custom.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery-1.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.12.start.min.js"></script>
|
||||
<script type="text/javascript" src="js/ui.js"></script>
|
||||
</head>';
|
||||
|
||||
@@ -32,6 +33,7 @@ function loadPage(){
|
||||
<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>
|
||||
<li><a href="guide.php" class="top_link">Guide</a></li>
|
||||
</ul>';
|
||||
|
||||
// User name and log out section
|
||||
@@ -79,16 +81,21 @@ 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>
|
||||
<p>Give the user name and password for the xCAT management node</p>
|
||||
<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>
|
||||
'<script src="js/jquery/jquery.cookie.min.js" type="text/javascript"></script>
|
||||
<script src="js/xcatauth.js" type="text/javascript"></script>
|
||||
<div id="logdialog">
|
||||
<div id="loginput" class="ui-corner-all">
|
||||
<table>
|
||||
<tr><td colspan=5></td></tr>
|
||||
<tr><td align=right><img src="images/logo.png" width="50" height="35"></img></td><td colspan=4><p>eXtreme Cloud Administration Toolkit</p></td></tr>
|
||||
<tr><td colspan=5></td></tr>
|
||||
<tr><td></td><td><label for=username>Username:</label></td><td colspan=2><input id=username type=text name=username></td><td></td></tr>
|
||||
<tr><td></td><td><label for=password>Password:</label></td><td colspan=2><input id=password type=password name=password></td><td></td></tr>
|
||||
<tr><td></td><td></td><td></td><td align=right><button>Login</button></td><td></td></tr>
|
||||
<tr><td></td><td colspan=4><span id=logstatus></span></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="loginfo">Open Source. EPL License</div>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
+14
-15
@@ -126,6 +126,18 @@ set -x
|
||||
fi
|
||||
|
||||
if [ "$1" = 1 ] # Install
|
||||
then
|
||||
# Update apache conf
|
||||
/bin/rm -f /etc/$apachedaemon/conf.d/xcat-ui.conf
|
||||
/bin/ln -s %{prefix}/ui/etc/apache2/conf.d/xcat-ui.conf /etc/$apachedaemon/conf.d/xcat-ui.conf
|
||||
|
||||
# Automatically put encrypted password into the xCAT passwd database
|
||||
%{prefix}/sbin/chtab key=xcat,username=root passwd.password=`grep root /etc/shadow|cut -d : -f 2`
|
||||
|
||||
echo "To use xCAT-UI, point your browser to http://"`hostname -f`"/xcat"
|
||||
fi
|
||||
|
||||
if [ "$1" = 1 ] || [ "$1" = 2 ] # Install or upgrade
|
||||
then
|
||||
# Copy php.ini file into /opt/xcat/ui and turn off output_buffering
|
||||
if [ -e "/etc/redhat-release" ]; then
|
||||
@@ -134,21 +146,8 @@ set -x
|
||||
/bin/sed /etc/php5/apache2/php.ini -e 's/output_buffering = 4096/output_buffering = Off/g' > %{prefix}/ui/php.ini
|
||||
fi
|
||||
|
||||
# Update apache conf
|
||||
/bin/rm -f /etc/$apachedaemon/conf.d/xcat-ui.conf
|
||||
/bin/ln -s %{prefix}/ui/etc/apache2/conf.d/xcat-ui.conf /etc/$apachedaemon/conf.d/xcat-ui.conf
|
||||
/etc/init.d/$apachedaemon reload
|
||||
|
||||
# Automatically put encrypted password into the xCAT passwd database
|
||||
%{prefix}/sbin/chtab key=xcat,username=root passwd.password=`grep root /etc/shadow|cut -d : -f 2`
|
||||
|
||||
echo "To use xCAT-UI, point your browser to http://"`hostname -f`"/xcat"
|
||||
fi
|
||||
|
||||
if [ "$1" = 1 ] || [ "$1" = 2 ] # Install or upgrade
|
||||
then
|
||||
# Uncomment this if we change xcat-ui.conf again
|
||||
# /etc/init.d/$apachedaemon reload
|
||||
# Restart Apache Web Server
|
||||
/etc/init.d/$apachedaemon reload
|
||||
true
|
||||
fi
|
||||
%else # AIX
|
||||
|
||||
Reference in New Issue
Block a user