updated download summary

pull/49/head
Ranjith Manickam 2020-02-09 16:23:54 +05:30
parent b1d33afd0a
commit 16fffca534
1 changed files with 4 additions and 10 deletions

View File

@ -13,13 +13,11 @@
dataType: "jsonp", dataType: "jsonp",
url: "https://api.github.com/repos/ran-jit/tomcat-cluster-redis-session-manager/releases", url: "https://api.github.com/repos/ran-jit/tomcat-cluster-redis-session-manager/releases",
success: function(data){ success: function(data){
var content = "<table border='1px' style='width: 80%;margin-left: 10%;margin-right: 10%;line-height: 1.5;'><tr><th style='width: 30%;'>tag</th><th>asset name & download count</th></tr>"; let content = "<table border='1px' style='width: 80%;margin-left: 10%;margin-right: 10%;line-height: 1.5;'><tr><th style='width: 30%;'>tag</th><th>asset name & download count</th></tr>";
for(var i=0; i< data.data.length; i++) { for(let i=0; i< data.data.length; i++) {
var tag = data.data[i]; const tag = data.data[i];
var downloadCount = 0;
for(var j=0; j< tag.assets.length; j++) { for(var j=0; j< tag.assets.length; j++) {
var asset = tag.assets[j]; const asset = tag.assets[j];
content = content + "<tr><td style='width: 10%;'>"+ tag.tag_name + "</td>"; content = content + "<tr><td style='width: 10%;'>"+ tag.tag_name + "</td>";
content = content + "<td>" + asset.name + "<div style='text-align:right;'>" + asset.download_count + "</div></td></tr>"; content = content + "<td>" + asset.name + "<div style='text-align:right;'>" + asset.download_count + "</div></td></tr>";
@ -31,9 +29,5 @@
}); });
}); });
</script> </script>
</table>
</body> </body>
</html> </html>