diff --git a/xCAT-UI/js/custom/hmc.js b/xCAT-UI/js/custom/hmc.js index b6473d7d5..6a58cfe5b 100644 --- a/xCAT-UI/js/custom/hmc.js +++ b/xCAT-UI/js/custom/hmc.js @@ -29,7 +29,7 @@ hmcPlugin.prototype.loadInventory = function(data) { var inv = data.rsp; // Remove loader - var loaderId = node + 'TabLoader'; + var loaderId = tabId + 'TabLoader'; $('#' + loaderId).remove(); // Create division to hold inventory diff --git a/xCAT-UI/js/custom/zvm.js b/xCAT-UI/js/custom/zvm.js index 38de90184..e8c70bdac 100644 --- a/xCAT-UI/js/custom/zvm.js +++ b/xCAT-UI/js/custom/zvm.js @@ -290,7 +290,7 @@ zvmPlugin.prototype.loadInventory = function(data) { var inv = data.rsp[0].split(node + ':'); // Remove loader - var loaderId = node + 'TabLoader'; + var loaderId = tabId + 'TabLoader'; $('#' + loaderId).remove(); // Create status bar diff --git a/xCAT-UI/js/nodes/nodes.js b/xCAT-UI/js/nodes/nodes.js index ada3dfa94..7770dd59f 100644 --- a/xCAT-UI/js/nodes/nodes.js +++ b/xCAT-UI/js/nodes/nodes.js @@ -634,14 +634,20 @@ 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. var myTab = getNodesTab(); - var newTabId = node + 'Tab'; - + var inst = 0; + var newTabId = 'NodeTab' + inst; + while ($('#' + newTabId).length) { + // If one already exists, generate another one + inst = inst + 1; + newTabId = 'NodeTab' + inst; + } // Reset node process $.cookie(node + 'Processes', 0); // Add new tab, only if one does not exist - var loader = createLoader(node + 'TabLoader'); + var loader = createLoader(newTabId + 'TabLoader'); loader = $('