realm-events.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <h1>
  3. <span>{{:: 'events' | translate}}</span>
  4. <kc-tooltip>{{:: 'events.tooltip' | translate}}</kc-tooltip>
  5. </h1>
  6. <ul class="nav nav-tabs">
  7. <li data-ng-class="(path[2] == 'events') && 'active'"><a href="#/realms/{{realm.realm}}/events">{{:: 'login-events' | translate}}</a></li>
  8. <li data-ng-class="(path[2] == 'admin-events') && 'active'"><a href="#/realms/{{realm.realm}}/admin-events">{{:: 'admin-events' | translate}}</a></li>
  9. <li data-ng-class="(path[2] == 'events-settings') && 'active'"><a href="#/realms/{{realm.realm}}/events-settings">{{:: 'config' | translate}}</a></li>
  10. </ul>
  11. <table class="table table-striped table-bordered">
  12. <thead>
  13. <tr>
  14. <th class="kc-table-actions" colspan="4">
  15. <div class="pull-right">
  16. <select data-ng-model="query.max"
  17. data-ng-click="update()"
  18. data-ng-options="itemCount for itemCount in [5,10,50,100]"
  19. class="btn btn-default">
  20. </select>
  21. <button class="btn btn-default" data-ng-click="filter = !filter">
  22. <span class="glyphicon glyphicon-plus" data-ng-show="!filter"></span>
  23. <span class="glyphicon glyphicon-minus" data-ng-show="filter"></span>
  24. {{:: 'filter' | translate}}
  25. </button>
  26. <button class="btn btn-default btn-default" data-ng-click="update()">{{:: 'update' | translate}}</button>
  27. <button class="btn btn-default btn-default" data-ng-click="reset()">{{:: 'reset' | translate}}</button>
  28. </div>
  29. <form class="form-horizontal">
  30. <div class="form-group" data-ng-show="filter">
  31. <label class="col-md-2 control-label" for="eventTypes">{{:: 'event-type' | translate}}</label>
  32. <div class="col-sm-5" onkeypress="return false;" ng-paste="disablePaste($event)">
  33. <input ui-select2="eventSelectOptions" id="eventTypes" ng-model="query.type" data-placeholder="{{:: 'select-event-types.placeholder' | translate}}"/>
  34. </div>
  35. </div>
  36. <div class="form-group" data-ng-show="filter">
  37. <label class="col-md-2 control-label" for="client">{{:: 'client' | translate}}</label>
  38. <div class="col-md-6">
  39. <input class="form-control" type="text" id="client" name="client" data-ng-model="query.client">
  40. </div>
  41. </div>
  42. <div class="form-group" data-ng-show="filter">
  43. <label class="col-md-2 control-label" for="user">{{:: 'user' | translate}}</label>
  44. <div class="col-md-6">
  45. <input class="form-control" type="text" id="user" name="user" data-ng-model="query.user">
  46. </div>
  47. </div>
  48. <div class="form-group" data-ng-show="filter">
  49. <label class="col-md-2 control-label" for="dateFrom">{{:: 'date-(from)' | translate}}</label>
  50. <div class="col-md-6">
  51. <input class="form-control" type="text" id="dateFrom" name="dateFrom" data-ng-model="query.dateFrom" placeholder="yyyy-MM-dd">
  52. </div>
  53. </div>
  54. <div class="form-group" data-ng-show="filter">
  55. <label class="col-md-2 control-label" for="dateTo">{{:: 'date-(to)' | translate}}</label>
  56. <div class="col-md-6">
  57. <input class="form-control" type="text" id="dateTo" name="dateTo" data-ng-model="query.dateTo" placeholder="yyyy-MM-dd">
  58. </div>
  59. </div>
  60. </form>
  61. </th>
  62. </tr>
  63. <tr>
  64. <th width="100px">{{:: 'time' | translate}}</th>
  65. <th width="180px">{{:: 'event-type' | translate}}</th>
  66. <th>{{:: 'details' | translate}}</th>
  67. </tr>
  68. </thead>
  69. <tfoot>
  70. <tr>
  71. <td colspan="7">
  72. <button data-ng-click="firstPage()" class="first" ng-disabled="query.first == 0"><i data-ng-class="query.first == 0 && 'text-muted'" class="fa fa-angle-double-left"></i></button>
  73. <button data-ng-click="previousPage()" class="prev" ng-disabled="query.first == 0"><i data-ng-class="query.first == 0 && 'text-muted'" class="fa fa-angle-left"></i></button>
  74. <button data-ng-click="nextPage()" class="next" ng-disabled="events.length < query.max"><i data-ng-class="events.length < query.max && 'text-muted'" class="fa fa-angle-right"></i></button>
  75. </td>
  76. </tr>
  77. </tfoot>
  78. <tbody>
  79. <tr ng-repeat="event in events">
  80. <td>{{event.time|date:('dateFormat' | translate)}}<br>{{event.time|date:('timeFormat' | translate)}}</td>
  81. <td>{{event.type}}</td>
  82. <td>
  83. <table class="table table-striped table-bordered">
  84. <tr><td width="100px">{{:: 'client' | translate}}</td><td>{{event.clientId}}</td></tr>
  85. <tr><td>{{:: 'user' | translate}}</td><td>{{event.userId}}</td></tr>
  86. <tr><td>{{:: 'ip-address' | translate}}</td><td>{{event.ipAddress}}</td></tr>
  87. <tr data-ng-show="event.error"><td>{{:: 'error' | translate}}</td><td>{{event.error}}</td></tr>
  88. <tr>
  89. <td>{{:: 'details' | translate}}</td>
  90. <td>
  91. <button type="button" class="btn btn-default btn-xs" ng-click="event.collapse = !event.collapse">
  92. <span class="glyphicon glyphicon-plus" data-ng-show="!event.collapse"></span>
  93. <span class="glyphicon glyphicon-minus" data-ng-show="event.collapse"></span>
  94. </button>
  95. <table data-ng-show="event.collapse" class="table table-striped table-bordered">
  96. <tr ng-repeat="(key, value) in event.details">
  97. <td>{{key}}</td>
  98. <td>{{value}}</td>
  99. </tr>
  100. </table>
  101. </td>
  102. </tr>
  103. <tr data-ng-show="event.representation">
  104. <td>{{:: 'representation' | translate}}</td>
  105. <td>
  106. <button type="button" class="btn btn-default btn-xs" ng-click="collapseRep = !collapseRep">
  107. <span class="glyphicon glyphicon-plus" data-ng-show="!collapseRep"></span>
  108. <span class="glyphicon glyphicon-minus" data-ng-show="collapseRep"></span>
  109. </button>
  110. <pre data-ng-show="collapseRep">{{event.representation}}</pre>
  111. </td>
  112. </tr>
  113. </table>
  114. </td>
  115. </tr>
  116. </tbody>
  117. </table>
  118. </div>
  119. <kc-menu></kc-menu>