mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Fixed bug where empty searches were hiding the results and attempting to filter without a selected task threw an error
This commit is contained in:
parent
9e0f01a29f
commit
ea170f4fe6
@ -99,16 +99,18 @@
|
||||
}
|
||||
};
|
||||
$scope.search = function(){
|
||||
$scope.searchActive = true;
|
||||
Wait('start');
|
||||
JobDetailService.getJobHostSummaries($stateParams.id, {
|
||||
page_size: page_size,
|
||||
host_name__icontains: $scope.searchTerm,
|
||||
}).success(function(res){
|
||||
$scope.hosts = res.results;
|
||||
$scope.next = res.next;
|
||||
Wait('stop');
|
||||
});
|
||||
if($scope.searchTerm && $scope.searchTerm !== '') {
|
||||
$scope.searchActive = true;
|
||||
Wait('start');
|
||||
JobDetailService.getJobHostSummaries($stateParams.id, {
|
||||
page_size: page_size,
|
||||
host_name__icontains: $scope.searchTerm,
|
||||
}).success(function(res){
|
||||
$scope.hosts = res.results;
|
||||
$scope.next = res.next;
|
||||
Wait('stop');
|
||||
});
|
||||
}
|
||||
};
|
||||
$scope.clearSearch = function(){
|
||||
$scope.searchActive = false;
|
||||
|
||||
@ -156,6 +156,10 @@ export default
|
||||
scope.search_task_status = 'all';
|
||||
scope.search_host_status = 'all';
|
||||
|
||||
scope.search_play_name = '';
|
||||
scope.search_task_name = '';
|
||||
scope.search_host_name = '';
|
||||
|
||||
scope.haltEventQueue = false;
|
||||
scope.processing = false;
|
||||
scope.lessStatus = false;
|
||||
@ -869,7 +873,7 @@ export default
|
||||
else {
|
||||
scope.searchHostsEnabled = true;
|
||||
}
|
||||
if (!scope.liveEventProcessing || scope.pauseLiveEvents) {
|
||||
if ((!scope.liveEventProcessing || scope.pauseLiveEvents) && scope.selectedTask) {
|
||||
scope.hostResultsLoading = true;
|
||||
params = {
|
||||
parent: scope.selectedTask,
|
||||
@ -888,6 +892,12 @@ export default
|
||||
}
|
||||
};
|
||||
|
||||
scope.searchHostsKeyPress = function(e) {
|
||||
if (e.keyCode === 13) {
|
||||
scope.searchHosts();
|
||||
e.stopPropagation();
|
||||
}
|
||||
};
|
||||
|
||||
if (scope.removeDeleteFinished) {
|
||||
scope.removeDeleteFinished();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user