Merge pull request #1571 from coreos-inc/js-error
Fix NPE and UI fixes for heatmap
This commit is contained in:
commit
46ea7ce2ed
3 changed files with 8 additions and 2 deletions
|
@ -14,4 +14,4 @@
|
|||
font-family: 'Source Sans Pro', sans-serif;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,10 @@ angular.module('quay').directive('repoPanelInfo', function () {
|
|||
};
|
||||
|
||||
$scope.getAggregatedUsage = function(stats, days) {
|
||||
if (!stats || !stats.length) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
var count = 0;
|
||||
var startDate = moment().subtract(days + 1, 'days');
|
||||
for (var i = 0; i < stats.length; ++i) {
|
||||
|
|
|
@ -39,10 +39,12 @@ angular.module('quay').directive('heatmap', function () {
|
|||
domainMargin: [10, 10, 10, 10],
|
||||
displayLegend: false,
|
||||
tooltip: true,
|
||||
weekStartOnMonday: false,
|
||||
legendColors: {
|
||||
empty: "#f4f4f4",
|
||||
min: "#c9e9fb",
|
||||
max: "steelblue",
|
||||
base: 'white'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -59,7 +61,7 @@ angular.module('quay').directive('heatmap', function () {
|
|||
};
|
||||
|
||||
$scope.$watch('data', function() {
|
||||
$timeout(refresh, 500);
|
||||
$timeout(refresh, 750);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Reference in a new issue