resque-web 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (286) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +39 -0
  3. data/Rakefile +34 -0
  4. data/app/assets/images/resque_web/idle.png +0 -0
  5. data/app/assets/images/resque_web/lifebuoy.png +0 -0
  6. data/app/assets/images/resque_web/poll.png +0 -0
  7. data/app/assets/images/resque_web/rails.png +0 -0
  8. data/app/assets/images/resque_web/working.png +0 -0
  9. data/app/assets/javascripts/resque_web/application.js +105 -0
  10. data/app/assets/javascripts/resque_web/bootstrap.js.coffee +4 -0
  11. data/app/assets/javascripts/resque_web/jquery.relative-date.js +47 -0
  12. data/app/assets/stylesheets/resque_web/application.css +13 -0
  13. data/app/assets/stylesheets/resque_web/bootstrap_and_overrides.css +146 -0
  14. data/app/controllers/resque_web/application_controller.rb +15 -0
  15. data/app/controllers/resque_web/failures_controller.rb +62 -0
  16. data/app/controllers/resque_web/overview_controller.rb +7 -0
  17. data/app/controllers/resque_web/queues_controller.rb +12 -0
  18. data/app/controllers/resque_web/stats_controller.rb +17 -0
  19. data/app/controllers/resque_web/workers_controller.rb +18 -0
  20. data/app/controllers/resque_web/working_controller.rb +4 -0
  21. data/app/helpers/resque_web/application_helper.rb +65 -0
  22. data/app/helpers/resque_web/failures_helper.rb +54 -0
  23. data/app/helpers/resque_web/overview_helper.rb +6 -0
  24. data/app/helpers/resque_web/queues_helper.rb +72 -0
  25. data/app/helpers/resque_web/stats_helper.rb +54 -0
  26. data/app/helpers/resque_web/workers_helper.rb +16 -0
  27. data/app/helpers/resque_web/working_helper.rb +19 -0
  28. data/app/views/layouts/resque_web/application.html.erb +58 -0
  29. data/app/views/resque_web/failures/_failed_job.html.erb +53 -0
  30. data/app/views/resque_web/failures/_overview.html.erb +24 -0
  31. data/app/views/resque_web/failures/index.html.erb +33 -0
  32. data/app/views/resque_web/failures/show.html.erb +20 -0
  33. data/app/views/resque_web/overview/show.html.erb +4 -0
  34. data/app/views/resque_web/queues/_queues.html.erb +4 -0
  35. data/app/views/resque_web/queues/_queues_advanced.html.erb +14 -0
  36. data/app/views/resque_web/queues/_queues_basic.html.erb +17 -0
  37. data/app/views/resque_web/queues/index.html.erb +1 -0
  38. data/app/views/resque_web/queues/show.html.erb +26 -0
  39. data/app/views/resque_web/stats/key.html.erb +26 -0
  40. data/app/views/resque_web/stats/keys.html.erb +19 -0
  41. data/app/views/resque_web/stats/redis.html.erb +14 -0
  42. data/app/views/resque_web/stats/resque.html.erb +14 -0
  43. data/app/views/resque_web/workers/index.html.erb +19 -0
  44. data/app/views/resque_web/workers/show.html.erb +38 -0
  45. data/app/views/resque_web/working/_working.html.erb +34 -0
  46. data/app/views/resque_web/working/index.html.erb +1 -0
  47. data/config/initializers/resque_config.rb +3 -0
  48. data/config/routes.rb +26 -0
  49. data/lib/resque_web.rb +4 -0
  50. data/lib/resque_web/engine.rb +8 -0
  51. data/lib/resque_web/version.rb +3 -0
  52. data/test/dummy/Rakefile +6 -0
  53. data/test/dummy/app/assets/javascripts/application.js +13 -0
  54. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  55. data/test/dummy/app/controllers/application_controller.rb +5 -0
  56. data/test/dummy/app/helpers/application_helper.rb +2 -0
  57. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  58. data/test/dummy/bin/bundle +3 -0
  59. data/test/dummy/bin/rails +4 -0
  60. data/test/dummy/bin/rake +4 -0
  61. data/test/dummy/config.ru +4 -0
  62. data/test/dummy/config/application.rb +23 -0
  63. data/test/dummy/config/boot.rb +5 -0
  64. data/test/dummy/config/database.yml +25 -0
  65. data/test/dummy/config/environment.rb +5 -0
  66. data/test/dummy/config/environments/development.rb +29 -0
  67. data/test/dummy/config/environments/production.rb +80 -0
  68. data/test/dummy/config/environments/test.rb +36 -0
  69. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  70. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  71. data/test/dummy/config/initializers/inflections.rb +16 -0
  72. data/test/dummy/config/initializers/mime_types.rb +5 -0
  73. data/test/dummy/config/initializers/secret_token.rb +12 -0
  74. data/test/dummy/config/initializers/session_store.rb +3 -0
  75. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  76. data/test/dummy/config/locales/en.yml +23 -0
  77. data/test/dummy/config/routes.rb +4 -0
  78. data/test/dummy/db/development.sqlite3 +0 -0
  79. data/test/dummy/db/schema.rb +16 -0
  80. data/test/dummy/db/test.sqlite3 +0 -0
  81. data/test/dummy/log/test.log +1351 -0
  82. data/test/dummy/public/404.html +58 -0
  83. data/test/dummy/public/422.html +58 -0
  84. data/test/dummy/public/500.html +57 -0
  85. data/test/dummy/public/favicon.ico +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/00d7e4d5eefd54b7a2b5415b3f4f0619 +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/02a14af754d35f9d015020c827dc4aad +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/060ba1e3c27350033cb45603b40ec988 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/0aa776b181456a7f52abf642461a339d +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/0ad1874459c89c2b7b055fbfc086093c +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/0d7923c4212365467631d19aafa9ae2c +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/14882e8f1f7d019b37950944b1053585 +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/15d6969ab8e6cc86d7e4ec72a9f29473 +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/16bf950594dc4e49b471963acc1a15d4 +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/1a3e7714b622f1753a451d9417ce2934 +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/1cabd5edcfb985bf0e754597f453c2d8 +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/1f93ad5cf36f5c7e5bec2b9cecedfe5c +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/201c8ed8e16a6bad90959a270eb42af5 +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/2352f28661a506c2c3e144d28bf6a6ca +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/2359b362b8c593ecacced9da62d27781 +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/23d4f21bc0a61aa91d818a1cbefbfa38 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/24fe9e2e6b73f666f6f50460b5fe12db +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/267d0243760c55e0ff8039158fbfa98d +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/2768ee82dea9ebd337e20faa4c08eda4 +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/29c7be01674c14314b1321da043c31cd +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/2b60e487f5394d3820f0d9008328de94 +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/32fdb0387d5cd8aba5f0185f10ccaf6b +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/36bf84c5368755f6fbc0c1808cfe7c5d +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/373b0c58027ae58f732cc7e48e62a522 +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/3fde4850b9ad7516ecd360a4c20cae8b +0 -0
  114. data/test/dummy/tmp/cache/assets/development/sprockets/47e84a019922f151c4815a3cd738beb6 +0 -0
  115. data/test/dummy/tmp/cache/assets/development/sprockets/4d22200fb380d8ae9d5f07525088622f +0 -0
  116. data/test/dummy/tmp/cache/assets/development/sprockets/4ef303154e5471cbc5a1b7b312a5fbd3 +0 -0
  117. data/test/dummy/tmp/cache/assets/development/sprockets/4ff25675e9d69ac5d68dff1d4372f3d1 +0 -0
  118. data/test/dummy/tmp/cache/assets/development/sprockets/50caadcf8e73c45ce4720b9a1f6f833d +0 -0
  119. data/test/dummy/tmp/cache/assets/development/sprockets/510c0a3f6fbee936a507ab77436c1713 +0 -0
  120. data/test/dummy/tmp/cache/assets/development/sprockets/530c2753f447f8c666f628c5b5d65782 +0 -0
  121. data/test/dummy/tmp/cache/assets/development/sprockets/54745c7a7543c4a5899cf4a7c285c505 +0 -0
  122. data/test/dummy/tmp/cache/assets/development/sprockets/58c7ee7b861e3bd17b1eb3c09a0ccb7e +0 -0
  123. data/test/dummy/tmp/cache/assets/development/sprockets/5ae7043abf033ad9c1db3190239296f4 +0 -0
  124. data/test/dummy/tmp/cache/assets/development/sprockets/5d4f24f37f52ec24be03c3ae69a710c2 +0 -0
  125. data/test/dummy/tmp/cache/assets/development/sprockets/5e3a1f4192671516ef3c5b040d3a04ec +0 -0
  126. data/test/dummy/tmp/cache/assets/development/sprockets/6104f6b3d705c20e2485d2bb6f388f11 +0 -0
  127. data/test/dummy/tmp/cache/assets/development/sprockets/61883ec63e4f9e11b14de9de4ca5157c +0 -0
  128. data/test/dummy/tmp/cache/assets/development/sprockets/61a6ced52f8ef4bc0e18a0f42c45376e +0 -0
  129. data/test/dummy/tmp/cache/assets/development/sprockets/67bdb77a662fa6c60ca6ec804ec4e72c +0 -0
  130. data/test/dummy/tmp/cache/assets/development/sprockets/67c23683dbf4e2e805770a041018f256 +0 -0
  131. data/test/dummy/tmp/cache/assets/development/sprockets/6c9f5bc4bee5fb0d8056b4c75fafef1e +0 -0
  132. data/test/dummy/tmp/cache/assets/development/sprockets/6e4717cabfe91d260f46c4adb0acae43 +0 -0
  133. data/test/dummy/tmp/cache/assets/development/sprockets/6ee0033c04cc130b81becd605709135b +0 -0
  134. data/test/dummy/tmp/cache/assets/development/sprockets/706b6b4aca8f925cbbff8a4bf161cd03 +0 -0
  135. data/test/dummy/tmp/cache/assets/development/sprockets/722f2a204ab15e0261bc526aa3ea4a3d +0 -0
  136. data/test/dummy/tmp/cache/assets/development/sprockets/79973091687030ef9b77e73884ab0c78 +0 -0
  137. data/test/dummy/tmp/cache/assets/development/sprockets/7bdd86db98ea61e2b45fa7a427617a3c +0 -0
  138. data/test/dummy/tmp/cache/assets/development/sprockets/7eab29f4bea09503894bcabf91a971b0 +0 -0
  139. data/test/dummy/tmp/cache/assets/development/sprockets/7eadf8ac6771f3b20086c935c28b0b95 +0 -0
  140. data/test/dummy/tmp/cache/assets/development/sprockets/815e702f76d5de58787af0b2954544b4 +0 -0
  141. data/test/dummy/tmp/cache/assets/development/sprockets/821dd3a673cddb023723b5a4b98fd493 +0 -0
  142. data/test/dummy/tmp/cache/assets/development/sprockets/8362592cdd4c1b1517d5e3fba760f0d3 +0 -0
  143. data/test/dummy/tmp/cache/assets/development/sprockets/8855c560fba1bd85e26f55568144a4d5 +0 -0
  144. data/test/dummy/tmp/cache/assets/development/sprockets/885603ea8649d78da8ba6674b31dd289 +0 -0
  145. data/test/dummy/tmp/cache/assets/development/sprockets/88e93f0cb6b7ecfaf55472f4aade58f9 +0 -0
  146. data/test/dummy/tmp/cache/assets/development/sprockets/8c71f2e04c07ba078f3fed661fea07ca +0 -0
  147. data/test/dummy/tmp/cache/assets/development/sprockets/8c86ace126a96b8c90b30f12a136fa81 +0 -0
  148. data/test/dummy/tmp/cache/assets/development/sprockets/8d0a322f394a2e12a350a4caf9b2c80e +0 -0
  149. data/test/dummy/tmp/cache/assets/development/sprockets/8fbf100e961e22baca23d1850b41e4d5 +0 -0
  150. data/test/dummy/tmp/cache/assets/development/sprockets/9048f98bf002a866ef7831c71f7124d6 +0 -0
  151. data/test/dummy/tmp/cache/assets/development/sprockets/92ad487c49bf84126118e1ada216eb52 +0 -0
  152. data/test/dummy/tmp/cache/assets/development/sprockets/938ed33abaeec8bfc22e533de5d92fd6 +0 -0
  153. data/test/dummy/tmp/cache/assets/development/sprockets/9780116ab7edfbe2fc71dab2b7d361f8 +0 -0
  154. data/test/dummy/tmp/cache/assets/development/sprockets/99cfb6fcfcd8fc23cc41ccfa12576a38 +0 -0
  155. data/test/dummy/tmp/cache/assets/development/sprockets/9a13af754490df860af9928bcd00fbd3 +0 -0
  156. data/test/dummy/tmp/cache/assets/development/sprockets/9b1a227146b80c04976c0a885c248f82 +0 -0
  157. data/test/dummy/tmp/cache/assets/development/sprockets/9f48e8c551b5f898ca5667d92067e33d +0 -0
  158. data/test/dummy/tmp/cache/assets/development/sprockets/a0113b5b044a3468edab999708723b3d +0 -0
  159. data/test/dummy/tmp/cache/assets/development/sprockets/a64f702451323ab621d1836cdb352123 +0 -0
  160. data/test/dummy/tmp/cache/assets/development/sprockets/aa5c2d7aaabb3df93a734411e42a3bfc +0 -0
  161. data/test/dummy/tmp/cache/assets/development/sprockets/abd1afcb16ba6e09d6002038d03d56b7 +0 -0
  162. data/test/dummy/tmp/cache/assets/development/sprockets/acda3fb5202cc9aefb599fd43a058105 +0 -0
  163. data/test/dummy/tmp/cache/assets/development/sprockets/ade126a20aa1092d23cc0afaf17c164b +0 -0
  164. data/test/dummy/tmp/cache/assets/development/sprockets/ae5d2a05a28b6aea379acad80dd0b343 +0 -0
  165. data/test/dummy/tmp/cache/assets/development/sprockets/b02ffe2d07d7ce606d1c3a0656d82bfe +0 -0
  166. data/test/dummy/tmp/cache/assets/development/sprockets/b13218598c5f77a5c239c023e3fff575 +0 -0
  167. data/test/dummy/tmp/cache/assets/development/sprockets/b1952fdaabef91d96f551aead4200069 +0 -0
  168. data/test/dummy/tmp/cache/assets/development/sprockets/b1d2f68953967d51ade8c6d223c2a2aa +0 -0
  169. data/test/dummy/tmp/cache/assets/development/sprockets/b4505cc242ed408c99b7b2466d1f6099 +0 -0
  170. data/test/dummy/tmp/cache/assets/development/sprockets/b5e993500308f32fff09cd7e0ee89efd +0 -0
  171. data/test/dummy/tmp/cache/assets/development/sprockets/b99c09238dcefa3d795f9f7594d819b7 +0 -0
  172. data/test/dummy/tmp/cache/assets/development/sprockets/bae95ffbad9e9c33e3d4492a4b986c0b +0 -0
  173. data/test/dummy/tmp/cache/assets/development/sprockets/baf363f79f6cd9b6a2b3688b77b58aba +0 -0
  174. data/test/dummy/tmp/cache/assets/development/sprockets/bc2f95ead37a4ea1f050f6f21a446d7c +0 -0
  175. data/test/dummy/tmp/cache/assets/development/sprockets/be47e0dd1cd9914997311db690cf38d7 +0 -0
  176. data/test/dummy/tmp/cache/assets/development/sprockets/bfc8b2b4f4c3f91fdc360b426adb2d94 +0 -0
  177. data/test/dummy/tmp/cache/assets/development/sprockets/c0a0dbfbf315a3edf26670c0f5ca7ecb +0 -0
  178. data/test/dummy/tmp/cache/assets/development/sprockets/c11cf414168c34e88a7c152937e0041c +0 -0
  179. data/test/dummy/tmp/cache/assets/development/sprockets/c2607067849ffce81a050a64bdf2e31b +0 -0
  180. data/test/dummy/tmp/cache/assets/development/sprockets/c29df33a00fdc6a29f73386c3e0ae5f4 +0 -0
  181. data/test/dummy/tmp/cache/assets/development/sprockets/c4902d10c0dbd2ef1e2edbb71c13456a +0 -0
  182. data/test/dummy/tmp/cache/assets/development/sprockets/c79e7b418287c2b4155c8aecd24be5a7 +0 -0
  183. data/test/dummy/tmp/cache/assets/development/sprockets/c7f7c001ba2ad5623ead9e6f2d6188e9 +0 -0
  184. data/test/dummy/tmp/cache/assets/development/sprockets/c81b1182b5c851c35680c7acc88d4812 +0 -0
  185. data/test/dummy/tmp/cache/assets/development/sprockets/c90e9c573e54b170859449cb2ceb3a7a +0 -0
  186. data/test/dummy/tmp/cache/assets/development/sprockets/c981eb8fa4e3e9ae04dbf1b7b8d7f395 +0 -0
  187. data/test/dummy/tmp/cache/assets/development/sprockets/cb1265ab418e2013b182c8deafcf897e +0 -0
  188. data/test/dummy/tmp/cache/assets/development/sprockets/cee0dd733846ecda4ac940c6f033fb28 +0 -0
  189. data/test/dummy/tmp/cache/assets/development/sprockets/ceebd7d45f23e34cda37b878e2af5b18 +0 -0
  190. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  191. data/test/dummy/tmp/cache/assets/development/sprockets/d0cf471bea69c5583f5cb22f924c9d81 +0 -0
  192. data/test/dummy/tmp/cache/assets/development/sprockets/d2c37ec460e77ea6ea41bbc670889f89 +0 -0
  193. data/test/dummy/tmp/cache/assets/development/sprockets/d3347e44949d8909be6fb1d64cfb9967 +0 -0
  194. data/test/dummy/tmp/cache/assets/development/sprockets/d592f7f190f2ed0852437aeaf413ffb7 +0 -0
  195. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  196. data/test/dummy/tmp/cache/assets/development/sprockets/d9f00b466d45c065d1281b100de9311f +0 -0
  197. data/test/dummy/tmp/cache/assets/development/sprockets/dc0f4af8c3937297fe2fd3f5f4906763 +0 -0
  198. data/test/dummy/tmp/cache/assets/development/sprockets/e05ff4f8801c918dc89fef1d37880568 +0 -0
  199. data/test/dummy/tmp/cache/assets/development/sprockets/e2bae9a171482111f585b481dc2c04c8 +0 -0
  200. data/test/dummy/tmp/cache/assets/development/sprockets/e46693bc631ec8f6c63f67a75c33f785 +0 -0
  201. data/test/dummy/tmp/cache/assets/development/sprockets/e5d439d83d3f264ee47b9f82005a4eef +0 -0
  202. data/test/dummy/tmp/cache/assets/development/sprockets/e64aa4663498f985d9a5c2c65a0f2401 +0 -0
  203. data/test/dummy/tmp/cache/assets/development/sprockets/eb8ceeb4c92c6bd813a541d672206eff +0 -0
  204. data/test/dummy/tmp/cache/assets/development/sprockets/ebf2449fa00d257e175bd62b6a757bd3 +0 -0
  205. data/test/dummy/tmp/cache/assets/development/sprockets/eece52c31fc27f6dbb1d3e9dad9c6a67 +0 -0
  206. data/test/dummy/tmp/cache/assets/development/sprockets/f28711adf8b5584c6956034b86f4cbee +0 -0
  207. data/test/dummy/tmp/cache/assets/development/sprockets/f375226842bb99acc2a5a8f2396b54d3 +0 -0
  208. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  209. data/test/dummy/tmp/cache/assets/development/sprockets/f8181ea5c5ea111ed8a3f0c5c0d59ebe +0 -0
  210. data/test/dummy/tmp/cache/assets/development/sprockets/f83b6fecae01f81acf9c39e710258b98 +0 -0
  211. data/test/dummy/tmp/cache/assets/development/sprockets/fa282debca304f7fac3307d091f5ecac +0 -0
  212. data/test/dummy/tmp/cache/assets/development/sprockets/fab96f7950f4025de51c865e118904a7 +0 -0
  213. data/test/dummy/tmp/cache/assets/development/sprockets/fee8b1f906f22a2ad21ffc8f21dec56b +0 -0
  214. data/test/dummy/tmp/cache/assets/development/sprockets/ff4777d609a0a67e637cc1530d6dc7b2 +0 -0
  215. data/test/dummy/tmp/cache/assets/test/sprockets/00d7e4d5eefd54b7a2b5415b3f4f0619 +0 -0
  216. data/test/dummy/tmp/cache/assets/test/sprockets/0aa776b181456a7f52abf642461a339d +0 -0
  217. data/test/dummy/tmp/cache/assets/test/sprockets/0ad1874459c89c2b7b055fbfc086093c +0 -0
  218. data/test/dummy/tmp/cache/assets/test/sprockets/0d7923c4212365467631d19aafa9ae2c +0 -0
  219. data/test/dummy/tmp/cache/assets/test/sprockets/16bf950594dc4e49b471963acc1a15d4 +0 -0
  220. data/test/dummy/tmp/cache/assets/test/sprockets/1a3e7714b622f1753a451d9417ce2934 +0 -0
  221. data/test/dummy/tmp/cache/assets/test/sprockets/201c8ed8e16a6bad90959a270eb42af5 +0 -0
  222. data/test/dummy/tmp/cache/assets/test/sprockets/2359b362b8c593ecacced9da62d27781 +0 -0
  223. data/test/dummy/tmp/cache/assets/test/sprockets/23d4f21bc0a61aa91d818a1cbefbfa38 +0 -0
  224. data/test/dummy/tmp/cache/assets/test/sprockets/267d0243760c55e0ff8039158fbfa98d +0 -0
  225. data/test/dummy/tmp/cache/assets/test/sprockets/2b60e487f5394d3820f0d9008328de94 +0 -0
  226. data/test/dummy/tmp/cache/assets/test/sprockets/32fdb0387d5cd8aba5f0185f10ccaf6b +0 -0
  227. data/test/dummy/tmp/cache/assets/test/sprockets/373b0c58027ae58f732cc7e48e62a522 +0 -0
  228. data/test/dummy/tmp/cache/assets/test/sprockets/4d22200fb380d8ae9d5f07525088622f +0 -0
  229. data/test/dummy/tmp/cache/assets/test/sprockets/4ef303154e5471cbc5a1b7b312a5fbd3 +0 -0
  230. data/test/dummy/tmp/cache/assets/test/sprockets/50caadcf8e73c45ce4720b9a1f6f833d +0 -0
  231. data/test/dummy/tmp/cache/assets/test/sprockets/510c0a3f6fbee936a507ab77436c1713 +0 -0
  232. data/test/dummy/tmp/cache/assets/test/sprockets/54745c7a7543c4a5899cf4a7c285c505 +0 -0
  233. data/test/dummy/tmp/cache/assets/test/sprockets/5d4f24f37f52ec24be03c3ae69a710c2 +0 -0
  234. data/test/dummy/tmp/cache/assets/test/sprockets/5e3a1f4192671516ef3c5b040d3a04ec +0 -0
  235. data/test/dummy/tmp/cache/assets/test/sprockets/61883ec63e4f9e11b14de9de4ca5157c +0 -0
  236. data/test/dummy/tmp/cache/assets/test/sprockets/61a6ced52f8ef4bc0e18a0f42c45376e +0 -0
  237. data/test/dummy/tmp/cache/assets/test/sprockets/67c23683dbf4e2e805770a041018f256 +0 -0
  238. data/test/dummy/tmp/cache/assets/test/sprockets/6c9f5bc4bee5fb0d8056b4c75fafef1e +0 -0
  239. data/test/dummy/tmp/cache/assets/test/sprockets/6e4717cabfe91d260f46c4adb0acae43 +0 -0
  240. data/test/dummy/tmp/cache/assets/test/sprockets/722f2a204ab15e0261bc526aa3ea4a3d +0 -0
  241. data/test/dummy/tmp/cache/assets/test/sprockets/815e702f76d5de58787af0b2954544b4 +0 -0
  242. data/test/dummy/tmp/cache/assets/test/sprockets/8362592cdd4c1b1517d5e3fba760f0d3 +0 -0
  243. data/test/dummy/tmp/cache/assets/test/sprockets/8855c560fba1bd85e26f55568144a4d5 +0 -0
  244. data/test/dummy/tmp/cache/assets/test/sprockets/88e93f0cb6b7ecfaf55472f4aade58f9 +0 -0
  245. data/test/dummy/tmp/cache/assets/test/sprockets/8c71f2e04c07ba078f3fed661fea07ca +0 -0
  246. data/test/dummy/tmp/cache/assets/test/sprockets/8d0a322f394a2e12a350a4caf9b2c80e +0 -0
  247. data/test/dummy/tmp/cache/assets/test/sprockets/8fbf100e961e22baca23d1850b41e4d5 +0 -0
  248. data/test/dummy/tmp/cache/assets/test/sprockets/92ad487c49bf84126118e1ada216eb52 +0 -0
  249. data/test/dummy/tmp/cache/assets/test/sprockets/938ed33abaeec8bfc22e533de5d92fd6 +0 -0
  250. data/test/dummy/tmp/cache/assets/test/sprockets/9780116ab7edfbe2fc71dab2b7d361f8 +0 -0
  251. data/test/dummy/tmp/cache/assets/test/sprockets/abd1afcb16ba6e09d6002038d03d56b7 +0 -0
  252. data/test/dummy/tmp/cache/assets/test/sprockets/ade126a20aa1092d23cc0afaf17c164b +0 -0
  253. data/test/dummy/tmp/cache/assets/test/sprockets/ae5d2a05a28b6aea379acad80dd0b343 +0 -0
  254. data/test/dummy/tmp/cache/assets/test/sprockets/b13218598c5f77a5c239c023e3fff575 +0 -0
  255. data/test/dummy/tmp/cache/assets/test/sprockets/b1952fdaabef91d96f551aead4200069 +0 -0
  256. data/test/dummy/tmp/cache/assets/test/sprockets/b1d2f68953967d51ade8c6d223c2a2aa +0 -0
  257. data/test/dummy/tmp/cache/assets/test/sprockets/b4505cc242ed408c99b7b2466d1f6099 +0 -0
  258. data/test/dummy/tmp/cache/assets/test/sprockets/b99c09238dcefa3d795f9f7594d819b7 +0 -0
  259. data/test/dummy/tmp/cache/assets/test/sprockets/c11cf414168c34e88a7c152937e0041c +0 -0
  260. data/test/dummy/tmp/cache/assets/test/sprockets/c29df33a00fdc6a29f73386c3e0ae5f4 +0 -0
  261. data/test/dummy/tmp/cache/assets/test/sprockets/c90e9c573e54b170859449cb2ceb3a7a +0 -0
  262. data/test/dummy/tmp/cache/assets/test/sprockets/d2c37ec460e77ea6ea41bbc670889f89 +0 -0
  263. data/test/dummy/tmp/cache/assets/test/sprockets/d592f7f190f2ed0852437aeaf413ffb7 +0 -0
  264. data/test/dummy/tmp/cache/assets/test/sprockets/d9f00b466d45c065d1281b100de9311f +0 -0
  265. data/test/dummy/tmp/cache/assets/test/sprockets/e05ff4f8801c918dc89fef1d37880568 +0 -0
  266. data/test/dummy/tmp/cache/assets/test/sprockets/e46693bc631ec8f6c63f67a75c33f785 +0 -0
  267. data/test/dummy/tmp/cache/assets/test/sprockets/e5d439d83d3f264ee47b9f82005a4eef +0 -0
  268. data/test/dummy/tmp/cache/assets/test/sprockets/eb8ceeb4c92c6bd813a541d672206eff +0 -0
  269. data/test/dummy/tmp/cache/assets/test/sprockets/f8181ea5c5ea111ed8a3f0c5c0d59ebe +0 -0
  270. data/test/dummy/tmp/cache/assets/test/sprockets/fee8b1f906f22a2ad21ffc8f21dec56b +0 -0
  271. data/test/functional/failures_controller_test.rb +73 -0
  272. data/test/functional/overview_controller_test.rb +7 -0
  273. data/test/functional/queues_controller_test.rb +20 -0
  274. data/test/functional/stats_controller_test.rb +7 -0
  275. data/test/functional/workers_controller_test.rb +7 -0
  276. data/test/functional/working_controller_test.rb +7 -0
  277. data/test/test_helper.rb +23 -0
  278. data/test/unit/helpers/failures_helper_test.rb +4 -0
  279. data/test/unit/helpers/jobs_helper_test.rb +4 -0
  280. data/test/unit/helpers/overview_helper_test.rb +4 -0
  281. data/test/unit/helpers/queues_helper_test.rb +4 -0
  282. data/test/unit/helpers/retry_controller_helper_test.rb +4 -0
  283. data/test/unit/helpers/stats_helper_test.rb +4 -0
  284. data/test/unit/helpers/workers_helper_test.rb +4 -0
  285. data/test/unit/helpers/working_helper_test.rb +4 -0
  286. metadata +632 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0c63e3387fdfaa4551e65a0d88d2877debf7182b
4
+ data.tar.gz: 1a4c31c3d7246e5e8f058a1740daf050dd533b6a
5
+ SHA512:
6
+ metadata.gz: 37b97943976ef3d64b50dc927d1a6c26564a0dffa76eae7dc11916e440cfec39301a3661453cbff05dcb11744c38ecca1caa2c66254e6b1f976e62afb3afa108
7
+ data.tar.gz: 7f7ee444a27d83262adffcdd99c64dfd1a01804bb6043c3389c407280855d7b687d21ef947290a76019efc9b45aa05d57c0dbec6f14a8dffd361aeaa5ae9272e
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ resque-web
2
+ ==========
3
+ [![Build Status](https://travis-ci.org/resque/resque-web.png?branch=master)](https://travis-ci.org/resque/resque-web)
4
+ [![Dependency Status](https://gemnasium.com/resque/resque-web.png)](https://gemnasium.com/resque/resque-web)
5
+ [![Code Climate](https://codeclimate.com/github/resque/resque-web.png)](https://codeclimate.com/github/resque/resque-web)
6
+ [![Coverage Status](https://coveralls.io/repos/resque/resque-web/badge.png?branch=master)](https://coveralls.io/r/resque/resque-web)
7
+
8
+ A Rails-based frontend to the [Resque](https://github.com/resque/resque) job
9
+ queue system. This provides a similar interface to the existing Sinatra
10
+ application that comes bundled with Resque, but deploys like a Rails application
11
+ and leverages Rails conventions for factoring things like controllers, helpers,
12
+ and views.
13
+
14
+ More documentation coming soon!
15
+
16
+ ## Starting
17
+ Resque web is built as a rails engine.
18
+
19
+ Add it to your gemfile.
20
+
21
+ ```
22
+ gem 'resque-web'
23
+ ```
24
+
25
+ Mount it in your config/routes.rb.
26
+
27
+ ```
28
+ mount ResqueWeb::Engine => "/resque_web"
29
+ ```
30
+
31
+ If you need a non-default resque server, use this environment variable.
32
+
33
+ ```
34
+ RAILS_RESQUE_REDIS=123.x.0.456:6712
35
+ ```
36
+
37
+ ## Screenshot
38
+
39
+ ![Screenshot](http://i.imgur.com/LkNgl.png)
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'ResqueWeb'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task :default => :test
@@ -0,0 +1,105 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require twitter/bootstrap
16
+ //= require_tree .
17
+
18
+ $(function() {
19
+ var poll_interval = 2
20
+
21
+ var relatizer = function(){
22
+ var dt = $(this).text();
23
+ $(this).relativeDate();
24
+ var relatized = $(this).text();
25
+
26
+ if ($(this).parents("a").length > 0 || $(this).is("a")) {
27
+ $(this).relativeDate()
28
+ if (!$(this).attr('title')) {
29
+ $(this).attr('title', dt)
30
+ }
31
+ } else {
32
+ $(this)
33
+ .text('')
34
+ .append( $('<a href="#" class="toggle_format" title="' + dt + '" />')
35
+ .append('<span class="date_time">' + dt +
36
+ '</span><span class="relatized_time">' +
37
+ relatized + '</span>') )
38
+ }
39
+ };
40
+
41
+ $('.time').each(relatizer);
42
+
43
+ $('.time a.toggle_format .date_time').hide()
44
+
45
+ var format_toggler = function(){
46
+ $('.time a.toggle_format span').toggle()
47
+ $(this).attr('title', $('span:hidden',this).text())
48
+ return false
49
+ };
50
+
51
+ $('.time a.toggle_format').click(format_toggler);
52
+
53
+ $('.backtrace').click(function() {
54
+ $(this).next().toggle()
55
+ return false
56
+ })
57
+
58
+ var poll_start = function(el) {
59
+ var href = el.attr('href')
60
+ el.parent().text('Starting...')
61
+ $("#main").addClass('polling')
62
+
63
+ setInterval(function() {
64
+ $.ajax({dataType: 'text', type: 'get', url: href, success: function(data) {
65
+ $('#main').html(data)
66
+ $('#main .time').relativeDate()
67
+ }})
68
+ }, poll_interval * 1000)
69
+
70
+ location.hash = '#poll'
71
+
72
+ return false
73
+ };
74
+
75
+ if (location.hash == '#poll') poll_start($('a[rel=poll]'))
76
+
77
+ $('a[rel=poll]').click(function() { return poll_start($(this)) })
78
+
79
+ $('ul.failed li').hover(function() {
80
+ $(this).addClass('hover');
81
+ }, function() {
82
+ $(this).removeClass('hover');
83
+ })
84
+
85
+ $('ul.failed a[rel=retry]').click(function() {
86
+ var href = $(this).attr('href');
87
+ $(this).text('Retrying...');
88
+ var parent = $(this).parent();
89
+ $.ajax({dataType: 'text', type: 'get', url: href, success: function(data) {
90
+ parent.html('Retried <b><span class="time">' + data + '</span></b>');
91
+ relatizer.apply($('.time', parent));
92
+ $('.date_time', parent).hide();
93
+ $('a.toggle_format span', parent).click(format_toggler);
94
+ }});
95
+ return false;
96
+ })
97
+
98
+ $('#clear-failed-jobs').click(function(){
99
+ return confirm('Are you sure you want to clear ALL failed jobs?');
100
+ })
101
+
102
+ $('#retry-failed-jobs').click(function(){
103
+ return confirm('Are you sure you want to retry ALL failed jobs?');
104
+ })
105
+ })
@@ -0,0 +1,4 @@
1
+ jQuery ->
2
+ $("a[rel=popover]").popover()
3
+ $(".tooltip").tooltip()
4
+ $("a[rel=tooltip]").tooltip()
@@ -0,0 +1,47 @@
1
+ /**
2
+ * jQ plugin adapted from 37s' relative date tool
3
+ * Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time
4
+ * @see http://37signals.com/svn/posts/1557-javascript-makes-relative-times-compatible-with-caching
5
+ */
6
+ (function($, window, undefined){
7
+
8
+ $.fn.relativeDate = function(opts){
9
+ var defaults = {
10
+ dateGetter: function(el){
11
+ return $(el).text();
12
+ }
13
+ },
14
+ options = $.extend({}, defaults, opts),
15
+ time_ago_in_words_with_parsing = function(from) {
16
+ var date = new Date;
17
+ date.setTime(Date.parse(from));
18
+ return time_ago_in_words(date);
19
+ },
20
+ time_ago_in_words = function(from) {
21
+ return distance_of_time_in_words(new Date, from);
22
+ },
23
+ distance_of_time_in_words = function(to, from) {
24
+ var distance_in_seconds = ((to - from) / 1000);
25
+ var distance_in_minutes = Math.floor(distance_in_seconds / 60);
26
+
27
+ if (distance_in_minutes == 0) { return 'less than a minute ago'; }
28
+ if (distance_in_minutes == 1) { return 'a minute ago'; }
29
+ if (distance_in_minutes < 45) { return distance_in_minutes + ' minutes ago'; }
30
+ if (distance_in_minutes < 90) { return 'about 1 hour ago'; }
31
+ if (distance_in_minutes < 1440) { return 'about ' + Math.round(distance_in_minutes / 60) + ' hours ago'; }
32
+ if (distance_in_minutes < 2880) { return '1 day ago'; }
33
+ if (distance_in_minutes < 43200) { return Math.floor(distance_in_minutes / 1440) + ' days ago'; }
34
+ if (distance_in_minutes < 86400) { return 'about 1 month ago'; }
35
+ if (distance_in_minutes < 525960) { return Math.floor(distance_in_minutes / 43200) + ' months ago'; }
36
+ if (distance_in_minutes < 1051199) { return 'about 1 year ago'; }
37
+
38
+ return 'over ' + Math.floor(distance_in_minutes / 525960) + ' years ago';
39
+ }
40
+
41
+ return $(this).each(function(){
42
+ date_str = options.dateGetter(this);
43
+ $(this).html(time_ago_in_words_with_parsing(date_str));
44
+ });
45
+ };
46
+
47
+ })(jQuery, window);
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,146 @@
1
+ /*
2
+ =require twitter-bootstrap-static/bootstrap
3
+
4
+ Use Font Awesome icons (default)
5
+ To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
6
+ =require twitter-bootstrap-static/fontawesome
7
+ */
8
+
9
+ html {
10
+ background: #efefef;
11
+ }
12
+
13
+ body {
14
+ padding-top: 40px;
15
+ }
16
+
17
+ .navbar {
18
+ border-bottom: 5px solid #ce1212;
19
+ }
20
+
21
+ .navbar .brand {
22
+ color: white;
23
+ }
24
+
25
+ .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
26
+ border-width: 0;
27
+ }
28
+
29
+ .navbar-inverse .nav>.active {
30
+ background: #fa2424; /* Old browsers */
31
+ background: -moz-linear-gradient(top, #fa2424 0%, #ce1212 100%); /* FF3.6+ */
32
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fa2424), color-stop(100%,#ce1212)); /* Chrome,Safari4+ */
33
+ background: -webkit-linear-gradient(top, #fa2424 0%,#ce1212 100%); /* Chrome10+,Safari5.1+ */
34
+ background: -o-linear-gradient(top, #fa2424 0%,#ce1212 100%); /* Opera 11.10+ */
35
+ background: -ms-linear-gradient(top, #fa2424 0%,#ce1212 100%); /* IE10+ */
36
+ background: linear-gradient(to bottom, #fa2424 0%,#ce1212 100%); /* W3C */
37
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fa2424', endColorstr='#ce1212',GradientType=0 ); /* IE6-8 */
38
+ }
39
+
40
+ .navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus {
41
+ background: none;
42
+ }
43
+
44
+ .container h1 { color:#ce1212; font-size: 24px; }
45
+
46
+ .label-info[href], .badge-info[href] {
47
+ background-color: #3A87AD;
48
+ }
49
+
50
+ .logo {
51
+ float: left;
52
+ margin: 2px 5px;
53
+ width: 36px;
54
+ height: 36px;
55
+ }
56
+
57
+ /* The remaining CSS rules come from the legacy Resque application */
58
+ .subnav { padding: 8px 10px 7px 10px; background:#ce1212; font-size:90%;}
59
+ .subnav li { display:inline; line-height: 16px; }
60
+ .subnav li a { color:#fff; text-decoration:none; margin:3px; display:inline-block; background:#dd5b5b; padding:5px; -webkit-border-radius:3px; -moz-border-radius:3px;}
61
+ .subnav li.current a { background:#fff; font-weight:bold; color:#ce1212;}
62
+ .subnav li a:active { background:#b00909;}
63
+
64
+ .container span.hl { background:#efefef; padding:2px;}
65
+ .container h2 { margin:10px 0; font-size:130%;}
66
+ .container table tr th { background:#efefef; color:#888; font-size:15px; font-weight:bold; min-width: 16px; }
67
+ .container table tr td.no-data { text-align:center; padding:40px 0; color:#999; font-style:italic; font-size:130%;}
68
+ .container p { margin:5px 0;}
69
+ .container p.intro { margin-bottom:15px; font-size:85%; color:#999; margin-top:0; line-height:1.3;}
70
+ .container h1.wi { margin-bottom:5px;}
71
+ .container p.sub { font-size:95%; color:#999;}
72
+
73
+ .container table.queues { width:40%;}
74
+ .container table.queues td.queue { font-weight:bold; width:50%;}
75
+ .container table.queues tr.failure td { background:#ffecec; color:#d37474;}
76
+ .container table.queues tr.failure td a{ color:#d37474;}
77
+ .container table.queues td.failure .badge a { color: white; }
78
+ .container table.queues tr.first_failure td { border-top:2px solid #d37474; }
79
+
80
+ .container table.jobs td.class { font-family:Monaco, "Courier New", monospace; font-size:90%; width:50%;}
81
+ .container table.jobs td.args{ width:50%;}
82
+
83
+ .container table.workers td.icon {width:1%; background:#efefef;text-align:center;}
84
+ .container table.workers td.icon img { height: 16px; width: 16px; }
85
+ .container table.workers td.where { width:25%;}
86
+ .container table.workers td.queues { width:35%;}
87
+ .container table.workers td.queues.queue { width:10%;}
88
+ .container table.workers td.process { width:35%;}
89
+ .container table.workers td.process span.waiting { color:#999; font-size:90%;}
90
+ .container table.workers td.process small { font-size:80%; margin-left:5px;}
91
+ .container table.workers td.process code { font-family:Monaco, "Courier New", monospace; font-size:90%;}
92
+ .container table.workers td.process small a { color:#999;}
93
+ .container.polling table.workers tr.working td { background:#f4ffe4; color:#7ac312;}
94
+ .container.polling table.workers tr.working td.where a { color:#7ac312;}
95
+ .container.polling table.workers tr.working td.process code { font-weight:bold;}
96
+
97
+
98
+ .container table.stats th { font-size:100%; width:40%; color:#000;}
99
+ .container hr { border:0; border-top:5px solid #efefef; margin:15px 0;}
100
+
101
+ #footer { padding:10px 5%; background:#efefef; color:#999; font-size:85%; line-height:1.5; border-top:5px solid #ccc; padding-top:10px;}
102
+ #footer p a { color:#999;}
103
+
104
+ .container p.poll { background:url(poll.png) no-repeat 0 2px; padding:3px 0; padding-left:23px; float:right; font-size:85%; }
105
+
106
+ .container ul.failed {margin-top: 20px;}
107
+ .container ul.failed li {
108
+ background: #efefef; /* Old browsers */
109
+ background: -moz-linear-gradient(top, #efefef 0%, #fff 100%); /* FF3.6+ */
110
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#efefef), color-stop(100%,#fff)); /* Chrome,Safari4+ */
111
+ background: -webkit-linear-gradient(top, #efefef 0%,#fff 100%); /* Chrome10+,Safari5.1+ */
112
+ background: -o-linear-gradient(top, #efefef 0%,#fff 100%); /* Opera 11.10+ */
113
+ background: -ms-linear-gradient(top, #efefef 0%,#fff 100%); /* IE10+ */
114
+ background: linear-gradient(to bottom, #efefef 0%,#fff 100%); /* W3C */
115
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#efefef', endColorstr='#fff',GradientType=0 ); /* IE6-8 */
116
+
117
+ margin-top:10px;
118
+ padding:10px;
119
+ overflow:hidden;
120
+ border:1px solid #ccc;
121
+ -webkit-border-radius:5px;
122
+ -moz-border-radius:5px;
123
+ border-radius:5px;
124
+ }
125
+ .container ul.failed li dl dt {font-size:80%; color:#999; width:60px; float:left; padding-top:1px; text-align:right;}
126
+ .container ul.failed li dl dd {margin-bottom:10px; margin-left:70px;}
127
+ .container ul.failed li dl dd .retried { float:right; text-align: right; }
128
+ .container ul.failed li dl dd .retried .remove { display:none; margin-top: 8px; }
129
+ .container ul.failed li.hover dl dd .retried .remove { display:block; }
130
+ .container ul.failed li dl dd .controls { display:none; float:right; }
131
+ .container ul.failed li.hover dl dd .controls { display:block; }
132
+ .container ul.failed li dl dd code, .container ul.failed li dl dd pre { font-family:Monaco, "Courier New", monospace; font-size:90%; white-space: pre-wrap;}
133
+ .container ul.failed li dl dd.error a {font-family:Monaco, "Courier New", monospace; font-size:90%; }
134
+ .container ul.failed li dl dd.error pre { margin-top:3px; line-height:1.3;}
135
+
136
+ .container p.pagination { background:#efefef; padding:10px; overflow:hidden;}
137
+ .container p.pagination a.less { float:left;}
138
+ .container p.pagination a.more { float:right;}
139
+
140
+ .container form {float:right; margin-top:-10px;margin-left:10px;}
141
+
142
+ .container .time a.toggle_format {text-decoration:none;}
143
+
144
+ #failed tr.total td {background-color: #FFECEC; color: #D37474; font-size: 15px; font-weight: bold;}
145
+ #failed .center {text-align: center;}
146
+ #failed .failed_class { padding-left: 20px; font-size:12px; }
@@ -0,0 +1,15 @@
1
+ module ResqueWeb
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery
4
+ before_filter :set_subtabs
5
+
6
+ def self.subtabs(*tab_names)
7
+ return defined?(@subtabs) ? @subtabs : [] if tab_names.empty?
8
+ @subtabs = tab_names
9
+ end
10
+
11
+ def set_subtabs(subtabs = self.class.subtabs)
12
+ @subtabs = subtabs
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,62 @@
1
+ module ResqueWeb
2
+ class FailuresController < ApplicationController
3
+
4
+ # Display all jobs in the failure queue
5
+ #
6
+ # @param [Hash] params
7
+ # @option params [String] :class filters failures shown by class
8
+ # @option params [String] :queue filters failures shown by failure queue name
9
+ def index
10
+ end
11
+
12
+ # remove an individual job from the failure queue
13
+ def destroy
14
+ Resque::Failure.remove(params[:id])
15
+ redirect_to failures_path(redirect_params)
16
+ end
17
+
18
+ # destroy all jobs from the failure queue
19
+ def destroy_all
20
+ queue = params[:queue] || 'failed'
21
+ Resque::Failure.clear(queue)
22
+ redirect_to failures_path(redirect_params)
23
+ end
24
+
25
+ # retry an individual job from the failure queue
26
+ def retry
27
+ reque_single_job(params[:id])
28
+ redirect_to failures_path(redirect_params)
29
+ end
30
+
31
+ # retry all jobs from the failure queue
32
+ def retry_all
33
+ if params[:queue].present? && params[:queue]!="failed"
34
+ Resque::Failure.requeue_queue(params[:queue])
35
+ else
36
+ (Resque::Failure.count-1).downto(0).each { |id| reque_single_job(id) }
37
+ end
38
+ redirect_to failures_path(redirect_params)
39
+ end
40
+
41
+ private
42
+
43
+ #API agnostic for Resque 2 with duck typing on requeue_and_remove
44
+ def reque_single_job(id)
45
+ if Resque::Failure.respond_to?(:requeue_and_remove)
46
+ Resque::Failure.requeue_and_remove(id)
47
+ else
48
+ Resque::Failure.requeue(id)
49
+ Resque::Failure.remove(id)
50
+ end
51
+ end
52
+
53
+ def redirect_params
54
+ {}.tap do |p|
55
+ if params[:queue].present?
56
+ p[:queue] = params[:queue]
57
+ end
58
+ end
59
+ end
60
+
61
+ end
62
+ end