Skip to content

Commit

Permalink
[#287] fileTypes.html not producing correct results
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeli committed Oct 22, 2019
1 parent 659dfca commit 0746448
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/main/resources/webapps/nna/fileTypes.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
<meta name="author" content="">
<link rel="icon" href="./favicon.ico">


<title>NNA Quotas</title>
<title>NNA FileTypes</title>

<!-- Bootstrap core CSS -->
<link href="./css/bootstrap.min.css" rel="stylesheet">
Expand Down Expand Up @@ -112,11 +111,11 @@ <h1>Welcome to NNAnalytics</h1>
var array = [];
var counts = obj.fileTypeCount;
var diskspaces = obj.fileTypeDs;

var users = union(Object.keys(counts), Object.keys(diskspaces));
var fileTypes = union(Object.keys(Object.values(counts)[0]), Object.keys(Object.values(diskspaces)[0]));


for(var user of users) {
var fileTypes = union(Object.keys(counts[user]), Object.keys(diskspaces[user]));
for(var fileType of fileTypes) {
var innerArray = [];
innerArray.push(user);
Expand All @@ -125,13 +124,13 @@ <h1>Welcome to NNAnalytics</h1>
if(count != null) {
innerArray.push(counts[user][fileType]);
} else {
innerArray.push(-1);
innerArray.push(0);
}
var diskspace = diskspaces[user][fileType];
if(diskspace != null) {
innerArray.push(diskspaces[user][fileType]);
} else {
innerArray.push(-1);
innerArray.push(0);
}
array.push(innerArray);
}
Expand All @@ -150,7 +149,7 @@ <h1>Welcome to NNAnalytics</h1>
},
"iDisplayLength": 100,
"aLengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
"order": [[0, "desc"], [3, "desc"]],
"order": [[2, "desc"], [3, "desc"], [0, "desc"]],
"dom": 'Bfrtipl',
"buttons": [
'copyHtml5', 'csvHtml5', 'excelHtml5'
Expand Down

0 comments on commit 0746448

Please sign in to comment.