Website for visualizing a persons github network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
732 B

  1. function generateHtmlRow(repoData)
  2. {
  3. var html = "<tr class=\"table_row\">";
  4. html+="<td><a href='" + repoData.url + "'>" + repoData.name + "</a></td>";
  5. html+="<td>" + repoData.forks + "</td>";
  6. html+="<td>" + repoData.language + "</td>";
  7. html +="</tr>";
  8. return html;
  9. }
  10. function createOrgTable(orgName, tableContainer)
  11. {
  12. var html = "";
  13. queryAPIByOrg(API_REPOSITORIES, orgName,
  14. function(data)
  15. {
  16. for(var i=0; i < data.length; i++)
  17. {
  18. html += generateHtmlRow(data[i]);
  19. }
  20. $("#" + tableContainer).html(html);
  21. },
  22. function(error)
  23. {
  24. console.log("Unable to load table data");
  25. });
  26. }