Better filtering of repo builds

This commit is contained in:
Joseph Schorr 2015-03-23 15:44:17 -04:00
parent 85d6500daa
commit 1ed814a469

View file

@ -65,18 +65,22 @@ angular.module('quay').directive('repoPanelBuilds', function () {
if ($scope.buildsResource && filter == $scope.currentFilter) { return; }
var since = null;
var limit = 10;
if ($scope.options.filter == '48hour') {
since = Math.floor(moment().subtract(2, 'days').valueOf() / 1000);
limit = 100;
} else if ($scope.options.filter == '30day') {
since = Math.floor(moment().subtract(30, 'days').valueOf() / 1000);
limit = 100;
} else {
since = null;
limit = 10;
}
var params = {
'repository': $scope.repository.namespace + '/' + $scope.repository.name,
'limit': 100,
'limit': limit,
'since': since
};