Skip to content

Commit ff22fa1

Browse files
author
Bryce Murphy
committed
tidying up
1 parent 5a2a0ac commit ff22fa1

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

public/OrgRepoGraph.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<script src="js/utilities.js"></script>
1919
<script src="js/profileGen.js"></script>
2020
<script src="js/createOrgTable.js"></script>
21+
<script src="js/createOrgInfo.js"></script>
2122

2223
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.18/datatables.min.css"/>
2324
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.18/datatables.min.js"></script>
@@ -66,6 +67,7 @@
6667
<div class="col-md-6 col-12">
6768
<h2 id="graphLabel"></h2>
6869
<div id="myGraph" class="w-100"></div>
70+
<div id="organizationInfo"></div>
6971
<pre id="eventSpan"></pre>
7072
</div>
7173
<div class="col-md-4 col-12 bg-light">
@@ -95,6 +97,7 @@ <h2 id="graphLabel"></h2>
9597

9698
createOrgRepoGraph(orgname, "myGraph", "graphLoading");
9799
createOrgTable(orgname, 'repositoryTable');
100+
createOrgInfo(orgname, 'organizationInfo')
98101
}
99102

100103
if(findGetParameter("name") !== null) {

public/js/createOrgInfo.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
function createOrgInfo(orgName, container) {
2+
queryAPIByOrg("", orgName, (orgData) => {
3+
console.log("called");
4+
var html =
5+
"<div class=\"card\" style=\"w-100;\"> \
6+
<div class=\"card-body\"> \
7+
<div class=\"card-header\"><h3 class=\"card-title\">"+orgData.name+"</h3></div> " +
8+
(orgData.description != null ? "<div class=\"card-text\"><p>"+orgData.description+"</p></div>" : "") + " \
9+
</div> \
10+
<ul class=\"list-group list-group-flush\">"+
11+
(orgData.location !=null ? "<li class=\"list-group-item\">Location: "+orgData.location+"</li>" : "") + " \
12+
</ul> \
13+
</div>"
14+
15+
$("#" + container).html(html);
16+
$('#dataTable').DataTable();
17+
}, function(error) {
18+
console.log("Unable to load table data");
19+
});
20+
}

0 commit comments

Comments
 (0)