Parsed out max-vm from comments

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12910 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2012-05-23 14:30:32 +00:00
parent bf8b2d03e7
commit d35ff774bf

View File

@ -309,7 +309,7 @@ function loadUserTable4Policy(data) {
// Start with the 2nd row (1st row is the headers)
topPriority = 0;
for ( var i = 1; i < rsp.length; i++) {
for (var i = 1; i < rsp.length; i++) {
// Split into columns
var tmp = rsp[i].split(',');
@ -326,8 +326,13 @@ function loadUserTable4Policy(data) {
// Update the priority and max-vm columns
if (rowPos > -1) {
var maxVM = tmp[8].replace('max-vm:', '');
maxVM = maxVM.replace(';', '');
var maxVM = 0;
var comments = tmp[8].split(';');
for (var k in comments) {
if (comments[k].indexOf('max-vm:') > -1)
maxVM = comments[k].replace('max-vm:', '');
}
datatable.fnUpdate(maxVM, rowPos, 4, false);
var priority = tmp[0];