From ff22fa1f71d2af2c861df6e90b339bcfdb41f7db Mon Sep 17 00:00:00 2001 From: Bryce Murphy Date: Sun, 17 Feb 2019 07:35:54 -0500 Subject: [PATCH] tidying up --- public/OrgRepoGraph.html | 3 +++ public/js/createOrgInfo.js | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 public/js/createOrgInfo.js diff --git a/public/OrgRepoGraph.html b/public/OrgRepoGraph.html index bc566d3..fee6086 100644 --- a/public/OrgRepoGraph.html +++ b/public/OrgRepoGraph.html @@ -18,6 +18,7 @@ + @@ -66,6 +67,7 @@

+

             
@@ -95,6 +97,7 @@ createOrgRepoGraph(orgname, "myGraph", "graphLoading"); createOrgTable(orgname, 'repositoryTable'); + createOrgInfo(orgname, 'organizationInfo') } if(findGetParameter("name") !== null) { diff --git a/public/js/createOrgInfo.js b/public/js/createOrgInfo.js new file mode 100644 index 0000000..8b224fc --- /dev/null +++ b/public/js/createOrgInfo.js @@ -0,0 +1,20 @@ +function createOrgInfo(orgName, container) { + queryAPIByOrg("", orgName, (orgData) => { + console.log("called"); + var html = + "
\ +
\ +

"+orgData.name+"

" + + (orgData.description != null ? "

"+orgData.description+"

" : "") + " \ +
\ +
    "+ + (orgData.location !=null ? "
  • Location: "+orgData.location+"
  • " : "") + " \ +
\ +
" + + $("#" + container).html(html); + $('#dataTable').DataTable(); + }, function(error) { + console.log("Unable to load table data"); + }); +} \ No newline at end of file