diff --git a/xCAT-UI/js/custom/zvm.js b/xCAT-UI/js/custom/zvm.js index 085e9005c..ff826074e 100644 --- a/xCAT-UI/js/custom/zvm.js +++ b/xCAT-UI/js/custom/zvm.js @@ -194,11 +194,19 @@ zvmPlugin.prototype.loadServiceInventory = function(data) { var tabId = args[0].replace('out=', ''); // Get node var node = args[1].replace('node=', ''); - // Get node inventory - var inv = data.rsp[0].split(node + ':'); - + // Remove loader $('#' + tabId).find('img').remove(); + + // Do not continue if error is found + if (data.rsp[0].indexOf('Error') > -1) { + var warn = createWarnBar(data.rsp[0]); + $('#' + tabId).append(warn); + return; + } + + // Get node inventory + var inv = data.rsp[0].split(node + ':'); // Create array of property keys var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'nic'); @@ -900,11 +908,19 @@ zvmPlugin.prototype.loadInventory = function(data) { var tabId = args[0].replace('out=', ''); // Get node var node = args[1].replace('node=', ''); - // Get node inventory - var inv = data.rsp[0].split(node + ':'); - + // Remove loader $('#' + tabId).find('img').remove(); + + // Do not continue if error is found + if (data.rsp[0].indexOf('Error') > -1) { + var warn = createWarnBar(data.rsp[0]); + $('#' + tabId).append(warn); + return; + } + + // Get node inventory + var inv = data.rsp[0].split(node + ':'); // Create status bar var statBarId = node + 'StatusBar'; @@ -979,7 +995,7 @@ zvmPlugin.prototype.loadInventory = function(data) { }); // Align toggle link to the right - var toggleLnkDiv = $('
').css( { + var toggleLnkDiv = $('').css({ 'text-align' : 'right' }); toggleLnkDiv.append(toggleLink);