Better filtering of repo builds
This commit is contained in:
parent
85d6500daa
commit
1ed814a469
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue