Consolidate platforms and changed their display names.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8926 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
086cfe5f5f
commit
e10fdcffd0
@ -129,7 +129,7 @@ bladePlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
statBar.append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a blade node.');
|
||||
var infoBar = createInfoBar('Provision a node on BladeCenter.');
|
||||
provForm.append(infoBar);
|
||||
|
||||
// Append to provision tab
|
||||
@ -192,7 +192,7 @@ bladePlugin.prototype.loadResources = function() {
|
||||
var resrcForm = $('<div class="form"></div>');
|
||||
resrcForm.append(infoBar);
|
||||
|
||||
$('#' + tabID).append(resrcForm);
|
||||
$('#' + tabId).append(resrcForm);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1,205 +0,0 @@
|
||||
/**
|
||||
* Execute when the DOM is fully loaded
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
// Load utility scripts
|
||||
});
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
var fspPlugin = function() {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Load node inventory
|
||||
*
|
||||
* @param data
|
||||
* Data from HTTP request
|
||||
* @return Nothing
|
||||
*/
|
||||
fspPlugin.prototype.loadInventory = function(data) {
|
||||
// Get arguments
|
||||
var args = data.msg.split(',');
|
||||
// Get tab ID
|
||||
var tabId = args[0].replace('out=', '');
|
||||
// Get node
|
||||
var node = args[1].replace('node=', '');
|
||||
// Get node inventory
|
||||
var inv = data.rsp;
|
||||
|
||||
// Remove loader
|
||||
$('#' + tabId).find('img').remove();
|
||||
|
||||
// Create division to hold inventory
|
||||
var invDivId = tabId + 'Inventory';
|
||||
var invDiv = $('<div class="inventory" id="' + invDivId + '"></div>');
|
||||
var info = createInfoBar('Under construction');
|
||||
invDiv.append(info);
|
||||
|
||||
// Append to inventory form
|
||||
$('#' + tabId).append(invDiv);
|
||||
};
|
||||
|
||||
/**
|
||||
* Load clone page
|
||||
*
|
||||
* @param node
|
||||
* Source node to clone
|
||||
* @return Nothing
|
||||
*/
|
||||
fspPlugin.prototype.loadClonePage = function(node) {
|
||||
// Get nodes tab
|
||||
var tab = getNodesTab();
|
||||
var newTabId = node + 'CloneTab';
|
||||
|
||||
// If there is no existing clone tab
|
||||
if (!$('#' + newTabId).length) {
|
||||
// Create status bar and hide it
|
||||
var statBarId = node + 'CloneStatusBar';
|
||||
var statBar = $('<div class="statusBar" id="' + statBarId + '"></div>').hide();
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Under construction');
|
||||
|
||||
// Create clone form
|
||||
var cloneForm = $('<div class="form"></div>');
|
||||
cloneForm.append(statBar);
|
||||
cloneForm.append(infoBar);
|
||||
|
||||
// Add clone tab
|
||||
tab.add(newTabId, 'Clone', cloneForm, true);
|
||||
}
|
||||
|
||||
tab.select(newTabId);
|
||||
};
|
||||
|
||||
/**
|
||||
* Load provision page
|
||||
*
|
||||
* @param tabId
|
||||
* The provision tab ID
|
||||
* @return Nothing
|
||||
*/
|
||||
fspPlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
// Get OS image names
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'tabdump',
|
||||
tgt : '',
|
||||
args : 'osimage',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : setOSImageCookies
|
||||
});
|
||||
|
||||
// Get groups
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'extnoderange',
|
||||
tgt : '/.*',
|
||||
args : 'subgroups',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : setGroupsCookies
|
||||
});
|
||||
|
||||
// Get provision tab instance
|
||||
var inst = tabId.replace('fspProvisionTab', '');
|
||||
|
||||
// Create provision form
|
||||
var provForm = $('<div class="form"></div>');
|
||||
|
||||
// Create status bar
|
||||
var statBarId = 'fspProvisionStatBar' + inst;
|
||||
var statBar = createStatusBar(statBarId).hide();
|
||||
provForm.append(statBar);
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('fspProvisionLoader' + inst).hide();
|
||||
statBar.append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a fsp node.');
|
||||
provForm.append(infoBar);
|
||||
|
||||
// Append to provision tab
|
||||
$('#' + tabId).append(provForm);
|
||||
|
||||
// Create provision type drop down
|
||||
var provType = $('<div></div>');
|
||||
var typeLabel = $('<label>Provision:</label>');
|
||||
var typeSelect = $('<select></select>');
|
||||
var provNewNode = $('<option value="new">New node</option>');
|
||||
var provExistNode = $('<option value="existing">Existing node</option>');
|
||||
typeSelect.append(provNewNode);
|
||||
typeSelect.append(provExistNode);
|
||||
provType.append(typeLabel);
|
||||
provType.append(typeSelect);
|
||||
provForm.append(provType);
|
||||
|
||||
/**
|
||||
* Create provision new node division
|
||||
*/
|
||||
// You should copy whatever is in this function, put it here, and customize it
|
||||
var provNew = createProvisionNew('fsp', inst);
|
||||
provForm.append(provNew);
|
||||
|
||||
/**
|
||||
* Create provision existing node division
|
||||
*/
|
||||
// You should copy whatever is in this function, put it here, and customize it
|
||||
var provExisting = createProvisionExisting('fsp', inst);
|
||||
provForm.append(provExisting);
|
||||
|
||||
// Toggle provision new/existing on select
|
||||
typeSelect.change(function() {
|
||||
var selected = $(this).val();
|
||||
if (selected == 'new') {
|
||||
provNew.toggle();
|
||||
provExisting.toggle();
|
||||
} else {
|
||||
provNew.toggle();
|
||||
provExisting.toggle();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Load resources
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
fspPlugin.prototype.loadResources = function() {
|
||||
// Get resource tab ID
|
||||
var tabId = 'fspResourceTab';
|
||||
// Remove loader
|
||||
$('#' + tabId).find('img').remove();
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Under construction');
|
||||
|
||||
// Create resource form
|
||||
var resrcForm = $('<div class="form"></div>');
|
||||
resrcForm.append(infoBar);
|
||||
|
||||
$('#' + tabId).append(resrcForm);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add node range
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
fspPlugin.prototype.addNode = function() {
|
||||
openDialog('info', 'Under construction');
|
||||
};
|
@ -165,7 +165,7 @@ hmcPlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
statBar.append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision an hmc node.');
|
||||
var infoBar = createInfoBar('Provision a node on System p.');
|
||||
provForm.append(infoBar);
|
||||
|
||||
// Append to provision tab
|
||||
|
@ -129,7 +129,7 @@ ipmiPlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
statBar.append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a ipmi node.');
|
||||
var infoBar = createInfoBar('Provision a node on iDataPlex.');
|
||||
provForm.append(infoBar);
|
||||
|
||||
// Append to provision tab
|
||||
|
@ -1,205 +0,0 @@
|
||||
/**
|
||||
* Execute when the DOM is fully loaded
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
// Load utility scripts
|
||||
});
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
var ivmPlugin = function() {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Load node inventory
|
||||
*
|
||||
* @param data
|
||||
* Data from HTTP request
|
||||
* @return Nothing
|
||||
*/
|
||||
ivmPlugin.prototype.loadInventory = function(data) {
|
||||
// Get arguments
|
||||
var args = data.msg.split(',');
|
||||
// Get tab ID
|
||||
var tabId = args[0].replace('out=', '');
|
||||
// Get node
|
||||
var node = args[1].replace('node=', '');
|
||||
// Get node inventory
|
||||
var inv = data.rsp;
|
||||
|
||||
// Remove loader
|
||||
$('#' + tabId).find('img').remove();
|
||||
|
||||
// Create division to hold inventory
|
||||
var invDivId = tabId + 'Inventory';
|
||||
var invDiv = $('<div class="inventory" id="' + invDivId + '"></div>');
|
||||
var info = createInfoBar('Under construction');
|
||||
invDiv.append(info);
|
||||
|
||||
// Append to inventory form
|
||||
$('#' + tabId).append(invDiv);
|
||||
};
|
||||
|
||||
/**
|
||||
* Load clone page
|
||||
*
|
||||
* @param node
|
||||
* Source node to clone
|
||||
* @return Nothing
|
||||
*/
|
||||
ivmPlugin.prototype.loadClonePage = function(node) {
|
||||
// Get nodes tab
|
||||
var tab = getNodesTab();
|
||||
var newTabId = node + 'CloneTab';
|
||||
|
||||
// If there is no existing clone tab
|
||||
if (!$('#' + newTabId).length) {
|
||||
// Create status bar and hide it
|
||||
var statBarId = node + 'CloneStatusBar';
|
||||
var statBar = $('<div class="statusBar" id="' + statBarId + '"></div>').hide();
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Under construction');
|
||||
|
||||
// Create clone form
|
||||
var cloneForm = $('<div class="form"></div>');
|
||||
cloneForm.append(statBar);
|
||||
cloneForm.append(infoBar);
|
||||
|
||||
// Add clone tab
|
||||
tab.add(newTabId, 'Clone', cloneForm, true);
|
||||
}
|
||||
|
||||
tab.select(newTabId);
|
||||
};
|
||||
|
||||
/**
|
||||
* Load provision page
|
||||
*
|
||||
* @param tabId
|
||||
* The provision tab ID
|
||||
* @return Nothing
|
||||
*/
|
||||
ivmPlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
// Get OS image names
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'tabdump',
|
||||
tgt : '',
|
||||
args : 'osimage',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : setOSImageCookies
|
||||
});
|
||||
|
||||
// Get groups
|
||||
$.ajax( {
|
||||
url : 'lib/cmd.php',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
cmd : 'extnoderange',
|
||||
tgt : '/.*',
|
||||
args : 'subgroups',
|
||||
msg : ''
|
||||
},
|
||||
|
||||
success : setGroupsCookies
|
||||
});
|
||||
|
||||
// Get provision tab instance
|
||||
var inst = tabId.replace('ivmProvisionTab', '');
|
||||
|
||||
// Create provision form
|
||||
var provForm = $('<div class="form"></div>');
|
||||
|
||||
// Create status bar
|
||||
var statBarId = 'ivmProvisionStatBar' + inst;
|
||||
var statBar = createStatusBar(statBarId).hide();
|
||||
provForm.append(statBar);
|
||||
|
||||
// Create loader
|
||||
var loader = createLoader('ivmProvisionLoader' + inst).hide();
|
||||
statBar.append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a ivm node.');
|
||||
provForm.append(infoBar);
|
||||
|
||||
// Append to provision tab
|
||||
$('#' + tabId).append(provForm);
|
||||
|
||||
// Create provision type drop down
|
||||
var provType = $('<div></div>');
|
||||
var typeLabel = $('<label>Provision:</label>');
|
||||
var typeSelect = $('<select></select>');
|
||||
var provNewNode = $('<option value="new">New node</option>');
|
||||
var provExistNode = $('<option value="existing">Existing node</option>');
|
||||
typeSelect.append(provNewNode);
|
||||
typeSelect.append(provExistNode);
|
||||
provType.append(typeLabel);
|
||||
provType.append(typeSelect);
|
||||
provForm.append(provType);
|
||||
|
||||
/**
|
||||
* Create provision new node division
|
||||
*/
|
||||
// You should copy whatever is in this function, put it here, and customize it
|
||||
var provNew = createProvisionNew('ivm', inst);
|
||||
provForm.append(provNew);
|
||||
|
||||
/**
|
||||
* Create provision existing node division
|
||||
*/
|
||||
// You should copy whatever is in this function, put it here, and customize it
|
||||
var provExisting = createProvisionExisting('ivm', inst);
|
||||
provForm.append(provExisting);
|
||||
|
||||
// Toggle provision new/existing on select
|
||||
typeSelect.change(function() {
|
||||
var selected = $(this).val();
|
||||
if (selected == 'new') {
|
||||
provNew.toggle();
|
||||
provExisting.toggle();
|
||||
} else {
|
||||
provNew.toggle();
|
||||
provExisting.toggle();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Load resources
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
ivmPlugin.prototype.loadResources = function() {
|
||||
// Get resource tab ID
|
||||
var tabId = 'ivmResourceTab';
|
||||
// Remove loader
|
||||
$('#' + tabId).find('img').remove();
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Under construction');
|
||||
|
||||
// Create resource form
|
||||
var resrcForm = $('<div class="form"></div>');
|
||||
resrcForm.append(infoBar);
|
||||
|
||||
$('#' + tabId).append(resrcForm);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add node range
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
ivmPlugin.prototype.addNode = function() {
|
||||
openDialog('info', 'Under construction');
|
||||
};
|
@ -844,7 +844,7 @@ zvmPlugin.prototype.loadProvisionPage = function(tabId) {
|
||||
statBar.append(loader);
|
||||
|
||||
// Create info bar
|
||||
var infoBar = createInfoBar('Provision a zVM node.');
|
||||
var infoBar = createInfoBar('Provision a node on System z.');
|
||||
provForm.append(infoBar);
|
||||
|
||||
// Append to provision tab
|
||||
|
@ -132,19 +132,15 @@ function loadMonitorPage() {
|
||||
resrcForm.append(resrcInfoBar);
|
||||
|
||||
// Create radio buttons for platforms
|
||||
var hwList = $('<ol>Platform to view:</ol>');
|
||||
var ipmi = $('<li><input type="radio" name="hw" value="ipmi" checked/>ipmi</li>');
|
||||
var blade = $('<li><input type="radio" name="hw" value="blade"/>blade</li>');
|
||||
var hmc = $('<li><input type="radio" name="hw" value="hmc"/>hmc</li>');
|
||||
var ivm = $('<li><input type="radio" name="hw" value="ivm"/>ivm</li>');
|
||||
var fsp = $('<li><input type="radio" name="hw" value="fsp"/>fsp</li>');
|
||||
var zvm = $('<li><input type="radio" name="hw" value="zvm"/>zvm</li>');
|
||||
var hwList = $('<ol>Platforms available:</ol>');
|
||||
var ipmi = $('<li><input type="radio" name="hw" value="ipmi" checked/>iDataPlex</li>');
|
||||
var blade = $('<li><input type="radio" name="hw" value="blade"/>BladeCenter</li>');
|
||||
var hmc = $('<li><input type="radio" name="hw" value="hmc"/>System p</li>');
|
||||
var zvm = $('<li><input type="radio" name="hw" value="zvm"/>System z</li>');
|
||||
|
||||
hwList.append(ipmi);
|
||||
hwList.append(blade);
|
||||
hwList.append(hmc);
|
||||
hwList.append(ivm);
|
||||
hwList.append(fsp);
|
||||
hwList.append(zvm);
|
||||
resrcForm.append(hwList);
|
||||
|
||||
@ -169,18 +165,12 @@ function loadMonitorPage() {
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "fsp":
|
||||
plugin = new fspPlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "ivm":
|
||||
plugin = new ivmPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
|
@ -83,18 +83,14 @@ function loadProvisionPage() {
|
||||
|
||||
// Create radio buttons for platforms
|
||||
var hwList = $('<ol>Platforms available:</ol>');
|
||||
var ipmi = $('<li><input type="radio" name="hw" value="ipmi" checked/>ipmi</li>');
|
||||
var blade = $('<li><input type="radio" name="hw" value="blade"/>blade</li>');
|
||||
var hmc = $('<li><input type="radio" name="hw" value="hmc"/>hmc</li>');
|
||||
var ivm = $('<li><input type="radio" name="hw" value="ivm"/>ivm</li>');
|
||||
var fsp = $('<li><input type="radio" name="hw" value="fsp"/>fsp</li>');
|
||||
var zvm = $('<li><input type="radio" name="hw" value="zvm"/>zvm</li>');
|
||||
var ipmi = $('<li><input type="radio" name="hw" value="ipmi" checked/>iDataPlex</li>');
|
||||
var blade = $('<li><input type="radio" name="hw" value="blade"/>BladeCenter</li>');
|
||||
var hmc = $('<li><input type="radio" name="hw" value="hmc"/>System p</li>');
|
||||
var zvm = $('<li><input type="radio" name="hw" value="zvm"/>System z</li>');
|
||||
|
||||
hwList.append(ipmi);
|
||||
hwList.append(blade);
|
||||
hwList.append(hmc);
|
||||
hwList.append(ivm);
|
||||
hwList.append(fsp);
|
||||
hwList.append(zvm);
|
||||
provPg.append(hwList);
|
||||
|
||||
@ -123,18 +119,12 @@ function loadProvisionPage() {
|
||||
case "blade":
|
||||
plugin = new bladePlugin();
|
||||
break;
|
||||
case "fsp":
|
||||
plugin = new fspPlugin();
|
||||
break;
|
||||
case "hmc":
|
||||
plugin = new hmcPlugin();
|
||||
break;
|
||||
case "ipmi":
|
||||
plugin = new ipmiPlugin();
|
||||
break;
|
||||
case "ivm":
|
||||
plugin = new ivmPlugin();
|
||||
break;
|
||||
case "zvm":
|
||||
plugin = new zvmPlugin();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user