');
var typeLabel = $('');
var typeSelect = $('');
- typeSelect.append('');
- typeSelect.append('');
- typeSelect.append('');
+ typeSelect.append(''
+ + ''
+ + ''
+ );
type.append(typeLabel);
type.append(typeSelect);
provExisting.append(type);
@@ -285,11 +287,12 @@ function createProvisionNew(plugin, inst) {
var method = $('');
var methodLabel = $('');
var methodSelect = $('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
+ methodSelect.append(''
+ + ''
+ + ''
+ + ''
+ + ''
+ );
method.append(methodLabel);
method.append(methodSelect);
provNew.append(method);
@@ -298,9 +301,10 @@ function createProvisionNew(plugin, inst) {
var type = $('');
var typeLabel = $('');
var typeSelect = $('');
- typeSelect.append('');
- typeSelect.append('');
- typeSelect.append('');
+ typeSelect.append(''
+ + ''
+ + ''
+ );
type.append(typeLabel);
type.append(typeSelect);
provNew.append(type);
diff --git a/xCAT-UI/js/custom/fsp.js b/xCAT-UI/js/custom/fsp.js
index 2e337704d..94e8be06a 100644
--- a/xCAT-UI/js/custom/fsp.js
+++ b/xCAT-UI/js/custom/fsp.js
@@ -143,7 +143,7 @@ fspPlugin.prototype.loadResources = function() {
};
/**
- * Add node
+ * Add node range
*
* @return Nothing
*/
diff --git a/xCAT-UI/js/custom/hmc.js b/xCAT-UI/js/custom/hmc.js
index 2c289ad1b..21bce650d 100644
--- a/xCAT-UI/js/custom/hmc.js
+++ b/xCAT-UI/js/custom/hmc.js
@@ -196,7 +196,7 @@ hmcPlugin.prototype.loadResources = function() {
};
/**
- * Add node
+ * Add node range
*
* @return Nothing
*/
diff --git a/xCAT-UI/js/custom/ipmi.js b/xCAT-UI/js/custom/ipmi.js
index 159a6789c..ae021864b 100644
--- a/xCAT-UI/js/custom/ipmi.js
+++ b/xCAT-UI/js/custom/ipmi.js
@@ -143,7 +143,7 @@ ipmiPlugin.prototype.loadResources = function() {
};
/**
- * Add node
+ * Add node range
*
* @return Nothing
*/
diff --git a/xCAT-UI/js/custom/ivm.js b/xCAT-UI/js/custom/ivm.js
index abbd84457..64042a99d 100644
--- a/xCAT-UI/js/custom/ivm.js
+++ b/xCAT-UI/js/custom/ivm.js
@@ -143,7 +143,7 @@ ivmPlugin.prototype.loadResources = function() {
};
/**
- * Add node
+ * Add node range
*
* @return Nothing
*/
diff --git a/xCAT-UI/js/custom/zvm.js b/xCAT-UI/js/custom/zvm.js
index 5f2aa259e..e9ccce82d 100644
--- a/xCAT-UI/js/custom/zvm.js
+++ b/xCAT-UI/js/custom/zvm.js
@@ -60,13 +60,8 @@ zvmPlugin.prototype.loadClonePage = function(node) {
var cloneForm = $('');
cloneForm.append(statBar);
cloneForm.append(infoBar);
-
- // Create target node range input
cloneForm.append('');
- // Create target user ID range input
cloneForm.append('');
-
- // Create clone source and hardware control point inputs
cloneForm.append('');
cloneForm.append('');
@@ -97,7 +92,6 @@ zvmPlugin.prototype.loadClonePage = function(node) {
poolDiv.append(poolInput);
cloneForm.append(poolDiv);
- // Create disk password input
cloneForm.append('');
/**
@@ -105,6 +99,9 @@ zvmPlugin.prototype.loadClonePage = function(node) {
*/
var cloneBtn = createButton('Clone');
cloneBtn.bind('click', function(event) {
+ // Remove any warning messages
+ $(this).parent().parent().find('.ui-state-error').remove();
+
var ready = true;
var errMsg = '';
@@ -123,7 +120,7 @@ zvmPlugin.prototype.loadClonePage = function(node) {
// Write error message
if (!ready) {
- errMsg = errMsg + 'You are missing some inputs. ';
+ errMsg = errMsg + 'You are missing some inputs. ';
}
// Get target node
@@ -134,7 +131,7 @@ zvmPlugin.prototype.loadClonePage = function(node) {
// Check node range and user ID range
if (nodeRange.indexOf('-') > -1 || userIdRange.indexOf('-') > -1) {
if (nodeRange.indexOf('-') < 0 || userIdRange.indexOf('-') < 0) {
- errMsg = errMsg + 'A user ID range and node range needs to be given. ';
+ errMsg = errMsg + 'A user ID range and node range needs to be given. ';
ready = false;
} else {
var tmp = nodeRange.split('-');
@@ -158,7 +155,7 @@ zvmPlugin.prototype.loadClonePage = function(node) {
// If starting and ending index do not match
if (!(nodeStart == userIdStart) || !(nodeEnd == userIdEnd)) {
// Not ready to provision
- errMsg = errMsg + 'The node range and user ID range does not match. ';
+ errMsg = errMsg + 'The node range and user ID range does not match. ';
ready = false;
}
}
@@ -254,7 +251,9 @@ zvmPlugin.prototype.loadClonePage = function(node) {
// Disable clone button
$(this).attr('disabled', 'true');
} else {
- alert('(Error) ' + errMsg);
+ // Show warning message
+ var warn = createWarnBar(errMsg);
+ warn.prependTo($(this).parent().parent());
}
});
cloneForm.append(cloneBtn);
@@ -329,7 +328,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
* Show user entry
*/
var toggleLinkId = node + 'ToggleLink';
- var toggleLink = $('Show user entry');
+ var toggleLink = $('Show directory entry');
toggleLink.one('click', function(event) {
// Toggle inventory division
$('#' + invDivId).toggle();
@@ -556,7 +555,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
*/
var addProcLink = $('Add processor');
addProcLink.bind('click', function(event) {
- createAddProcDialog(node);
+ openAddProcDialog(node);
});
procFooter.append(addProcLink);
@@ -635,7 +634,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
var addDasdLink = $('Add disk');
addDasdLink.bind('click', function(event) {
var hcp = attrs['hcp'][0].split('.');
- createAddDiskDialog(node, hcp[0]);
+ openAddDiskDialog(node, hcp[0]);
});
dasdFooter.append(addDasdLink);
dasdTable.append(dasdFooter);
@@ -716,7 +715,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
var addNicLink = $('Add NIC');
addNicLink.bind('click', function(event) {
var hcp = attrs['hcp'][0].split('.');
- createAddNicDialog(node, hcp[0]);
+ openAddNicDialog(node, hcp[0]);
});
nicFooter.append(addNicLink);
nicTable.append(nicFooter);
@@ -863,27 +862,27 @@ zvmPlugin.prototype.loadResources = function() {
};
/**
- * Add node
+ * Add node range
*
* @return Nothing
*/
zvmPlugin.prototype.addNode = function() {
- var info = createInfoBar('Add a new node');
+ // Create form to add node range
var addNodeForm = $('');
- addNodeForm.append(info);
+ var info = createInfoBar('Add a node range');
+ addNodeForm.append(info);
addNodeForm.append('');
addNodeForm.append('');
addNodeForm.append('');
addNodeForm.append('');
- // Create add node dialog
+ // Open form as a dialog
addNodeForm.dialog({
position: 'top',
modal: true,
width: 400,
buttons: {
"Cancel": function(){
- // Close dialog
$(this).dialog( "close" );
},
"Ok": function(){
@@ -895,7 +894,8 @@ zvmPlugin.prototype.addNode = function() {
var userIdRange = $(this).find('input[name=userId]').val();
var group = $(this).find('input[name=group]').val();
var hcp = $(this).find('input[name=hcp]').val();
-
+
+ // Show warning message if inputs are not complete
if (!nodeRange || !userIdRange || !group || !hcp) {
var warn = createWarnBar('Missing values');
warn.prependTo($(this));
@@ -1053,9 +1053,9 @@ zvmPlugin.prototype.addNode = function() {
// Show warning message
var warn = createWarnBar(errMsg);
warn.prependTo($(this));
- }
- }
- }
+ }
+ } // End of else
+ } // End of function()
}
});
};
\ No newline at end of file
diff --git a/xCAT-UI/js/custom/zvmUtils.js b/xCAT-UI/js/custom/zvmUtils.js
index c1d4d9e56..a0fd76a86 100644
--- a/xCAT-UI/js/custom/zvmUtils.js
+++ b/xCAT-UI/js/custom/zvmUtils.js
@@ -60,7 +60,7 @@ function loadUserEntry(data) {
var ueDivId = args[0].replace('out=', '');
// Get node
var node = args[1].replace('node=', '');
- // Get user entry
+ // Get user directory entry
var userEntry = data.rsp[0].split(node + ':');
// Remove loader
@@ -78,16 +78,16 @@ function loadUserEntry(data) {
$('#' + node + 'Inventory').toggle();
// Change text
- if (lnkText == 'Show user entry') {
+ if (lnkText == 'Show directory entry') {
$(this).text('Show inventory');
} else {
- $(this).text('Show user entry');
+ $(this).text('Show directory entry');
}
});
// Put user entry into a list
var fieldSet = $('');
- var legend = $('');
+ var legend = $('');
fieldSet.append(legend);
var txtArea = $('');
@@ -176,7 +176,7 @@ function loadUserEntry(data) {
});
// Create info bar
- var infoBar = createInfoBar('Double click on the user entry to edit');
+ var infoBar = createInfoBar('Double click on the directory entry to edit');
// Append user entry into division
$('#' + ueDivId).append(infoBar);
@@ -235,8 +235,7 @@ function updateZProvisionNewStatus(data) {
* (2) Update /etc/hosts
*/
if (cmd == 'nodeadd') {
- // If there was an error
- // Do not continue
+ // If there was an error, do not continue
if (rsp.length) {
$('#' + loaderId).hide();
$('#' + statBarId).append('
(Error) Failed to create node definition
');
@@ -261,8 +260,7 @@ function updateZProvisionNewStatus(data) {
* (3) Update DNS
*/
else if (cmd == 'makehosts') {
- // If there was an error
- // Do not continue
+ // If there was an error, do not continue
if (rsp.length) {
$('#' + loaderId).hide();
$('#' + statBarId).append('
(Error) Failed to update /etc/hosts
');
@@ -321,13 +319,12 @@ function updateZProvisionNewStatus(data) {
var prg = writeRsp(rsp, '');
$('#' + statBarId).append(prg);
- // If there was an error
- // Do not continue
+ // 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('
Trying again
');
+ $('#' + statBarId).append('
Trying again...
');
tries = tries + 1;
// One more try
@@ -411,15 +408,14 @@ function updateZProvisionNewStatus(data) {
var prg = writeRsp(rsp, '');
$('#' + statBarId).append(prg);
- // If there was an error
- // Do not continue
+ // If there was an error, do not continue
if (prg.html().indexOf('Error') > -1) {
$('#' + loaderId).hide();
// Try again
var tries = parseInt($.cookie('tries4' + tabId));
if (tries < 2) {
- $('#' + statBarId).append('
Trying again
');
+ $('#' + statBarId).append('
Trying again...
');
tries = tries + 1;
// One more try
@@ -1007,12 +1003,11 @@ function getAttrs(keys, propNames, data) {
* Node to add processor to
* @return Nothing
*/
-function createAddProcDialog(node) {
+function openAddProcDialog(node) {
+ // Create form to add processor
+ var addProcForm = $('');
// Create info bar
var info = createInfoBar('Add a processor');
-
- // Create add processor form
- var addProcForm = $('');
addProcForm.append(info);
addProcForm.append('');
addProcForm.append('');
@@ -1021,34 +1016,35 @@ function createAddProcDialog(node) {
var procType = $('');
procType.append('');
var typeSelect = $('');
- typeSelect.append('');
- typeSelect.append('');
- typeSelect.append('');
- typeSelect.append('');
+ typeSelect.append(''
+ + ''
+ + ''
+ + ''
+ );
procType.append(typeSelect);
addProcForm.append(procType);
- // Create add processor dialog
+ // Open dialog to add processor
addProcForm.dialog({
position: 'top',
modal: true,
width: 400,
buttons: {
"Cancel": function() {
- // Close dialog
$(this).dialog( "close" );
},
"Ok": function(){
// Remove any warning messages
$(this).find('.ui-state-error').remove();
- // Get processor properties
+ // Get inputs
var node = $(this).find('input[name=procNode]').val();
var address = $(this).find('input[name=procAddress]').val();
var type = $(this).find('select[name=procType]').val();
+ // If inputs are not complete, show warning message
if (!node || !address || !type) {
- var warn = createWarnBar('Missing values');
+ var warn = createWarnBar('You are missing inputs.');
warn.prependTo($(this));
} else {
// Add processor
@@ -1091,16 +1087,15 @@ function createAddProcDialog(node) {
* Hardware control point of node
* @return Nothing
*/
-function createAddDiskDialog(node, hcp) {
+function openAddDiskDialog(node, hcp) {
// Get list of disk pools
var cookie = $.cookie(hcp + 'DiskPools');
var pools = cookie.split(',');
+ // Create form to add disk
+ var addDiskForm = $('');
// Create info bar
var info = createInfoBar('Add a disk');
-
- // Create add disk form
- var addDiskForm = $('');
addDiskForm.append(info);
addDiskForm.append('');
addDiskForm.append('');
@@ -1121,33 +1116,33 @@ function createAddDiskDialog(node, hcp) {
var diskMode = $('');
diskMode.append('');
var modeSelect = $('');
- modeSelect.append('');
- modeSelect.append('');
- modeSelect.append('');
- modeSelect.append('');
- modeSelect.append('');
- modeSelect.append('');
- modeSelect.append('');
+ modeSelect.append(''
+ + ''
+ + ''
+ + ''
+ + ''
+ + ''
+ + ''
+ );
diskMode.append(modeSelect);
addDiskForm.append(diskMode);
addDiskForm.append('');
- // Create add disk dialog
+ // Open dialog to add disk
addDiskForm.dialog({
position: 'top',
modal: true,
width: 400,
buttons: {
"Cancel": function() {
- // Close dialog
$(this).dialog( "close" );
},
"Ok": function(){
// Remove any warning messages
$(this).find('.ui-state-error').remove();
- // Get disk properties
+ // Get inputs
var node = $(this).find('input[name=diskNode]').val();
var type = $(this).find('select[name=diskType]').val();
var address = $(this).find('input[name=diskAddress]').val();
@@ -1156,8 +1151,9 @@ function createAddDiskDialog(node, hcp) {
var mode = $(this).find('select[name=diskMode]').val();
var password = $(this).find('input[name=diskPassword]').val();
+ // If inputs are not complete, show warning message
if (!node || !type || !address || !size || !pool || !mode) {
- var warn = createWarnBar('Missing values');
+ var warn = createWarnBar('You are missing inputs.');
warn.prependTo($(this));
} else {
// Add disk
@@ -1215,7 +1211,7 @@ function createAddDiskDialog(node, hcp) {
// Close dialog
$(this).dialog( "close" );
} // End of else
- }
+ } // End of function()
}
});
}
@@ -1229,15 +1225,14 @@ function createAddDiskDialog(node, hcp) {
* Hardware control point of node
* @return Nothing
*/
-function createAddNicDialog(node, hcp) {
+function openAddNicDialog(node, hcp) {
// Get network names
var networks = $.cookie(hcp + 'Networks').split(',');
-
+
+ // Create form to add NIC
+ var addNicForm = $('');
// Create info bar
var info = createInfoBar('Add a NIC');
-
- // Create add NIC form
- var addNicForm = $('');
addNicForm.append(info);
addNicForm.append('');
addNicForm.append('');
@@ -1246,9 +1241,10 @@ function createAddNicDialog(node, hcp) {
var nicType = $('');
nicType.append('');
var nicTypeSelect = $('');
- nicTypeSelect.append('');
- nicTypeSelect.append('');
- nicTypeSelect.append('');
+ nicTypeSelect.append(''
+ + ''
+ + ''
+ );
nicType.append(nicTypeSelect);
addNicForm.append(nicType);
@@ -1256,9 +1252,10 @@ function createAddNicDialog(node, hcp) {
var networkType = $('');
networkType.append('');
var networkTypeSelect = $('');
- networkTypeSelect.append('');
- networkTypeSelect.append('');
- networkTypeSelect.append('');
+ networkTypeSelect.append(''
+ + ''
+ + ''
+ );
networkType.append(networkTypeSelect);
addNicForm.append(networkType);
@@ -1278,16 +1275,20 @@ function createAddNicDialog(node, hcp) {
}
}
+ // Hide network name drop downs until the NIC type and network type is selected
+ // QDIO Guest LAN drop down
var guestLanQdio = $('').hide();
guestLanQdio.append('');
guestLanQdio.append(gLansQdioSelect);
addNicForm.append(guestLanQdio);
+ // HIPERS Guest LAN drop down
var guestLanHipers = $('').hide();
guestLanHipers.append('');
guestLanHipers.append(gLansHipersSelect);
addNicForm.append(guestLanHipers);
+ // VSWITCH drop down
var vswitch = $('').hide();
vswitch.append('');
vswitch.append(vswitchSelect);
@@ -1298,74 +1299,102 @@ function createAddNicDialog(node, hcp) {
// Remove any warning messages
$(this).parent().parent().find('.ui-state-error').remove();
+ // Get NIC type and network type
var nicType = nicTypeSelect.val();
var networkType = $(this).val();
+ // Hide network name drop downs
guestLanQdio.hide();
guestLanHipers.hide();
vswitch.hide();
- if (networkType == 'Guest LAN' && nicType == 'QDIO')
+ // Show correct network name
+ if (networkType == 'Guest LAN' && nicType == 'QDIO') {
guestLanQdio.show();
- else if (networkType == 'Guest LAN' && nicType == 'HiperSockets')
+ } else if (networkType == 'Guest LAN' && nicType == 'HiperSockets') {
guestLanHipers.show();
- else if (networkType == 'Virtual Switch' && nicType == 'QDIO')
- vswitch.show();
- else if (networkType == 'Virtual Switch' && nicType != 'QDIO') {
- var warn = createWarnBar('The selected choices are not valid');
- warn.prependTo($(this).parent().parent());
+ } else if (networkType == 'Virtual Switch') {
+ if (nicType == 'QDIO') {
+ vswitch.show();
+ } else {
+ // No such thing as HIPERS VSWITCH
+ var warn = createWarnBar('The selected choices are not valid.');
+ warn.prependTo($(this).parent().parent());
+ }
}
});
+ // Show network names on change
nicTypeSelect.change(function(){
// Remove any warning messages
$(this).parent().parent().find('.ui-state-error').remove();
+ // Get NIC type and network type
var nicType = $(this).val();
var networkType = networkTypeSelect.val();
+ // Hide network name drop downs
guestLanQdio.hide();
guestLanHipers.hide();
vswitch.hide();
- if (networkType == 'Guest LAN' && nicType == 'QDIO')
+ // Show correct network name
+ if (networkType == 'Guest LAN' && nicType == 'QDIO') {
guestLanQdio.show();
- else if (networkType == 'Guest LAN' && nicType == 'HiperSockets')
+ } else if (networkType == 'Guest LAN' && nicType == 'HiperSockets') {
guestLanHipers.show();
- else if (networkType == 'Virtual Switch' && nicType == 'QDIO')
- vswitch.show();
- else if (networkType == 'Virtual Switch' && nicType != 'QDIO') {
- var warn = createWarnBar('The selected choices are not valid');
- warn.prependTo($(this).parent().parent());
+ } else if (networkType == 'Virtual Switch') {
+ if (nicType == 'QDIO') {
+ vswitch.show();
+ } else {
+ // No such thing as HIPERS VSWITCH
+ var warn = createWarnBar('The selected choices are not valid.');
+ warn.prependTo($(this).parent().parent());
+ }
}
});
- // Create add NIC dialog
+ // Open dialog to add NIC
addNicForm.dialog({
position: 'top',
modal: true,
width: 400,
buttons: {
"Cancel": function(){
- // Close dialog
$(this).dialog( "close" );
},
"Ok": function(){
// Remove any warning messages
$(this).find('.ui-state-error').remove();
+ var ready = true;
+ var errMsg = '';
+
+ // Get inputs
var node = $(this).find('input[name=nicNode]').val();
var nicType = $(this).find('select[name=nicType]').val();
var networkType = $(this).find('select[name=nicNetworkType]').val();
var address = $(this).find('input[name=nicAddress]').val();
-
+
+ // If inputs are not complete, show warning message
if (!node || !nicType || !networkType || !address) {
- var warn = createWarnBar('Missing values');
- warn.prependTo($(this));
+ errMsg = 'You are missing inputs. ';
+ ready = false;
+ }
+
+ // If a HIPERS VSWITCH is selected, show warning message
+ if (nicType == 'HiperSockets' && networkType == 'Virtual Switch') {
+ errMsg += 'The selected choices are not valid.';
+ ready = false;
+ }
+
+ // If there are errors
+ if (!ready) {
+ // Show warning message
+ var warn = createWarnBar(errMsg);
+ warn.prependTo($(this));
} else {
- /**
- * Add guest LAN
- */
+ // Add guest LAN
if (networkType == 'Guest LAN') {
var temp;
if (nicType == 'QDIO') {
@@ -1391,9 +1420,7 @@ function createAddNicDialog(node, hcp) {
});
}
- /**
- * Add virtual switch
- */
+ // Add virtual switch
else if (networkType == 'Virtual Switch' && nicType == 'QDIO') {
var temp = $(this).find('select[name=nicVSwitchName]').val().split(' ');
var vswitchName = temp[1];
@@ -1425,7 +1452,7 @@ function createAddNicDialog(node, hcp) {
// Close dialog
$(this).dialog( "close" );
} // End of else
- }
+ } // End of function()
}
});
}
@@ -1606,9 +1633,8 @@ function getDiskPool(data) {
success : loadDiskPoolTable
});
- }
- }
-
+ } // End of if
+ } // End of for
}
}
@@ -1643,8 +1669,8 @@ function getNetwork(data) {
success : loadNetworkTable
});
- }
- }
+ } // End of for
+ } // End of if
}
/**
@@ -1909,11 +1935,12 @@ function createZProvisionExisting(inst) {
var bootMethod = $('');
var methoddLabel = $('');
var methodSelect = $('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
+ methodSelect.append(''
+ + ''
+ + ''
+ + ''
+ + ''
+ );
bootMethod.append(methoddLabel);
bootMethod.append(methodSelect);
provExisting.append(bootMethod);
@@ -1923,6 +1950,9 @@ function createZProvisionExisting(inst) {
*/
var provisionBtn = createButton('Provision');
provisionBtn.bind('click', function(event) {
+ // Remove any warning messages
+ $(this).parent().parent().find('.ui-state-error').remove();
+
var ready = true;
var errMsg = '';
@@ -1935,13 +1965,14 @@ function createZProvisionExisting(inst) {
var dTableId = 'zNodesDatatable' + inst;
var tgts = getNodesChecked(dTableId);
if (!tgts) {
- errMsg = 'You need to select a node.';
+ errMsg += 'You need to select a node. ';
ready = false;
}
// Check operating system image
var os = $('#' + thisTabId + ' input[name=os]:visible');
if (!os.val()) {
+ errMsg += 'You need to select a operating system image.';
os.css('border', 'solid #FF0000 1px');
ready = false;
} else {
@@ -1988,7 +2019,9 @@ function createZProvisionExisting(inst) {
success : updateZProvisionExistingStatus
});
} else {
- alert('(Error) ' + errMsg);
+ // Show warning message
+ var warn = createWarnBar(errMsg);
+ warn.prependTo($(this).parent().parent());
}
});
provExisting.append(provisionBtn);
@@ -2116,10 +2149,9 @@ function createZProvisionNew(inst) {
// Create disk type drop down
var diskType = $('
');
var diskTypeSelect = $('');
- var diskType3390 = $('');
- var diskType9336 = $('');
- diskTypeSelect.append(diskType3390);
- diskTypeSelect.append(diskType9336);
+ diskTypeSelect.append(''
+ + ''
+ );
diskType.append(diskTypeSelect);
diskRow.append(diskType);
@@ -2134,13 +2166,14 @@ function createZProvisionNew(inst) {
// Create disk mode input
var diskMode = $('
');
var diskModeSelect = $('');
- diskModeSelect.append('');
- diskModeSelect.append('');
- diskModeSelect.append('');
- diskModeSelect.append('');
- diskModeSelect.append('');
- diskModeSelect.append('');
- diskModeSelect.append('');
+ diskModeSelect.append(''
+ + ''
+ + ''
+ + ''
+ + ''
+ + ''
+ + ''
+ );
diskMode.append(diskModeSelect);
diskRow.append(diskMode);
@@ -2182,6 +2215,9 @@ function createZProvisionNew(inst) {
*/
var provisionBtn = createButton('Provision');
provisionBtn.bind('click', function(event) {
+ // Remove any warning messages
+ $(this).parent().parent().find('.ui-state-error').remove();
+
var ready = true;
var errMsg = '';
@@ -2218,7 +2254,7 @@ function createZProvisionNew(inst) {
var thisUserId = $('#' + thisTabId + ' input[name=userId]:visible');
var pos = thisUserEntry.val().indexOf('USER ' + thisUserId.val().toUpperCase());
if (pos < 0) {
- errMsg = errMsg + 'The user entry does not contain the correct user ID. ';
+ errMsg = errMsg + 'The user entry does not contain the correct user ID. ';
ready = false;
}
@@ -2229,7 +2265,7 @@ function createZProvisionNew(inst) {
var diskRows = $('#' + thisTabId + ' table tr');
// If an OS is given, disks are needed
if (os.val() && (diskRows.length < 1)) {
- errMsg = errMsg + 'You need to add at some disks. ';
+ errMsg = errMsg + 'You need to add at some disks. ';
ready = false;
}
@@ -2387,7 +2423,9 @@ function createZProvisionNew(inst) {
});
}
} else {
- alert('(Error) ' + errMsg);
+ // Show warning message
+ var warn = createWarnBar(errMsg);
+ warn.prependTo($(this).parent().parent());
}
});
provNew.append(provisionBtn);
diff --git a/xCAT-UI/js/monitor/gangliamon.js b/xCAT-UI/js/monitor/gangliamon.js
index 734743287..fd4b143a0 100644
--- a/xCAT-UI/js/monitor/gangliamon.js
+++ b/xCAT-UI/js/monitor/gangliamon.js
@@ -73,6 +73,7 @@ function addGangLink(){
window.open('../ganglia/');
});
}
+
function gangRpmCheck(data){
var rpmStatus = data.rsp.split(/\n/);
var stopFlag = false;
diff --git a/xCAT-UI/js/monitor/monitor.js b/xCAT-UI/js/monitor/monitor.js
index ee0a5e403..22d4aea3f 100644
--- a/xCAT-UI/js/monitor/monitor.js
+++ b/xCAT-UI/js/monitor/monitor.js
@@ -57,9 +57,6 @@ function loadMonitorPage() {
var monitorInfoBar = createInfoBar('Select the Monitor Tool');
monitorForm.append(monitorInfoBar);
- // Create drop-down menu
- // Hardware available to provision - ipmi, blade, hmc, ivm, fsp, and zvm
-
var monitorList = $('');
var items = "
xCAT Monitor : xcatmon provides node status " +
"monitoring using fping on AIX and nmap on Linux. It also provides application " +
diff --git a/xCAT-UI/js/monitor/rmcmon.js b/xCAT-UI/js/monitor/rmcmon.js
index f915bc694..4c0bf05c7 100644
--- a/xCAT-UI/js/monitor/rmcmon.js
+++ b/xCAT-UI/js/monitor/rmcmon.js
@@ -191,6 +191,7 @@ function rmcWorkingCheck(){
}
});
}
+
function loadRmcMonShow(){
$('#rmcMonStatus').empty().append("Getting monitoring Data.");
$('#rmcMonStatus').append(createLoader());
diff --git a/xCAT-UI/js/nodes/nodes.js b/xCAT-UI/js/nodes/nodes.js
index fe95a5929..36a6f158e 100644
--- a/xCAT-UI/js/nodes/nodes.js
+++ b/xCAT-UI/js/nodes/nodes.js
@@ -168,18 +168,17 @@ function loadGroups(data) {
+ ''
+ '' );
- // Create add processor dialog
+ // Open dialog to add node
addNodeForm.dialog({
position: 'top',
modal: true,
width: 400,
buttons: {
"Cancel": function(){
- // Close dialog
$(this).dialog( "close" );
},
"Ok": function(){
- // Get processor properties
+ // Get hardware management
var mgt = $(this).find('select[name=mgt]').val();
var plugin;
@@ -205,8 +204,6 @@ function loadGroups(data) {
}
plugin.addNode();
-
- // Close dialog
$(this).dialog( "close" );
}
}
@@ -462,10 +459,9 @@ function loadNodes(data) {
// Advanced actions
var advancedActions;
- if ('compute' == group){
+ if ('compute' == group) {
advancedActions = [ boot2NetworkLnk, scriptLnk, setBootStateLnk, updateLnk, rcons ];
- }
- else{
+ } else {
advancedActions = [ boot2NetworkLnk, scriptLnk, setBootStateLnk, updateLnk ];
}
@@ -605,7 +601,7 @@ function loadPowerStatus(data) {
var rowNum, node, status, args;
for ( var i in power) {
- // node name and power status, where power[0] = nodeName and power[1] = state
+ // power[0] = nodeName and power[1] = state
args = power[i].split(':');
node = jQuery.trim(args[0]);
status = jQuery.trim(args[1]);
@@ -613,7 +609,7 @@ function loadPowerStatus(data) {
// Get the row containing the node
rowNum = getRowNum(node);
- //update the data in the
+ // Update the power status column
dTable.fnUpdate(status, rowNum, 3);
}
@@ -665,14 +661,14 @@ function loadPingStatus(data) {
// Get all nodes within the datatable
var rows = dTable.fnGetNodes();
for ( var i in ping) {
- // where ping[0] = nodeName ping[1] = state
+ // ping[0] = nodeName and ping[1] = state
node = jQuery.trim(ping[i][0]);
status = jQuery.trim(ping[i][1]);
// Get the row containing the node
rowPos = getRowNum(node);
- // Update the power status column
+ // Update the ping status column
dTable.fnUpdate(status, rowPos, 2);
}
@@ -748,7 +744,7 @@ function loadNode(e) {
}
// Get tab area where a new tab will be inserted
- // the node name may contain special char(such as '.','#'), so we can not use the node name as a id.
+ // The node name may contain special char(such as '.','#'), so we can not use the node name as a id.
var myTab = getNodesTab();
var inst = 0;
var newTabId = 'nodeTab' + inst;
@@ -781,7 +777,7 @@ function loadNode(e) {
});
// Select new tab
- // tabid may contains special char, so we had to use the index
+ // Tab ID may contains special char, so we had to use the index
myTab.select(newTabId);
}
@@ -828,6 +824,9 @@ function loadUnlockPage(tgtNodes) {
*/
var okBtn = createButton('Ok');
okBtn.bind('click', function(event) {
+ // Remove any warning messages
+ $(this).parent().parent().find('.ui-state-error').remove();
+
// If form is complete
var ready = formComplete(newTabId);
if (ready) {
@@ -852,6 +851,10 @@ function loadUnlockPage(tgtNodes) {
// Disable Ok button
$(this).attr('disabled', 'true');
+ } else {
+ // Show warning message
+ var warn = createWarnBar('You are missing some values');
+ warn.prependTo($(this).parent().parent());
}
});
@@ -928,6 +931,9 @@ function loadScriptPage(tgtNodes) {
*/
var runBtn = createButton('Run');
runBtn.bind('click', function(event) {
+ // Remove any warning messages
+ $(this).parent().parent().find('.ui-state-error').remove();
+
var ready = true;
// Check script
@@ -946,7 +952,9 @@ function loadScriptPage(tgtNodes) {
// Run script
runScript(inst);
} else {
- alert('You are missing some values');
+ // Show warning message
+ var warn = createWarnBar('You are missing some values');
+ warn.prependTo($(this).parent().parent());
}
});
scriptForm.append(runBtn);
@@ -1130,8 +1138,7 @@ function updateStatusBar(data) {
var prg = writeRsp(rsp, '');
$('#' + statBarId).append(prg);
- // If there was an error
- // Do not continue
+ // If there was an error, do not continue
if (prg.html().indexOf('Error') > -1) {
failed = true;
}
@@ -1310,7 +1317,6 @@ function getNodeAttr(node, attrName) {
}
}
-
// If the column containing the attribute is found
if (attrCol) {
// Get the attribute column index
diff --git a/xCAT-UI/js/nodes/nodeset.js b/xCAT-UI/js/nodes/nodeset.js
index 5ac191fe1..f91c0c17c 100644
--- a/xCAT-UI/js/nodes/nodeset.js
+++ b/xCAT-UI/js/nodes/nodeset.js
@@ -58,11 +58,12 @@ function loadNodesetPage(tgtNodes) {
var method = $('');
var methodLabel = $('');
var methodSelect = $('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
- methodSelect.append('');
+ methodSelect.append(''
+ + ''
+ + ''
+ + ''
+ + ''
+ );
method.append(methodLabel);
method.append(methodSelect);
nodesetForm.append(method);
@@ -71,9 +72,10 @@ function loadNodesetPage(tgtNodes) {
var type = $('');
var typeLabel = $('');
var typeSelect = $('');
- typeSelect.append('');
- typeSelect.append('');
- typeSelect.append('');
+ typeSelect.append(''
+ + ''
+ + ''
+ );
type.append(typeLabel);
type.append(typeSelect);
nodesetForm.append(type);
@@ -128,6 +130,9 @@ function loadNodesetPage(tgtNodes) {
*/
var okBtn = createButton('Ok');
okBtn.bind('click', function(event) {
+ // Remove any warning messages
+ $(this).parent().parent().find('.ui-state-error').remove();
+
// Check state, OS, arch, and profile
var ready = true;
var inputs = $('#' + tabId + ' input');
@@ -178,7 +183,9 @@ function loadNodesetPage(tgtNodes) {
// Show status bar
statBar.show();
} else {
- alert('You are missing some values');
+ // Show warning message
+ var warn = createWarnBar('You are missing some values');
+ warn.prependTo($(this).parent().parent());
}
});
nodesetForm.append(okBtn);
diff --git a/xCAT-UI/js/nodes/rnetboot.js b/xCAT-UI/js/nodes/rnetboot.js
index 6a9bbeeda..2059e9199 100644
--- a/xCAT-UI/js/nodes/rnetboot.js
+++ b/xCAT-UI/js/nodes/rnetboot.js
@@ -104,6 +104,9 @@ function loadNetbootPage(tgtNodes) {
*/
var okBtn = createButton('Ok');
okBtn.bind('click', function(event) {
+ // Remove any warning messages
+ $(this).parent().parent().find('.ui-state-error').remove();
+
// Check inputs
var ready = true;
var inputs = $("#" + newTabId + " input[type='text']:visible");
@@ -169,7 +172,9 @@ function loadNetbootPage(tgtNodes) {
// Show status bar
statusBar.show();
} else {
- alert('You are missing some values');
+ // Show warning message
+ var warn = createWarnBar('You are missing some values');
+ warn.prependTo($(this).parent().parent());
}
});
netbootForm.append(okBtn);
diff --git a/xCAT-UI/js/nodes/updatenode.js b/xCAT-UI/js/nodes/updatenode.js
index 49dccc017..4ad67e28d 100644
--- a/xCAT-UI/js/nodes/updatenode.js
+++ b/xCAT-UI/js/nodes/updatenode.js
@@ -155,6 +155,7 @@ function loadUpdatenodePage(tgtNodes) {
var postscripts = $('
');
postscripts.hide();
optsList.append(postscripts);
+
// Show alternate source directory when checked
postChkBox.bind('click', function(event) {
if ($(this).is(':checked')) {
@@ -203,6 +204,8 @@ function loadUpdatenodePage(tgtNodes) {
*/
var okBtn = createButton('Ok');
okBtn.bind('click', function(event) {
+ // Remove any warning messages
+ $(this).parent().parent().find('.ui-state-error').remove();
var ready = true;
// Generate arguments
@@ -218,9 +221,9 @@ function loadUpdatenodePage(tgtNodes) {
var srcDir = $('#' + newTabId + ' input[name=allSwSrcDirectory]').val();
if (srcDir) {
optStr += ';-d ' + srcDir;
- }
+ }
}
-
+
// If update software is checked
if (opt == 'S') {
// Get source directory
@@ -299,7 +302,9 @@ function loadUpdatenodePage(tgtNodes) {
// Show status bar
statusBar.show();
} else {
- alert('You are missing some values');
+ // Show warning message
+ var warn = createWarnBar('You are missing some values');
+ warn.prependTo($(this).parent().parent());
}
});
updatenodeForm.append(okBtn);
diff --git a/xCAT-UI/js/ui.js b/xCAT-UI/js/ui.js
index e89cfacca..829605f4c 100644
--- a/xCAT-UI/js/ui.js
+++ b/xCAT-UI/js/ui.js
@@ -416,7 +416,6 @@ function initPage() {
includeJs("js/jquery/jquery.autocomplete.js");
includeJs("js/jquery/jquery.contextmenu.js");
includeJs("js/jquery/jquery.cookie.js");
- includeJs("js/jquery/jquery-impromptu.3.0.min.js");
includeJs("js/jquery/superfish.js");
includeJs("js/jquery/hoverIntent.js");
includeJs("js/jquery/jquery.tree.js");
@@ -529,17 +528,15 @@ function writeRsp(rsp, pattern) {
* @return Nothing
*/
function openDialog(msg) {
- // If there was an error, do not continue
var div = $('