mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 15:58:45 -03:30
add tokens to activity stream
This commit is contained in:
@@ -21,6 +21,11 @@ export default {
|
|||||||
name: 'users.edit.tokens.add',
|
name: 'users.edit.tokens.add',
|
||||||
params: {
|
params: {
|
||||||
},
|
},
|
||||||
|
data: {
|
||||||
|
activityStream: true,
|
||||||
|
activityStreamTarget: 'o_auth2_access_token',
|
||||||
|
noActivityStreamID: true
|
||||||
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
label: N_('CREATE TOKEN')
|
label: N_('CREATE TOKEN')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ export default {
|
|||||||
controllerAs: 'vm'
|
controllerAs: 'vm'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data: {
|
||||||
|
activityStream: true,
|
||||||
|
activityStreamTarget: 'o_auth2_access_token',
|
||||||
|
noActivityStreamID: true
|
||||||
|
},
|
||||||
searchPrefix: 'token',
|
searchPrefix: 'token',
|
||||||
params: {
|
params: {
|
||||||
token_search: {
|
token_search: {
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ export default function GetTargetTitle(i18n) {
|
|||||||
case 'o_auth2_application':
|
case 'o_auth2_application':
|
||||||
rtnTitle = i18n._('APPLICATIONS');
|
rtnTitle = i18n._('APPLICATIONS');
|
||||||
break;
|
break;
|
||||||
|
case 'o_auth2_access_token':
|
||||||
|
rtnTitle = i18n._('TOKENS');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rtnTitle;
|
return rtnTitle;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export default ['templateUrl', 'i18n', function(templateUrl, i18n) {
|
|||||||
$scope.options = [
|
$scope.options = [
|
||||||
{label: i18n._('All Activity'), value: 'dashboard'},
|
{label: i18n._('All Activity'), value: 'dashboard'},
|
||||||
{label: i18n._('Applications'), value: 'o_auth2_application'},
|
{label: i18n._('Applications'), value: 'o_auth2_application'},
|
||||||
|
{label: i18n._('Tokens'), value: 'o_auth2_access_token'},
|
||||||
{label: i18n._('Credentials'), value: 'credential'},
|
{label: i18n._('Credentials'), value: 'credential'},
|
||||||
{label: i18n._('Hosts'), value: 'host'},
|
{label: i18n._('Hosts'), value: 'host'},
|
||||||
{label: i18n._('Inventories'), value: 'inventory'},
|
{label: i18n._('Inventories'), value: 'inventory'},
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export default
|
|||||||
order_by: '-timestamp',
|
order_by: '-timestamp',
|
||||||
page_size: '20',
|
page_size: '20',
|
||||||
};
|
};
|
||||||
if (streamConfig.activityStreamTarget && streamConfig.activityStreamId) {
|
if (streamConfig.activityStreamTarget && streamConfig.activityStreamId && !streamConfig.noActivityStreamID) {
|
||||||
stateGoParams.activity_search[streamConfig.activityStreamTarget] = $state.params[streamConfig.activityStreamId];
|
stateGoParams.activity_search[streamConfig.activityStreamTarget] = $state.params[streamConfig.activityStreamId];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ export default
|
|||||||
page_size: '20',
|
page_size: '20',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if(streamConfig.activityStreamId) {
|
if(streamConfig.activityStreamId && !streamConfig.noActivityStreamID) {
|
||||||
stateGoParams.id = $state.params[streamConfig.activityStreamId];
|
stateGoParams.id = $state.params[streamConfig.activityStreamId];
|
||||||
}
|
}
|
||||||
if(stateGoParams.target === "custom_inventory_script"){
|
if(stateGoParams.target === "custom_inventory_script"){
|
||||||
|
|||||||
Reference in New Issue
Block a user