modified for darpa demo
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13331 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
fd39f52d46
commit
9f52269d85
@ -90,23 +90,33 @@ function createNextButton() {
|
||||
*/
|
||||
function createBackButton() {
|
||||
var tempFlag = true;
|
||||
var tempButton;
|
||||
if (0 == currentStep)
|
||||
return undefined;
|
||||
|
||||
var backButton = createButton('Back');
|
||||
backButton.bind('click', function() {
|
||||
if (nextFunctions[currentStep])
|
||||
tempFlag = nextFunctions[currentStep]('back');
|
||||
if ((steps.length - 1) == currentStep){
|
||||
tempButton = createButton('Complete');
|
||||
tempButton.bind('click', function() {
|
||||
window.location.href="index.php";
|
||||
});
|
||||
}
|
||||
else{
|
||||
var tempButton = createButton('Back');
|
||||
tempButton.bind('click', function() {
|
||||
if (nextFunctions[currentStep])
|
||||
tempFlag = nextFunctions[currentStep]('back');
|
||||
|
||||
if (!tempFlag)
|
||||
return;
|
||||
if (!tempFlag)
|
||||
return;
|
||||
|
||||
currentStep--;
|
||||
currentStep--;
|
||||
|
||||
initFunctions[currentStep]('back');
|
||||
});
|
||||
initFunctions[currentStep]('back');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return backButton;
|
||||
return tempButton;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -314,7 +324,7 @@ function initSelectPlatform() {
|
||||
selectPlatform.append(info);
|
||||
|
||||
var hwList = $('<ol>Platforms available:</ol>');
|
||||
hwList.append('<li><input type="radio" name="platform" id="idataplex"><label>iDataPlex</label></input></li>');
|
||||
hwList.append('<li><input type="radio" name="platform" disabled="true" id="idataplex"><label>iDataPlex</label></input></li>');
|
||||
hwList.append('<li><input type="radio" name="platform" disabled="true" id="blade"><span style="color:gray;"> BladeCenter</span></input></li>');
|
||||
hwList.append('<li><input type="radio" name="platform" id="ih"> System p hardware (P7 IH)</input></li>');
|
||||
hwList.append('<li><input type="radio" name="platform" id="nonih"> System p hardware (Non P7 IH)</input></li>');
|
||||
|
@ -22,7 +22,7 @@ var hmcPlugin = function() {
|
||||
hmcPlugin.prototype.getStep = function() {
|
||||
return [ 'Basic patterns', 'Supernode', 'More patterns',
|
||||
'Power on hardware', 'Discover frames', 'Management node',
|
||||
'Update definitions', 'Create LPARs' ];
|
||||
'Discover Rest of Hardware and Update Definitions', 'Create LPARs' ];
|
||||
};
|
||||
|
||||
hmcPlugin.prototype.getInitFunction = function() {
|
||||
@ -1276,7 +1276,6 @@ function createSetupFile() {
|
||||
fileContent += ' hostname-range = ' + getDiscoverEnv('cecName') + '\n';
|
||||
fileContent += ' delete-unused-cecs = 1\n';
|
||||
fileContent += ' supernode-list = /tmp/websupernode.txt\n';
|
||||
fileContent += ' delete-unused-cecs = 1 \n';
|
||||
|
||||
//Building Block
|
||||
fileContent += 'xcat-building-blocks:\n';
|
||||
@ -1289,6 +1288,8 @@ function createSetupFile() {
|
||||
+ '\n';
|
||||
fileContent += ' hostname-range = ' + getDiscoverEnv('lparName') + '\n';
|
||||
fileContent += ' starting-ip = ' + getDiscoverEnv('lparstartip') + '\n';
|
||||
fileContent += ' aliases = -hf0 \n';
|
||||
fileContent += ' otherinterfaces = -hf1:11.1.3.1,-hf2:12.1.3.1,-hf3:13.1.3.1,-hf4:14.1.3.1,-hf5:15.1.3.1,,-hf6:16.1.3.1,-hf7:17.1.3.1,-bond0:18.1.3.1 \n';
|
||||
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
@ -1359,11 +1360,19 @@ function powerInitUpdateDefinition(operType) {
|
||||
showStr += '<li id="frameLine1"><span class="ui-icon ' + iconClass
|
||||
+ '"></span>Update Frames into xCAT database.</li>';
|
||||
showStr += '<li id="frameLine2"><span class="ui-icon ' + iconClass
|
||||
+ '"></span>Set up Frame(DHCP, DNS, Hardware connection).</li>';
|
||||
+ '"></span>Set up Frame DHCP, DNS.</li>';
|
||||
showStr += '<li id="frameLine3"><span class="ui-icon ' + iconClass
|
||||
+ '"></span>Resetting networks on FRAME to get persistent IP.</li>';
|
||||
showStr += '<li id="frameLine4"><span class="ui-icon ' + iconClass
|
||||
+ '"></span>Creating hardware connection for FRAME.</li>';
|
||||
showStr += '<li id="cecLine"><span class="ui-icon ' + iconClass
|
||||
+ '"></span>Discover CECs and update into xCAT database.</li>';
|
||||
showStr += '<li id="cecLine2"><span class="ui-icon ' + iconClass
|
||||
+ '"></span>Set up CEC(DHCP, DNS, Hardware connection).</li>';
|
||||
+ '"></span>Set up CEC DHCP, DNS.</li>';
|
||||
showStr += '<li id="cecLine3"><span class="ui-icon ' + iconClass
|
||||
+ '"></span>Resetting networks on CEC to get persistent IP.</li>';
|
||||
showStr += '<li id="cecLine4"><span class="ui-icon ' + iconClass
|
||||
+ '"></span>Creating hardware connection for CEC.</li>';
|
||||
showStr += '</ul></div>';
|
||||
|
||||
$('#discoverContentDiv').append(showStr);
|
||||
@ -1490,7 +1499,7 @@ function lsslpWriteFrame() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 8: config the frame
|
||||
* Step 8: config the frame dhcp and dns
|
||||
*/
|
||||
function frameSetup() {
|
||||
$('#frameLine2').append(createLoader());
|
||||
@ -1502,14 +1511,67 @@ function frameSetup() {
|
||||
data : {
|
||||
cmd : 'webrun',
|
||||
tgt : '',
|
||||
args : 'framesetup;' + tempargs,
|
||||
args : 'framesetup;' + tempargs + ';1',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : function() {
|
||||
$('#frameLine2 img').remove();
|
||||
var tempSpan = $('#frameLine2').find('span');
|
||||
tempSpan.removeClass('ui-icon-gear');
|
||||
tempSpan.addClass('ui-icon-check');
|
||||
frameReset();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 8: reset the networks for frames
|
||||
*/
|
||||
function frameReset(){
|
||||
$('#frameLine3').append(createLoader());
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'rspconfig',
|
||||
tgt : 'frame',
|
||||
args : '--resetnet',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : function() {
|
||||
$('#frameLine3 img').remove();
|
||||
var tempSpan = $('#frameLine3').find('span');
|
||||
tempSpan.removeClass('ui-icon-gear');
|
||||
tempSpan.addClass('ui-icon-check');
|
||||
frameHwconn();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 8: create hardware connection for frames
|
||||
*/
|
||||
function frameHwconn(){
|
||||
$('#frameLine4').append(createLoader());
|
||||
var tempargs = getDiscoverEnv('adminpasswd') + ';' + getDiscoverEnv('generalpasswd') + ';'
|
||||
+ getDiscoverEnv('hmcpasswd');
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'webrun',
|
||||
tgt : '',
|
||||
args : 'framesetup;' + tempargs + ';2',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : function() {
|
||||
$('#frameLine4 img').remove();
|
||||
var tempSpan = $('#frameLine4').find('span');
|
||||
tempSpan.removeClass('ui-icon-gear');
|
||||
tempSpan.addClass('ui-icon-check');
|
||||
lsslpWriteCec();
|
||||
}
|
||||
});
|
||||
@ -1540,7 +1602,7 @@ function lsslpWriteCec() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 8: config the cec
|
||||
* Step 8: config the cec dhcp and dns
|
||||
*/
|
||||
function cecsetup(){
|
||||
$('#cecLine2').append(createLoader());
|
||||
@ -1552,7 +1614,7 @@ function cecsetup(){
|
||||
data : {
|
||||
cmd : 'webrun',
|
||||
tgt : '',
|
||||
args : 'cecsetup;' + tempargs,
|
||||
args : 'cecsetup;' + tempargs + ';1',
|
||||
msg : ''
|
||||
},
|
||||
success : function() {
|
||||
@ -1560,6 +1622,57 @@ function cecsetup(){
|
||||
var tempSpan = $('#cecLine2').find('span');
|
||||
tempSpan.removeClass('ui-icon-gear');
|
||||
tempSpan.addClass('ui-icon-check');
|
||||
cecReset();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 8: reset the networks for cecs
|
||||
*/
|
||||
function cecReset(){
|
||||
$('#cecLine3').append(createLoader());
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'rspconfig',
|
||||
tgt : 'cec',
|
||||
args : '--resetnet',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : function() {
|
||||
$('#cecLine3 img').remove();
|
||||
var tempSpan = $('#cecLine3').find('span');
|
||||
tempSpan.removeClass('ui-icon-gear');
|
||||
tempSpan.addClass('ui-icon-check');
|
||||
cecHwconn();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 8: config the cec
|
||||
*/
|
||||
function cecHwconn(){
|
||||
$('#cecLine4').append(createLoader());
|
||||
var tempargs = getDiscoverEnv('adminpasswd') + ';' + getDiscoverEnv('generalpasswd') + ';'
|
||||
+ getDiscoverEnv('hmcpasswd');
|
||||
$.ajax({
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'webrun',
|
||||
tgt : '',
|
||||
args : 'cecsetup;' + tempargs + ';2',
|
||||
msg : ''
|
||||
},
|
||||
success : function() {
|
||||
$('#cecLine4 img').remove();
|
||||
var tempSpan = $('#cecLine4').find('span');
|
||||
tempSpan.removeClass('ui-icon-gear');
|
||||
tempSpan.addClass('ui-icon-check');
|
||||
createDiscoverButtons();
|
||||
}
|
||||
});
|
||||
|
@ -40,5 +40,5 @@ var hardwareInfo = {
|
||||
'9179-MHC' : [ 'P7-780', 4 ],
|
||||
'8231-E2C' : [ 'P7 HE', 4 ],
|
||||
'9125-F2C' : [ 'Power 775', 2],
|
||||
'78AC-100' : [ 'Power 775', 2] // FSP
|
||||
'78AC-100' : [ 'Power 775', 2] // bpa
|
||||
};
|
@ -307,9 +307,11 @@ DataTable.prototype.add = function(rowCont) {
|
||||
* @param barId Status bar ID
|
||||
*/
|
||||
function createStatusBar(barId) {
|
||||
var statusBar = $('<div class="ui-state-highlight ui-corner-all" id="' + barId + '"></div>').css({
|
||||
var statusBar = $('<div class="ui-corner-all" id="' + barId + '"></div>').css({
|
||||
'margin-bottom': '5px',
|
||||
'min-height': '30px'
|
||||
'min-height': '30px',
|
||||
'background-color':'#7BBEDE',
|
||||
'color': '#FFFFFF'
|
||||
});
|
||||
|
||||
// Create info icon
|
||||
@ -350,7 +352,11 @@ function createStatusBar(barId) {
|
||||
* @return Info bar
|
||||
*/
|
||||
function createInfoBar(msg) {
|
||||
var infoBar = $('<div class="ui-state-highlight ui-corner-all"></div>').css('margin', '5px 0px');
|
||||
var infoBar = $('<div class="ui-corner-all"></div>').css({
|
||||
'margin': '5px 0px',
|
||||
'background-color':'#7BBEDE',
|
||||
'color': '#FFFFFF'
|
||||
});
|
||||
var icon = $('<span class="ui-icon ui-icon-info"></span>').css({
|
||||
'display': 'inline-block',
|
||||
'margin': '10px 5px'
|
||||
|
Loading…
Reference in New Issue
Block a user