mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Job detail page refactor
Fixed failed filter reset.
This commit is contained in:
parent
e6cf440511
commit
b0a03697b6
@ -1000,19 +1000,21 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log,
|
||||
};
|
||||
|
||||
scope.filterByStatus = function(choice) {
|
||||
var key, keys, nxtPlay;
|
||||
var nxtPlay;
|
||||
if (choice === 'Failed') {
|
||||
scope.searchAllStatus = 'failed';
|
||||
for(key in scope.plays) {
|
||||
if (scope.plays[key].status === 'failed') {
|
||||
nxtPlay = key;
|
||||
nxtPlay = null;
|
||||
scope.plays.every(function(play) {
|
||||
if (play.status === 'failed') {
|
||||
nxtPlay = play.id;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
else {
|
||||
scope.searchAllStatus = '';
|
||||
keys = Object.keys(scope.plays);
|
||||
nxtPlay = (keys.length > 0) ? keys[keys.length - 1] : null;
|
||||
nxtPlay = (scope.plays.length > 0) ? scope.plays[0].id : null;
|
||||
}
|
||||
SelectPlay({
|
||||
scope: scope,
|
||||
|
Loading…
Reference in New Issue
Block a user