From f0cd1b890a51e29075ca44675b2fdc6e51ad22fe Mon Sep 17 00:00:00 2001 From: phamt Date: Fri, 29 Mar 2013 15:38:05 +0000 Subject: [PATCH] Allowed dialog box to show up when adding disks or NICs, even when no disk pool or network exists. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15730 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/custom/zvmUtils.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/xCAT-UI/js/custom/zvmUtils.js b/xCAT-UI/js/custom/zvmUtils.js index 2ec031c01..56d9a34dd 100644 --- a/xCAT-UI/js/custom/zvmUtils.js +++ b/xCAT-UI/js/custom/zvmUtils.js @@ -1246,7 +1246,10 @@ function openAddProcDialog(node) { function openAddDiskDialog(node, hcp) { // Get list of disk pools var cookie = $.cookie(hcp + 'diskpools'); - var pools = cookie.split(','); + var pools = new Array(); + if (cookie) { + pools = cookie.split(','); + } // Create form to add disk var addDiskForm = $('
'); @@ -1406,7 +1409,10 @@ function openAddDiskDialog(node, hcp) { function openAddZfcpDialog(node, hcp, zvm) { // Get list of disk pools var cookie = $.cookie(hcp + 'zfcppools'); - var pools = cookie.split(','); + var pools = new Array(); + if (cookie) { + pools = cookie.split(','); + } // Create form to add disk var addZfcpForm = $('
'); @@ -2369,7 +2375,11 @@ function openRemoveScsiDialog(hcp) { */ function openAddNicDialog(node, hcp) { // Get network names - var networks = $.cookie(hcp + 'networks').split(','); + var cookie = $.cookie(hcp + 'networks'); + var networks = new Array(); + if (cookie) { + networks = cookie.split(','); + } // Create form to add NIC var addNicForm = $('
');