client-sessions.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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">{{:: 'active-sessions' | 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>{{:: 'active-sessions.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="3">
  22. <div class="pull-right">
  23. <a class="btn btn-default" ng-click="loadUsers()" tooltip-placement="left" tooltip-trigger="mouseover mouseout" tooltip="{{:: 'show-sessions.tooltip' | translate}}">{{:: 'show-sessions' | 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>{{:: 'session-start' | translate}}</th>
  31. </tr>
  32. </thead>
  33. <tfoot data-ng-show="sessions && (sessions.length >= 5 || query.first != 0)">
  34. <tr>
  35. <td colspan="7">
  36. <div class="table-nav">
  37. <button data-ng-click="firstPage()" class="first" ng-disabled="query.first == 0">{{:: 'first-page' | translate}}</button>
  38. <button data-ng-click="previousPage()" class="prev" ng-disabled="query.first == 0">{{:: 'previous-page' | translate}}</button>
  39. <button data-ng-click="nextPage()" class="next" ng-disabled="sessions.length < query.max">{{:: 'next-page' | translate}}</button>
  40. </div>
  41. </td>
  42. </tr>
  43. </tfoot>
  44. <tbody>
  45. <tr data-ng-repeat="session in sessions">
  46. <td><a href="#/realms/{{realm.realm}}/users/{{session.userId}}">{{session.username}}</a></td>
  47. <td>{{session.ipAddress}}</td>
  48. <td>{{session.start | date:'medium'}}</td>
  49. </tr>
  50. </tbody>
  51. </table>
  52. </div>
  53. <kc-menu></kc-menu>