Commit | Line | Data |
---|---|---|
128850fd TO |
1 | <div af-api4-ctrl="tokens" af-api4="['OAuthSysToken', 'get', {'where': [['client_id', '=', options.clientId]]}]"> |
2 | </div> | |
3 | <div ng-if="tokens.result.length == 0"> | |
4 | {{ts('No tokens found')}} | |
5 | </div> | |
6 | ||
7 | <table class="table" ng-if="tokens.result.length > 0"> | |
8 | <tr> | |
9 | <th>{{ts('ID')}}</th> | |
10 | <th>{{ts('Tag')}}</th> | |
11 | <th>{{ts('On Behalf Of')}}</th> | |
12 | <th>{{ts('Scopes')}}</th> | |
13 | <th>{{ts('Created Date')}}</th> | |
14 | <th>{{ts('Actions')}}</th> | |
15 | </tr> | |
16 | <tr ng-repeat="token in tokens.result"> | |
17 | <td>{{token.id}}</td> | |
18 | <td>{{token.tag}}</td> | |
19 | <td>{{token.resource_owner_name}}</td> | |
20 | <td>{{token.scopes.join(" ")}}</td> | |
21 | <td>{{token.created_date}}</td> | |
22 | <td> | |
23 | <div class="btn-group"> | |
bbfd04e1 TO |
24 | <a class="btn btn-default" |
25 | ng-if="token.access_token" | |
26 | ng-href="{{crmUrl('civicrm/admin/oauth-jwt-debug#!/', {id: token.id})}}" | |
27 | target="_blank" | |
28 | >{{ts('Inspect')}}</a> | |
29 | ||
128850fd TO |
30 | <a class="btn btn-danger" |
31 | af-api4-action="['OAuthSysToken', 'delete', {where: [['id', '=', token.id]]}]" | |
32 | af-api4-start-msg="ts('Deleting...')" | |
33 | af-api4-success-msg="ts('Deleted')" | |
34 | af-api4-success="tokens.refresh()" | |
35 | >{{ts('Delete')}}</a> | |
36 | </div> | |
37 | </td> | |
38 | </tr> | |
39 | </table> |