user-storage-generic.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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}}/user-federation">{{:: 'user-federation' | translate}}</a></li>
  4. <li data-ng-hide="create">{{instance.name|capitalize}}</li>
  5. <li data-ng-show="create">{{:: 'add-user-storage-provider' | translate}}</li>
  6. </ol>
  7. <kc-tabs-user-storage></kc-tabs-user-storage>
  8. <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageRealm">
  9. <fieldset>
  10. <legend><span class="text">{{:: 'required-settings' | translate}}</span></legend>
  11. <div class="form-group clearfix" data-ng-show="!create">
  12. <label class="col-md-2 control-label" for="providerId">{{:: 'provider-id' | translate}} </label>
  13. <div class="col-md-6">
  14. <input class="form-control" id="providerId" type="text" ng-model="instance.id" readonly>
  15. </div>
  16. </div>
  17. <div class="form-group clearfix block">
  18. <label class="col-md-2 control-label" for="enabled">{{:: 'enabled' | translate}}</label>
  19. <div class="col-md-6">
  20. <input ng-model="instance.config['enabled'][0]" name="enabled" id="enabled" onoffswitchvalue on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />
  21. </div>
  22. <kc-tooltip>{{:: 'user-storage.enabled.tooltip' | translate}}</kc-tooltip>
  23. </div>
  24. <div class="form-group clearfix">
  25. <label class="col-md-2 control-label" for="consoleDisplayName">{{:: 'console-display-name' | translate}} </label>
  26. <div class="col-md-6">
  27. <input class="form-control" id="consoleDisplayName" type="text" ng-model="instance.name" placeholder="{{:: 'defaults-to-id' | translate}}">
  28. </div>
  29. <kc-tooltip>{{:: 'console-display-name.tooltip' | translate}}</kc-tooltip>
  30. </div>
  31. <div class="form-group clearfix">
  32. <label class="col-md-2 control-label" for="priority">{{:: 'priority' | translate}} </label>
  33. <div class="col-md-6">
  34. <input class="form-control" id="priority" type="text" ng-model="instance.config['priority'][0]">
  35. </div>
  36. <kc-tooltip>{{:: 'priority.tooltip' | translate}}</kc-tooltip>
  37. </div>
  38. <kc-component-config realm="realm" config="instance.config" properties="providerFactory.properties"></kc-component-config>
  39. </fieldset>
  40. <fieldset ng-show="showSync">
  41. <legend><span class="text">{{:: 'sync-settings' | translate}}</span></legend>
  42. <div class="form-group clearfix">
  43. <label class="col-md-2 control-label" for="fullSyncEnabled">{{:: 'periodic-full-sync' | translate}}</label>
  44. <div class="col-md-6">
  45. <input ng-model="fullSyncEnabled" name="fullSyncEnabled" id="fullSyncEnabled" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />
  46. </div>
  47. <kc-tooltip>{{:: 'periodic-full-sync.tooltip' | translate}}</kc-tooltip>
  48. </div>
  49. <div class="form-group clearfix" data-ng-show="fullSyncEnabled">
  50. <label class="col-md-2 control-label" for="fullSyncPeriod">{{:: 'full-sync-period' | translate}}</label>
  51. <div class="col-md-6">
  52. <input class="form-control" type="text" ng-model="instance.config['fullSyncPeriod'][0]" id="fullSyncPeriod" />
  53. </div>
  54. <kc-tooltip>{{:: 'full-sync-period.tooltip' | translate}}</kc-tooltip>
  55. </div>
  56. <div class="form-group clearfix">
  57. <label class="col-md-2 control-label" for="changedSyncEnabled">{{:: 'periodic-changed-users-sync' | translate}}</label>
  58. <div class="col-md-6">
  59. <input ng-model="changedSyncEnabled" name="changedSyncEnabled" id="changedSyncEnabled" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />
  60. </div>
  61. <kc-tooltip>{{:: 'periodic-changed-users-sync.tooltip' | translate}}</kc-tooltip>
  62. </div>
  63. <div class="form-group clearfix" data-ng-show="changedSyncEnabled">
  64. <label class="col-md-2 control-label" for="changedSyncPeriod">{{:: 'changed-users-sync-period' | translate}}</label>
  65. <div class="col-md-6">
  66. <input class="form-control" type="text" ng-model="instance.config['changedSyncPeriod'][0]" id="changedSyncPeriod" />
  67. </div>
  68. <kc-tooltip>{{:: 'changed-users-sync-period.tooltip' | translate}}</kc-tooltip>
  69. </div>
  70. </fieldset>
  71. <fieldset>
  72. <legend><span class="text">{{:: 'user-storage-cache-policy' | translate}}</span></legend>
  73. <div class="form-group">
  74. <label for="cachePolicy" class="col-md-2 control-label">{{:: 'userStorage.cachePolicy' | translate}}</label>
  75. <div class="col-md-2">
  76. <div>
  77. <select id="cachePolicy" ng-model="instance.config['cachePolicy'][0]" class="form-control">
  78. <option value="DEFAULT">{{:: 'userStorage.cachePolicy.option.DEFAULT' | translate}}</option>
  79. <option value="EVICT_DAILY">{{:: 'userStorage.cachePolicy.option.EVICT_DAILY' | translate}}</option>
  80. <option value="EVICT_WEEKLY">{{:: 'userStorage.cachePolicy.option.EVICT_WEEKLY' | translate}}</option>
  81. <option value="MAX_LIFESPAN">{{:: 'userStorage.cachePolicy.option.MAX_LIFESPAN' | translate}}</option>
  82. <option value="NO_CACHE">{{:: 'userStorage.cachePolicy.option.NO_CACHE' | translate}}</option>
  83. </select>
  84. </div>
  85. </div>
  86. <kc-tooltip>{{:: 'userStorage.cachePolicy.tooltip' | translate}}</kc-tooltip>
  87. </div>
  88. <div class="form-group" data-ng-show="instance.config['cachePolicy'][0] == 'EVICT_WEEKLY'">
  89. <label for="evictionDay" class="col-md-2 control-label">{{:: 'userStorage.cachePolicy.evictionDay' | translate}}</label>
  90. <div class="col-md-2">
  91. <div>
  92. <select id="evictionDay" ng-model="instance.config['evictionDay'][0]" class="form-control">
  93. <option value="1">{{:: 'Sunday' | translate}}</option>
  94. <option value="2">{{:: 'Monday' | translate}}</option>
  95. <option value="3">{{:: 'Tuesday' | translate}}</option>
  96. <option value="4">{{:: 'Wednesday' | translate}}</option>
  97. <option value="5">{{:: 'Thursday' | translate}}</option>
  98. <option value="6">{{:: 'Friday' | translate}}</option>
  99. <option value="7">{{:: 'Saturday' | translate}}</option>
  100. </select>
  101. </div>
  102. </div>
  103. <kc-tooltip>{{:: 'userStorage.cachePolicy.evictionDay.tooltip' | translate}}</kc-tooltip>
  104. </div>
  105. <div class="form-group clearfix" data-ng-show="instance.config['cachePolicy'][0] == 'EVICT_WEEKLY' || instance.config['cachePolicy'][0] == 'EVICT_DAILY'">
  106. <label class="col-md-2 control-label" for="evictionHour">{{:: 'userStorage.cachePolicy.evictionHour' | translate}}</label>
  107. <div class="col-md-2">
  108. <div>
  109. <select id="evictionHour" ng-model="instance.config['evictionHour'][0]" class="form-control">
  110. <option value="0">00</option>
  111. <option value="1">01</option>
  112. <option value="2">02</option>
  113. <option value="3">03</option>
  114. <option value="4">04</option>
  115. <option value="5">05</option>
  116. <option value="6">06</option>
  117. <option value="7">07</option>
  118. <option value="8">08</option>
  119. <option value="9">09</option>
  120. <option value="10">10</option>
  121. <option value="11">11</option>
  122. <option value="12">12</option>
  123. <option value="13">13</option>
  124. <option value="14">14</option>
  125. <option value="15">15</option>
  126. <option value="16">16</option>
  127. <option value="17">17</option>
  128. <option value="18">18</option>
  129. <option value="19">19</option>
  130. <option value="20">20</option>
  131. <option value="21">21</option>
  132. <option value="22">22</option>
  133. <option value="23">23</option>
  134. </select>
  135. </div>
  136. </div>
  137. <kc-tooltip>{{:: 'userStorage.cachePolicy.evictionHour.tooltip' | translate}}</kc-tooltip>
  138. </div>
  139. <div class="form-group clearfix" data-ng-show="instance.config['cachePolicy'][0] == 'EVICT_WEEKLY' || instance.config['cachePolicy'][0] == 'EVICT_DAILY'">
  140. <label class="col-md-2 control-label" for="evictionMinute">{{:: 'userStorage.cachePolicy.evictionMinute' | translate}}</label>
  141. <div class="col-md-2">
  142. <div>
  143. <select id="evictionMinute" ng-model="instance.config['evictionMinute'][0]" class="form-control">
  144. <option value="0">00</option>
  145. <option value="1">01</option>
  146. <option value="2">02</option>
  147. <option value="3">03</option>
  148. <option value="4">04</option>
  149. <option value="5">05</option>
  150. <option value="6">06</option>
  151. <option value="7">07</option>
  152. <option value="8">08</option>
  153. <option value="9">09</option>
  154. <option value="10">10</option>
  155. <option value="11">11</option>
  156. <option value="12">12</option>
  157. <option value="13">13</option>
  158. <option value="14">14</option>
  159. <option value="15">15</option>
  160. <option value="16">16</option>
  161. <option value="17">17</option>
  162. <option value="18">18</option>
  163. <option value="19">19</option>
  164. <option value="20">20</option>
  165. <option value="21">21</option>
  166. <option value="22">22</option>
  167. <option value="23">23</option>
  168. <option value="24">24</option>
  169. <option value="25">25</option>
  170. <option value="26">26</option>
  171. <option value="27">27</option>
  172. <option value="28">28</option>
  173. <option value="29">29</option>
  174. <option value="30">30</option>
  175. <option value="31">31</option>
  176. <option value="32">32</option>
  177. <option value="33">33</option>
  178. <option value="34">34</option>
  179. <option value="35">35</option>
  180. <option value="36">36</option>
  181. <option value="37">37</option>
  182. <option value="38">38</option>
  183. <option value="39">39</option>
  184. <option value="40">40</option>
  185. <option value="41">41</option>
  186. <option value="42">42</option>
  187. <option value="43">43</option>
  188. <option value="44">44</option>
  189. <option value="45">45</option>
  190. <option value="46">46</option>
  191. <option value="47">47</option>
  192. <option value="48">48</option>
  193. <option value="49">49</option>
  194. <option value="50">50</option>
  195. <option value="51">51</option>
  196. <option value="52">52</option>
  197. <option value="53">53</option>
  198. <option value="54">54</option>
  199. <option value="55">55</option>
  200. <option value="56">56</option>
  201. <option value="57">57</option>
  202. <option value="58">58</option>
  203. <option value="59">59</option>
  204. </select>
  205. </div>
  206. </div>
  207. <kc-tooltip>{{:: 'userStorage.cachePolicy.evictionMinute.tooltip' | translate}}</kc-tooltip>
  208. </div>
  209. <div class="form-group clearfix" data-ng-show="instance.config['cachePolicy'][0] == 'MAX_LIFESPAN'">
  210. <label class="col-md-2 control-label" for="maxLifespan">{{:: 'userStorage.cachePolicy.maxLifespan' | translate}}</label>
  211. <div class="col-md-6">
  212. <input class="form-control" type="text" ng-model="instance.config['maxLifespan'][0]" id="maxLifespan" />
  213. </div>
  214. <kc-tooltip>{{:: 'userStorage.cachePolicy.maxLifespan.tooltip' | translate}}</kc-tooltip>
  215. </div>
  216. </fieldset>
  217. <div class="form-group">
  218. <div class="col-md-10 col-md-offset-2" data-ng-show="create && access.manageRealm">
  219. <button kc-save>{{:: 'save' | translate}}</button>
  220. <button kc-cancel data-ng-click="cancel()">{{:: 'cancel' | translate}}</button>
  221. </div>
  222. </div>
  223. <div class="form-group">
  224. <div class="col-md-10 col-md-offset-2" data-ng-show="!create && access.manageRealm">
  225. <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
  226. <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button>
  227. <button class="btn btn-primary" data-ng-click="triggerChangedUsersSync()" data-ng-hide="changed || !showSync">{{:: 'synchronize-changed-users' | translate}}</button>
  228. <button class="btn btn-primary" data-ng-click="triggerFullSync()" data-ng-hide="changed || !showSync">{{:: 'synchronize-all-users' | translate}}</button>
  229. <button class="btn btn-primary" data-ng-click="removeImportedUsers()" data-ng-hide="changed">{{:: 'remove-imported-users' | translate}}</button>
  230. <button class="btn btn-primary" data-ng-click="unlinkUsers()" data-ng-hide="changed">{{:: 'unlink-users' | translate}}</button>
  231. </div>
  232. </div>
  233. </form>
  234. </div>
  235. <kc-menu></kc-menu>