diff --git a/xCAT-UI/js/custom/zvm.js b/xCAT-UI/js/custom/zvm.js index 5145fd1c1..fee3b239f 100644 --- a/xCAT-UI/js/custom/zvm.js +++ b/xCAT-UI/js/custom/zvm.js @@ -516,8 +516,8 @@ zvmPlugin.prototype.loadServiceInventory = function(data) { var nicVDev, nicType, nicPortName, nicNumOfDevs, nicLanName; // Loop through each NIC (Data contained in 2 lines) - for (l = 0; l < attrs[keys[k]].length; l = l + 2) { - if (attrs[keys[k]][l]) { + for (l = 0; l < attrs[keys[k]].length; l++) { + if (attrs[keys[k]][l].indexOf('Adapter') != -1) { args = attrs[keys[k]][l].split(' '); // Get NIC virtual device, type, port name, and number of devices @@ -1530,8 +1530,8 @@ zvmPlugin.prototype.loadInventory = function(data) { var nicVDev, nicType, nicPortName, nicNumOfDevs, nicLanName; // Loop through each NIC (Data contained in 2 lines) - for (l = 0; l < attrs[keys[k]].length; l = l + 2) { - if (attrs[keys[k]][l]) { + for (l = 0; l < attrs[keys[k]].length; l++) { + if (attrs[keys[k]][l].indexOf('Adapter') != -1) { args = attrs[keys[k]][l].split(' '); // Get NIC virtual device, type, port name, and number of devices diff --git a/xCAT-UI/js/service/service.js b/xCAT-UI/js/service/service.js index 9cae5e602..4d60e2e5e 100644 --- a/xCAT-UI/js/service/service.js +++ b/xCAT-UI/js/service/service.js @@ -1676,7 +1676,7 @@ function getMonitorMetrics(node) { var node, status; // Get the ganglia status - for ( var i in ganglia) { + for (var i in ganglia) { // ganglia[0] = nodeName and ganglia[1] = state node = jQuery.trim(ganglia[i][0]); status = jQuery.trim(ganglia[i][1]);