-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepo.html
118 lines (101 loc) · 3.58 KB
/
repo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Analysis of GitHub repositories activities</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/search-styles.css" media="screen" />
<link type="text/css" href="stylesheets/jquery.jscrollpane.css" rel="stylesheet" media="all" />
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="js/ext/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/ext/jquery.mousewheel.js"></script>
<script type="text/javascript" src="js/ext/jquery.jscrollpane.min.js"></script>
<script language="javascript" type="text/javascript" src="js/ext/jquery.flot.js"></script>
<script language="javascript" type="text/javascript" src="js/ext/jquery.flot.selection.js"></script>
<script type="text/javascript" src="js/github-tools.js"></script>
<script type="text/javascript" src="js/github-tools-ui.js"></script>
<script type="text/javascript">
$(document).ready(function(){
function showCommitters(repository) {
$('#committers').addClass("active");
// Creates and add a result-list node element
$('<div/>', {
'id': 'result-list',
'class': 'scrollbar'
})
.append($('<ul/>', { 'class': 'list' }))
.appendTo($('#results .inner'));
repository.showContributors(com.github.ui.showCommitor, "#result-list .list", function() {
$("#result-list").jScrollPane({hideFocus: true });
});
}
function showCommittersAsTreeMap(repository) {
$('#impact').addClass("active");
$('<div/>', { 'id': 'analysis' }).appendTo($('#results .inner'));
repository.commitsByUser(com.github.ui.showCommittersAsTreeMap, 'analysis');
}
function showCommitsOnTimeline(repository) {
$('#timeline').addClass("active");
$('<div/>', { 'id': 'analysis' }).appendTo($('#results .inner'));
repository.commitsByDate(com.github.ui.showCommitsOnTimeline, '#analysis');
}
function newRepository() {
var readParams = [];
var query = window.location.search.substring(1);
var params = query.split('&');
for (var i=0; i<params.length; i++) {
var param = params[i].split('=');
if (param.length > 0) {
var key = param[0];
var value = param[1];
readParams[key] = value;
}
}
var repository = new com.github.Repository( readParams['repo'],
readParams['user'],
readParams['analysis']);
return repository;
}
var repository = newRepository();
if (repository.isCommittersAnalysis()) {
showCommitters(repository);
}
else if (repository.isImpactAnalysis()) {
showCommittersAsTreeMap(repository);
}
else if (repository.isTimelineAnalysis()) {
showCommitsOnTimeline(repository);
}
$('#committers').attr('href', repository.committersUrl());
$('#impact').attr('href', repository.impactUrl());
$('#timeline').attr('href', repository.timelineUrl());
});
</script>
</head>
<body >
<section id="header">
<div class="inner">
<div class="container">
<h1>GitHub Analysis</h1>
<p class="lead">Analysis of GitHub repositories activities.</p>
</div>
</div>
</section>
<section id="commands">
<div class="inner">
<a id="back" href="index.html"><<< Search</a>
<div class="container">
<ul>
<li><a id="committers">Committers</a></li>
<li><a id="impact">User commits</a></li>
<li><a id="timeline">Commits timeline</a></li>
</ul>
</div>
</div>
</section>
<section id="results">
<div class="inner">
</div>
</section>
</body>
</html>