mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 09:07:45 -02:30
Update name/description whenever the activities array changes
This commit is contained in:
@@ -283,6 +283,16 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
||||
});
|
||||
};
|
||||
|
||||
if(scope.activities && scope.activities.length > 0) {
|
||||
buildUserAndDescription();
|
||||
}
|
||||
|
||||
scope.$watch('activities', function(){
|
||||
// Watch for future update to scope.activities (like page change, column sort, search, etc)
|
||||
buildUserAndDescription();
|
||||
});
|
||||
|
||||
function buildUserAndDescription(){
|
||||
scope.activities.forEach(function(activity, i) {
|
||||
// build activity.user
|
||||
if (scope.activities[i].summary_fields.actor) {
|
||||
@@ -295,6 +305,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
||||
BuildDescription(scope.activities[i]);
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user