Fixed formatting with percentage compliant and percentage assessed (default to only show 2 decimal places)

This commit is contained in:
Ryan Prather 2018-12-12 11:41:13 -05:00
parent 8048fea8d7
commit 904f1e4655
No known key found for this signature in database
GPG Key ID: 66FDE2B4E8AB87A7
2 changed files with 3 additions and 3 deletions

View File

@ -449,9 +449,9 @@ function display_stats_hosts(hosts) {
"<span class='cat-cell na' title='Not Applicable' style='text-align:center;'>" + hosts.targets[x].na + "</span>" +
"<span class='cat-cell nr' title='Not Reviewed' style='text-align:center;'>" + hosts.targets[x].nr + "</span>" +
"<span class='cat-cell comp' title='Percentage Compliant' style='text-align:center;background-color: " +
getColorForPercentage(hosts.targets[x].comp) + ";'>" + (hosts.targets[x].comp.toFixed(2) * 100) + "%</span>" +
getColorForPercentage(hosts.targets[x].comp) + ";'>" + (hosts.targets[x].comp * 100).toFixed(2) + "%</span>" +
"<span class='cat-cell assessed' title='Percentage Assessed' style='text-align:center;background-color: " +
getColorForPercentage(hosts.targets[x].assessed) + ";'>" + (hosts.targets[x].assessed.toFixed(2) * 100) + "%</span>" +
getColorForPercentage(hosts.targets[x].assessed) + ";'>" + (hosts.targets[x].assessed * 100).toFixed(2) + "%</span>" +
"<span class='cat-cell scans'>" +
(hosts.targets[x].scans ? hosts.targets[x].scans : "&nbsp;") +
"</span>" +

File diff suppressed because one or more lines are too long