Browse Source

some more cleanup

pull/11/head
Bryce Murphy 5 years ago
parent
commit
e55b4e81c1
4 changed files with 35 additions and 6 deletions
  1. +0
    -1
      public/FriendsGraph.html
  2. +2
    -2
      public/GraphGenerator.html
  3. +2
    -2
      public/js/friendsGraph.js
  4. +31
    -1
      public/js/githubAPI.js

+ 0
- 1
public/FriendsGraph.html View File

@ -71,7 +71,6 @@
options.height = "700px"; options.height = "700px";
createFriendsGraph(username, "myGraph", "graphLoading"); createFriendsGraph(username, "myGraph", "graphLoading");
profileGen(username, "profileGen"); profileGen(username, "profileGen");
$("#searchBarTop").html("");
} }
if(findGetParameter("name") !== null) if(findGetParameter("name") !== null)

+ 2
- 2
public/GraphGenerator.html View File

@ -110,7 +110,7 @@
Creates a web chart of the specified organization Creates a web chart of the specified organization
and all associated repos. and all associated repos.
</p> </p>
<button class="btn btn-outline-success rounder" onclick='toOrganization()' type='button'>Generate</button>
<button class="btn btn-outline-success rounder" onclick='toOrgRepos()' type='button'>Generate</button>
</div> </div>
<p></p> <p></p>
</div> </div>
@ -145,5 +145,5 @@
var oname = fetchOrgInput(); var oname = fetchOrgInput();
window.location.href = "./OrgRepoGraph.html?name=" + oname; window.location.href = "./OrgRepoGraph.html?name=" + oname;
} }
</script> </script>

+ 2
- 2
public/js/friendsGraph.js View File

@ -291,9 +291,9 @@ function bringUpProfileView(id)
* @param containerName * @param containerName
* @param graphsTitle * @param graphsTitle
*/ */
function createFriendsGraph(username, containerName, graphsProgres)
function createFriendsGraph(username, containerName, graphsTitle)
{ {
progressID = graphsProgres;
progressID = graphsTitle;
nodes = []; nodes = [];
edges = []; edges = [];

+ 31
- 1
public/js/githubAPI.js View File

@ -11,6 +11,10 @@ const APIROOT = "api";
const API_USER_PATH = "/users/"; const API_USER_PATH = "/users/";
const API_ORG_PATH = "/orgs/";
const API_REPOS = "/repos/";
const API_FOLLOWING = "/following"; const API_FOLLOWING = "/following";
const API_FOLLOWERS = "/followers"; const API_FOLLOWERS = "/followers";
@ -42,4 +46,30 @@ function queryAPIByUser(apiPath, user, successCallBack, errorCallBack) {
error:errorCallBack, error:errorCallBack,
timeout: 4000 timeout: 4000
}); });
}
}
function queryAPIByOrg(apiPath, org, successCallBack, errorCallBack) {
const urlpath = APIROOT + API_ORG_PATH + org + apiPath;
$.ajax({
type:'GET',
url: urlpath,
crossDomain: true,
dataType: "json",
success: successCallBack,
error:errorCallBack,
timeout: 4000
});
}
/*
function queryAPIByRepo(apiPath, org, successCallBack, errorCallBack) {
const urlpath = APIROOT + API_ORG_PATH + org + apiPath;
$.ajax({
type:'GET',
url: urlpath,
crossDomain: true,
dataType: "json",
success: successCallBack,
error:errorCallBack,
timeout: 4000
});
}*/

Loading…
Cancel
Save