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