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; }
|
if ($scope.buildsResource && filter == $scope.currentFilter) { return; }
|
||||||
|
|
||||||
var since = null;
|
var since = null;
|
||||||
|
var limit = 10;
|
||||||
|
|
||||||
if ($scope.options.filter == '48hour') {
|
if ($scope.options.filter == '48hour') {
|
||||||
since = Math.floor(moment().subtract(2, 'days').valueOf() / 1000);
|
since = Math.floor(moment().subtract(2, 'days').valueOf() / 1000);
|
||||||
|
limit = 100;
|
||||||
} else if ($scope.options.filter == '30day') {
|
} else if ($scope.options.filter == '30day') {
|
||||||
since = Math.floor(moment().subtract(30, 'days').valueOf() / 1000);
|
since = Math.floor(moment().subtract(30, 'days').valueOf() / 1000);
|
||||||
|
limit = 100;
|
||||||
} else {
|
} else {
|
||||||
since = null;
|
since = null;
|
||||||
|
limit = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
'repository': $scope.repository.namespace + '/' + $scope.repository.name,
|
'repository': $scope.repository.namespace + '/' + $scope.repository.name,
|
||||||
'limit': 100,
|
'limit': limit,
|
||||||
'since': since
|
'since': since
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in a new issue