From 4916e1ad31233407dbc0b7c53181d69f8d2a43c1 Mon Sep 17 00:00:00 2001 From: phamt Date: Tue, 6 Nov 2012 20:52:55 +0000 Subject: [PATCH] Fixed sizing issue for action bar on Google Chrome. Fixed zFCP table for when no pool exists. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14259 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/configure/service.js | 6 ++-- xCAT-UI/js/custom/zvmUtils.js | 36 +++++++++++-------- .../xcat/install/scripts/post.rhel6.s390x | 4 +-- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/xCAT-UI/js/configure/service.js b/xCAT-UI/js/configure/service.js index eaa7954b2..116932cca 100644 --- a/xCAT-UI/js/configure/service.js +++ b/xCAT-UI/js/configure/service.js @@ -178,7 +178,7 @@ function loadUserTable(data) { }); // Create action bar - var actionBar = $('
'); + var actionBar = $('
').css("width", "400px"); var createLnk = $('Create'); createLnk.click(function() { @@ -687,7 +687,7 @@ function configImagePanel(data) { }); // Create action bar - var actionBar = $('
'); + var actionBar = $('
').css("width", "400px"); // Create a profile var createLnk = $('Create'); @@ -1193,7 +1193,7 @@ function configGroupPanel(data) { }); // Create action bar - var actionBar = $('
'); + var actionBar = $('
').css("width", "400px"); // Create a group var createLnk = $('Create'); diff --git a/xCAT-UI/js/custom/zvmUtils.js b/xCAT-UI/js/custom/zvmUtils.js index eedd128dc..4d27b2c3b 100644 --- a/xCAT-UI/js/custom/zvmUtils.js +++ b/xCAT-UI/js/custom/zvmUtils.js @@ -1965,7 +1965,7 @@ function getDiskPool(data) { * @param data HTTP request data */ function getZfcpPool(data) { - if (data.rsp) { + if (data.rsp.length) { var hcp = data.msg; var pools = data.rsp[0].split(hcp + ': '); @@ -1989,6 +1989,9 @@ function getZfcpPool(data) { }); } // End of if } // End of for + } else { + // Load empty table + loadZfcpPoolTable(null); } } @@ -2119,11 +2122,11 @@ function loadDiskPoolTable(data) { success : getDiskPool }); - } + } }); // Create action bar - var actionBar = $('
'); + var actionBar = $('
').css("width", "400px"); // Create an action menu var actionsMenu = createMenu([addLnk, removeLnk, refreshLnk]); @@ -2163,10 +2166,13 @@ function loadZfcpPoolTable(data) { var panelId = 'zfcpResource'; $('#' + panelId).find('img[src="images/loader.gif"]').remove(); - var args = data.msg.split(';'); - var hcp = args[0].replace('hcp=', ''); - var pool = args[1].replace('pool=', ''); - var tmp = data.rsp[0].split(hcp + ': '); + var args, hcp, pool, tmp; + if (data) { + args = data.msg.split(';'); + hcp = args[0].replace('hcp=', ''); + pool = args[1].replace('pool=', ''); + tmp = data.rsp[0].split(hcp + ': '); + } // Resource tab ID var info = $('#' + panelId).find('.ui-state-highlight'); @@ -2196,11 +2202,13 @@ function loadZfcpPoolTable(data) { setZfcpDataTable(dTable); } - // Skip index 0 and 1 because it contains nothing - for ( var i = 2; i < tmp.length; i++) { - tmp[i] = jQuery.trim(tmp[i]); - var diskAttrs = tmp[i].split(','); - dTable.fnAddData( [ '', hcp, pool, diskAttrs[0], diskAttrs[1], diskAttrs[2], diskAttrs[3], diskAttrs[4], diskAttrs[5], diskAttrs[6] ]); + if (data) { + // Skip index 0 and 1 because it contains nothing + for ( var i = 2; i < tmp.length; i++) { + tmp[i] = jQuery.trim(tmp[i]); + var diskAttrs = tmp[i].split(','); + dTable.fnAddData( [ '', hcp, pool, diskAttrs[0], diskAttrs[1], diskAttrs[2], diskAttrs[3], diskAttrs[4], diskAttrs[5], diskAttrs[6] ]); + } } // Create actions menu @@ -2252,7 +2260,7 @@ function loadZfcpPoolTable(data) { }); // Create action bar - var actionBar = $('
'); + var actionBar = $('
').css("width", "400px"); // Create an action menu var actionsMenu = createMenu([addLnk, removeLnk, refreshLnk]); @@ -4069,7 +4077,7 @@ function configProfilePanel(panelId) { }); // Create action bar - var actionBar = $('
'); + var actionBar = $('
').css("width", "400px"); // Create a profile var createLnk = $('Create'); diff --git a/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x b/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x index d32843f4a..35a35315d 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x @@ -136,9 +136,9 @@ $INSTALLDIR/postscripts/xcatinstallpost EOF chmod 755 /opt/xcat/xcatinstallpost -chkconfig --add xcatpostinit1 +chkconfig xcatpostinit1 on -#create the dskls post +# Create the dskls post cat >/opt/xcat/xcatdsklspost << 'EOF' #INCLUDE:#TABLE:site:key=installdir:value#/postscripts/xcatdsklspost# EOF