rjack-solr 3.6.2.0-java → 4.0.0.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. data/History.rdoc +5 -0
  2. data/Manifest.txt +268 -33
  3. data/NOTICE.txt +1 -1
  4. data/README.rdoc +6 -6
  5. data/assembly.xml +2 -2
  6. data/bin/rjack-solr-fg +1 -1
  7. data/init/rjack-solr +2 -2
  8. data/lib/rjack-solr.rb +7 -2
  9. data/lib/rjack-solr/base.rb +2 -2
  10. data/lib/rjack-solr/commons-cli-1.2.jar +0 -0
  11. data/lib/rjack-solr/config.rb +1 -1
  12. data/lib/rjack-solr/server.rb +1 -1
  13. data/lib/rjack-solr/solr-core-4.0.0.jar +0 -0
  14. data/lib/rjack-solr/solr-solrj-4.0.0.jar +0 -0
  15. data/pom.xml +19 -6
  16. data/test/test_solr.rb +7 -5
  17. data/webapp/META-INF/LICENSE.txt +0 -940
  18. data/webapp/META-INF/MANIFEST.MF +5 -5
  19. data/webapp/META-INF/NOTICE.txt +160 -93
  20. data/webapp/WEB-INF/web.xml +57 -43
  21. data/webapp/admin.html +140 -0
  22. data/webapp/css/chosen.css +392 -0
  23. data/webapp/css/styles/analysis.css +293 -0
  24. data/webapp/css/styles/cloud.css +331 -0
  25. data/webapp/css/styles/common.css +593 -0
  26. data/webapp/css/styles/cores.css +203 -0
  27. data/webapp/css/styles/dashboard.css +127 -0
  28. data/webapp/css/styles/dataimport.css +222 -0
  29. data/webapp/css/styles/index.css +195 -0
  30. data/webapp/css/styles/java-properties.css +33 -0
  31. data/webapp/css/styles/logging.css +323 -0
  32. data/webapp/css/styles/menu.css +272 -0
  33. data/webapp/css/styles/plugins.css +175 -0
  34. data/webapp/css/styles/query.css +137 -0
  35. data/webapp/css/styles/replication.css +494 -0
  36. data/webapp/css/styles/schema-browser.css +476 -0
  37. data/webapp/css/styles/threads.css +153 -0
  38. data/webapp/img/ZeroClipboard.swf +0 -0
  39. data/webapp/img/chosen-sprite.png +0 -0
  40. data/webapp/img/div.gif +0 -0
  41. data/webapp/{admin → img}/favicon.ico +0 -0
  42. data/webapp/img/filetypes/7z.png +0 -0
  43. data/webapp/img/filetypes/README +27 -0
  44. data/webapp/img/filetypes/ai.png +0 -0
  45. data/webapp/img/filetypes/aiff.png +0 -0
  46. data/webapp/img/filetypes/asc.png +0 -0
  47. data/webapp/img/filetypes/audio.png +0 -0
  48. data/webapp/img/filetypes/bin.png +0 -0
  49. data/webapp/img/filetypes/bz2.png +0 -0
  50. data/webapp/img/filetypes/c.png +0 -0
  51. data/webapp/img/filetypes/cfc.png +0 -0
  52. data/webapp/img/filetypes/cfm.png +0 -0
  53. data/webapp/img/filetypes/chm.png +0 -0
  54. data/webapp/img/filetypes/class.png +0 -0
  55. data/webapp/img/filetypes/conf.png +0 -0
  56. data/webapp/img/filetypes/cpp.png +0 -0
  57. data/webapp/img/filetypes/cs.png +0 -0
  58. data/webapp/img/filetypes/css.png +0 -0
  59. data/webapp/img/filetypes/csv.png +0 -0
  60. data/webapp/img/filetypes/deb.png +0 -0
  61. data/webapp/img/filetypes/divx.png +0 -0
  62. data/webapp/img/filetypes/doc.png +0 -0
  63. data/webapp/img/filetypes/dot.png +0 -0
  64. data/webapp/img/filetypes/eml.png +0 -0
  65. data/webapp/img/filetypes/enc.png +0 -0
  66. data/webapp/img/filetypes/file.png +0 -0
  67. data/webapp/img/filetypes/gif.png +0 -0
  68. data/webapp/img/filetypes/gz.png +0 -0
  69. data/webapp/img/filetypes/hlp.png +0 -0
  70. data/webapp/img/filetypes/htm.png +0 -0
  71. data/webapp/img/filetypes/html.png +0 -0
  72. data/webapp/img/filetypes/image.png +0 -0
  73. data/webapp/img/filetypes/iso.png +0 -0
  74. data/webapp/img/filetypes/jar.png +0 -0
  75. data/webapp/img/filetypes/java.png +0 -0
  76. data/webapp/img/filetypes/jpeg.png +0 -0
  77. data/webapp/img/filetypes/jpg.png +0 -0
  78. data/webapp/img/filetypes/js.png +0 -0
  79. data/webapp/img/filetypes/lua.png +0 -0
  80. data/webapp/img/filetypes/m.png +0 -0
  81. data/webapp/img/filetypes/mm.png +0 -0
  82. data/webapp/img/filetypes/mov.png +0 -0
  83. data/webapp/img/filetypes/mp3.png +0 -0
  84. data/webapp/img/filetypes/mpg.png +0 -0
  85. data/webapp/img/filetypes/odc.png +0 -0
  86. data/webapp/img/filetypes/odf.png +0 -0
  87. data/webapp/img/filetypes/odg.png +0 -0
  88. data/webapp/img/filetypes/odi.png +0 -0
  89. data/webapp/img/filetypes/odp.png +0 -0
  90. data/webapp/img/filetypes/ods.png +0 -0
  91. data/webapp/img/filetypes/odt.png +0 -0
  92. data/webapp/img/filetypes/ogg.png +0 -0
  93. data/webapp/img/filetypes/pdf.png +0 -0
  94. data/webapp/img/filetypes/pgp.png +0 -0
  95. data/webapp/img/filetypes/php.png +0 -0
  96. data/webapp/img/filetypes/pl.png +0 -0
  97. data/webapp/img/filetypes/png.png +0 -0
  98. data/webapp/img/filetypes/ppt.png +0 -0
  99. data/webapp/img/filetypes/ps.png +0 -0
  100. data/webapp/img/filetypes/py.png +0 -0
  101. data/webapp/img/filetypes/ram.png +0 -0
  102. data/webapp/img/filetypes/rar.png +0 -0
  103. data/webapp/img/filetypes/rb.png +0 -0
  104. data/webapp/img/filetypes/rm.png +0 -0
  105. data/webapp/img/filetypes/rpm.png +0 -0
  106. data/webapp/img/filetypes/rtf.png +0 -0
  107. data/webapp/img/filetypes/sig.png +0 -0
  108. data/webapp/img/filetypes/sql.png +0 -0
  109. data/webapp/img/filetypes/swf.png +0 -0
  110. data/webapp/img/filetypes/sxc.png +0 -0
  111. data/webapp/img/filetypes/sxd.png +0 -0
  112. data/webapp/img/filetypes/sxi.png +0 -0
  113. data/webapp/img/filetypes/sxw.png +0 -0
  114. data/webapp/img/filetypes/tar.png +0 -0
  115. data/webapp/img/filetypes/tex.png +0 -0
  116. data/webapp/img/filetypes/tgz.png +0 -0
  117. data/webapp/img/filetypes/txt.png +0 -0
  118. data/webapp/img/filetypes/vcf.png +0 -0
  119. data/webapp/img/filetypes/video.png +0 -0
  120. data/webapp/img/filetypes/vsd.png +0 -0
  121. data/webapp/img/filetypes/wav.png +0 -0
  122. data/webapp/img/filetypes/wma.png +0 -0
  123. data/webapp/img/filetypes/wmv.png +0 -0
  124. data/webapp/img/filetypes/xls.png +0 -0
  125. data/webapp/img/filetypes/xml.png +0 -0
  126. data/webapp/img/filetypes/xpi.png +0 -0
  127. data/webapp/img/filetypes/xvid.png +0 -0
  128. data/webapp/img/filetypes/zip.png +0 -0
  129. data/webapp/img/ico/arrow-000-small.png +0 -0
  130. data/webapp/img/ico/arrow-circle.png +0 -0
  131. data/webapp/img/ico/arrow-switch.png +0 -0
  132. data/webapp/img/ico/asterisk.png +0 -0
  133. data/webapp/img/ico/battery.png +0 -0
  134. data/webapp/img/ico/block-small.png +0 -0
  135. data/webapp/img/ico/block.png +0 -0
  136. data/webapp/img/ico/book-open-text.png +0 -0
  137. data/webapp/img/ico/box.png +0 -0
  138. data/webapp/img/ico/bug.png +0 -0
  139. data/webapp/img/ico/chart.png +0 -0
  140. data/webapp/img/ico/chevron-small-expand.png +0 -0
  141. data/webapp/img/ico/chevron-small.png +0 -0
  142. data/webapp/img/ico/clipboard-list.png +0 -0
  143. data/webapp/img/ico/clipboard-paste-document-text.png +0 -0
  144. data/webapp/img/ico/clipboard-paste.png +0 -0
  145. data/webapp/img/ico/clock-select-remain.png +0 -0
  146. data/webapp/img/ico/clock-select.png +0 -0
  147. data/webapp/img/ico/construction.png +0 -0
  148. data/webapp/img/ico/cross-0.png +0 -0
  149. data/webapp/img/ico/cross-1.png +0 -0
  150. data/webapp/img/ico/cross.png +0 -0
  151. data/webapp/img/ico/dashboard.png +0 -0
  152. data/webapp/img/ico/database.png +0 -0
  153. data/webapp/img/ico/databases.png +0 -0
  154. data/webapp/img/ico/disk-black.png +0 -0
  155. data/webapp/img/ico/document-convert.png +0 -0
  156. data/webapp/img/ico/document-import.png +0 -0
  157. data/webapp/img/ico/document-list.png +0 -0
  158. data/webapp/img/ico/document-text.png +0 -0
  159. data/webapp/img/ico/download-cloud.png +0 -0
  160. data/webapp/img/ico/exclamation-button.png +0 -0
  161. data/webapp/img/ico/eye.png +0 -0
  162. data/webapp/img/ico/folder-export.png +0 -0
  163. data/webapp/img/ico/folder-tree.png +0 -0
  164. data/webapp/img/ico/folder.png +0 -0
  165. data/webapp/img/ico/funnel-small.png +0 -0
  166. data/webapp/img/ico/funnel.png +0 -0
  167. data/webapp/img/ico/gear.png +0 -0
  168. data/webapp/img/ico/globe-network.png +0 -0
  169. data/webapp/img/ico/globe.png +0 -0
  170. data/webapp/img/ico/hammer-screwdriver.png +0 -0
  171. data/webapp/img/ico/hand.png +0 -0
  172. data/webapp/img/ico/highlighter-text.png +0 -0
  173. data/webapp/img/ico/hourglass--exclamation.png +0 -0
  174. data/webapp/img/ico/hourglass.png +0 -0
  175. data/webapp/img/ico/inbox-document-text.png +0 -0
  176. data/webapp/img/ico/information-button.png +0 -0
  177. data/webapp/img/ico/information-small.png +0 -0
  178. data/webapp/img/ico/information-white.png +0 -0
  179. data/webapp/img/ico/information.png +0 -0
  180. data/webapp/img/ico/jar.png +0 -0
  181. data/webapp/img/ico/magnifier.png +0 -0
  182. data/webapp/img/ico/mail.png +0 -0
  183. data/webapp/img/ico/memory.png +0 -0
  184. data/webapp/img/ico/molecule.png +0 -0
  185. data/webapp/img/ico/network-cloud.png +0 -0
  186. data/webapp/img/ico/network-status-away.png +0 -0
  187. data/webapp/img/ico/network-status-busy.png +0 -0
  188. data/webapp/img/ico/network-status-offline.png +0 -0
  189. data/webapp/img/ico/network-status.png +0 -0
  190. data/webapp/img/ico/network.png +0 -0
  191. data/webapp/img/ico/node-design.png +0 -0
  192. data/webapp/img/ico/node-master.png +0 -0
  193. data/webapp/img/ico/node-select.png +0 -0
  194. data/webapp/img/ico/node-slave.png +0 -0
  195. data/webapp/img/ico/node.png +0 -0
  196. data/webapp/img/ico/pencil-small.png +0 -0
  197. data/webapp/img/ico/plus-button.png +0 -0
  198. data/webapp/img/ico/processor.png +0 -0
  199. data/webapp/img/ico/prohibition.png +0 -0
  200. data/webapp/img/ico/property.png +0 -0
  201. data/webapp/img/ico/question-small-white.png +0 -0
  202. data/webapp/img/ico/question-white.png +0 -0
  203. data/webapp/img/ico/question.png +0 -0
  204. data/webapp/img/ico/receipt-invoice.png +0 -0
  205. data/webapp/img/ico/receipt.png +0 -0
  206. data/webapp/img/ico/script-code.png +0 -0
  207. data/webapp/img/ico/server-cast.png +0 -0
  208. data/webapp/img/ico/server.png +0 -0
  209. data/webapp/img/ico/sitemap.png +0 -0
  210. data/webapp/img/ico/slash.png +0 -0
  211. data/webapp/img/ico/status-away.png +0 -0
  212. data/webapp/img/ico/status-busy.png +0 -0
  213. data/webapp/img/ico/status-offline.png +0 -0
  214. data/webapp/img/ico/status.png +0 -0
  215. data/webapp/img/ico/system-monitor--exclamation.png +0 -0
  216. data/webapp/img/ico/system-monitor.png +0 -0
  217. data/webapp/img/ico/table.png +0 -0
  218. data/webapp/img/ico/terminal.png +0 -0
  219. data/webapp/img/ico/tick-circle.png +0 -0
  220. data/webapp/img/ico/tick-red.png +0 -0
  221. data/webapp/img/ico/tick.png +0 -0
  222. data/webapp/img/ico/toggle-small-expand.png +0 -0
  223. data/webapp/img/ico/toggle-small.png +0 -0
  224. data/webapp/img/ico/toolbox.png +0 -0
  225. data/webapp/img/ico/ui-accordion.png +0 -0
  226. data/webapp/img/ico/ui-address-bar.png +0 -0
  227. data/webapp/img/ico/ui-check-box-uncheck.png +0 -0
  228. data/webapp/img/ico/ui-check-box.png +0 -0
  229. data/webapp/img/ico/ui-radio-button-uncheck.png +0 -0
  230. data/webapp/img/ico/ui-radio-button.png +0 -0
  231. data/webapp/img/ico/ui-text-field-select.png +0 -0
  232. data/webapp/img/ico/users.png +0 -0
  233. data/webapp/img/ico/wooden-box.png +0 -0
  234. data/webapp/img/ico/zone.png +0 -0
  235. data/webapp/img/loader-light.gif +0 -0
  236. data/webapp/img/loader.gif +0 -0
  237. data/webapp/img/lucene-ico.png +0 -0
  238. data/webapp/img/solr-ico.png +0 -0
  239. data/webapp/{admin/solr_small.png → img/solr.png} +0 -0
  240. data/webapp/img/tree.png +0 -0
  241. data/webapp/js/lib/ZeroClipboard.js +317 -0
  242. data/webapp/js/lib/chosen.js +953 -0
  243. data/webapp/{admin/get-properties.jsp → js/lib/console.js} +13 -10
  244. data/webapp/js/lib/d3.js +9342 -0
  245. data/webapp/js/lib/highlight.js +1 -0
  246. data/webapp/{admin/jquery-1.4.3.min.js → js/lib/jquery-1.7.2.min.js} +0 -0
  247. data/webapp/js/lib/jquery.blockUI.js +499 -0
  248. data/webapp/js/lib/jquery.cookie.js +47 -0
  249. data/webapp/js/lib/jquery.form.js +782 -0
  250. data/webapp/js/lib/jquery.jstree.js +3510 -0
  251. data/webapp/js/lib/jquery.sammy.js +1856 -0
  252. data/webapp/js/lib/jquery.sparkline.js +1271 -0
  253. data/webapp/js/lib/jquery.timeago.js +165 -0
  254. data/webapp/js/lib/linker.js +48 -0
  255. data/webapp/js/lib/order.js +189 -0
  256. data/webapp/js/main.js +57 -0
  257. data/webapp/js/require.js +11319 -0
  258. data/webapp/js/scripts/analysis.js +549 -0
  259. data/webapp/js/scripts/app.js +368 -0
  260. data/webapp/js/scripts/cloud.js +719 -0
  261. data/webapp/js/scripts/cores.js +540 -0
  262. data/webapp/js/scripts/dashboard.js +540 -0
  263. data/webapp/js/scripts/dataimport.js +567 -0
  264. data/webapp/js/scripts/file.js +56 -0
  265. data/webapp/js/scripts/index.js +344 -0
  266. data/webapp/js/scripts/java-properties.js +107 -0
  267. data/webapp/js/scripts/logging.js +519 -0
  268. data/webapp/js/scripts/ping.js +72 -0
  269. data/webapp/js/scripts/plugins.js +426 -0
  270. data/webapp/js/scripts/query.js +170 -0
  271. data/webapp/js/scripts/replication.js +557 -0
  272. data/webapp/js/scripts/schema-browser.js +1206 -0
  273. data/webapp/js/scripts/threads.js +159 -0
  274. data/webapp/tpl/analysis.html +83 -0
  275. data/webapp/tpl/cloud.html +54 -0
  276. data/webapp/tpl/cores.html +215 -0
  277. data/webapp/tpl/dashboard.html +164 -0
  278. data/webapp/tpl/dataimport.html +123 -0
  279. data/webapp/tpl/index.html +250 -0
  280. data/webapp/tpl/logging.html +23 -0
  281. data/webapp/tpl/plugins.html +39 -0
  282. data/webapp/tpl/query.html +318 -0
  283. data/webapp/tpl/replication.html +207 -0
  284. data/webapp/tpl/schema-browser.html +178 -0
  285. data/webapp/tpl/threads.html +56 -0
  286. metadata +307 -40
  287. data/lib/rjack-solr/solr-core-3.6.2.jar +0 -0
  288. data/lib/rjack-solr/solr-solrj-3.6.2.jar +0 -0
  289. data/webapp/admin/_info.jsp +0 -120
  290. data/webapp/admin/action.jsp +0 -94
  291. data/webapp/admin/analysis.jsp +0 -496
  292. data/webapp/admin/analysis.xsl +0 -179
  293. data/webapp/admin/dataimport.jsp +0 -53
  294. data/webapp/admin/debug.jsp +0 -103
  295. data/webapp/admin/distributiondump.jsp +0 -160
  296. data/webapp/admin/form.jsp +0 -152
  297. data/webapp/admin/get-file.jsp +0 -72
  298. data/webapp/admin/header.jsp +0 -44
  299. data/webapp/admin/index.jsp +0 -162
  300. data/webapp/admin/meta.xsl +0 -34
  301. data/webapp/admin/ping.jsp +0 -52
  302. data/webapp/admin/ping.xsl +0 -71
  303. data/webapp/admin/raw-schema.jsp +0 -38
  304. data/webapp/admin/registry.jsp +0 -107
  305. data/webapp/admin/registry.xsl +0 -321
  306. data/webapp/admin/replication/header.jsp +0 -89
  307. data/webapp/admin/replication/index.jsp +0 -378
  308. data/webapp/admin/schema.jsp +0 -690
  309. data/webapp/admin/solr-admin.css +0 -215
  310. data/webapp/admin/stats.jsp +0 -92
  311. data/webapp/admin/stats.xsl +0 -220
  312. data/webapp/admin/tabular.xsl +0 -141
  313. data/webapp/admin/threaddump.jsp +0 -110
  314. data/webapp/admin/threaddump.xsl +0 -103
  315. data/webapp/index.jsp +0 -49
@@ -0,0 +1,165 @@
1
+ /*
2
+ * timeago: a jQuery plugin, version: 0.9.3 (2011-01-21)
3
+ * @requires jQuery v1.2.3 or later
4
+ *
5
+ * Timeago is a jQuery plugin that makes it easy to support automatically
6
+ * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
7
+ *
8
+ * For usage and examples, visit:
9
+ * http://timeago.yarp.com/
10
+ *
11
+ * Licensed under the MIT:
12
+ * http://www.opensource.org/licenses/mit-license.php
13
+ *
14
+ * Copyright (c) 2008-2011, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org)
15
+ */
16
+
17
+ (function($) {
18
+ $.timeago = function(timestamp) {
19
+ if (timestamp instanceof Date) {
20
+ return inWords(timestamp);
21
+ } else if (typeof timestamp === "string") {
22
+ return inWords($.timeago.parse(timestamp));
23
+ } else {
24
+ return inWords($.timeago.datetime(timestamp));
25
+ }
26
+ };
27
+ var $t = $.timeago;
28
+
29
+ $.extend($.timeago, {
30
+ settings: {
31
+ refreshMillis: 60000,
32
+ allowFuture: false,
33
+ strings: {
34
+ prefixAgo: null,
35
+ prefixFromNow: null,
36
+ suffixAgo: "ago",
37
+ suffixFromNow: "from now",
38
+ seconds: "less than a minute",
39
+ minute: "about a minute",
40
+ minutes: "%d minutes",
41
+ hour: "about an hour",
42
+ hours: "about %d hours",
43
+ day: "a day",
44
+ days: "%d days",
45
+ month: "about a month",
46
+ months: "%d months",
47
+ year: "about a year",
48
+ years: "%d years",
49
+ numbers: []
50
+ }
51
+ },
52
+ inWords: function(distanceMillis) {
53
+ var $l = this.settings.strings;
54
+ var prefix = $l.prefixAgo;
55
+ var suffix = $l.suffixAgo;
56
+ if (this.settings.allowFuture) {
57
+ if (distanceMillis < 0) {
58
+ prefix = $l.prefixFromNow;
59
+ suffix = $l.suffixFromNow;
60
+ }
61
+ distanceMillis = Math.abs(distanceMillis);
62
+ }
63
+
64
+ var seconds = distanceMillis / 1000;
65
+ var minutes = seconds / 60;
66
+ var hours = minutes / 60;
67
+ var days = hours / 24;
68
+ var years = days / 365;
69
+
70
+ function substitute(stringOrFunction, number) {
71
+ var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
72
+ var value = ($l.numbers && $l.numbers[number]) || number;
73
+ return string.replace(/%d/i, value);
74
+ }
75
+
76
+ var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
77
+ seconds < 90 && substitute($l.minute, 1) ||
78
+ minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
79
+ minutes < 90 && substitute($l.hour, 1) ||
80
+ hours < 24 && substitute($l.hours, Math.round(hours)) ||
81
+ hours < 48 && substitute($l.day, 1) ||
82
+ days < 30 && substitute($l.days, Math.floor(days)) ||
83
+ days < 60 && substitute($l.month, 1) ||
84
+ days < 365 && substitute($l.months, Math.floor(days / 30)) ||
85
+ years < 2 && substitute($l.year, 1) ||
86
+ substitute($l.years, Math.floor(years));
87
+
88
+ return $.trim([prefix, words, suffix].join(" "));
89
+ },
90
+ parse: function(iso8601) {
91
+ var s = $.trim(iso8601);
92
+ s = s.replace(/\.\d\d\d+/,""); // remove milliseconds
93
+ s = s.replace(/-/g,"/");
94
+ s = s.replace(/(\d)T(\d)/,"$1 $2").replace(/(\d)Z/,"$1 UTC");
95
+ s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
96
+ return new Date(s);
97
+ },
98
+ datetime: function(elem) {
99
+ // jQuery's `is()` doesn't play well with HTML5 in IE
100
+ var isTime = $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
101
+
102
+ var iso8601 = null;
103
+
104
+ if( isTime )
105
+ {
106
+ iso8601 = $(elem).attr("datetime");
107
+ }
108
+
109
+ if( !iso8601 )
110
+ {
111
+ iso8601 = $(elem).attr("title");
112
+ }
113
+
114
+ if( !iso8601 )
115
+ {
116
+ iso8601 = $(elem).text();
117
+ }
118
+
119
+ return $t.parse(iso8601);
120
+ }
121
+ });
122
+
123
+ $.fn.timeago = function() {
124
+ var self = this;
125
+ self.each(refresh);
126
+
127
+ var $s = $t.settings;
128
+ if ($s.refreshMillis > 0) {
129
+ setInterval(function() { self.each(refresh); }, $s.refreshMillis);
130
+ }
131
+ return self;
132
+ };
133
+
134
+ function refresh() {
135
+ var data = prepareData(this);
136
+ if (!isNaN(data.datetime)) {
137
+ $(this).text(inWords(data.datetime));
138
+ }
139
+ return this;
140
+ }
141
+
142
+ function prepareData(element) {
143
+ element = $(element);
144
+ if (!element.data("timeago")) {
145
+ element.data("timeago", { datetime: $t.datetime(element) });
146
+ var text = $.trim(element.text());
147
+ if (text.length > 0) {
148
+ element.attr("title", text);
149
+ }
150
+ }
151
+ return element.data("timeago");
152
+ }
153
+
154
+ function inWords(date) {
155
+ return $t.inWords(distance(date));
156
+ }
157
+
158
+ function distance(date) {
159
+ return (new Date().getTime() - date.getTime());
160
+ }
161
+
162
+ // fix for IE6 suckage
163
+ document.createElement("abbr");
164
+ document.createElement("time");
165
+ }(jQuery));
@@ -0,0 +1,48 @@
1
+ //by Michalis Tzikas & Vasilis Lolos
2
+ //07-03-2012
3
+ //v1.0
4
+ /*
5
+ Copyright (C) 2011 by Michalis Tzikas & Vasilis Lolos
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
24
+ */
25
+ (function( $ ){
26
+ $.fn.linker = function(options) {
27
+ var defaults = {
28
+ target : '', //blank,self,parent,top
29
+ className : '',
30
+ rel : ''
31
+ };
32
+ var options = $.extend(defaults, options);
33
+
34
+ target_string = (options.target != '') ? 'target="_'+options.target+'"' : '';
35
+ class_string = (options.className != '') ? 'class="'+options.className+'"' : '';
36
+ rel_string = (options.rel != '') ? 'rel="'+options.rel+'"' : '';
37
+
38
+ $(this).each(function(){
39
+ t = $(this).text();
40
+
41
+ t = t.replace(/(https\:\/\/|http:\/\/)([www\.]?)([^\s|<]+)/gi,'<a href="$1$2$3" '+target_string+' '+class_string+' '+rel_string+'>$1$2$3</a>');
42
+ t = t.replace(/([^https\:\/\/]|[^http:\/\/]|^)(www)\.([^\s|<]+)/gi,'$1<a href="http://$2.$3" '+target_string+' '+class_string+' '+rel_string+'>$2.$3</a>');
43
+ t = t.replace(/<([^a]|^\/a])([^<>]+)>/g, "&lt;$1$2&gt;").replace(/&lt;\/a&gt;/g, "</a>").replace(/<(.)>/g, "&lt;$1&gt;").replace(/\n/g, '<br />');
44
+
45
+ $(this).html(t);
46
+ });
47
+ };
48
+ })( jQuery );
@@ -0,0 +1,189 @@
1
+ /**
2
+ * @license RequireJS order 1.0.5 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
3
+ * Available via the MIT or new BSD license.
4
+ * see: http://github.com/jrburke/requirejs for details
5
+ */
6
+ /*jslint nomen: false, plusplus: false, strict: false */
7
+ /*global require: false, define: false, window: false, document: false,
8
+ setTimeout: false */
9
+
10
+ //Specify that requirejs optimizer should wrap this code in a closure that
11
+ //maps the namespaced requirejs API to non-namespaced local variables.
12
+ /*requirejs namespace: true */
13
+
14
+ (function () {
15
+
16
+ //Sadly necessary browser inference due to differences in the way
17
+ //that browsers load and execute dynamically inserted javascript
18
+ //and whether the script/cache method works when ordered execution is
19
+ //desired. Currently, Gecko and Opera do not load/fire onload for scripts with
20
+ //type="script/cache" but they execute injected scripts in order
21
+ //unless the 'async' flag is present.
22
+ //However, this is all changing in latest browsers implementing HTML5
23
+ //spec. With compliant browsers .async true by default, and
24
+ //if false, then it will execute in order. Favor that test first for forward
25
+ //compatibility.
26
+ var testScript = typeof document !== "undefined" &&
27
+ typeof window !== "undefined" &&
28
+ document.createElement("script"),
29
+
30
+ supportsInOrderExecution = testScript && (testScript.async ||
31
+ ((window.opera &&
32
+ Object.prototype.toString.call(window.opera) === "[object Opera]") ||
33
+ //If Firefox 2 does not have to be supported, then
34
+ //a better check may be:
35
+ //('mozIsLocallyAvailable' in window.navigator)
36
+ ("MozAppearance" in document.documentElement.style))),
37
+
38
+ //This test is true for IE browsers, which will load scripts but only
39
+ //execute them once the script is added to the DOM.
40
+ supportsLoadSeparateFromExecute = testScript &&
41
+ testScript.readyState === 'uninitialized',
42
+
43
+ readyRegExp = /^(complete|loaded)$/,
44
+ cacheWaiting = [],
45
+ cached = {},
46
+ scriptNodes = {},
47
+ scriptWaiting = [];
48
+
49
+ //Done with the test script.
50
+ testScript = null;
51
+
52
+ //Callback used by the type="script/cache" callback that indicates a script
53
+ //has finished downloading.
54
+ function scriptCacheCallback(evt) {
55
+ var node = evt.currentTarget || evt.srcElement, i,
56
+ moduleName, resource;
57
+
58
+ if (evt.type === "load" || readyRegExp.test(node.readyState)) {
59
+ //Pull out the name of the module and the context.
60
+ moduleName = node.getAttribute("data-requiremodule");
61
+
62
+ //Mark this cache request as loaded
63
+ cached[moduleName] = true;
64
+
65
+ //Find out how many ordered modules have loaded
66
+ for (i = 0; (resource = cacheWaiting[i]); i++) {
67
+ if (cached[resource.name]) {
68
+ resource.req([resource.name], resource.onLoad);
69
+ } else {
70
+ //Something in the ordered list is not loaded,
71
+ //so wait.
72
+ break;
73
+ }
74
+ }
75
+
76
+ //If just loaded some items, remove them from cacheWaiting.
77
+ if (i > 0) {
78
+ cacheWaiting.splice(0, i);
79
+ }
80
+
81
+ //Remove this script tag from the DOM
82
+ //Use a setTimeout for cleanup because some older IE versions vomit
83
+ //if removing a script node while it is being evaluated.
84
+ setTimeout(function () {
85
+ node.parentNode.removeChild(node);
86
+ }, 15);
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Used for the IE case, where fetching is done by creating script element
92
+ * but not attaching it to the DOM. This function will be called when that
93
+ * happens so it can be determined when the node can be attached to the
94
+ * DOM to trigger its execution.
95
+ */
96
+ function onFetchOnly(node) {
97
+ var i, loadedNode, resourceName;
98
+
99
+ //Mark this script as loaded.
100
+ node.setAttribute('data-orderloaded', 'loaded');
101
+
102
+ //Cycle through waiting scripts. If the matching node for them
103
+ //is loaded, and is in the right order, add it to the DOM
104
+ //to execute the script.
105
+ for (i = 0; (resourceName = scriptWaiting[i]); i++) {
106
+ loadedNode = scriptNodes[resourceName];
107
+ if (loadedNode &&
108
+ loadedNode.getAttribute('data-orderloaded') === 'loaded') {
109
+ delete scriptNodes[resourceName];
110
+ require.addScriptToDom(loadedNode);
111
+ } else {
112
+ break;
113
+ }
114
+ }
115
+
116
+ //If just loaded some items, remove them from waiting.
117
+ if (i > 0) {
118
+ scriptWaiting.splice(0, i);
119
+ }
120
+ }
121
+
122
+ define({
123
+ version: '1.0.5',
124
+
125
+ load: function (name, req, onLoad, config) {
126
+ var hasToUrl = !!req.nameToUrl,
127
+ url, node, context;
128
+
129
+ //If no nameToUrl, then probably a build with a loader that
130
+ //does not support it, and all modules are inlined.
131
+ if (!hasToUrl) {
132
+ req([name], onLoad);
133
+ return;
134
+ }
135
+
136
+ url = req.nameToUrl(name, null);
137
+
138
+ //Make sure the async attribute is not set for any pathway involving
139
+ //this script.
140
+ require.s.skipAsync[url] = true;
141
+ if (supportsInOrderExecution || config.isBuild) {
142
+ //Just a normal script tag append, but without async attribute
143
+ //on the script.
144
+ req([name], onLoad);
145
+ } else if (supportsLoadSeparateFromExecute) {
146
+ //Just fetch the URL, but do not execute it yet. The
147
+ //non-standards IE case. Really not so nice because it is
148
+ //assuming and touching requrejs internals. OK though since
149
+ //ordered execution should go away after a long while.
150
+ context = require.s.contexts._;
151
+
152
+ if (!context.urlFetched[url] && !context.loaded[name]) {
153
+ //Indicate the script is being fetched.
154
+ context.urlFetched[url] = true;
155
+
156
+ //Stuff from require.load
157
+ require.resourcesReady(false);
158
+ context.scriptCount += 1;
159
+
160
+ //Fetch the script now, remember it.
161
+ node = require.attach(url, context, name, null, null, onFetchOnly);
162
+ scriptNodes[name] = node;
163
+ scriptWaiting.push(name);
164
+ }
165
+
166
+ //Do a normal require for it, once it loads, use it as return
167
+ //value.
168
+ req([name], onLoad);
169
+ } else {
170
+ //Credit to LABjs author Kyle Simpson for finding that scripts
171
+ //with type="script/cache" allow scripts to be downloaded into
172
+ //browser cache but not executed. Use that
173
+ //so that subsequent addition of a real type="text/javascript"
174
+ //tag will cause the scripts to be executed immediately in the
175
+ //correct order.
176
+ if (req.specified(name)) {
177
+ req([name], onLoad);
178
+ } else {
179
+ cacheWaiting.push({
180
+ name: name,
181
+ req: req,
182
+ onLoad: onLoad
183
+ });
184
+ require.attach(url, null, name, scriptCacheCallback, "script/cache");
185
+ }
186
+ }
187
+ }
188
+ });
189
+ }());
data/webapp/js/main.js ADDED
@@ -0,0 +1,57 @@
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
+ require
19
+ (
20
+ [
21
+ 'lib/order!lib/console',
22
+ 'lib/order!jquery',
23
+ 'lib/order!lib/jquery.cookie',
24
+ 'lib/order!lib/jquery.form',
25
+ 'lib/order!lib/jquery.jstree',
26
+ 'lib/order!lib/jquery.sammy',
27
+ 'lib/order!lib/jquery.sparkline',
28
+ 'lib/order!lib/jquery.timeago',
29
+ 'lib/order!lib/jquery.blockUI',
30
+ 'lib/order!lib/highlight',
31
+ 'lib/order!lib/linker',
32
+ 'lib/order!lib/ZeroClipboard',
33
+ 'lib/order!lib/d3',
34
+ 'lib/order!lib/chosen',
35
+ 'lib/order!scripts/app',
36
+
37
+ 'lib/order!scripts/analysis',
38
+ 'lib/order!scripts/cloud',
39
+ 'lib/order!scripts/cores',
40
+ 'lib/order!scripts/dataimport',
41
+ 'lib/order!scripts/dashboard',
42
+ 'lib/order!scripts/file',
43
+ 'lib/order!scripts/index',
44
+ 'lib/order!scripts/java-properties',
45
+ 'lib/order!scripts/logging',
46
+ 'lib/order!scripts/ping',
47
+ 'lib/order!scripts/plugins',
48
+ 'lib/order!scripts/query',
49
+ 'lib/order!scripts/replication',
50
+ 'lib/order!scripts/schema-browser',
51
+ 'lib/order!scripts/threads'
52
+ ],
53
+ function( $ )
54
+ {
55
+ app.run();
56
+ }
57
+ );