1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Merge pull request #1762 from jlmitch5/appTokenSearchPath

update app tokens search path
This commit is contained in:
John Mitchell 2018-05-22 12:00:42 -04:00 committed by GitHub
commit 22cffccc38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -8,7 +8,9 @@ function ListApplicationsUsersController (
$scope,
Dataset,
resolvedModels,
strings
strings,
$stateParams,
GetBasePath
) {
const vm = this || {};
// const application = resolvedModels;
@ -21,9 +23,15 @@ function ListApplicationsUsersController (
$scope.list = { iterator, name, basePath: 'applications' };
$scope.collection = { iterator };
$scope.tokenBasePath = `${GetBasePath('applications')}${$stateParams.application_id}/tokens`;
$scope[key] = Dataset.data;
vm.usersCount = Dataset.data.count;
$scope[name] = Dataset.data.results;
$scope.$on('updateDataset', (e, dataset) => {
$scope[key] = dataset;
$scope[name] = dataset.results;
vm.usersCount = dataset.count;
});
vm.getLastUsed = user => {
const lastUsed = _.get(user, 'last_used');
@ -49,7 +57,9 @@ ListApplicationsUsersController.$inject = [
'$scope',
'Dataset',
'resolvedModels',
'ApplicationsStrings'
'ApplicationsStrings',
'$stateParams',
'GetBasePath'
];
export default ListApplicationsUsersController;

View File

@ -2,7 +2,7 @@
<smart-search
class="at-List-search"
django-model="users"
base-path="users"
base-path="{{ tokenBasePath }}"
iterator="user"
list="list"
dataset="user_dataset"