mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 15:57:52 -02:30
Merge pull request #5310 from mabashian/5278-activity-stream
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) {
|
scope.activities.forEach(function(activity, i) {
|
||||||
// build activity.user
|
// build activity.user
|
||||||
if (scope.activities[i].summary_fields.actor) {
|
if (scope.activities[i].summary_fields.actor) {
|
||||||
@@ -295,6 +305,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
|||||||
BuildDescription(scope.activities[i]);
|
BuildDescription(scope.activities[i]);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user