sunspot_solr 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (256) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sunspot-solr +2 -6
  3. data/lib/sunspot/solr/server.rb +2 -3
  4. data/solr/README.txt +181 -181
  5. data/solr/bin/post +29 -19
  6. data/solr/bin/solr +247 -428
  7. data/solr/bin/solr.cmd +102 -256
  8. data/solr/bin/solr.in.cmd +15 -7
  9. data/solr/bin/solr.in.sh +26 -12
  10. data/solr/server/README.txt +110 -113
  11. data/solr/server/contexts/solr-jetty-context.xml +8 -8
  12. data/solr/server/etc/jetty-http.xml +47 -0
  13. data/solr/server/etc/jetty-https-ssl.xml +175 -159
  14. data/solr/server/etc/jetty-https.xml +53 -0
  15. data/solr/server/etc/jetty-ssl.xml +46 -0
  16. data/solr/server/etc/jetty.xml +189 -167
  17. data/solr/server/etc/webdefault.xml +527 -527
  18. data/solr/server/lib/javax.servlet-api-3.1.0.jar +0 -0
  19. data/solr/server/lib/jetty-continuation-9.2.11.v20150529.jar +0 -0
  20. data/solr/server/lib/jetty-deploy-9.2.11.v20150529.jar +0 -0
  21. data/solr/server/lib/jetty-http-9.2.11.v20150529.jar +0 -0
  22. data/solr/server/lib/jetty-io-9.2.11.v20150529.jar +0 -0
  23. data/solr/server/lib/jetty-jmx-9.2.11.v20150529.jar +0 -0
  24. data/solr/server/lib/jetty-rewrite-9.2.11.v20150529.jar +0 -0
  25. data/solr/server/lib/jetty-security-9.2.11.v20150529.jar +0 -0
  26. data/solr/server/lib/jetty-server-9.2.11.v20150529.jar +0 -0
  27. data/solr/server/lib/jetty-servlet-9.2.11.v20150529.jar +0 -0
  28. data/solr/server/lib/jetty-servlets-9.2.11.v20150529.jar +0 -0
  29. data/solr/server/lib/jetty-util-9.2.11.v20150529.jar +0 -0
  30. data/solr/server/lib/jetty-webapp-9.2.11.v20150529.jar +0 -0
  31. data/solr/server/lib/jetty-xml-9.2.11.v20150529.jar +0 -0
  32. data/solr/server/modules/http.mod +9 -0
  33. data/solr/server/modules/https.mod +9 -0
  34. data/solr/server/modules/server.mod +11 -0
  35. data/solr/server/modules/ssl.mod +9 -0
  36. data/solr/server/resources/jetty-logging.properties +1 -0
  37. data/solr/server/resources/log4j.properties +24 -24
  38. data/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-exec-1.3.jar +0 -0
  39. data/solr/server/solr-webapp/webapp/WEB-INF/lib/{hadoop-annotations-2.3.0.jar → hadoop-annotations-2.6.0.jar} +0 -0
  40. data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.6.0.jar +0 -0
  41. data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.6.0.jar +0 -0
  42. data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.6.0.jar +0 -0
  43. data/solr/server/solr-webapp/webapp/WEB-INF/lib/htrace-core-3.0.4.jar +0 -0
  44. data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpclient-4.4.1.jar +0 -0
  45. data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpcore-4.4.1.jar +0 -0
  46. data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpmime-4.4.1.jar +0 -0
  47. data/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-core-2.5.4.jar +0 -0
  48. data/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-dataformat-smile-2.5.4.jar +0 -0
  49. data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-analyzers-common-5.0.0.jar → lucene-analyzers-common-5.3.1.jar} +0 -0
  50. data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-analyzers-kuromoji-5.0.0.jar → lucene-analyzers-kuromoji-5.3.1.jar} +0 -0
  51. data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-analyzers-phonetic-5.0.0.jar → lucene-analyzers-phonetic-5.3.1.jar} +0 -0
  52. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-5.3.1.jar +0 -0
  53. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-codecs-5.3.1.jar +0 -0
  54. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-core-5.3.1.jar +0 -0
  55. data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-expressions-5.0.0.jar → lucene-expressions-5.3.1.jar} +0 -0
  56. data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-grouping-5.0.0.jar → lucene-grouping-5.3.1.jar} +0 -0
  57. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-highlighter-5.3.1.jar +0 -0
  58. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-join-5.3.1.jar +0 -0
  59. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-memory-5.3.1.jar +0 -0
  60. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-misc-5.3.1.jar +0 -0
  61. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queries-5.3.1.jar +0 -0
  62. data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-queryparser-5.0.0.jar → lucene-queryparser-5.3.1.jar} +0 -0
  63. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-sandbox-5.3.1.jar +0 -0
  64. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-spatial-5.3.1.jar +0 -0
  65. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-suggest-5.3.1.jar +0 -0
  66. data/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet-2.3.0.jar +0 -0
  67. data/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet.ext.servlet-2.3.0.jar +0 -0
  68. data/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-core-5.3.1.jar +0 -0
  69. data/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-5.3.1.jar +0 -0
  70. data/solr/server/solr-webapp/webapp/WEB-INF/lib/t-digest-3.1.jar +0 -0
  71. data/solr/server/solr-webapp/webapp/WEB-INF/web.xml +169 -181
  72. data/solr/server/solr-webapp/webapp/WEB-INF/weblogic.xml +28 -28
  73. data/solr/server/solr-webapp/webapp/admin.html +164 -163
  74. data/solr/server/solr-webapp/webapp/css/angular/analysis.css +304 -0
  75. data/solr/server/solr-webapp/webapp/css/angular/chosen.css +465 -0
  76. data/solr/server/solr-webapp/webapp/css/angular/cloud.css +398 -0
  77. data/solr/server/solr-webapp/webapp/css/angular/common.css +724 -0
  78. data/solr/server/solr-webapp/webapp/css/angular/cores.css +233 -0
  79. data/solr/server/solr-webapp/webapp/css/angular/dataimport.css +370 -0
  80. data/solr/server/solr-webapp/webapp/css/angular/documents.css +179 -0
  81. data/solr/server/solr-webapp/webapp/css/angular/files.css +53 -0
  82. data/solr/server/solr-webapp/webapp/css/angular/index.css +206 -0
  83. data/solr/server/solr-webapp/webapp/css/angular/logging.css +376 -0
  84. data/solr/server/solr-webapp/webapp/css/angular/menu.css +321 -0
  85. data/solr/server/solr-webapp/webapp/css/angular/plugins.css +212 -0
  86. data/solr/server/solr-webapp/webapp/css/angular/query.css +162 -0
  87. data/solr/server/solr-webapp/webapp/css/angular/replication.css +500 -0
  88. data/solr/server/solr-webapp/webapp/css/angular/schema-browser.css +567 -0
  89. data/solr/server/solr-webapp/webapp/css/angular/segments.css +173 -0
  90. data/solr/server/solr-webapp/webapp/css/angular/threads.css +161 -0
  91. data/solr/server/solr-webapp/webapp/css/chosen.css +421 -421
  92. data/solr/server/solr-webapp/webapp/css/styles/analysis.css +311 -311
  93. data/solr/server/solr-webapp/webapp/css/styles/cloud.css +410 -410
  94. data/solr/server/solr-webapp/webapp/css/styles/common.css +701 -701
  95. data/solr/server/solr-webapp/webapp/css/styles/cores.css +244 -244
  96. data/solr/server/solr-webapp/webapp/css/styles/dashboard.css +155 -155
  97. data/solr/server/solr-webapp/webapp/css/styles/dataimport.css +403 -403
  98. data/solr/server/solr-webapp/webapp/css/styles/documents.css +197 -197
  99. data/solr/server/solr-webapp/webapp/css/styles/files.css +54 -54
  100. data/solr/server/solr-webapp/webapp/css/styles/index.css +207 -207
  101. data/solr/server/solr-webapp/webapp/css/styles/java-properties.css +52 -52
  102. data/solr/server/solr-webapp/webapp/css/styles/logging.css +391 -391
  103. data/solr/server/solr-webapp/webapp/css/styles/menu.css +329 -328
  104. data/solr/server/solr-webapp/webapp/css/styles/plugins.css +195 -195
  105. data/solr/server/solr-webapp/webapp/css/styles/query.css +173 -173
  106. data/solr/server/solr-webapp/webapp/css/styles/replication.css +515 -515
  107. data/solr/server/solr-webapp/webapp/css/styles/schema-browser.css +578 -578
  108. data/solr/server/solr-webapp/webapp/css/styles/segments.css +145 -0
  109. data/solr/server/solr-webapp/webapp/css/styles/threads.css +172 -172
  110. data/solr/server/solr-webapp/webapp/img/chosen-sprite-2x.png +0 -0
  111. data/solr/server/solr-webapp/webapp/img/filetypes/README +27 -27
  112. data/solr/server/solr-webapp/webapp/img/solr.svg +39 -39
  113. data/solr/server/solr-webapp/webapp/index.html +208 -0
  114. data/solr/server/solr-webapp/webapp/js/angular/app.js +713 -0
  115. data/solr/server/solr-webapp/webapp/js/angular/controllers/analysis.js +199 -0
  116. data/solr/server/solr-webapp/webapp/js/angular/controllers/cloud.js +528 -0
  117. data/solr/server/solr-webapp/webapp/js/angular/controllers/core-overview.js +225 -0
  118. data/solr/server/solr-webapp/webapp/js/angular/controllers/cores.js +465 -0
  119. data/solr/server/solr-webapp/webapp/js/angular/controllers/dataimport.js +284 -0
  120. data/solr/server/solr-webapp/webapp/js/angular/controllers/documents.js +139 -0
  121. data/solr/server/solr-webapp/webapp/js/angular/controllers/files.js +92 -0
  122. data/solr/server/solr-webapp/webapp/js/angular/controllers/index.js +95 -0
  123. data/solr/server/solr-webapp/webapp/js/angular/controllers/java-properties.js +45 -0
  124. data/solr/server/solr-webapp/webapp/js/angular/controllers/logging.js +146 -0
  125. data/solr/server/solr-webapp/webapp/js/angular/controllers/plugins.js +166 -0
  126. data/solr/server/solr-webapp/webapp/js/angular/controllers/query.js +99 -0
  127. data/solr/server/solr-webapp/webapp/js/angular/controllers/replication.js +227 -0
  128. data/solr/server/solr-webapp/webapp/js/angular/controllers/schema-browser.js +432 -0
  129. data/solr/server/solr-webapp/webapp/js/angular/controllers/segments.js +94 -0
  130. data/solr/server/solr-webapp/webapp/js/angular/controllers/threads.js +51 -0
  131. data/solr/server/solr-webapp/webapp/js/angular/services.js +214 -0
  132. data/solr/server/solr-webapp/webapp/js/lib/ZeroClipboard.js +342 -342
  133. data/solr/server/solr-webapp/webapp/js/lib/chosen.js +982 -982
  134. data/solr/server/solr-webapp/webapp/js/lib/console.js +29 -29
  135. data/solr/server/solr-webapp/webapp/js/lib/d3.js +9373 -9373
  136. data/solr/server/solr-webapp/webapp/js/lib/highlight.js +31 -31
  137. data/solr/server/solr-webapp/webapp/js/lib/jquery-1.7.2.min.js +30 -30
  138. data/solr/server/solr-webapp/webapp/js/lib/jquery.ajaxfileupload.js +184 -184
  139. data/solr/server/solr-webapp/webapp/js/lib/jquery.blockUI.js +523 -523
  140. data/solr/server/solr-webapp/webapp/js/lib/jquery.cookie.js +71 -71
  141. data/solr/server/solr-webapp/webapp/js/lib/jquery.form.js +806 -806
  142. data/solr/server/solr-webapp/webapp/js/lib/jquery.jstree.js +3534 -3534
  143. data/solr/server/solr-webapp/webapp/js/lib/jquery.sammy.js +1863 -1863
  144. data/solr/server/solr-webapp/webapp/js/lib/jquery.timeago.js +189 -189
  145. data/solr/server/solr-webapp/webapp/js/lib/linker.js +48 -48
  146. data/solr/server/solr-webapp/webapp/js/lib/naturalSort.js +82 -0
  147. data/solr/server/solr-webapp/webapp/js/lib/order.js +216 -216
  148. data/solr/server/solr-webapp/webapp/js/main.js +60 -58
  149. data/solr/server/solr-webapp/webapp/js/require.js +11349 -11349
  150. data/solr/server/solr-webapp/webapp/js/scripts/analysis.js +545 -545
  151. data/solr/server/solr-webapp/webapp/js/scripts/app.js +680 -679
  152. data/solr/server/solr-webapp/webapp/js/scripts/cloud.js +877 -877
  153. data/solr/server/solr-webapp/webapp/js/scripts/cores.js +719 -719
  154. data/solr/server/solr-webapp/webapp/js/scripts/dashboard.js +562 -562
  155. data/solr/server/solr-webapp/webapp/js/scripts/dataimport.js +812 -812
  156. data/solr/server/solr-webapp/webapp/js/scripts/documents.js +370 -370
  157. data/solr/server/solr-webapp/webapp/js/scripts/files.js +265 -265
  158. data/solr/server/solr-webapp/webapp/js/scripts/index.js +340 -340
  159. data/solr/server/solr-webapp/webapp/js/scripts/java-properties.js +106 -106
  160. data/solr/server/solr-webapp/webapp/js/scripts/logging.js +578 -576
  161. data/solr/server/solr-webapp/webapp/js/scripts/ping.js +72 -72
  162. data/solr/server/solr-webapp/webapp/js/scripts/plugins.js +462 -462
  163. data/solr/server/solr-webapp/webapp/js/scripts/query.js +229 -229
  164. data/solr/server/solr-webapp/webapp/js/scripts/replication.js +527 -527
  165. data/solr/server/solr-webapp/webapp/js/scripts/schema-browser.js +1229 -1229
  166. data/solr/server/solr-webapp/webapp/js/scripts/segments.js +206 -0
  167. data/solr/server/solr-webapp/webapp/js/scripts/threads.js +158 -158
  168. data/solr/server/solr-webapp/webapp/libs/angular-chosen.js +139 -0
  169. data/solr/server/solr-webapp/webapp/libs/angular-cookies.js +229 -0
  170. data/solr/server/solr-webapp/webapp/libs/angular-cookies.min.js +31 -0
  171. data/solr/server/solr-webapp/webapp/libs/angular-resource.min.js +36 -0
  172. data/solr/server/solr-webapp/webapp/libs/angular-route.js +1018 -0
  173. data/solr/server/solr-webapp/webapp/libs/angular-route.min.js +38 -0
  174. data/solr/server/solr-webapp/webapp/libs/angular-sanitize.js +703 -0
  175. data/solr/server/solr-webapp/webapp/libs/angular-sanitize.min.js +39 -0
  176. data/solr/server/solr-webapp/webapp/libs/angular.js +26093 -0
  177. data/solr/server/solr-webapp/webapp/libs/angular.min.js +273 -0
  178. data/solr/server/solr-webapp/webapp/libs/chosen.jquery.js +1194 -0
  179. data/solr/server/solr-webapp/webapp/libs/chosen.jquery.min.js +30 -0
  180. data/solr/server/solr-webapp/webapp/libs/d3.js +9373 -0
  181. data/solr/server/solr-webapp/webapp/libs/highlight.js +31 -0
  182. data/solr/server/solr-webapp/webapp/libs/jquery-2.1.3.min.js +29 -0
  183. data/solr/server/solr-webapp/webapp/libs/jquery.jstree.js +3534 -0
  184. data/solr/server/solr-webapp/webapp/libs/ngtimeago.js +102 -0
  185. data/solr/server/solr-webapp/webapp/partials/analysis.html +128 -0
  186. data/solr/server/solr-webapp/webapp/partials/cloud.html +104 -0
  187. data/solr/server/solr-webapp/webapp/partials/core_overview.html +227 -0
  188. data/solr/server/solr-webapp/webapp/partials/cores.html +231 -0
  189. data/solr/server/solr-webapp/webapp/partials/dataimport.html +209 -0
  190. data/solr/server/solr-webapp/webapp/partials/documents.html +118 -0
  191. data/solr/server/solr-webapp/webapp/partials/files.html +47 -0
  192. data/solr/server/solr-webapp/webapp/partials/index.html +261 -0
  193. data/solr/server/solr-webapp/webapp/partials/java-properties.html +27 -0
  194. data/solr/server/solr-webapp/webapp/partials/logging-levels.html +56 -0
  195. data/solr/server/solr-webapp/webapp/partials/logging.html +56 -0
  196. data/solr/server/solr-webapp/webapp/partials/plugins.html +72 -0
  197. data/solr/server/solr-webapp/webapp/partials/query.html +356 -0
  198. data/solr/server/solr-webapp/webapp/partials/replication.html +239 -0
  199. data/solr/server/solr-webapp/webapp/partials/schema-browser.html +206 -0
  200. data/solr/server/solr-webapp/webapp/partials/segments.html +99 -0
  201. data/solr/server/solr-webapp/webapp/partials/threads.html +65 -0
  202. data/solr/server/solr-webapp/webapp/tpl/analysis.html +83 -83
  203. data/solr/server/solr-webapp/webapp/tpl/cloud.html +87 -87
  204. data/solr/server/solr-webapp/webapp/tpl/cores.html +226 -226
  205. data/solr/server/solr-webapp/webapp/tpl/dashboard.html +201 -201
  206. data/solr/server/solr-webapp/webapp/tpl/dataimport.html +183 -183
  207. data/solr/server/solr-webapp/webapp/tpl/documents.html +107 -107
  208. data/solr/server/solr-webapp/webapp/tpl/files.html +44 -44
  209. data/solr/server/solr-webapp/webapp/tpl/index.html +250 -250
  210. data/solr/server/solr-webapp/webapp/tpl/logging.html +23 -23
  211. data/solr/server/solr-webapp/webapp/tpl/plugins.html +39 -39
  212. data/solr/server/solr-webapp/webapp/tpl/query.html +361 -361
  213. data/solr/server/solr-webapp/webapp/tpl/replication.html +216 -216
  214. data/solr/server/solr-webapp/webapp/tpl/schema-browser.html +192 -192
  215. data/solr/server/solr-webapp/webapp/tpl/segments.html +49 -0
  216. data/solr/server/solr-webapp/webapp/tpl/threads.html +56 -56
  217. data/solr/server/solr/README.txt +77 -77
  218. data/solr/server/solr/solr.xml +51 -51
  219. data/solr/server/solr/zoo.cfg +17 -17
  220. data/solr/server/start.jar +0 -0
  221. data/spec/server_spec.rb +3 -8
  222. metadata +132 -43
  223. data/solr/server/lib/jetty-continuation-8.1.10.v20130312.jar +0 -0
  224. data/solr/server/lib/jetty-deploy-8.1.10.v20130312.jar +0 -0
  225. data/solr/server/lib/jetty-http-8.1.10.v20130312.jar +0 -0
  226. data/solr/server/lib/jetty-io-8.1.10.v20130312.jar +0 -0
  227. data/solr/server/lib/jetty-jmx-8.1.10.v20130312.jar +0 -0
  228. data/solr/server/lib/jetty-security-8.1.10.v20130312.jar +0 -0
  229. data/solr/server/lib/jetty-server-8.1.10.v20130312.jar +0 -0
  230. data/solr/server/lib/jetty-servlet-8.1.10.v20130312.jar +0 -0
  231. data/solr/server/lib/jetty-util-8.1.10.v20130312.jar +0 -0
  232. data/solr/server/lib/jetty-webapp-8.1.10.v20130312.jar +0 -0
  233. data/solr/server/lib/jetty-xml-8.1.10.v20130312.jar +0 -0
  234. data/solr/server/lib/servlet-api-3.0.jar +0 -0
  235. data/solr/server/solr-webapp/webapp/.gitignore +0 -1
  236. data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.3.0.jar +0 -0
  237. data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.3.0.jar +0 -0
  238. data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.3.0.jar +0 -0
  239. data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpclient-4.3.1.jar +0 -0
  240. data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpcore-4.3.jar +0 -0
  241. data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpmime-4.3.1.jar +0 -0
  242. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-5.0.0.jar +0 -0
  243. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-codecs-5.0.0.jar +0 -0
  244. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-core-5.0.0.jar +0 -0
  245. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-highlighter-5.0.0.jar +0 -0
  246. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-join-5.0.0.jar +0 -0
  247. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-memory-5.0.0.jar +0 -0
  248. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-misc-5.0.0.jar +0 -0
  249. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queries-5.0.0.jar +0 -0
  250. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-spatial-5.0.0.jar +0 -0
  251. data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-suggest-5.0.0.jar +0 -0
  252. data/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet-2.1.1.jar +0 -0
  253. data/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet.ext.servlet-2.1.1.jar +0 -0
  254. data/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-core-5.0.0.jar +0 -0
  255. data/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-5.0.0.jar +0 -0
  256. data/solr/server/webapps/solr.war +0 -0
@@ -1,562 +1,562 @@
1
- /*
2
- Licensed to the Apache Software Foundation (ASF) under one or more
3
- contributor license agreements. See the NOTICE file distributed with
4
- this work for additional information regarding copyright ownership.
5
- The ASF licenses this file to You under the Apache License, Version 2.0
6
- (the "License"); you may not use this file except in compliance with
7
- the License. You may obtain a copy of the License at
8
-
9
- http://www.apache.org/licenses/LICENSE-2.0
10
-
11
- Unless required by applicable law or agreed to in writing, software
12
- distributed under the License is distributed on an "AS IS" BASIS,
13
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- See the License for the specific language governing permissions and
15
- limitations under the License.
16
- */
17
-
18
- var set_healthcheck_status = function( status )
19
- {
20
- var hc_button = $( '.healthcheck-status' )
21
- if ( status == 'enable' )
22
- {
23
- hc_button.parents( 'dd' )
24
- .removeClass( 'ico-0' )
25
- .addClass( 'ico-1' );
26
- hc_button
27
- .addClass( 'enabled' )
28
- .html( 'disable ping' );
29
- } else {
30
- hc_button.parents( 'dd' )
31
- .removeClass( 'ico-1')
32
- .addClass( 'ico-0' );
33
- hc_button
34
- .removeClass( 'enabled' )
35
- .html( 'enable ping' );
36
- }
37
- };
38
-
39
- // #/:core
40
- sammy.get
41
- (
42
- new RegExp( app.core_regex_base + '$' ),
43
- function( context )
44
- {
45
- var core_basepath = this.active_core.attr( 'data-basepath' );
46
- var content_element = $( '#content' );
47
-
48
- content_element
49
- .removeClass( 'single' );
50
-
51
- if( !app.core_menu.data( 'admin-extra-loaded' ) )
52
- {
53
- app.core_menu.data( 'admin-extra-loaded', new Date() );
54
-
55
- $.get
56
- (
57
- core_basepath + '/admin/file/?file=admin-extra.menu-top.html&contentType=text/html;charset=utf-8',
58
- function( menu_extra )
59
- {
60
- app.core_menu
61
- .prepend( menu_extra );
62
- }
63
- );
64
-
65
- $.get
66
- (
67
- core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html&contentType=text/html;charset=utf-8',
68
- function( menu_extra )
69
- {
70
- app.core_menu
71
- .append( menu_extra );
72
- }
73
- );
74
- }
75
-
76
- $.get
77
- (
78
- 'tpl/dashboard.html',
79
- function( template )
80
- {
81
- content_element
82
- .html( template );
83
-
84
- var dashboard_element = $( '#dashboard' );
85
-
86
- $.ajax
87
- (
88
- {
89
- url : core_basepath + '/admin/luke?wt=json&show=index&numTerms=0',
90
- dataType : 'json',
91
- context : $( '#statistics', dashboard_element ),
92
- beforeSend : function( xhr, settings )
93
- {
94
- $( 'h2', this )
95
- .addClass( 'loader' );
96
-
97
- $( '.message', this )
98
- .show()
99
- .html( 'Loading ...' );
100
-
101
- $( '.content', this )
102
- .hide();
103
- },
104
- success : function( response, text_status, xhr )
105
- {
106
- $( '.message', this )
107
- .empty()
108
- .hide();
109
-
110
- $( '.content', this )
111
- .show();
112
-
113
- var data = {
114
- 'index_num-docs' : response['index']['numDocs'],
115
- 'index_heap-usage-bytes' : response['index']['indexHeapUsageBytes'],
116
- 'index_max-doc' : response['index']['maxDoc'],
117
- 'index_deleted-docs' : response['index']['deletedDocs'],
118
- 'index_version' : response['index']['version'],
119
- 'index_segmentCount' : response['index']['segmentCount'],
120
- 'index_last-modified' : response['index']['lastModified']
121
- };
122
-
123
- for( var key in data )
124
- {
125
- $( '.' + key, this )
126
- .show();
127
-
128
- $( '.value.' + key, this )
129
- .html( data[key] );
130
- }
131
-
132
- var optimized_element = $( '.value.index_optimized', this );
133
- if( !response['index']['hasDeletions'] )
134
- {
135
- optimized_element
136
- .addClass( 'ico-1' );
137
-
138
- $( 'span', optimized_element )
139
- .html( 'yes' );
140
- }
141
- else
142
- {
143
- optimized_element
144
- .addClass( 'ico-0' );
145
-
146
- $( 'span', optimized_element )
147
- .html( 'no' );
148
- }
149
-
150
- var current_element = $( '.value.index_current', this );
151
- if( response['index']['current'] )
152
- {
153
- current_element
154
- .addClass( 'ico-1' );
155
-
156
- $( 'span', current_element )
157
- .html( 'yes' );
158
- }
159
- else
160
- {
161
- current_element
162
- .addClass( 'ico-0' );
163
-
164
- $( 'span', current_element )
165
- .html( 'no' );
166
- }
167
-
168
- $( 'a', optimized_element )
169
- .die( 'click' )
170
- .live
171
- (
172
- 'click',
173
- function( event )
174
- {
175
- $.ajax
176
- (
177
- {
178
- url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
179
- dataType : 'json',
180
- context : $( this ),
181
- beforeSend : function( xhr, settings )
182
- {
183
- this
184
- .addClass( 'loader' );
185
- },
186
- success : function( response, text_status, xhr )
187
- {
188
- this.parents( 'dd' )
189
- .removeClass( 'ico-0' )
190
- .addClass( 'ico-1' );
191
- },
192
- error : function( xhr, text_status, error_thrown)
193
- {
194
- console.warn( 'd0h, optimize broken!' );
195
- },
196
- complete : function( xhr, text_status )
197
- {
198
- this
199
- .removeClass( 'loader' );
200
- }
201
- }
202
- );
203
- }
204
- );
205
-
206
- $( '.timeago', this )
207
- .timeago();
208
- },
209
- error : function( xhr, text_status, error_thrown )
210
- {
211
- this
212
- .addClass( 'disabled' );
213
-
214
- $( '.message', this )
215
- .show()
216
- .html( 'Luke is not configured' );
217
- },
218
- complete : function( xhr, text_status )
219
- {
220
- $( 'h2', this )
221
- .removeClass( 'loader' );
222
- }
223
- }
224
- );
225
-
226
- $.ajax
227
- (
228
- {
229
- url : core_basepath + '/replication?command=details&wt=json',
230
- dataType : 'json',
231
- context : $( '#replication', dashboard_element ),
232
- beforeSend : function( xhr, settings )
233
- {
234
- $( 'h2', this )
235
- .addClass( 'loader' );
236
-
237
- $( '.message', this )
238
- .show()
239
- .html( 'Loading' );
240
-
241
- $( '.content', this )
242
- .hide();
243
- },
244
- success : function( response, text_status, xhr )
245
- {
246
- $( '.message', this )
247
- .empty()
248
- .hide();
249
-
250
- $( '.content', this )
251
- .show();
252
-
253
- $( '.replication', context.active_core )
254
- .show();
255
-
256
- var data = response.details;
257
- var is_slave = 'undefined' !== typeof( data.slave );
258
- var headline = $( 'h2 span', this );
259
- var details_element = $( '#details', this );
260
- var current_type_element = $( ( is_slave ? '.slave' : '.masterSearch' ), this );
261
- var master_data = is_slave ? data.slave.masterDetails : data;
262
-
263
- if( is_slave )
264
- {
265
- this
266
- .addClass( 'slave' );
267
-
268
- headline
269
- .html( headline.html() + ' (Slave)' );
270
- }
271
- else
272
- {
273
- this
274
- .addClass( 'master' );
275
-
276
- headline
277
- .html( headline.html() + ' (Master)' );
278
- }
279
-
280
- // the currently searchable commit regardless of type
281
- $( '.version div', current_type_element )
282
- .html( data.indexVersion );
283
- $( '.generation div', current_type_element )
284
- .html( data.generation );
285
- $( '.size div', current_type_element )
286
- .html( data.indexSize );
287
-
288
- // what's replicable on the master
289
- var master_element = $( '.master', details_element );
290
- $( '.version div', master_element )
291
- .html( master_data.master.replicableVersion || '-' );
292
- $( '.generation div', master_element )
293
- .html( master_data.master.replicableGeneration || '-' );
294
- $( '.size div', master_element )
295
- .html( "-" );
296
-
297
- if( is_slave )
298
- {
299
- var master_element = $( '.masterSearch', details_element );
300
- $( '.version div', master_element )
301
- .html( data.slave.masterDetails.indexVersion );
302
- $( '.generation div', master_element )
303
- .html( data.slave.masterDetails.generation );
304
- $( '.size div', master_element )
305
- .html( data.slave.masterDetails.indexSize );
306
-
307
- // warnings if slave version|gen doesn't match what's replicable
308
- if( data.indexVersion !== master_data.master.replicableVersion )
309
- {
310
- $( '.version', details_element )
311
- .addClass( 'diff' );
312
- }
313
- else
314
- {
315
- $( '.version', details_element )
316
- .removeClass( 'diff' );
317
- }
318
-
319
- if( data.generation !== master_data.master.replicableGeneration )
320
- {
321
- $( '.generation', details_element )
322
- .addClass( 'diff' );
323
- }
324
- else
325
- {
326
- $( '.generation', details_element )
327
- .removeClass( 'diff' );
328
- }
329
- }
330
- },
331
- error : function( xhr, text_status, error_thrown)
332
- {
333
- this
334
- .addClass( 'disabled' );
335
-
336
- $( '.message', this )
337
- .show()
338
- .html( 'Replication is not configured' );
339
- },
340
- complete : function( xhr, text_status )
341
- {
342
- $( 'h2', this )
343
- .removeClass( 'loader' );
344
- }
345
- }
346
- );
347
-
348
- $.ajax
349
- (
350
- {
351
- url : core_basepath + '/admin/system?wt=json',
352
- dataType : 'json',
353
- context : $( '#instance', dashboard_element ),
354
- beforeSend : function( xhr, settings )
355
- {
356
- $( 'h2', this )
357
- .addClass( 'loader' );
358
-
359
- $( '.message', this )
360
- .show()
361
- .html( 'Loading' );
362
-
363
- $( '.content', this )
364
- .hide();
365
- },
366
- success : function( response, text_status, xhr )
367
- {
368
- $( '.message', this )
369
- .empty()
370
- .hide();
371
-
372
- $( '.content', this )
373
- .show();
374
-
375
- $( 'dl', this )
376
- .show();
377
-
378
- var data = {
379
- 'dir_cwd' : response.core.directory.cwd,
380
- 'dir_instance' : response.core.directory.instance,
381
- 'dir_data' : response.core.directory.data,
382
- 'dir_index' : response.core.directory.index,
383
- 'dir_impl' : response.core.directory.dirimpl
384
- };
385
-
386
- for( var key in data )
387
- {
388
- $( '.' + key, this )
389
- .show();
390
-
391
- $( '.value.' + key, this )
392
- .html( data[key] );
393
- }
394
- },
395
- error : function( xhr, text_status, error_thrown)
396
- {
397
- this
398
- .addClass( 'disabled' );
399
-
400
- $( '.message', this )
401
- .show()
402
- .html( '/admin/system Handler is not configured' );
403
- },
404
- complete : function( xhr, text_status )
405
- {
406
- $( 'h2', this )
407
- .removeClass( 'loader' );
408
- }
409
- }
410
- );
411
-
412
- $.ajax
413
- (
414
- {
415
- url : core_basepath + '/admin/file/?file=admin-extra.html',
416
- dataType : 'html',
417
- context : $( '#admin-extra', dashboard_element ),
418
- beforeSend : function( xhr, settings )
419
- {
420
- $( 'h2', this )
421
- .addClass( 'loader' );
422
-
423
- $( '.message', this )
424
- .show()
425
- .html( 'Loading' );
426
-
427
- $( '.content', this )
428
- .hide();
429
- },
430
- success : function( response, text_status, xhr )
431
- {
432
- $( '.message', this )
433
- .hide()
434
- .empty();
435
-
436
- $( '.content', this )
437
- .show()
438
- .html( response );
439
- },
440
- error : function( xhr, text_status, error_thrown)
441
- {
442
- this
443
- .addClass( 'disabled' );
444
-
445
- $( '.message', this )
446
- .show()
447
- .html( 'We found no "admin-extra.html" file.' );
448
- },
449
- complete : function( xhr, text_status )
450
- {
451
- $( 'h2', this )
452
- .removeClass( 'loader' );
453
- }
454
- }
455
- );
456
-
457
- $.ajax
458
- (
459
- {
460
- url : core_basepath + '/admin/ping?action=status&wt=json',
461
- dataType : 'json',
462
- context : $( '#healthcheck', dashboard_element ),
463
- beforeSend : function( xhr, settings )
464
- {
465
- $( 'h2', this )
466
- .addClass( 'loader' );
467
-
468
- $( '.message', this )
469
- .show()
470
- .html( 'Loading' );
471
-
472
- $( '.content', this )
473
- .hide();
474
- },
475
- success : function( response, text_status, xhr )
476
- {
477
- $( '.message', this )
478
- .empty()
479
- .hide();
480
-
481
- $( '.content', this )
482
- .show();
483
-
484
- var status_element = $( '.value.status', this );
485
- var toggle_button = $( '.healthcheck-status', this );
486
- var status = response['status'];
487
- $( 'span', status_element ).html( status );
488
-
489
- var action = ( response['status'] == 'enabled' ) ? 'enable' : 'disable';
490
- set_healthcheck_status(action);
491
-
492
- if( response['status'] == 'enabled' )
493
- {
494
- status_element
495
- .addClass( 'ico-1' );
496
- toggle_button
497
- .addClass( 'enabled' );
498
- }
499
- else
500
- {
501
- status_element
502
- .addClass( 'ico-0' );
503
- }
504
-
505
- $( '.healthcheck-status', status_element )
506
- .die( 'click' )
507
- .live
508
- (
509
- 'click',
510
- function( event )
511
- {
512
- var action = $(this).hasClass( 'enabled' ) ? 'disable' : 'enable';
513
- $.ajax
514
- (
515
- {
516
- url : core_basepath + '/admin/ping?action=' + action + '&wt=json',
517
- dataType : 'json',
518
- context : $( this ),
519
- beforeSend : function( xhr, settings )
520
- {
521
- this
522
- .addClass( 'loader' );
523
- },
524
- success : function( response, text_status, xhr )
525
- {
526
- set_healthcheck_status(action);
527
- },
528
- error : function( xhr, text_status, error_thrown)
529
- {
530
- console.warn( 'd0h, enable broken!' );
531
- },
532
- complete : function( xhr, text_status )
533
- {
534
- this
535
- .removeClass( 'loader' );
536
- }
537
- }
538
- );
539
- }
540
- );
541
- },
542
- error : function( xhr, text_status, error_thrown)
543
- {
544
- this
545
- .addClass( 'disabled' );
546
-
547
- $( '.message', this )
548
- .show()
549
- .html( 'Ping request handler is not configured with a healthcheck file.' );
550
- },
551
- complete : function( xhr, text_status )
552
- {
553
- $( 'h2', this )
554
- .removeClass( 'loader' );
555
- }
556
- }
557
- );
558
-
559
- }
560
- );
561
- }
562
- );
1
+ /*
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ */
17
+
18
+ var set_healthcheck_status = function( status )
19
+ {
20
+ var hc_button = $( '.healthcheck-status' )
21
+ if ( status == 'enable' )
22
+ {
23
+ hc_button.parents( 'dd' )
24
+ .removeClass( 'ico-0' )
25
+ .addClass( 'ico-1' );
26
+ hc_button
27
+ .addClass( 'enabled' )
28
+ .html( 'disable ping' );
29
+ } else {
30
+ hc_button.parents( 'dd' )
31
+ .removeClass( 'ico-1')
32
+ .addClass( 'ico-0' );
33
+ hc_button
34
+ .removeClass( 'enabled' )
35
+ .html( 'enable ping' );
36
+ }
37
+ };
38
+
39
+ // #/:core
40
+ sammy.get
41
+ (
42
+ new RegExp( app.core_regex_base + '$' ),
43
+ function( context )
44
+ {
45
+ var core_basepath = this.active_core.attr( 'data-basepath' );
46
+ var content_element = $( '#content' );
47
+
48
+ content_element
49
+ .removeClass( 'single' );
50
+
51
+ if( !app.core_menu.data( 'admin-extra-loaded' ) )
52
+ {
53
+ app.core_menu.data( 'admin-extra-loaded', new Date() );
54
+
55
+ $.get
56
+ (
57
+ core_basepath + '/admin/file/?file=admin-extra.menu-top.html&contentType=text/html;charset=utf-8',
58
+ function( menu_extra )
59
+ {
60
+ app.core_menu
61
+ .prepend( menu_extra );
62
+ }
63
+ );
64
+
65
+ $.get
66
+ (
67
+ core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html&contentType=text/html;charset=utf-8',
68
+ function( menu_extra )
69
+ {
70
+ app.core_menu
71
+ .append( menu_extra );
72
+ }
73
+ );
74
+ }
75
+
76
+ $.get
77
+ (
78
+ 'tpl/dashboard.html',
79
+ function( template )
80
+ {
81
+ content_element
82
+ .html( template );
83
+
84
+ var dashboard_element = $( '#dashboard' );
85
+
86
+ $.ajax
87
+ (
88
+ {
89
+ url : core_basepath + '/admin/luke?wt=json&show=index&numTerms=0',
90
+ dataType : 'json',
91
+ context : $( '#statistics', dashboard_element ),
92
+ beforeSend : function( xhr, settings )
93
+ {
94
+ $( 'h2', this )
95
+ .addClass( 'loader' );
96
+
97
+ $( '.message', this )
98
+ .show()
99
+ .html( 'Loading ...' );
100
+
101
+ $( '.content', this )
102
+ .hide();
103
+ },
104
+ success : function( response, text_status, xhr )
105
+ {
106
+ $( '.message', this )
107
+ .empty()
108
+ .hide();
109
+
110
+ $( '.content', this )
111
+ .show();
112
+
113
+ var data = {
114
+ 'index_num-doc' : response['index']['numDocs'],
115
+ 'index_heap-usage-bytes' : response['index']['indexHeapUsageBytes'],
116
+ 'index_max-doc' : response['index']['maxDoc'],
117
+ 'index_deleted-doc' : response['index']['deletedDocs'],
118
+ 'index_version' : response['index']['version'],
119
+ 'index_segmentCount' : response['index']['segmentCount'],
120
+ 'index_last-modified' : response['index']['lastModified']
121
+ };
122
+
123
+ for( var key in data )
124
+ {
125
+ $( '.' + key, this )
126
+ .show();
127
+
128
+ $( '.value.' + key, this )
129
+ .html( data[key] );
130
+ }
131
+
132
+ var optimized_element = $( '.value.index_optimized', this );
133
+ if( !response['index']['hasDeletions'] )
134
+ {
135
+ optimized_element
136
+ .addClass( 'ico-1' );
137
+
138
+ $( 'span', optimized_element )
139
+ .html( 'yes' );
140
+ }
141
+ else
142
+ {
143
+ optimized_element
144
+ .addClass( 'ico-0' );
145
+
146
+ $( 'span', optimized_element )
147
+ .html( 'no' );
148
+ }
149
+
150
+ var current_element = $( '.value.index_current', this );
151
+ if( response['index']['current'] )
152
+ {
153
+ current_element
154
+ .addClass( 'ico-1' );
155
+
156
+ $( 'span', current_element )
157
+ .html( 'yes' );
158
+ }
159
+ else
160
+ {
161
+ current_element
162
+ .addClass( 'ico-0' );
163
+
164
+ $( 'span', current_element )
165
+ .html( 'no' );
166
+ }
167
+
168
+ $( 'a', optimized_element )
169
+ .die( 'click' )
170
+ .live
171
+ (
172
+ 'click',
173
+ function( event )
174
+ {
175
+ $.ajax
176
+ (
177
+ {
178
+ url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
179
+ dataType : 'json',
180
+ context : $( this ),
181
+ beforeSend : function( xhr, settings )
182
+ {
183
+ this
184
+ .addClass( 'loader' );
185
+ },
186
+ success : function( response, text_status, xhr )
187
+ {
188
+ this.parents( 'dd' )
189
+ .removeClass( 'ico-0' )
190
+ .addClass( 'ico-1' );
191
+ },
192
+ error : function( xhr, text_status, error_thrown)
193
+ {
194
+ console.warn( 'd0h, optimize broken!' );
195
+ },
196
+ complete : function( xhr, text_status )
197
+ {
198
+ this
199
+ .removeClass( 'loader' );
200
+ }
201
+ }
202
+ );
203
+ }
204
+ );
205
+
206
+ $( '.timeago', this )
207
+ .timeago();
208
+ },
209
+ error : function( xhr, text_status, error_thrown )
210
+ {
211
+ this
212
+ .addClass( 'disabled' );
213
+
214
+ $( '.message', this )
215
+ .show()
216
+ .html( 'Luke is not configured' );
217
+ },
218
+ complete : function( xhr, text_status )
219
+ {
220
+ $( 'h2', this )
221
+ .removeClass( 'loader' );
222
+ }
223
+ }
224
+ );
225
+
226
+ $.ajax
227
+ (
228
+ {
229
+ url : core_basepath + '/replication?command=details&wt=json',
230
+ dataType : 'json',
231
+ context : $( '#replication', dashboard_element ),
232
+ beforeSend : function( xhr, settings )
233
+ {
234
+ $( 'h2', this )
235
+ .addClass( 'loader' );
236
+
237
+ $( '.message', this )
238
+ .show()
239
+ .html( 'Loading' );
240
+
241
+ $( '.content', this )
242
+ .hide();
243
+ },
244
+ success : function( response, text_status, xhr )
245
+ {
246
+ $( '.message', this )
247
+ .empty()
248
+ .hide();
249
+
250
+ $( '.content', this )
251
+ .show();
252
+
253
+ $( '.replication', context.active_core )
254
+ .show();
255
+
256
+ var data = response.details;
257
+ var is_slave = 'undefined' !== typeof( data.slave );
258
+ var headline = $( 'h2 span', this );
259
+ var details_element = $( '#details', this );
260
+ var current_type_element = $( ( is_slave ? '.slave' : '.masterSearch' ), this );
261
+ var master_data = is_slave ? data.slave.masterDetails : data;
262
+
263
+ if( is_slave )
264
+ {
265
+ this
266
+ .addClass( 'slave' );
267
+
268
+ headline
269
+ .html( headline.html() + ' (Slave)' );
270
+ }
271
+ else
272
+ {
273
+ this
274
+ .addClass( 'master' );
275
+
276
+ headline
277
+ .html( headline.html() + ' (Master)' );
278
+ }
279
+
280
+ // the currently searchable commit regardless of type
281
+ $( '.version div', current_type_element )
282
+ .html( data.indexVersion );
283
+ $( '.generation div', current_type_element )
284
+ .html( data.generation );
285
+ $( '.size div', current_type_element )
286
+ .html( data.indexSize );
287
+
288
+ // what's replicable on the master
289
+ var master_element = $( '.master', details_element );
290
+ $( '.version div', master_element )
291
+ .html( master_data.master.replicableVersion || '-' );
292
+ $( '.generation div', master_element )
293
+ .html( master_data.master.replicableGeneration || '-' );
294
+ $( '.size div', master_element )
295
+ .html( "-" );
296
+
297
+ if( is_slave )
298
+ {
299
+ var master_element = $( '.masterSearch', details_element );
300
+ $( '.version div', master_element )
301
+ .html( data.slave.masterDetails.indexVersion );
302
+ $( '.generation div', master_element )
303
+ .html( data.slave.masterDetails.generation );
304
+ $( '.size div', master_element )
305
+ .html( data.slave.masterDetails.indexSize );
306
+
307
+ // warnings if slave version|gen doesn't match what's replicable
308
+ if( data.indexVersion !== master_data.master.replicableVersion )
309
+ {
310
+ $( '.version', details_element )
311
+ .addClass( 'diff' );
312
+ }
313
+ else
314
+ {
315
+ $( '.version', details_element )
316
+ .removeClass( 'diff' );
317
+ }
318
+
319
+ if( data.generation !== master_data.master.replicableGeneration )
320
+ {
321
+ $( '.generation', details_element )
322
+ .addClass( 'diff' );
323
+ }
324
+ else
325
+ {
326
+ $( '.generation', details_element )
327
+ .removeClass( 'diff' );
328
+ }
329
+ }
330
+ },
331
+ error : function( xhr, text_status, error_thrown)
332
+ {
333
+ this
334
+ .addClass( 'disabled' );
335
+
336
+ $( '.message', this )
337
+ .show()
338
+ .html( 'Replication is not configured' );
339
+ },
340
+ complete : function( xhr, text_status )
341
+ {
342
+ $( 'h2', this )
343
+ .removeClass( 'loader' );
344
+ }
345
+ }
346
+ );
347
+
348
+ $.ajax
349
+ (
350
+ {
351
+ url : core_basepath + '/admin/system?wt=json',
352
+ dataType : 'json',
353
+ context : $( '#instance', dashboard_element ),
354
+ beforeSend : function( xhr, settings )
355
+ {
356
+ $( 'h2', this )
357
+ .addClass( 'loader' );
358
+
359
+ $( '.message', this )
360
+ .show()
361
+ .html( 'Loading' );
362
+
363
+ $( '.content', this )
364
+ .hide();
365
+ },
366
+ success : function( response, text_status, xhr )
367
+ {
368
+ $( '.message', this )
369
+ .empty()
370
+ .hide();
371
+
372
+ $( '.content', this )
373
+ .show();
374
+
375
+ $( 'dl', this )
376
+ .show();
377
+
378
+ var data = {
379
+ 'dir_cwd' : response.core.directory.cwd,
380
+ 'dir_instance' : response.core.directory.instance,
381
+ 'dir_data' : response.core.directory.data,
382
+ 'dir_index' : response.core.directory.index,
383
+ 'dir_impl' : response.core.directory.dirimpl
384
+ };
385
+
386
+ for( var key in data )
387
+ {
388
+ $( '.' + key, this )
389
+ .show();
390
+
391
+ $( '.value.' + key, this )
392
+ .html( data[key] );
393
+ }
394
+ },
395
+ error : function( xhr, text_status, error_thrown)
396
+ {
397
+ this
398
+ .addClass( 'disabled' );
399
+
400
+ $( '.message', this )
401
+ .show()
402
+ .html( '/admin/system Handler is not configured' );
403
+ },
404
+ complete : function( xhr, text_status )
405
+ {
406
+ $( 'h2', this )
407
+ .removeClass( 'loader' );
408
+ }
409
+ }
410
+ );
411
+
412
+ $.ajax
413
+ (
414
+ {
415
+ url : core_basepath + '/admin/file/?file=admin-extra.html',
416
+ dataType : 'html',
417
+ context : $( '#admin-extra', dashboard_element ),
418
+ beforeSend : function( xhr, settings )
419
+ {
420
+ $( 'h2', this )
421
+ .addClass( 'loader' );
422
+
423
+ $( '.message', this )
424
+ .show()
425
+ .html( 'Loading' );
426
+
427
+ $( '.content', this )
428
+ .hide();
429
+ },
430
+ success : function( response, text_status, xhr )
431
+ {
432
+ $( '.message', this )
433
+ .hide()
434
+ .empty();
435
+
436
+ $( '.content', this )
437
+ .show()
438
+ .html( response );
439
+ },
440
+ error : function( xhr, text_status, error_thrown)
441
+ {
442
+ this
443
+ .addClass( 'disabled' );
444
+
445
+ $( '.message', this )
446
+ .show()
447
+ .html( 'We found no "admin-extra.html" file.' );
448
+ },
449
+ complete : function( xhr, text_status )
450
+ {
451
+ $( 'h2', this )
452
+ .removeClass( 'loader' );
453
+ }
454
+ }
455
+ );
456
+
457
+ $.ajax
458
+ (
459
+ {
460
+ url : core_basepath + '/admin/ping?action=status&wt=json',
461
+ dataType : 'json',
462
+ context : $( '#healthcheck', dashboard_element ),
463
+ beforeSend : function( xhr, settings )
464
+ {
465
+ $( 'h2', this )
466
+ .addClass( 'loader' );
467
+
468
+ $( '.message', this )
469
+ .show()
470
+ .html( 'Loading' );
471
+
472
+ $( '.content', this )
473
+ .hide();
474
+ },
475
+ success : function( response, text_status, xhr )
476
+ {
477
+ $( '.message', this )
478
+ .empty()
479
+ .hide();
480
+
481
+ $( '.content', this )
482
+ .show();
483
+
484
+ var status_element = $( '.value.status', this );
485
+ var toggle_button = $( '.healthcheck-status', this );
486
+ var status = response['status'];
487
+ $( 'span', status_element ).html( status );
488
+
489
+ var action = ( response['status'] == 'enabled' ) ? 'enable' : 'disable';
490
+ set_healthcheck_status(action);
491
+
492
+ if( response['status'] == 'enabled' )
493
+ {
494
+ status_element
495
+ .addClass( 'ico-1' );
496
+ toggle_button
497
+ .addClass( 'enabled' );
498
+ }
499
+ else
500
+ {
501
+ status_element
502
+ .addClass( 'ico-0' );
503
+ }
504
+
505
+ $( '.healthcheck-status', status_element )
506
+ .die( 'click' )
507
+ .live
508
+ (
509
+ 'click',
510
+ function( event )
511
+ {
512
+ var action = $(this).hasClass( 'enabled' ) ? 'disable' : 'enable';
513
+ $.ajax
514
+ (
515
+ {
516
+ url : core_basepath + '/admin/ping?action=' + action + '&wt=json',
517
+ dataType : 'json',
518
+ context : $( this ),
519
+ beforeSend : function( xhr, settings )
520
+ {
521
+ this
522
+ .addClass( 'loader' );
523
+ },
524
+ success : function( response, text_status, xhr )
525
+ {
526
+ set_healthcheck_status(action);
527
+ },
528
+ error : function( xhr, text_status, error_thrown)
529
+ {
530
+ console.warn( 'd0h, enable broken!' );
531
+ },
532
+ complete : function( xhr, text_status )
533
+ {
534
+ this
535
+ .removeClass( 'loader' );
536
+ }
537
+ }
538
+ );
539
+ }
540
+ );
541
+ },
542
+ error : function( xhr, text_status, error_thrown)
543
+ {
544
+ this
545
+ .addClass( 'disabled' );
546
+
547
+ $( '.message', this )
548
+ .show()
549
+ .html( 'Ping request handler is not configured with a healthcheck file.' );
550
+ },
551
+ complete : function( xhr, text_status )
552
+ {
553
+ $( 'h2', this )
554
+ .removeClass( 'loader' );
555
+ }
556
+ }
557
+ );
558
+
559
+ }
560
+ );
561
+ }
562
+ );