From 61573604ef94c78880b73b7b3f9f825f47178763 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 22 Jun 2016 15:43:15 -0400 Subject: [PATCH 1/2] Fix stats NPE --- static/js/directives/repo-view/repo-panel-info.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/directives/repo-view/repo-panel-info.js b/static/js/directives/repo-view/repo-panel-info.js index 26fc92781..eb4d9ed48 100644 --- a/static/js/directives/repo-view/repo-panel-info.js +++ b/static/js/directives/repo-view/repo-panel-info.js @@ -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) { From 760d63bfdcdce58a462ff7e58a91c4de7b113b4f Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 22 Jun 2016 15:56:11 -0400 Subject: [PATCH 2/2] Small fixes for heat map views --- static/css/directives/ui/heatmap.css | 2 +- static/js/directives/ui/heatmap.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/static/css/directives/ui/heatmap.css b/static/css/directives/ui/heatmap.css index ab5e27960..9295c2805 100644 --- a/static/css/directives/ui/heatmap.css +++ b/static/css/directives/ui/heatmap.css @@ -14,4 +14,4 @@ font-family: 'Source Sans Pro', sans-serif; font-size: 12px; text-transform: uppercase; -} \ No newline at end of file +} diff --git a/static/js/directives/ui/heatmap.js b/static/js/directives/ui/heatmap.js index c035b25ba..4c4d5800f 100644 --- a/static/js/directives/ui/heatmap.js +++ b/static/js/directives/ui/heatmap.js @@ -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); }); } };