diff --git a/xCAT-UI/js/nodes/nodes.js b/xCAT-UI/js/nodes/nodes.js index 61c5d3f7e..afa7d1a4b 100644 --- a/xCAT-UI/js/nodes/nodes.js +++ b/xCAT-UI/js/nodes/nodes.js @@ -1397,7 +1397,7 @@ function loadGangliaStatus(data) { // Get datatable var datatable = $('#' + nodesTableId).dataTable(); var ganglia = data.rsp; - var rowNum, node, status, args; + var rowNum, node, status; for ( var i in ganglia) { // ganglia[0] = nodeName and ganglia[1] = state @@ -2052,6 +2052,9 @@ function updateStatusBar(data) { dTable.fnDeleteRow(rowPos); } } + + // Adjust column size + adjustColumnSize(nodesTableId); } else if (cmd == 'xdsh') { // Hide loader $('#' + statBarId).find('img').hide(); diff --git a/xCAT-UI/js/service/service.js b/xCAT-UI/js/service/service.js index 8776e2de9..b10ddff60 100644 --- a/xCAT-UI/js/service/service.js +++ b/xCAT-UI/js/service/service.js @@ -191,14 +191,20 @@ function loadServiceProvisionPage(tabId) { okBtn.bind('click', function(event) { var userName = $.cookie('srv_usrname'); var tmp = $.cookie(userName + '_usrnodes'); - var nodes = tmp.split(','); - var maxVM = parseInt($.cookie(userName + '_maxvm')); - // Do not allow user to clone if the maximum number of VMs is reached - if (nodes.length >= maxVM) { - var warn = createWarnBar('You have reached the maximum number of VMs allowed. Please de-allocate some existing VMs to free up space or contact your system administrator request more VMs.'); - warn.prependTo($('#' + tabId)); - return; + // Get maximun number for nodes from cookie + var nodes = ''; + var maxVM = 0; + if (tmp.length) { + nodes = tmp.split(','); + maxVM = parseInt($.cookie(userName + '_maxvm')); + + // Do not allow user to clone if the maximum number of VMs is reached + if (nodes.length >= maxVM) { + var warn = createWarnBar('You have reached the maximum number of virtual machines allowed (' + maxVM + '). Delete unused virtual machines or contact your system administrator request more virtual machines.'); + warn.prependTo($('#' + tabId)); + return; + } } // Get hardware that was selected @@ -276,8 +282,7 @@ function loadServiceProvisionPage(tabId) { */ function loadManagePage(tabId) { // Create manage form - var loader = createLoader(''); - var manageForm = $('
').append(loader); + var manageForm = $(''); // Append to manage tab $('#' + tabId).append(manageForm); @@ -305,8 +310,7 @@ function getUserNodesDef() { }); } else { // Clear the tab before inserting the table - $('#manageTab').children().remove(); - $('#manageTab').append(createWarnBar('Could not find any nodes that belong to you. Do you have any? Or did your session expire?')); + $('#manageTab').append(createWarnBar('No nodes were found belonging to you!')); } } @@ -1295,7 +1299,7 @@ function cloneNode(tgtNodes) { // Do not allow user to clone if the maximum number of VMs is reached if (usrNodes.length >= maxVM) { - var warn = createWarnBar('You have reached the maximum number of VMs allowed. Please de-allocate some existing VMs to free up space or contact your system administrator request more VMs.'); + var warn = createWarnBar('You have reached the maximum number of virtual machines allowed (' + maxVM + '). Delete un-used virtual machines or contact your system administrator request more virtual machines.'); warn.prependTo($('#manageTab')); return; } diff --git a/xCAT-UI/xcat/plugins/webportal.pm b/xCAT-UI/xcat/plugins/webportal.pm index da583b574..a917b66b4 100644 --- a/xCAT-UI/xcat/plugins/webportal.pm +++ b/xCAT-UI/xcat/plugins/webportal.pm @@ -224,7 +224,7 @@ sub provzlinux { return; } - my $userid = 'XCAT' . $base_digit; + my $userid = $node; # Set node definitions # Also put node into all group @@ -670,7 +670,7 @@ sub clonezlinux { # Create VM # e.g. webportal provzlinux [group] [hcp] [image] my ($node, $ip, $base_digit) = gennodename( $callback, $group ); - my $userid = 'XCAT' . $base_digit; + my $userid = $node; # Set node definitions $out = `mkdef -t node -o $node userid=$userid hcp=$hcp mgt=zvm groups=$group`;