-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevelopment.html
More file actions
186 lines (159 loc) · 6.2 KB
/
development.html
File metadata and controls
186 lines (159 loc) · 6.2 KB
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
---
layout: default
title: Development
categories: Development
group: "navigation"
disqus: true
---
<h1 id="development" class="page-header">{{ page.title }}</h1>
<h2>Dashboard</h2>
<div class="table-responsive">
<table class="table table-condensed" id="status">
<thead>
<tr>
<td><em>Package</em></td>
<td>Build</td>
<td>Coverage</td>
<td>Issues</td>
<td>Pull Requests</td>
</tr>
</thead>
<tbody>
{% for package in site.data.packages %}
<tr id="{{ package.github }}" style="">
<td><a href="https://github.com/roboptim/{{ package.github }}">{{ package.name }}</a>
{% if package.status == 'alpha' %}<sup>alpha</sup>{% endif %}
{% if package.status == 'beta' %}<sup>beta</sup>{% endif %}
</td>
<td id="{{ package.github }}-travis-status">n/a</td>
<td id="{{ package.github }}-coveralls-status">
<a href="https://coveralls.io/r/roboptim/{{ package.github }}?branch=master">
<img src="https://coveralls.io/repos/roboptim/{{ package.github }}/badge.png?branch=master"
alt="Coverage Status" />
</td>
<td id="{{ package.github }}-issues">n/a</td>
<td id="{{ package.github }}-pr">n/a</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="bs-callout bs-callout-warning" id="github_token_info">
<h4>Access to all developer information...</h4>
<p>
Due to GitHub API quota, if you access this page frequently, you
will need to login to see the number of issues and pull request.
</p>
<button type="button" class="btn btn-primary" id="github_login">
<span class="glyphicon glyphicon-new-window"></span>Login with GitHub
</button>
</div>
<div style="padding:2em"> </div>
<h2>Thank You!</h2>
<div class="container marketing">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Hosted on GitHub</h2>
<p class="lead"><a href="http://www.github.com/">GitHub</a> provides hosting for our source code and website.</p>
</div>
<div class="col-md-5">
<img src="assets/octocat-200px.png" alt="GitHub" />
</div>
</div>
<hr class="featurette-divider">
<div class="row">
<div class="col-md-5">
<img src="assets/travis-mascot-200px.png" alt="Travis" />
</div>
<div class="col-md-7">
<h2 class="featurette-heading">Continuous Integration</h2>
<p class="lead">Each commit of every package is graciously built by <a href="http://www.travis-ci.org/">Travis CI</a>.</p>
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Test Reports by Coveralls.io</h2>
<p class="lead"><a href="http://www.coveralls.io/">Coveralls</a> summarizes RobOptim test coverage.</p>
</div>
<div class="col-md-5">
</div>
</div>
<hr class="featurette-divider">
</div>
<script type="text/javascript">
// Initialize OAuth
OAuth.initialize('ynP-FCRXCMX1_o-qM0Kv6n8mOJY')
// If the user clicks on the GitHub button
$("#github_login").click(function(){
OAuth.popup('github', function(err, result) {
if (result) {
// Store token in local storage
window.localStorage.setItem('access_token', result.access_token);
console.log(result.access_token);
// Reload page to hide token block
location.reload();
} else {
console.log(err);
};
});
});
// Load token from local storage
var access_token = window.localStorage.getItem('access_token');
if (access_token) {
// Test the validity of the local token (it may have been revoked)
url = "https://api.github.com/user?access_token=" + access_token;
$.get(url, function (data) {
console.log("Valid access token found.");
// Do not display the GitHub token block if the token is already registered
document.getElementById("github_token_info").style.display = "none";
})
.fail(function() {
console.log("Invalid access token found. Removing it.");
// Remove the invalid token and nullify it
window.localStorage.removeItem('access_token');
access_token = null;
});
}
var stateToStyle = {
"passed": "",
"errored": "active",
"failed": "danger",
};
var projects = ["roboptim-core", "roboptim-core-python",
"roboptim-core-plugin-cminpack", "roboptim-core-plugin-cmaes",
"roboptim-core-plugin-eigen", "roboptim-core-plugin-ipopt",
"roboptim-core-plugin-nag", "roboptim-core-plugin-nlopt",
"roboptim-core-plugin-pagmo", "roboptim-core-manifold",
"roboptim-analysis", "roboptim-capsule", "roboptim-trajectory"];
$.each(projects, function(index, project) {
var url = "https://api.travis-ci.org/repos/roboptim/" + project + "/branches/master";
$.get(url, function (data) {
$(data.branch).each(function(index, value){
var content = "";
if (value.state === "passed")
content = "<span class='glyphicon glyphicon-ok'></span>";
else if (value.state === "errored")
content = "<span class='glyphicon glyphicon-remove'></span>";
else if (value.state === "failed")
content = "<span class='glyphicon glyphicon-remove'></span>";
else
content = value.state;
content = "<a href ='https://travis-ci.org/roboptim/" + project + "'>" + content + "</a>";
$("#" + project + "-travis-status").html(content);
$("#" + project).removeClass().addClass(stateToStyle[value.state]);
});
});
url = "https://api.github.com/repos/roboptim/" + project + "/issues?access_token=" + access_token;
$.get(url, function (data) {
content = "<a href ='https://www.github.com/roboptim/" + project + "/issues'>" + data.length + "</a>";
$("#" + project + "-issues").html(content);
});
url = "https://api.github.com/repos/roboptim/" + project + "/pulls?access_token=" + access_token;
$.get(url, function (data) {
content = "<a href ='https://www.github.com/roboptim/" + project + "/pulls'>" + data.length + "</a>";
$("#" + project + "-pr").html(content);
});
});
</script>
</div>