mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 13:36: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:
@@ -99,16 +99,18 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
$scope.search = function(){
|
$scope.search = function(){
|
||||||
$scope.searchActive = true;
|
if($scope.searchTerm && $scope.searchTerm !== '') {
|
||||||
Wait('start');
|
$scope.searchActive = true;
|
||||||
JobDetailService.getJobHostSummaries($stateParams.id, {
|
Wait('start');
|
||||||
page_size: page_size,
|
JobDetailService.getJobHostSummaries($stateParams.id, {
|
||||||
host_name__icontains: $scope.searchTerm,
|
page_size: page_size,
|
||||||
}).success(function(res){
|
host_name__icontains: $scope.searchTerm,
|
||||||
$scope.hosts = res.results;
|
}).success(function(res){
|
||||||
$scope.next = res.next;
|
$scope.hosts = res.results;
|
||||||
Wait('stop');
|
$scope.next = res.next;
|
||||||
});
|
Wait('stop');
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
$scope.clearSearch = function(){
|
$scope.clearSearch = function(){
|
||||||
$scope.searchActive = false;
|
$scope.searchActive = false;
|
||||||
|
|||||||
@@ -156,6 +156,10 @@ export default
|
|||||||
scope.search_task_status = 'all';
|
scope.search_task_status = 'all';
|
||||||
scope.search_host_status = 'all';
|
scope.search_host_status = 'all';
|
||||||
|
|
||||||
|
scope.search_play_name = '';
|
||||||
|
scope.search_task_name = '';
|
||||||
|
scope.search_host_name = '';
|
||||||
|
|
||||||
scope.haltEventQueue = false;
|
scope.haltEventQueue = false;
|
||||||
scope.processing = false;
|
scope.processing = false;
|
||||||
scope.lessStatus = false;
|
scope.lessStatus = false;
|
||||||
@@ -869,7 +873,7 @@ export default
|
|||||||
else {
|
else {
|
||||||
scope.searchHostsEnabled = true;
|
scope.searchHostsEnabled = true;
|
||||||
}
|
}
|
||||||
if (!scope.liveEventProcessing || scope.pauseLiveEvents) {
|
if ((!scope.liveEventProcessing || scope.pauseLiveEvents) && scope.selectedTask) {
|
||||||
scope.hostResultsLoading = true;
|
scope.hostResultsLoading = true;
|
||||||
params = {
|
params = {
|
||||||
parent: scope.selectedTask,
|
parent: scope.selectedTask,
|
||||||
@@ -888,6 +892,12 @@ export default
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
scope.searchHostsKeyPress = function(e) {
|
||||||
|
if (e.keyCode === 13) {
|
||||||
|
scope.searchHosts();
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if (scope.removeDeleteFinished) {
|
if (scope.removeDeleteFinished) {
|
||||||
scope.removeDeleteFinished();
|
scope.removeDeleteFinished();
|
||||||
|
|||||||
Reference in New Issue
Block a user