client-offline-sessions.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <ol class="breadcrumb">
  3. <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li>
  4. <li>{{client.clientId}}</li>
  5. </ol>
  6. <kc-tabs-client></kc-tabs-client>
  7. <form class="form-horizontal" name="sessionStats">
  8. <fieldset class="border-top">
  9. <div class="form-group">
  10. <label class="col-md-2 control-label" for="activeSessions">{{:: 'offline-tokens' | translate}}</label>
  11. <div class="col-md-6">
  12. <input class="form-control" type="text" id="activeSessions" name="activeSessions" data-ng-model="count" ng-disabled="true">
  13. </div>
  14. <kc-tooltip>{{:: 'offline-tokens.tooltip' | translate}}</kc-tooltip>
  15. </div>
  16. </fieldset>
  17. </form>
  18. <table class="table table-striped table-bordered" data-ng-show="count > 0">
  19. <thead>
  20. <tr>
  21. <th class="kc-table-actions" colspan="4">
  22. <div class="pull-right">
  23. <a class="btn btn-default" ng-click="loadUsers()" tooltip-placement="left" tooltip-trigger="mouseover mouseout" tooltip="{{:: 'show-offline-tokens.tooltip' | translate}}">{{:: 'show-offline-tokens' | translate}}</a>
  24. </div>
  25. </th>
  26. </tr>
  27. <tr data-ng-show="sessions">
  28. <th>{{:: 'user' | translate}}</th>
  29. <th>{{:: 'from-ip' | translate}}</th>
  30. <th>{{:: 'token-issued' | translate}}</th>
  31. <th>{{:: 'last-refresh' | translate}}</th>
  32. </tr>
  33. </thead>
  34. <tfoot data-ng-show="sessions && (sessions.length >= 5 || query.first != 0)">
  35. <tr>
  36. <td colspan="7">
  37. <div class="table-nav">
  38. <button data-ng-click="firstPage()" class="first" ng-disabled="query.first == 0">{{:: 'first-page' | translate}}</button>
  39. <button data-ng-click="previousPage()" class="prev" ng-disabled="query.first == 0">{{:: 'previous-page' | translate}}</button>
  40. <button data-ng-click="nextPage()" class="next" ng-disabled="sessions.length < query.max">{{:: 'next-page' | translate}}</button>
  41. </div>
  42. </td>
  43. </tr>
  44. </tfoot>
  45. <tbody>
  46. <tr data-ng-repeat="session in sessions">
  47. <td><a href="#/realms/{{realm.realm}}/users/{{session.userId}}">{{session.username}}</a></td>
  48. <td>{{session.ipAddress}}</td>
  49. <td>{{session.start | date:'medium'}}</td>
  50. <td>{{session.lastAccess | date:'medium'}}</td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. </div>
  55. <kc-menu></kc-menu>