display details of actual deployments
This commit is contained in:
parent
b786ec1066
commit
34114942b7
|
@ -0,0 +1,27 @@
|
|||
$(function() {
|
||||
if ($('.administration').length == 0) {
|
||||
/* fake access control */
|
||||
return;
|
||||
}
|
||||
if ($('body.controller-issues.action-show').length == 0) {
|
||||
return;
|
||||
}
|
||||
var issue_no = $('a.atom').attr('href').split('/')[2].split('.')[0];
|
||||
$.ajax({
|
||||
url: 'https://scrutiny.entrouvert.org/projects/api/issues/' + issue_no + '/',
|
||||
async: true,
|
||||
dataType: 'jsonp',
|
||||
crossDomain: true,
|
||||
success: function(data) {
|
||||
if (data.platforms) {
|
||||
$('<h3>Déploiements</h3><ul id="deployed"></ul>').appendTo('#sidebar');
|
||||
var platforms = Object.keys(data.platforms);
|
||||
platforms.sort();
|
||||
platforms.forEach(function(val) {
|
||||
var status = data.platforms[val];
|
||||
$('<li class="' + status.status + '">' + val + ': ' + status.version + '</li>').appendTo($('#deployed'));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
|
@ -273,3 +273,19 @@ table.list.issues tr.status-3 td.id,
|
|||
table.list.issues tr.status-4 td.id {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
ul#deployed {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
ul#deployed li.nok {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
ul#deployed li.ok::before {
|
||||
content: "✔ ";
|
||||
}
|
||||
|
||||
ul#deployed li.nok::before {
|
||||
content: "✘ ";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue