Patrik and Tim,
I have run into a issue with the CSV export option. The description field could contain commas, and the Associated-Pools field has extra quotation marks > "|" < when there are multiple pools. These cause the fields to get cut up when imported into a spreadsheet.
I checked both v5.2.9 and v5.3.0 and found the code the same in both. I modified the following lines in the "generateCSV" function of bigipreport.js:
var line = vs.name + ',"' + (vs.description || "") + '",' + (vs.ip || "") + "," + (vs.port || "") + ',"' + (vs.sslprofileclient || "None") + '","' + (vs.sslprofileserver || "None") + '",' +(vs.compressionprofile || "None") + "," + (vs.persistenceprofile || "None") + "," + vs.availability + "," + vs.enabled + "," + vs.currentconnections + "," + vs.cpuavg5sec + "," + vs.cpuavg1min + "," + vs.cpuavg5min + "," + (vs.defaultpool || "None") + ',"';
var firstpool = true;
for (var p in vs.pools) {
if (!firstpool){ line += "|"} else { firstpool = false }
var pool = getPool(vs.pools[p], vs.loadbalancer);
line += pool.name + ": ";
line += getMembers(pool);
}
line += '",' + vs.loadbalancer;
I modified the "var line =" line (1) by changing the "," around the vs.description to be literal strings using apostrophes, and then at the end of the line the same thing to make sure quotation marks would go around the Associated-Pools field. I removed the quotation marks around the pipes (lines 10 & 12). And then ensured closing quotation marks (line 15).
I also used mixed case in the CSV header, but then, I am "particular" that way.
var csv = "Name,Description,IP,Port,SslProfileClient,SslProfileServer,CompressionProfile,PersistenceProfile,Availability,Enabled,CurrentConnections,CpuAvg5sec,CpuAvg1min,CpuAvg5min,DefaultPool,Associated-Pools,LoadBalancer\n";-Patrick
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)