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
@@ -0,0 +1,225 @@
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
+ solrAdminApp.controller('CoreOverviewController',
19
+ function($scope, $rootScope, $routeParams, Luke, CoreSystem, Update, Replication, Ping) {
20
+ $scope.resetMenu("overview");
21
+ $scope.refreshIndex = function() {
22
+ Luke.index({core: $routeParams.core},
23
+ function(data) {
24
+ $scope.index = data.index;
25
+ delete $scope.statsMessage;
26
+ },
27
+ function(error) {
28
+ $scope.statsMessage = "Luke is not configured";
29
+ }
30
+ );
31
+ };
32
+
33
+ $scope.optimizeIndex = function(core) {
34
+ Update.optimize({core: $routeParams.core},
35
+ function(response) {
36
+ $scope.refresh();
37
+ delete $scope.indexMessage;
38
+ },
39
+ function(error) {
40
+ $scope.statisticsDisabled = true;
41
+ $scope.indexMessage = "Optimize broken.";
42
+ });
43
+ };
44
+
45
+ $scope.refreshReplication = function() {
46
+ Replication.details({core: $routeParams.core},
47
+ function(data) {
48
+ $scope.isSlave = data.details.isSlave == "true";
49
+ $scope.isMaster = data.details.isMaster == "true";
50
+ $scope.replication = data.details;
51
+ },
52
+ function(error) {
53
+ $scope.replicationMessage = "Replication is not configured";
54
+ });
55
+ /*
56
+ /replication?command=details&wt=json
57
+
58
+ if( is_slave )
59
+ {
60
+
61
+ // warnings if slave version|gen doesn't match what's replicable
62
+ if( data.indexVersion !== master_data.master.replicableVersion )
63
+ {
64
+ $( '.version', details_element )
65
+ .addClass( 'diff' );
66
+ }
67
+ else
68
+ {
69
+ $( '.version', details_element )
70
+ .removeClass( 'diff' );
71
+ }
72
+
73
+ if( data.generation !== master_data.master.replicableGeneration )
74
+ {
75
+ $( '.generation', details_element )
76
+ .addClass( 'diff' );
77
+ }
78
+ else
79
+ {
80
+ $( '.generation', details_element )
81
+ .removeClass( 'diff' );
82
+ }
83
+ }
84
+ },
85
+
86
+ */
87
+ };
88
+
89
+ $scope.refreshAdminExtra = function() {
90
+ };
91
+
92
+ $scope.refreshSystem = function() {
93
+ CoreSystem.get({core: $routeParams.core},
94
+ function(data) {
95
+ $scope.core = data.core;
96
+ delete $scope.systemMessage;
97
+ },
98
+ function(error) {
99
+ $scope.systemMessage = "/admin/system Handler is not configured";
100
+ }
101
+ );
102
+ };
103
+
104
+ $scope.refreshPing = function() {
105
+ Ping.status({core: $routeParams.core}, function(data) {
106
+ $scope.healthcheckStatus = data.status == "enabled";
107
+ }).$promise.catch(function(error) {
108
+ if (error.status == 404) {
109
+ $scope.healthcheckStatus = false;
110
+ } else {
111
+ $scope.healthcheckStatus = false;
112
+ delete $rootScope.exception;
113
+ $scope.healthcheckMessage = 'Ping request handler is not configured with a healthcheck file.';
114
+ }
115
+ });
116
+ };
117
+
118
+ $scope.toggleHealthcheck = function() {
119
+ if ($scope.healthcheckStatus) {
120
+ Ping.disable(
121
+ function(data) {$scope.healthcheckStatus = false},
122
+ function(error) {$scope.healthcheckMessage = error}
123
+ );
124
+ } else {
125
+ Ping.enable(
126
+ function(data) {$scope.healthcheckStatus = true},
127
+ function(error) {$scope.healthcheckMessage = error}
128
+ );
129
+ }
130
+ };
131
+
132
+ $scope.refresh = function() {
133
+ $scope.refreshIndex();
134
+ $scope.refreshReplication();
135
+ $scope.refreshAdminExtra();
136
+ $scope.refreshSystem();
137
+ $scope.refreshPing();
138
+ };
139
+
140
+ $scope.refresh();
141
+ });
142
+
143
+ /*******
144
+
145
+ // @todo admin-extra
146
+ var core_basepath = this.active_core.attr( 'data-basepath' );
147
+ var content_element = $( '#content' );
148
+
149
+ content_element
150
+ .removeClass( 'single' );
151
+
152
+ if( !app.core_menu.data( 'admin-extra-loaded' ) )
153
+ {
154
+ app.core_menu.data( 'admin-extra-loaded', new Date() );
155
+
156
+ $.get
157
+ (
158
+ core_basepath + '/admin/file/?file=admin-extra.menu-top.html&contentType=text/html;charset=utf-8',
159
+ function( menu_extra )
160
+ {
161
+ app.core_menu
162
+ .prepend( menu_extra );
163
+ }
164
+ );
165
+
166
+ $.get
167
+ (
168
+ core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html&contentType=text/html;charset=utf-8',
169
+ function( menu_extra )
170
+ {
171
+ app.core_menu
172
+ .append( menu_extra );
173
+ }
174
+ );
175
+ }
176
+
177
+
178
+
179
+ ////////////////////////////////// ADMIN EXTRA
180
+ $.ajax
181
+ (
182
+ {
183
+ url : core_basepath + '/admin/file/?file=admin-extra.html',
184
+ dataType : 'html',
185
+ context : $( '#admin-extra', dashboard_element ),
186
+ beforeSend : function( xhr, settings )
187
+ {
188
+ $( 'h2', this )
189
+ .addClass( 'loader' );
190
+
191
+ $( '.message', this )
192
+ .show()
193
+ .html( 'Loading' );
194
+
195
+ $( '.content', this )
196
+ .hide();
197
+ },
198
+ success : function( response, text_status, xhr )
199
+ {
200
+ $( '.message', this )
201
+ .hide()
202
+ .empty();
203
+
204
+ $( '.content', this )
205
+ .show()
206
+ .html( response );
207
+ },
208
+ error : function( xhr, text_status, error_thrown)
209
+ {
210
+ this
211
+ .addClass( 'disabled' );
212
+
213
+ $( '.message', this )
214
+ .show()
215
+ .html( 'We found no "admin-extra.html" file.' );
216
+ },
217
+ complete : function( xhr, text_status )
218
+ {
219
+ $( 'h2', this )
220
+ .removeClass( 'loader' );
221
+ }
222
+ }
223
+ );
224
+
225
+ ***/
@@ -0,0 +1,465 @@
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
+ // @todo test optimize (delete stuff, watch button appear, test button/form)
19
+ solrAdminApp.controller('CoreAdminController',
20
+ ['$scope', '$routeParams', '$location', '$timeout', 'Cores', 'Update',
21
+ function($scope, $routeParams, $location, $timeout, Cores, Update){
22
+ $scope.resetMenu("cores", true);
23
+ $scope.currentCore = $routeParams.corename; // use 'corename' not 'core' to distinguish from /solr/:core/
24
+ $scope.refresh = function() {
25
+ Cores.get(function(data) {
26
+ var coreCount = 0;
27
+ for (_obj in data.status) coreCount++;
28
+ $scope.hasCores = coreCount >0;
29
+ if (!$scope.currentCore && coreCount==0) {
30
+ $scope.showAddCore();
31
+ return;
32
+ } else if (!$scope.currentCore) {
33
+ for (firstCore in data.status) break;
34
+ $scope.currentCore = firstCore;
35
+ $location.path("/~cores/" + $scope.currentCore).replace();
36
+ }
37
+ $scope.core = data.status[$scope.currentCore];
38
+ var cores = [];
39
+ for (var core in data.status) {
40
+ cores.push(data.status[core]);
41
+ }
42
+ $scope.cores = cores;
43
+ $scope.$parent.refresh();
44
+ });
45
+ };
46
+ $scope.showAddCore = function() {
47
+ $scope.hideAll();
48
+ $scope.showAdd = true;
49
+ $scope.newCore = {
50
+ name: "new_core",
51
+ dataDir: "data",
52
+ instanceDir: "new_core",
53
+ config: "solrconfig.xml",
54
+ schema: "schema.xml",
55
+ collection: "",
56
+ shard: ""
57
+ };
58
+ };
59
+
60
+ $scope.addCore = function() {
61
+ if (!$scope.newCore.name) {
62
+ $scope.addMessage = "Please provide a core name";
63
+ } else if (false) { //@todo detect whether core exists
64
+ $scope.AddMessage = "A core with that name already exists";
65
+ } else {
66
+ var params = {
67
+ name: $scope.newCore.name,
68
+ instanceDir: $scope.newCore.instanceDir,
69
+ config: $scope.newCore.config,
70
+ schema: $scope.newCore.schema,
71
+ dataDir: $scope.newCore.dataDir
72
+ };
73
+ if ($scope.isCloud) {
74
+ params.collection = $scope.newCore.collection;
75
+ params.shard = $scope.newCore.shard;
76
+ }
77
+ Cores.add(params, function(data) {
78
+ $location.path("/~cores/" + $scope.newCore.name);
79
+ $scope.cancelAddCore();
80
+ });
81
+ }
82
+ };
83
+
84
+ $scope.cancelAddCore = function() {
85
+ delete $scope.addMessage;
86
+ $scope.showAdd = false
87
+ };
88
+
89
+ $scope.unloadCore = function() {
90
+ var answer = confirm( 'Do you really want to unload Core "' + $scope.currentCore + '"?' );
91
+ if( !answer ) return;
92
+ Cores.unload({core: $scope.currentCore}, function(data) {
93
+ $location.path("/~cores");
94
+ });
95
+ };
96
+
97
+ $scope.showRenameCore = function() {
98
+ $scope.hideAll();
99
+ $scope.showRename = true;
100
+ };
101
+
102
+ $scope.renameCore = function() {
103
+ if (!$scope.other) {
104
+ $scope.renameMessage = "Please provide a new name for the " + $scope.currentCore + " core";
105
+ } else if ($scope.other == $scope.currentCore) {
106
+ $scope.renameMessage = "New name must be different from the current one";
107
+ } else {
108
+ Cores.rename({core:$scope.currentCore, other: $scope.other}, function(data) {
109
+ $location.path("/~cores/" + $scope.other);
110
+ $scope.cancelRename();
111
+ });
112
+ }
113
+ };
114
+
115
+ $scope.cancelRenameCore = function() {
116
+ $scope.showRename = false;
117
+ delete $scope.renameMessage;
118
+ $scope.other = "";
119
+ };
120
+
121
+ $scope.showSwapCores = function() {
122
+ $scope.hideAll();
123
+ $scope.showSwap = true;
124
+ };
125
+
126
+ $scope.swapCores = function() {
127
+ if ($scope.swapOther) {
128
+ $swapMessage = "Please select a core to swap with";
129
+ } else if ($scope.swapOther == $scope.currentCore) {
130
+ $swapMessage = "Cannot swap with the same core";
131
+ } else {
132
+ Cores.swap({core: $scope.currentCore, other: $scope.swapOther}, function(data) {
133
+ $location.path("/~cores/" + $scope.swapOther);
134
+ delete $scope.swapOther;
135
+ $scope.cancelSwap();
136
+ });
137
+ }
138
+ };
139
+
140
+ $scope.cancelSwapCores = function() {
141
+ delete $scope.swapMessage;
142
+ $scope.showSwap = false;
143
+ }
144
+
145
+ $scope.reloadCore = function() {
146
+ Cores.reload({core: $scope.currentCore},
147
+ function(successData) {
148
+ $scope.reloadSuccess = true;
149
+ $timeout(function() {$scope.reloadSuccess=false}, 1000);
150
+ },
151
+ function(failureData) {
152
+ $scope.reloadFailure = true;
153
+ $timeout(function() {$scope.reloadFailure=false}, 1000);
154
+ $scope.currentCore = null;
155
+ $scope.refresh();
156
+ $location.path("/~cores");
157
+ });
158
+ };
159
+
160
+ $scope.hideAll = function() {
161
+ $scope.showRename = false;
162
+ $scope.showAdd = false;
163
+ $scope.showSwap = false;
164
+ };
165
+
166
+ $scope.optimizeCore = function() {
167
+ Update.optimize({core: $scope.currentCore},
168
+ function(successData) {
169
+ $scope.optimizeSuccess = true;
170
+ $timeout(function() {$scope.optimizeSuccess=false}, 1000);
171
+ $scope.refresh();
172
+ },
173
+ function(failureData) {
174
+ $scope.optimizeFailure = true;
175
+ $timeout(function () {$scope.optimizeFailure=false}, 1000);
176
+ $scope.refresh();
177
+ });
178
+ };
179
+
180
+ $scope.refresh();
181
+ }
182
+ ]);
183
+
184
+ /**************
185
+ 'cores_load_data',
186
+ function( event, params )
187
+ {
188
+ $.ajax
189
+ (
190
+ {
191
+ url : app.config.solr_path + app.config.core_admin_path + '?wt=json',
192
+ dataType : 'json',
193
+ success : function( response, text_status, xhr )
194
+ {
195
+ if( params.only_failures )
196
+ {
197
+ app.check_for_init_failures( response );
198
+ return true;
199
+ }
200
+
201
+
202
+ =========== NO CORES
203
+ error : function()
204
+ {
205
+ sammy.trigger
206
+ (
207
+ 'cores_load_template',
208
+ {
209
+ content_element : content_element,
210
+ callback : function()
211
+ {
212
+ var cores_element = $( '#cores', content_element );
213
+ var navigation_element = $( '#navigation', cores_element );
214
+ var data_element = $( '#data', cores_element );
215
+ var core_data_element = $( '#core-data', data_element );
216
+ var index_data_element = $( '#index-data', data_element );
217
+
218
+ // layout
219
+
220
+ var ui_block = $( '#ui-block' );
221
+ var actions_element = $( '.actions', cores_element );
222
+ var div_action = $( 'div.action', actions_element );
223
+
224
+ ui_block
225
+ .css( 'opacity', 0.7 )
226
+ .width( cores_element.width() + 10 )
227
+ .height( cores_element.height() );
228
+
229
+ if( $( '#cloud.global' ).is( ':visible' ) )
230
+ {
231
+ $( '.cloud', div_action )
232
+ .show();
233
+ }
234
+
235
+ $( 'button.action', actions_element )
236
+ .die( 'click' )
237
+ .live
238
+ (
239
+ 'click',
240
+ function( event )
241
+ {
242
+ var self = $( this );
243
+
244
+ self
245
+ .toggleClass( 'open' );
246
+
247
+ $( '.action.' + self.attr( 'id' ), actions_element )
248
+ .trigger( 'open' );
249
+
250
+ return false;
251
+ }
252
+ );
253
+
254
+ div_action
255
+ .die( 'close' )
256
+ .live
257
+ (
258
+ 'close',
259
+ function( event )
260
+ {
261
+ div_action.hide();
262
+ ui_block.hide();
263
+ }
264
+ )
265
+ .die( 'open' )
266
+ .live
267
+ (
268
+ 'open',
269
+ function( event )
270
+ {
271
+ var self = $( this );
272
+ var rel = $( '#' + self.data( 'rel' ) );
273
+
274
+ self
275
+ .trigger( 'close' )
276
+ .show()
277
+ .css( 'left', rel.position().left );
278
+
279
+ ui_block
280
+ .show();
281
+ }
282
+ );
283
+
284
+ $( 'form button.reset', actions_element )
285
+ .die( 'click' )
286
+ .live
287
+ (
288
+ 'click',
289
+ function( event )
290
+ {
291
+ $( this ).closest( 'div.action' )
292
+ .trigger( 'close' );
293
+ }
294
+ );
295
+
296
+ $( 'form', div_action )
297
+ .ajaxForm
298
+ (
299
+ {
300
+ url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false',
301
+ dataType : 'json',
302
+ beforeSubmit : function( array, form, options )
303
+ {
304
+ $( 'button[type="submit"] span', form )
305
+ .addClass( 'loader' );
306
+ },
307
+ success : function( response, status_text, xhr, form )
308
+ {
309
+ delete app.cores_data;
310
+ sammy.refresh();
311
+
312
+ $( 'button.reset', form )
313
+ .trigger( 'click' );
314
+ },
315
+ error : function( xhr, text_status, error_thrown )
316
+ {
317
+ var response = null;
318
+ eval( 'response = ' + xhr.responseText + ';' );
319
+
320
+ var error_elem = $( '.error', div_action.filter( ':visible' ) );
321
+ error_elem.show();
322
+ $( 'span', error_elem ).text( response.error.msg );
323
+ },
324
+ complete : function()
325
+ {
326
+ $( 'button span.loader', actions_element )
327
+ .removeClass( 'loader' );
328
+ }
329
+ }
330
+ );
331
+
332
+ // --
333
+
334
+ $( '#add', content_element )
335
+ .trigger( 'click' );
336
+
337
+ $( '[data-rel="add"] input[type="text"]:first', content_element )
338
+ .focus();
339
+ }
340
+ }
341
+ );
342
+ }
343
+ }
344
+ );
345
+ }
346
+ );
347
+
348
+ // #/~cores
349
+ sammy.get
350
+ (
351
+ /^#\/(~cores)\//,
352
+ function( context )
353
+ {
354
+ var content_element = $( '#content' );
355
+
356
+ var path_parts = this.path.match( /^(.+\/~cores\/)(.*)$/ );
357
+ var current_core = path_parts[2];
358
+
359
+ sammy.trigger
360
+ (
361
+ 'cores_load_data',
362
+ {
363
+ error : function()
364
+ {
365
+ context.redirect( '#/' + context.params.splat[0] );
366
+ },
367
+ success : function( cores )
368
+ {
369
+ sammy.trigger
370
+ (
371
+ 'cores_load_template',
372
+ {
373
+ content_element : content_element,
374
+ callback : function()
375
+ {
376
+ var cores_element = $( '#cores', content_element );
377
+ var navigation_element = $( '#navigation', cores_element );
378
+ var data_element = $( '#data', cores_element );
379
+ var core_data_element = $( '#core-data', data_element );
380
+ var index_data_element = $( '#index-data', data_element );
381
+
382
+ cores_element
383
+ .removeClass( 'empty' );
384
+
385
+ var core_data = cores[current_core];
386
+ var core_basepath = $( '#' + current_core, app.menu_element ).attr( 'data-basepath' );
387
+
388
+ var core_names = [];
389
+ var core_selects = $( '#actions select', cores_element );
390
+
391
+ $( 'option[value="' + current_core + '"]', core_selects.filter( '.other' ) )
392
+ .remove();
393
+
394
+ $( 'input[data-core="current"]', cores_element )
395
+ .val( current_core );
396
+
397
+ // layout
398
+
399
+ var ui_block = $( '#ui-block' );
400
+ var actions_element = $( '.actions', cores_element );
401
+ var div_action = $( 'div.action', actions_element );
402
+
403
+ ui_block
404
+ .css( 'opacity', 0.7 )
405
+ .width( cores_element.width() + 10 )
406
+ .height( cores_element.height() );
407
+
408
+ if( $( '#cloud.global' ).is( ':visible' ) )
409
+ {
410
+ $( '.cloud', div_action )
411
+ .show();
412
+ }
413
+
414
+ var form_callback = {
415
+
416
+ rename : function( form, response )
417
+ {
418
+ var url = path_parts[1] + $( 'input[name="other"]', form ).val();
419
+ context.redirect( url );
420
+ }
421
+
422
+ };
423
+
424
+ $( 'form', div_action )
425
+ .ajaxForm
426
+ (
427
+ {
428
+ url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false',
429
+ success : function( response, status_text, xhr, form )
430
+ {
431
+ var action = $( 'input[name="action"]', form ).val().toLowerCase();
432
+
433
+ delete app.cores_data;
434
+
435
+ if( form_callback[action] )
436
+ {
437
+ form_callback[action]( form, response );
438
+ }
439
+ else
440
+ {
441
+ sammy.refresh();
442
+ }
443
+
444
+ $( 'button.reset', form )
445
+ .trigger( 'click' );
446
+ },
447
+ );
448
+
449
+ $( '#actions #unload', cores_element )
450
+ var ret = confirm( 'Do you really want to unload Core "' + current_core + '"?' );
451
+ if( !ret )
452
+ return false;
453
+
454
+ url : app.config.solr_path + app.config.core_admin_path + '?wt=json&action=UNLOAD&core=' + current_core,
455
+ success : function( response, text_status, xhr )
456
+ {
457
+ delete app.cores_data;
458
+ context.redirect( path_parts[1].substr( 0, path_parts[1].length - 1 ) );
459
+ },
460
+
461
+ optimize_button
462
+ url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
463
+ success : function( response, text_status, xhr )
464
+
465
+ ******/