mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
use translated string for scope in tokens list
This commit is contained in:
@@ -37,6 +37,14 @@ function ListTokensController (
|
|||||||
$scope[name] = dataset.results;
|
$scope[name] = dataset.results;
|
||||||
vm.tokensCount = dataset.count;
|
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');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
vm.getLastUsed = token => {
|
vm.getLastUsed = token => {
|
||||||
const lastUsed = _.get(token, 'last_used');
|
const lastUsed = _.get(token, 'last_used');
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</at-row-item>
|
</at-row-item>
|
||||||
<at-row-item
|
<at-row-item
|
||||||
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_SCOPE') }}"
|
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_SCOPE') }}"
|
||||||
value="{{ token.scope }}">
|
value="{{ vm.getScopeString(token.scope) }}">
|
||||||
</at-row-item>
|
</at-row-item>
|
||||||
<at-row-item
|
<at-row-item
|
||||||
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_APPLICATION') }}"
|
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_APPLICATION') }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user