realm-events-config.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <h1>
  3. <span>{{:: 'events-config' | translate}}</span>
  4. <kc-tooltip>{{:: 'events-config.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. <div id="content">
  12. <h2>{{:: 'events-config' | translate}}</h2>
  13. <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageEvents">
  14. <fieldset class="border-top">
  15. <div class="form-group">
  16. <label class="col-md-2 control-label" for="eventsListeners" class="control-label">{{:: 'event-listeners' | translate}}</label>
  17. <kc-tooltip>{{:: 'event-listeners.tooltip' | translate}}</kc-tooltip>
  18. <div class="col-md-6">
  19. <input ui-select2="eventsConfigSelectOptions" id="eventsListeners" ng-model="eventsConfig.eventsListeners" data-placeholder="{{:: 'select-an-action.placeholder' | translate}}"/>
  20. </div>
  21. </div>
  22. </fieldset>
  23. <fieldset>
  24. <legend><span class="text">{{:: 'login-events-settings' | translate}}</span></legend>
  25. <div class="form-group">
  26. <label class="col-md-2 control-label" for="enabled">{{:: 'save-events' | translate}}</label>
  27. <kc-tooltip>{{:: 'login.save-events.tooltip' | translate}}</kc-tooltip>
  28. <div class="col-md-6">
  29. <input ng-model="eventsConfig.eventsEnabled" name="enabled" id="enabled" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}"/>
  30. </div>
  31. </div>
  32. <div class="form-group" data-ng-show="eventsConfig.eventsEnabled">
  33. <label class="col-md-2 control-label" for="enabledEventTypes" class="control-label">{{:: 'saved-types' | translate}}</label>
  34. <kc-tooltip>{{:: 'saved-types.tooltip' | translate}}</kc-tooltip>
  35. <div class="col-md-6">
  36. <input ui-select2="eventSelectOptions" id="enabledEventTypes" ng-model="eventsConfig.enabledEventTypes" data-placeholder="{{:: 'select-event-types.placeholder' | translate}}"/>
  37. </div>
  38. </div>
  39. <div class="form-group" data-ng-show="access.manageEvents && eventsConfig.eventsEnabled">
  40. <label class="col-md-2 control-label" for="password">{{:: 'clear-events' | translate}}</label>
  41. <kc-tooltip>{{:: 'clear-events.tooltip' | translate}}</kc-tooltip>
  42. <div class="col-md-6">
  43. <button class="btn btn-danger" type="submit" data-ng-click="clearEvents()" >{{:: 'clear-events' | translate}}</button>
  44. </div>
  45. </div>
  46. <div class="form-group" data-ng-show="eventsConfig.eventsEnabled">
  47. <label class="col-md-2 control-label" for="expiration">{{:: 'expiration' | translate}}</label>
  48. <kc-tooltip>{{:: 'events.expiration.tooltip' | translate}}</kc-tooltip>
  49. <div class="col-md-6 time-selector">
  50. <input class="form-control" type="number" data-ng-model="eventsConfig.eventsExpiration" id="expiration" name="expiration" min="0"/>
  51. <select class="form-control" name="expirationUnit" data-ng-model="eventsConfig.expirationUnit">
  52. <option value="Minutes">{{:: 'minutes' | translate}}</option>
  53. <option value="Hours">{{:: 'hours' | translate}}</option>
  54. <option value="Days">{{:: 'days' | translate}}</option>
  55. </select>
  56. </div>
  57. </div>
  58. </fieldset>
  59. <fieldset>
  60. <legend><span class="text">{{:: 'admin-events-settings' | translate}}</span></legend>
  61. <div class="form-group">
  62. <label class="col-md-2 control-label" for="adminEventsEnabled">{{:: 'save-events' | translate}}</label>
  63. <kc-tooltip>{{:: 'admin.save-events.tooltip' | translate}}</kc-tooltip>
  64. <div class="col-md-6">
  65. <input ng-model="eventsConfig.adminEventsEnabled" name="adminEventsEnabled" id="adminEventsEnabled" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}"/>
  66. </div>
  67. </div>
  68. <div class="form-group" data-ng-show="eventsConfig.adminEventsEnabled">
  69. <label class="col-md-2 control-label" for="adminEventsDetailsEnabled">{{:: 'include-representation' | translate}}</label>
  70. <kc-tooltip>{{:: 'include-representation.tooltip' | translate}}</kc-tooltip>
  71. <div class="col-md-6">
  72. <input ng-model="eventsConfig.adminEventsDetailsEnabled" name="adminEventsDetailsEnabled" id="adminEventsDetailsEnabled" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}"/>
  73. </div>
  74. </div>
  75. <div class="form-group" data-ng-show="access.manageEvents && eventsConfig.adminEventsEnabled">
  76. <label class="col-md-2 control-label" for="password">{{:: 'clear-admin-events' | translate}}</label>
  77. <kc-tooltip>{{:: 'clear-admin-events.tooltip' | translate}}</kc-tooltip>
  78. <div class="col-md-6">
  79. <button class="btn btn-danger" type="submit" data-ng-click="clearAdminEvents()" >{{:: 'clear-admin-events' | translate}}</button>
  80. </div>
  81. </div>
  82. </fieldset>
  83. <div class="form-group" data-ng-show="access.manageEvents">
  84. <div class="col-md-10 col-md-offset-2">
  85. <button data-kc-reset data-ng-disabled="!changed">{{:: 'clear-changes' | translate}}</button>
  86. <button data-kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
  87. </div>
  88. </div>
  89. </form>
  90. </div>
  91. </div>
  92. <kc-menu></kc-menu>