mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
order recent builds in job page chronologically
This commit is contained in:
parent
f181c87d3b
commit
99fd47de68
@ -213,20 +213,20 @@ angular.module('laminar',['ngRoute','ngSanitize'])
|
||||
$scope.$apply();
|
||||
|
||||
var chtBt = new Chart(document.getElementById("chartBt").getContext("2d")).Bar({
|
||||
labels: data.recent.map(function(e){return '#' + e.number;}),
|
||||
labels: data.recent.map(function(e){return '#' + e.number;}).reverse(),
|
||||
datasets: [{
|
||||
fillColor: "darkseagreen",
|
||||
strokeColor: "forestgreen",
|
||||
data: data.recent.map(function(e){return e.duration;})
|
||||
data: data.recent.map(function(e){return e.duration;}).reverse()
|
||||
}]
|
||||
},
|
||||
{barValueSpacing: 1,barStrokeWidth: 1,barDatasetSpacing:0}
|
||||
);
|
||||
|
||||
for(var i = 0; i < data.recent.length; ++i) {
|
||||
for(var i = 0, n = data.recent.length; i < n; ++i) {
|
||||
if(data.recent[i].result != "success") {
|
||||
chtBt.datasets[0].bars[i].fillColor = "darksalmon";
|
||||
chtBt.datasets[0].bars[i].strokeColor = "crimson";
|
||||
chtBt.datasets[0].bars[n-i-1].fillColor = "darksalmon";
|
||||
chtBt.datasets[0].bars[n-i-1].strokeColor = "crimson";
|
||||
}
|
||||
}
|
||||
chtBt.update();
|
||||
|
Loading…
Reference in New Issue
Block a user