mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Fixed bug where removing a label from a job template via the list wasn't updating the list without a hard refresh.
This commit is contained in:
parent
ab6c5f7b8d
commit
ee74905d41
@ -15,12 +15,6 @@ export default
|
||||
link: function(scope, element, attrs) {
|
||||
scope.seeMoreInactive = true;
|
||||
|
||||
scope.labels = scope.
|
||||
job_template.summary_fields.labels.results;
|
||||
|
||||
scope.count = scope.
|
||||
job_template.summary_fields.labels.count;
|
||||
|
||||
var getNext = function(data, arr, resolve) {
|
||||
Rest.setUrl(data.next);
|
||||
Rest.get()
|
||||
@ -75,6 +69,13 @@ export default
|
||||
actionText: 'REMOVE'
|
||||
});
|
||||
};
|
||||
|
||||
scope.$watch("job_template.summary_fields.labels.results", 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
|
||||
scope.labels = scope.job_template.summary_fields.labels.results;
|
||||
scope.count = scope.job_template.summary_fields.labels.count;
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user