diff --git a/xCAT-UI/js/configure/users.js b/xCAT-UI/js/configure/users.js index 3781df970..dda52524a 100644 --- a/xCAT-UI/js/configure/users.js +++ b/xCAT-UI/js/configure/users.js @@ -323,7 +323,7 @@ function openCreateUserDialog(data) { data : { cmd : 'webrun', tgt : '', - args : 'policy|' + priority + '|' + args, + args : 'policy||' + priority + '||' + args, msg : dialogId }, @@ -337,7 +337,7 @@ function openCreateUserDialog(data) { data : { cmd : 'webrun', tgt : '', - args : 'passwd|' + usrName + '|' + password, + args : 'passwd||' + usrName + '||' + password, msg : dialogId }, @@ -455,7 +455,7 @@ function openDeleteUserDialog(users) { data : { cmd : 'webrun', tgt : '', - args : 'deleteuser|' + users, + args : 'deleteuser||' + users, msg : dialogId }, success : updatePanel diff --git a/xCAT-UI/js/custom/esx.js b/xCAT-UI/js/custom/esx.js index 92b084c90..33f686a59 100644 --- a/xCAT-UI/js/custom/esx.js +++ b/xCAT-UI/js/custom/esx.js @@ -70,6 +70,15 @@ esxPlugin.prototype.loadConfigPage = function(tabId) { profileLnk.trigger('click'); }; +/** + * Migrate node + * + * @param node Node to migrate + */ +esxPlugin.prototype.loadMigratePage = function(node) { + openDialog('info', 'Not yet supported'); +}; + /** * Clone node (service page) * diff --git a/xCAT-UI/js/custom/kvm.js b/xCAT-UI/js/custom/kvm.js index 1f2ca89b1..4add9688d 100644 --- a/xCAT-UI/js/custom/kvm.js +++ b/xCAT-UI/js/custom/kvm.js @@ -68,6 +68,15 @@ kvmPlugin.prototype.loadConfigPage = function(tabId) { profileLnk.trigger('click'); }; +/** + * Migrate node + * + * @param node Node to migrate + */ +kvmPlugin.prototype.loadMigratePage = function(node) { + openDialog('info', 'Not yet supported'); +}; + /** * Clone node (service page) * diff --git a/xCAT-UI/js/custom/zvm.js b/xCAT-UI/js/custom/zvm.js index 015b050b2..a6dbf87f9 100644 --- a/xCAT-UI/js/custom/zvm.js +++ b/xCAT-UI/js/custom/zvm.js @@ -2394,18 +2394,16 @@ zvmPlugin.prototype.loadMigratePage = function(tgtNode) { if (maxQuiesce.val() <= 0) { args = args + "max_quiesce=NOLIMIT;"; } else { - args = args + "'max_quiesce=" + maxQuiesce.val() + "';"; + args = args + "max_quiesce=" + maxQuiesce.val() + ";"; } // Append force argument if ($("input[name=force]:checked").length > 0) { args = args + "'force=" $("input[name=force]:checked").each(function() { - args = args + $(this).val() + ' '; + args += $(this).val() + ' '; }); - args = args + "';"; - } else { - args = args + ";"; + args += "';"; } var statBarId = 'migrateStatusBar' + inst; diff --git a/xCAT-UI/js/custom/zvmUtils.js b/xCAT-UI/js/custom/zvmUtils.js index 5df11d311..8bc5dd041 100644 --- a/xCAT-UI/js/custom/zvmUtils.js +++ b/xCAT-UI/js/custom/zvmUtils.js @@ -1993,7 +1993,7 @@ function openAddScsi2SystemDialog(hcp) { data : { cmd : 'chhypervisor', tgt : hcp, - args : "--addscsi|" + num + "|" + pathArray + "|" + option + "|" + persist, + args : "--addscsi||" + num + "||" + pathArray + "||" + option + "||" + persist, msg : dialogId }, @@ -2707,7 +2707,7 @@ function removeZfcp(node, address, wwpn, lun) { data : { cmd : 'chvm', tgt : node, - args : '--removezfcp;' + address + ';' + wwpn + ';' + lun, + args : '--removezfcp||' + address + '||' + wwpn + '||' + lun, msg : node }, @@ -3624,7 +3624,7 @@ function openAddZfcp2PoolDialog() { data : { cmd : 'chvm', tgt : tgtHcp, - args : '--addzfcp2pool|' + tgtPool + '|' + tgtStatus + '|"' + tgtPortName + '"|' + tgtUnitNo + '|' + tgtSize + "| " + tgtRange + '|' + tgtOwner, + args : '--addzfcp2pool||' + tgtPool + '||' + tgtStatus + '||"' + tgtPortName + '"||' + tgtUnitNo + '||' + tgtSize + '||' + tgtRange + '||' + tgtOwner, msg : dialogId }, diff --git a/xCAT-UI/js/nodes/nodes.js b/xCAT-UI/js/nodes/nodes.js index 074d5d520..76b16a7f7 100644 --- a/xCAT-UI/js/nodes/nodes.js +++ b/xCAT-UI/js/nodes/nodes.js @@ -418,24 +418,24 @@ function mkAddNodeLink() { var plugin; switch(mgt) { - case "kvm": - plugin = new kvmPlugin(); - break; - case "esx": - plugin = new esxPlugin(); - break; - case "blade": - plugin = new bladePlugin(); - break; - case "hmc": - plugin = new hmcPlugin(); - break; - case "ipmi": - plugin = new ipmiPlugin(); - break; - case "zvm": - plugin = new zvmPlugin(); - break; + case "kvm": + plugin = new kvmPlugin(); + break; + case "esx": + plugin = new esxPlugin(); + break; + case "blade": + plugin = new bladePlugin(); + break; + case "hmc": + plugin = new hmcPlugin(); + break; + case "ipmi": + plugin = new ipmiPlugin(); + break; + case "zvm": + plugin = new zvmPlugin(); + break; } plugin.addNode(); @@ -686,24 +686,15 @@ function loadNodes(data) { // Create an instance of the plugin var plugin; switch(mgt) { - 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; + case "kvm": + plugin = new kvmPlugin(); + break; + case "esx": + plugin = new esxPlugin(); + break; + case "zvm": + plugin = new zvmPlugin(); + break; } plugin.loadClonePage(tgtNodes[i]); @@ -741,34 +732,35 @@ function loadNodes(data) { var migrateLnk = $('Migrate'); migrateLnk.click(function() { var tgtNodes = getNodesChecked(nodesTableId).split(','); + var mgt = "", tmp = ""; for (var i in tgtNodes) { - var mgt = getNodeAttr(tgtNodes[i], 'mgt'); - - // Create an instance of the plugin - var plugin; - switch(mgt) { - 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; + tmp = getNodeAttr(tgtNodes[i], 'mgt'); + if (!mgt) { + mgt = tmp + } else { + if (tmp != mgt) { + openDialog('warn', "You can pick only one type (mgt) of node to migrate!"); + return; + } } - - plugin.loadMigratePage(tgtNodes[i]); } + + // Create an instance of the plugin + var plugin; + switch(mgt) { + // Only hypervisors support migration + case "kvm": + plugin = new kvmPlugin(); + break; + case "esx": + plugin = new esxPlugin(); + break; + case "zvm": + plugin = new zvmPlugin(); + break; + } + + plugin.loadMigratePage(tgtNodes); }); // Update @@ -854,24 +846,24 @@ function loadNodes(data) { // Create an instance of the plugin var plugin; switch(mgt) { - 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; + case "kvm": + plugin = new kvmPlugin(); + break; + case "esx": + plugin = new esxPlugin(); + break; + case "blade": + plugin = new bladePlugin(); + break; + case "hmc": + plugin = new hmcPlugin(); + break; + case "ipmi": + plugin = new ipmiPlugin(); + break; + case "zvm": + plugin = new zvmPlugin(); + break; } plugin.loadLogPage(tgtNodes[i]); @@ -1635,24 +1627,24 @@ function loadNode(e) { // Create an instance of the plugin var plugin; switch(mgt) { - 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; + case "kvm": + plugin = new kvmPlugin(); + break; + case "esx": + plugin = new esxPlugin(); + break; + case "blade": + plugin = new bladePlugin(); + break; + case "hmc": + plugin = new hmcPlugin(); + break; + case "ipmi": + plugin = new ipmiPlugin(); + break; + case "zvm": + plugin = new zvmPlugin(); + break; } // Get tab area where a new tab will be inserted diff --git a/xCAT-UI/js/service/service.js b/xCAT-UI/js/service/service.js index e40140014..13da1083c 100644 --- a/xCAT-UI/js/service/service.js +++ b/xCAT-UI/js/service/service.js @@ -858,18 +858,15 @@ function loadNode(e) { // Create an instance of the plugin var plugin; switch (mgt) { - case "blade": - plugin = new bladePlugin(); - break; - case "hmc": - plugin = new hmcPlugin(); - break; - case "ipmi": - plugin = new ipmiPlugin(); - break; - case "zvm": - plugin = new zvmPlugin(); - break; + case "kvm": + plugin = new kvmPlugin(); + break; + case "esx": + plugin = new esxPlugin(); + break; + case "zvm": + plugin = new zvmPlugin(); + break; } // Select tab @@ -1317,18 +1314,15 @@ function cloneNode(tgtNodes) { // Create an instance of the plugin var plugin; switch (hw) { - case "blade": - plugin = new bladePlugin(); - break; - case "hmc": - plugin = new hmcPlugin(); - break; - case "ipmi": - plugin = new ipmiPlugin(); - break; - case "zvm": - plugin = new zvmPlugin(); - break; + case "kvm": + plugin = new kvmPlugin(); + break; + case "esx": + plugin = new esxPlugin(); + break; + case "zvm": + plugin = new zvmPlugin(); + break; } // Clone node diff --git a/xCAT-UI/js/ui.js b/xCAT-UI/js/ui.js index 6d1450914..10996f56d 100644 --- a/xCAT-UI/js/ui.js +++ b/xCAT-UI/js/ui.js @@ -676,21 +676,21 @@ function writeRsp(rsp, pattern) { * @param msg Message to show */ function openDialog(type, msg) { - var msgDialog; + var msgDialog = $('
'); + var title = ""; if (type == "warn") { // Create warning message - msgDialog = $('' + msg + '
' - + '' + msg + '
' - +'