Browse Source

Created more robust checks for if the organizations exists.

pull/11/head
Jeffery Russell 5 years ago
parent
commit
1405bcab9e
4 changed files with 10 additions and 4 deletions
  1. +2
    -1
      public/OrgRepoGraph.html
  2. +2
    -1
      public/js/createOrgInfo.js
  3. +4
    -1
      public/js/createOrgTable.js
  4. +2
    -1
      public/js/profileGen.js

+ 2
- 1
public/OrgRepoGraph.html View File

@ -100,7 +100,8 @@
createOrgInfo(orgname, 'organizationInfo') createOrgInfo(orgname, 'organizationInfo')
} }
if(findGetParameter("name") !== null) {
if(findGetParameter("name") !== null)
{
createGraphs(findGetParameter("name")) createGraphs(findGetParameter("name"))
} }

+ 2
- 1
public/js/createOrgInfo.js View File

@ -15,6 +15,7 @@ function createOrgInfo(orgName, container) {
$("#" + container).html(html); $("#" + container).html(html);
$('#dataTable').DataTable(); $('#dataTable').DataTable();
}, function(error) { }, function(error) {
console.log("Unable to load table data");
alert("Organization Does Not Exist");
window.location.href = "./GraphGenerator.html";
}); });
} }

+ 4
- 1
public/js/createOrgTable.js View File

@ -52,7 +52,10 @@ function createOrgTable(orgName, tableContainer)
} }
$("#" + tableContainer).html(html); $("#" + tableContainer).html(html);
$('#dataTable').DataTable();
$(document).ready(function() {
$('#dataTable').DataTable();
} );
}).catch(function(error) }).catch(function(error)
{ {
//console.log("Unable to create table"); //console.log("Unable to create table");

+ 2
- 1
public/js/profileGen.js View File

@ -49,7 +49,8 @@ function profileGen(username, container)
$("#"+container).html(html); $("#"+container).html(html);
}) })
}, () => { }, () => {
console.error("error getting user info");
alert("User Does Not Exist");
window.location.href = "./GraphGenerator.html";
}); });
} }

Loading…
Cancel
Save