1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

AC-275 Fixed Credential list not showing usernamer and team values.

This commit is contained in:
chouseknecht 2013-07-28 07:03:37 -04:00
parent d1ad7d822d
commit 48c522aa17
2 changed files with 14 additions and 2 deletions

View File

@ -29,6 +29,18 @@ function CredentialsList ($scope, $rootScope, $location, $log, $routeParams, Res
SelectionInit({ scope: scope, list: list, url: url, returnToCaller: 1 });
scope.PostRefershRemove = scope.$on('PostRefresh', function() {
// After a refresh, populate the organization name on each row
for(var i=0; i < scope.credentials.length; i++) {
if (scope.credentials[i].summary_fields.user) {
scope.credentials[i].user_username = scope.credentials[i].summary_fields.user.username;
}
if (scope.credentials[i].summary_fields.team) {
scope.credentials[i].team_name = scope.credentials[i].summary_fields.team.name;
}
}
});
SearchInit({ scope: scope, set: 'credentials', list: list, url: defaultUrl });
PaginateInit({ scope: scope, list: list, url: defaultUrl });
scope.search(list.iterator);

View File

@ -30,13 +30,13 @@ angular.module('CredentialsListDefinition', [])
},
team: {
label: 'Team',
ngBind: 'credential.summary_fields.team.name',
ngBind: 'credential.team_name',
sourceModel: 'team',
sourceField: 'name'
},
user: {
label: 'User',
ngBind: 'credential.summary_fields.user.usename',
ngBind: 'credential.user_username',
sourceModel: 'user',
sourceField: 'username'
}