Browse Source

tidying up

pull/11/head
Bryce Murphy 5 years ago
parent
commit
ff22fa1f71
2 changed files with 23 additions and 0 deletions
  1. +3
    -0
      public/OrgRepoGraph.html
  2. +20
    -0
      public/js/createOrgInfo.js

+ 3
- 0
public/OrgRepoGraph.html View File

@ -18,6 +18,7 @@
<script src="js/utilities.js"></script> <script src="js/utilities.js"></script>
<script src="js/profileGen.js"></script> <script src="js/profileGen.js"></script>
<script src="js/createOrgTable.js"></script> <script src="js/createOrgTable.js"></script>
<script src="js/createOrgInfo.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.18/datatables.min.css"/> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.18/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.18/datatables.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.18/datatables.min.js"></script>
@ -66,6 +67,7 @@
<div class="col-md-6 col-12"> <div class="col-md-6 col-12">
<h2 id="graphLabel"></h2> <h2 id="graphLabel"></h2>
<div id="myGraph" class="w-100"></div> <div id="myGraph" class="w-100"></div>
<div id="organizationInfo"></div>
<pre id="eventSpan"></pre> <pre id="eventSpan"></pre>
</div> </div>
<div class="col-md-4 col-12 bg-light"> <div class="col-md-4 col-12 bg-light">
@ -95,6 +97,7 @@
createOrgRepoGraph(orgname, "myGraph", "graphLoading"); createOrgRepoGraph(orgname, "myGraph", "graphLoading");
createOrgTable(orgname, 'repositoryTable'); createOrgTable(orgname, 'repositoryTable');
createOrgInfo(orgname, 'organizationInfo')
} }
if(findGetParameter("name") !== null) { if(findGetParameter("name") !== null) {

+ 20
- 0
public/js/createOrgInfo.js View File

@ -0,0 +1,20 @@
function createOrgInfo(orgName, container) {
queryAPIByOrg("", orgName, (orgData) => {
console.log("called");
var html =
"<div class=\"card\" style=\"w-100;\"> \
<div class=\"card-body\"> \
<div class=\"card-header\"><h3 class=\"card-title\">"+orgData.name+"</h3></div> " +
(orgData.description != null ? "<div class=\"card-text\"><p>"+orgData.description+"</p></div>" : "") + " \
</div> \
<ul class=\"list-group list-group-flush\">"+
(orgData.location !=null ? "<li class=\"list-group-item\">Location: "+orgData.location+"</li>" : "") + " \
</ul> \
</div>"
$("#" + container).html(html);
$('#dataTable').DataTable();
}, function(error) {
console.log("Unable to load table data");
});
}

Loading…
Cancel
Save