|
157 | 157 | licenseData = []; |
158 | 158 | if('licenses' in x) { |
159 | 159 | licenseData = $.map(x.licenses, function(y){ |
160 | | - return [$.extend(y, { |
161 | | - "path" : x.location, |
162 | | - "what": "License", |
163 | | - "start_line": y.start_line, |
164 | | - "end_line": y.end_line, |
165 | | - "info": y.short_name |
166 | | - })]; |
| 160 | + return [$.extend(y, { |
| 161 | + "path" : x.location, |
| 162 | + "what": "License", |
| 163 | + "start_line": y.start_line, |
| 164 | + "end_line": y.end_line, |
| 165 | + "info": y.short_name, |
| 166 | + "pkg_type": "", |
| 167 | + "pkg_packaging": "", |
| 168 | + "pkg_primary_language": "" |
| 169 | + })]; |
167 | 170 | })}; |
168 | 171 | // Add all copyright columns here |
169 | 172 | copyrightData = []; |
170 | 173 | if('copyrights' in x) { |
171 | 174 | copyrightData = $.map(x.copyrights, function(y){ |
172 | | - return [$.extend(y, { |
173 | | - "path" : x.location, |
174 | | - "what": "Copyright", |
175 | | - "start_line": y.start_line, |
176 | | - "end_line": y.end_line, |
177 | | - "info": y.statements.join("</br>") |
178 | | - })]; |
| 175 | + return [$.extend(y, { |
| 176 | + "path" : x.location, |
| 177 | + "what": "Copyright", |
| 178 | + "start_line": y.start_line, |
| 179 | + "end_line": y.end_line, |
| 180 | + "info": y.statements.join("</br>"), |
| 181 | + "pkg_type": "", |
| 182 | + "pkg_packaging": "", |
| 183 | + "pkg_primary_language": "" |
| 184 | + })]; |
179 | 185 | })}; |
180 | 186 |
|
| 187 | + // Add all package columns here |
| 188 | + packageData = []; |
| 189 | + if('packages' in x) { |
| 190 | + packageData = $.map(x.packages, function(y){ |
| 191 | + return [$.extend(y, { |
| 192 | + "path" : x.location, |
| 193 | + "what": "Package", |
| 194 | + "start_line": "", |
| 195 | + "end_line": "", |
| 196 | + "info": "", |
| 197 | + "pkg_type": y.type, |
| 198 | + "pkg_packaging": y.packaging, |
| 199 | + "pkg_primary_language": y.primary_language |
| 200 | + })]; |
| 201 | + })}; |
181 | 202 | // Return the concatenation of the two data sets |
182 | | - return licenseData.concat(copyrightData); |
| 203 | + return licenseData.concat(copyrightData).concat(packageData); |
183 | 204 | }) |
184 | 205 | }; |
185 | 206 |
|
|
272 | 293 | { "title": "Start Line", "data": "start_line", "width": "50px"}, |
273 | 294 | { "title": "End Line", "data": "end_line", "width": "50px"}, |
274 | 295 | { "orderable": false, "data": null, 'defaultContent': '', "width":"1px"}, |
275 | | - { "title": "Info", "data": "info", "width": "30%"} |
| 296 | + { "title": "Info", "data": "info", "width": "30%"}, |
| 297 | + { "title": "Package Type", "data": "pkg_type", "width": "60px"}, |
| 298 | + { "title": "Packaging", "data": "pkg_packaging", "width": "60px"}, |
| 299 | + { "title": "Primary Language", "data": "pkg_primary_language", "width": "60px"} |
276 | 300 | ], |
277 | 301 | // This is called just before the row is rendered |
278 | 302 | "rowCallback": function( row, data, index ) { |
|
0 commit comments