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:
commit
22cffccc38
@ -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;
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user