Skip to content

Commit 1405bca

Browse files
committed
Created more robust checks for if the organizations exists.
1 parent a84b605 commit 1405bca

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

public/OrgRepoGraph.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
createOrgInfo(orgname, 'organizationInfo')
101101
}
102102

103-
if(findGetParameter("name") !== null) {
103+
if(findGetParameter("name") !== null)
104+
{
104105
createGraphs(findGetParameter("name"))
105106
}
106107

public/js/createOrgInfo.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function createOrgInfo(orgName, container) {
1515
$("#" + container).html(html);
1616
$('#dataTable').DataTable();
1717
}, function(error) {
18-
console.log("Unable to load table data");
18+
alert("Organization Does Not Exist");
19+
window.location.href = "./GraphGenerator.html";
1920
});
2021
}

public/js/createOrgTable.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ function createOrgTable(orgName, tableContainer)
5252
}
5353

5454
$("#" + tableContainer).html(html);
55-
$('#dataTable').DataTable();
55+
56+
$(document).ready(function() {
57+
$('#dataTable').DataTable();
58+
} );
5659
}).catch(function(error)
5760
{
5861
//console.log("Unable to create table");

public/js/profileGen.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ function profileGen(username, container)
4949
$("#"+container).html(html);
5050
})
5151
}, () => {
52-
console.error("error getting user info");
52+
alert("User Does Not Exist");
53+
window.location.href = "./GraphGenerator.html";
5354
});
5455
}
5556

0 commit comments

Comments
 (0)