mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Merge pull request #2872 from leigh-johnson/2865
Clear job list labels column if no label results are found
This commit is contained in:
commit
90466ea69e
@ -74,13 +74,17 @@ export default
|
||||
});
|
||||
};
|
||||
|
||||
scope.$watch(scope.$parent.list.iterator+".summary_fields.labels.results", function() {
|
||||
scope.$watchCollection(scope.$parent.list.iterator, function() {
|
||||
// To keep the array of labels fresh, we need to set up a watcher - otherwise, the
|
||||
// array will get set initially and then never be updated as labels are removed
|
||||
if (scope[scope.$parent.list.iterator].summary_fields.labels){
|
||||
scope.labels = scope[scope.$parent.list.iterator].summary_fields.labels.results;
|
||||
scope.count = scope[scope.$parent.list.iterator].summary_fields.labels.count;
|
||||
}
|
||||
else{
|
||||
scope.labels = null;
|
||||
scope.count = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user