diff --git a/awx/ui/client/features/applications/list-applications.controller.js b/awx/ui/client/features/applications/list-applications.controller.js index 8a6ad5a8bf..b9353f8d88 100644 --- a/awx/ui/client/features/applications/list-applications.controller.js +++ b/awx/ui/client/features/applications/list-applications.controller.js @@ -78,7 +78,7 @@ function ListApplicationsController ( } if (parseInt($state.params.application_id, 10) === app.id) { - $state.go('^', reloadListStateParams, { reload: true }); + $state.go('applications', reloadListStateParams, { reload: true }); } else { $state.go('.', reloadListStateParams, { reload: true }); } diff --git a/awx/ui/client/features/users/tokens/tokens.strings.js b/awx/ui/client/features/users/tokens/tokens.strings.js index ac0af8e15f..27b9450992 100644 --- a/awx/ui/client/features/users/tokens/tokens.strings.js +++ b/awx/ui/client/features/users/tokens/tokens.strings.js @@ -34,7 +34,10 @@ function TokensStrings (BaseString) { ns.list = { ROW_ITEM_LABEL_DESCRIPTION: t.s('DESCRIPTION'), ROW_ITEM_LABEL_EXPIRED: t.s('EXPIRATION'), - ROW_ITEM_LABEL_USED: t.s('LAST USED') + ROW_ITEM_LABEL_USED: t.s('LAST USED'), + ROW_ITEM_LABEL_SCOPE: t.s('SCOPE'), + ROW_ITEM_LABEL_APPLICATION: t.s('APPLICATION'), + HEADER: appName => t.s('{{ appName }} Token', { appName }), }; } diff --git a/awx/ui/client/features/users/tokens/users-tokens-add.route.js b/awx/ui/client/features/users/tokens/users-tokens-add.route.js index 350e9bd2dd..56effe1991 100644 --- a/awx/ui/client/features/users/tokens/users-tokens-add.route.js +++ b/awx/ui/client/features/users/tokens/users-tokens-add.route.js @@ -21,6 +21,11 @@ export default { name: 'users.edit.tokens.add', params: { }, + data: { + activityStream: true, + activityStreamTarget: 'o_auth2_access_token', + noActivityStreamID: true + }, ncyBreadcrumb: { label: N_('CREATE TOKEN') }, diff --git a/awx/ui/client/features/users/tokens/users-tokens-list.controller.js b/awx/ui/client/features/users/tokens/users-tokens-list.controller.js index c2fe647928..056a77792a 100644 --- a/awx/ui/client/features/users/tokens/users-tokens-list.controller.js +++ b/awx/ui/client/features/users/tokens/users-tokens-list.controller.js @@ -38,6 +38,16 @@ function ListTokensController ( vm.tokensCount = dataset.count; }); + vm.getScopeString = str => { + if (str === 'Read') { + return vm.strings.get('add.SCOPE_READ_LABEL'); + } else if (str === 'Write') { + return vm.strings.get('add.SCOPE_WRITE_LABEL'); + } + + return undefined; + }; + vm.getLastUsed = token => { const lastUsed = _.get(token, 'last_used'); @@ -95,7 +105,7 @@ function ListTokensController ( Prompt({ hdr: strings.get('deleteResource.HEADER'), - resourceName: 'token', + resourceName: strings.get('list.HEADER', tok.summary_fields.application.name), body: deleteModalBody, action, actionText: strings.get('add.DELETE_ACTION_LABEL') diff --git a/awx/ui/client/features/users/tokens/users-tokens-list.partial.html b/awx/ui/client/features/users/tokens/users-tokens-list.partial.html index e460e5ecf4..b92d24811a 100644 --- a/awx/ui/client/features/users/tokens/users-tokens-list.partial.html +++ b/awx/ui/client/features/users/tokens/users-tokens-list.partial.html @@ -25,15 +25,24 @@
+ header-value="{{ vm.strings.get('list.HEADER', token.summary_fields.application.name) }}"> + + + + + value="{{ token.expires | longDate }}">