From 093fa0578c4cbd0b7a86a60912b4a46c5c4002f6 Mon Sep 17 00:00:00 2001 From: phamt Date: Fri, 15 Feb 2013 17:20:22 +0000 Subject: [PATCH] Fixed inventory tab. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15184 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/custom/zvm.js | 8 ++++---- xCAT-UI/js/service/service.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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]);