client-storage-generic.html 12 KB

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