mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
add tokens to activity stream
This commit is contained in:
parent
924cb51d51
commit
8a2c3ce716
@ -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')
|
||||
},
|
||||
|
||||
@ -17,6 +17,11 @@ export default {
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
},
|
||||
data: {
|
||||
activityStream: true,
|
||||
activityStreamTarget: 'o_auth2_access_token',
|
||||
noActivityStreamID: true
|
||||
},
|
||||
searchPrefix: 'token',
|
||||
params: {
|
||||
token_search: {
|
||||
|
||||
@ -46,6 +46,9 @@ export default function GetTargetTitle(i18n) {
|
||||
case 'o_auth2_application':
|
||||
rtnTitle = i18n._('APPLICATIONS');
|
||||
break;
|
||||
case 'o_auth2_access_token':
|
||||
rtnTitle = i18n._('TOKENS');
|
||||
break;
|
||||
}
|
||||
|
||||
return rtnTitle;
|
||||
|
||||
@ -22,6 +22,7 @@ export default ['templateUrl', 'i18n', function(templateUrl, i18n) {
|
||||
$scope.options = [
|
||||
{label: i18n._('All Activity'), value: 'dashboard'},
|
||||
{label: i18n._('Applications'), value: 'o_auth2_application'},
|
||||
{label: i18n._('Tokens'), value: 'o_auth2_access_token'},
|
||||
{label: i18n._('Credentials'), value: 'credential'},
|
||||
{label: i18n._('Hosts'), value: 'host'},
|
||||
{label: i18n._('Inventories'), value: 'inventory'},
|
||||
|
||||
@ -97,7 +97,7 @@ export default
|
||||
order_by: '-timestamp',
|
||||
page_size: '20',
|
||||
};
|
||||
if (streamConfig.activityStreamTarget && streamConfig.activityStreamId) {
|
||||
if (streamConfig.activityStreamTarget && streamConfig.activityStreamId && !streamConfig.noActivityStreamID) {
|
||||
stateGoParams.activity_search[streamConfig.activityStreamTarget] = $state.params[streamConfig.activityStreamId];
|
||||
}
|
||||
}
|
||||
@ -107,7 +107,7 @@ export default
|
||||
page_size: '20',
|
||||
};
|
||||
}
|
||||
if(streamConfig.activityStreamId) {
|
||||
if(streamConfig.activityStreamId && !streamConfig.noActivityStreamID) {
|
||||
stateGoParams.id = $state.params[streamConfig.activityStreamId];
|
||||
}
|
||||
if(stateGoParams.target === "custom_inventory_script"){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user