This repository has been archived by the owner on Jul 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgroup.html
215 lines (171 loc) · 6.55 KB
/
group.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE html>
<html>
<head>
<title>NCIP Open Source</title>
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/grid.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<!-- Loading list of repos and groups from JSON files -->
<script type="text/javascript" src="ncip-group.json"></script>
<script type="text/javascript" src="ncip-repo.json"></script>
<script type="text/javascript" src="assets/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="assets/strftime.js"></script>
<script type="text/javascript" src="assets/ncipnamespace.js"></script>
<script>
var browserIsIELessThan10 = false;
if ($.browser.msie && parseInt($.browser.version, 10) < 10){
browserIsIELessThan10 = true;
}
</script>
<script type="text/javascript">
(function ($, undefined) {
var NCIPGlobal = window.NCIPGlobal;
NCIPGlobal.namespace('cache.repos');
NCIPGlobal.namespace('cache.reposDate');
NCIPGlobal.namespace('cache.members');
NCIPGlobal.namespace('cache.membersDate');
var repoGroupName = NCIPGlobal.urlQueryString('name');
repoGroupName = unescape(repoGroupName);
function processMembers(members) {
$(function () {
if (members) {
$("#num-members").text(members.length);
}
});
}
function addRepo(repo) {
if (repo) {
var $item = $("<li>").addClass("repo grid-1 " + repo.category);
var $link = $("<a>").attr("href", repo.html_url).appendTo($item);
$link.append($("<h2>").text(repo.name));
$link.append($("<p>").text(repo.description));
$item.appendTo("#repos");
}
}
function selectReposFromGroup(reposFromGithub,repoGroupName) {
var reposInGroup = [];
var repoGroups = ncip_groups;
var repoGroup = repoGroups[repoGroupName];
$(function () {
$.each(repoGroups, function (i, group) {
if( group ) {
if( group.name ) {
if( group.name === repoGroupName ) {
repoGroup = group;
}
}
}
});
});
$(function () {
$.each(reposFromGithub, function (i, repo) {
var matchedToGroup = false;
$.each(ncip_repos, function (i, ncip_repo) {
if( ncip_repo ) {
if( ncip_repo.full_name ) {
if( repo.full_name === ncip_repo.full_name ) {
if( ncip_repo.group === repoGroupName ) {
matchedToGroup = true;
}
}
}
}
});
if( matchedToGroup ) {
if( !repo.category ) {
repo['category'] = repoGroup.category;
}
reposInGroup.push(repo);
}
});
});
return reposInGroup;
}
function addReposFromGroup(listOfRepos) {
$(function () {
$.each(listOfRepos, function (i, repo) {
addRepo(repo);
});
});
}
function processRepositoriesInGroup(repos) {
$(function () {
$("#num-repos").text(repos.length);
// Convert pushed_at to Date.
$.each(repos, function (i, repo) {
if (!browserIsIELessThan10) {
repo.pushed_at = new Date(repo.pushed_at);
}
});
});
// Sort alphabetically by repository name
repos.sort(function (a, b) {
var namea = a.full_name.toLowerCase();
var nameb = b.full_name.toLowerCase();
if (namea > nameb) return 1;
if (nameb > namea) return -1;
return 0;
});
//
// Process the repositories
//
var reposInGroup = selectReposFromGroup(repos,repoGroupName);
NCIPGlobal.addRecentlyUpdatedRepos(reposInGroup);
addReposFromGroup(reposInGroup);
}
NCIPGlobal.processReposCallback = processRepositoriesInGroup;
NCIPGlobal.processMembersCallback = processMembers;
NCIPGlobal.initializeCache();
NCIPGlobal.findAllOrgsFromReposCatalog(ncip_repos);
if ( browserIsIELessThan10 ) {
NCIPGlobal.getReposFromOneOrg = NCIPGlobal.getReposFromOneOrgWithoutCORS;
NCIPGlobal.getMembersFromOneOrg = NCIPGlobal.getMembersFromOneOrgWithoutCORS;
}
NCIPGlobal.getReposFromAllOrgs();
NCIPGlobal.getMembersFromAllOrgs();
})(jQuery);
</script>
</head>
<body>
<div id="wrapper" class="grid clearfix">
<div id="main" class="grid-1">
<div id="logo"><h1>NCIP Open Source</h1></div>
<a href="http://ncip.github.io/">
<img src="images/logo.png" alt="NCIP Logo" height="200" width="200">
</a>
<h2>Supporting</h2>
<h2>Cancer Research</h2>
<h2>with Open Source</h2>
<p>Visit <a href="http://ncip.nci.nih.gov/">ncip.nci.nih.gov</a></p>
<p><a href="https://github.com/NCIP/ncip.github.com/wiki/_pages">Wiki Pages</a></p>
</div>
<div class="grid grid-3">
<div id="recently-updated" class="grid-2 omega header">
<h1>Recently updated <a href="https://github.com/ncip/repositories">View All on GitHub</a></h1>
<ol id="recently-updated-repos"></ol>
</div>
<div id="statistics" class="grid-1 alpha header">
<h1>Statistics</h1>
<p>
<a href="https://github.com/ncip/repositories"><span id="num-repos"><img src="images/spinner.gif" /></span> public repos</a>
<br>
<a href="https://github.com/ncip?tab=members"><span id="num-members"><img src="images/spinner.gif" /></span> members</a>
</p>
<p class="email"><a href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>
<div class="grid grid-3">
<div id="category" class="grid-1 iota iotaleft categoryheader biology">
<h4>Cancer Biology and Genomics</h4>
</div>
<div id="category" class="grid-1 iota iotacenter categoryheader translational">
<h4>Clinical and Translational</h4>
</div>
<div id="category" class="grid-1 iota iotaright categoryheader semantics">
<h4>Semantics and Interoperability</h4>
</div>
</div>
<ol id="repos"></ol>
</div>
</body>
</html>