mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
clear labels column if no label results are found, resolves #2865
This commit is contained in:
parent
33547259e2
commit
6296e717cb
@ -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