webroar 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (402) hide show
  1. data/CHANGELOG +7 -0
  2. data/README +1 -1
  3. data/doc/user-guide.html +125 -85
  4. data/doc/user-guide.txt +2 -2
  5. data/lib/constant.rb +23 -16
  6. data/lib/db_connect.rb +2 -3
  7. data/lib/installer.rb +17 -10
  8. data/lib/user_interaction.rb +21 -10
  9. data/lib/webroar_command.rb +21 -23
  10. data/src/admin_panel/Gemfile +8 -0
  11. data/src/admin_panel/Rakefile +2 -5
  12. data/src/admin_panel/app/controllers/application_controller.rb +1 -1
  13. data/src/admin_panel/app/controllers/exceptions_controller.rb +25 -26
  14. data/src/admin_panel/app/controllers/graph_controller.rb +2 -1
  15. data/src/admin_panel/app/helpers/admin_helper.rb +1 -1
  16. data/src/admin_panel/app/{models → mailers}/mailer.rb +5 -8
  17. data/src/admin_panel/app/models/app.rb +1 -1
  18. data/src/admin_panel/app/models/app_exception.rb +15 -11
  19. data/src/admin_panel/app/models/app_time_sample.rb +40 -10
  20. data/src/admin_panel/app/models/application_specification.rb +71 -41
  21. data/src/admin_panel/app/models/resource_usage.rb +76 -55
  22. data/src/admin_panel/app/models/url_breakup_time_sample.rb +6 -11
  23. data/src/admin_panel/app/models/url_time_sample.rb +57 -13
  24. data/src/admin_panel/app/views/admin/_application_table.html.erb +5 -5
  25. data/src/admin_panel/app/views/admin/_feedback_partial.html.erb +4 -4
  26. data/src/admin_panel/app/views/admin/_report_bug_partial.html.erb +5 -5
  27. data/src/admin_panel/app/views/admin/change_password_form.html.erb +3 -3
  28. data/src/admin_panel/app/views/admin/configuration.html.erb +6 -6
  29. data/src/admin_panel/app/views/admin/home.html.erb +4 -4
  30. data/src/admin_panel/app/views/admin/index.html.erb +5 -5
  31. data/src/admin_panel/app/views/application_specification/_application_specification_form.html.erb +15 -6
  32. data/src/admin_panel/app/views/exceptions/_add_and_list_exception_classes.html.erb +7 -6
  33. data/src/admin_panel/app/views/exceptions/_exception_backtrace_partial.html.erb +1 -1
  34. data/src/admin_panel/app/views/exceptions/_exception_environment_partial.html.erb +30 -30
  35. data/src/admin_panel/app/views/exceptions/_exception_list_partial.html.erb +11 -11
  36. data/src/admin_panel/app/views/exceptions/_show.html.erb +8 -8
  37. data/src/admin_panel/app/views/exceptions/index.html.erb +0 -1
  38. data/src/admin_panel/app/views/graph/_get_database_data.html.erb +1 -1
  39. data/src/admin_panel/app/views/graph/_get_resource_usage_data_app.html.erb +2 -2
  40. data/src/admin_panel/app/views/graph/_get_resource_usage_data_server.html.erb +2 -2
  41. data/src/admin_panel/app/views/graph/_get_throughput_data.html.erb +2 -2
  42. data/src/admin_panel/app/views/graph/_get_url_data.html.erb +4 -4
  43. data/src/admin_panel/app/views/graph/_pie.html.erb +2 -2
  44. data/src/admin_panel/app/views/graph/_query_date.html.erb +1 -1
  45. data/src/admin_panel/app/views/graph/_query_period.html.erb +1 -1
  46. data/src/admin_panel/app/views/graph/_slider_partial.html.erb +5 -4
  47. data/src/admin_panel/app/views/graph/index.html.erb +0 -1
  48. data/src/admin_panel/app/views/headers/_add_expires_text_box.html.erb +5 -5
  49. data/src/admin_panel/app/views/headers/_expires_by_type_form.html.erb +1 -1
  50. data/src/admin_panel/app/views/headers/_headers_table.html.erb +12 -12
  51. data/src/admin_panel/app/views/layouts/application.html.erb +71 -51
  52. data/src/admin_panel/app/views/mail_specification/_current_spec.html.erb +4 -4
  53. data/src/admin_panel/app/views/mail_specification/_sendmail_form.html.erb +3 -3
  54. data/src/admin_panel/app/views/mail_specification/_smtp_form.html.erb +3 -3
  55. data/src/admin_panel/app/views/server_specification/_add_div.html.erb +4 -4
  56. data/src/admin_panel/app/views/server_specification/_ssl_support_form.html.erb +3 -2
  57. data/src/admin_panel/config.ru +4 -0
  58. data/src/admin_panel/config/application.rb +46 -0
  59. data/src/admin_panel/config/boot.rb +4 -112
  60. data/src/admin_panel/config/environment.rb +4 -85
  61. data/src/admin_panel/config/environments/development.rb +20 -13
  62. data/src/admin_panel/config/environments/production.rb +44 -17
  63. data/src/admin_panel/config/environments/test.rb +31 -18
  64. data/src/admin_panel/config/initializers/application_constants.rb +13 -11
  65. data/src/admin_panel/config/initializers/secret_token.rb +7 -0
  66. data/src/admin_panel/config/initializers/session_store.rb +8 -0
  67. data/src/admin_panel/config/initializers/ssl.rb +6 -2
  68. data/src/admin_panel/config/routes.rb +15 -57
  69. data/src/admin_panel/doc/README_FOR_APP +1 -1
  70. data/src/admin_panel/doc/app/ActionView.html +229 -0
  71. data/src/admin_panel/doc/app/ActionView/Helpers.html +229 -0
  72. data/src/admin_panel/doc/app/ActionView/Helpers/AssetTagHelper.html +277 -0
  73. data/src/admin_panel/doc/app/AdminController.html +814 -0
  74. data/src/admin_panel/doc/app/AdminHelper.html +495 -0
  75. data/src/admin_panel/doc/app/Analytics.html +272 -0
  76. data/src/admin_panel/doc/app/Analytics/Database.html +401 -0
  77. data/src/admin_panel/doc/app/Analytics/ResourceUsage.html +683 -0
  78. data/src/admin_panel/doc/app/Analytics/Throughput.html +488 -0
  79. data/src/admin_panel/doc/app/Analytics/Url.html +484 -0
  80. data/src/admin_panel/doc/app/Analytics/UrlBreakup.html +537 -0
  81. data/src/admin_panel/doc/app/App.html +489 -0
  82. data/src/admin_panel/doc/app/AppException.html +710 -0
  83. data/src/admin_panel/doc/app/AppTimeSample.html +620 -0
  84. data/src/admin_panel/doc/app/ApplicationController.html +239 -0
  85. data/src/admin_panel/doc/app/ApplicationHelper.html +296 -0
  86. data/src/admin_panel/doc/app/ApplicationSpecification.html +876 -0
  87. data/src/admin_panel/doc/app/ApplicationSpecificationController.html +552 -0
  88. data/src/admin_panel/doc/app/ApplicationSpecificationHelper.html +219 -0
  89. data/src/admin_panel/doc/app/Control.html +431 -0
  90. data/src/admin_panel/doc/app/ExceptionDetail.html +227 -0
  91. data/src/admin_panel/doc/app/ExceptionsController.html +754 -0
  92. data/src/admin_panel/doc/app/ExceptionsHelper.html +219 -0
  93. data/src/admin_panel/doc/app/GraphController.html +1101 -0
  94. data/src/admin_panel/doc/app/GraphHelper.html +285 -0
  95. data/src/admin_panel/doc/app/Headers.html +549 -0
  96. data/src/admin_panel/doc/app/HeadersController.html +507 -0
  97. data/src/admin_panel/doc/app/HeadersHelper.html +219 -0
  98. data/src/admin_panel/doc/app/MailSpecification.html +685 -0
  99. data/src/admin_panel/doc/app/MailSpecificationController.html +541 -0
  100. data/src/admin_panel/doc/app/MailSpecificationHelper.html +219 -0
  101. data/src/admin_panel/doc/app/Mailer.html +589 -0
  102. data/src/admin_panel/doc/app/Object.html +240 -0
  103. data/src/admin_panel/doc/app/PseudoModel.html +354 -0
  104. data/src/admin_panel/doc/app/ResourceUsage.html +656 -0
  105. data/src/admin_panel/doc/app/SCGI.html +674 -0
  106. data/src/admin_panel/doc/app/ServerSpecification.html +479 -0
  107. data/src/admin_panel/doc/app/ServerSpecificationController.html +500 -0
  108. data/src/admin_panel/doc/app/ServerSpecificationHelper.html +219 -0
  109. data/src/admin_panel/doc/app/SignalHelper.html +287 -0
  110. data/src/admin_panel/doc/app/UrlBreakupTimeSample.html +287 -0
  111. data/src/admin_panel/doc/app/UrlTimeSample.html +986 -0
  112. data/src/admin_panel/doc/app/User.html +290 -0
  113. data/src/admin_panel/doc/app/YAMLConfig.html +247 -0
  114. data/src/admin_panel/doc/app/YAMLWriter.html +284 -0
  115. data/src/admin_panel/doc/app/app/controllers/admin_controller_rb.html +52 -0
  116. data/src/admin_panel/doc/app/app/controllers/application_controller_rb.html +54 -0
  117. data/src/admin_panel/doc/app/app/controllers/application_specification_controller_rb.html +52 -0
  118. data/src/admin_panel/doc/app/app/controllers/exceptions_controller_rb.html +52 -0
  119. data/src/admin_panel/doc/app/app/controllers/graph_controller_rb.html +52 -0
  120. data/src/admin_panel/doc/app/app/controllers/headers_controller_rb.html +52 -0
  121. data/src/admin_panel/doc/app/app/controllers/mail_specification_controller_rb.html +52 -0
  122. data/src/admin_panel/doc/app/app/controllers/server_specification_controller_rb.html +52 -0
  123. data/src/admin_panel/doc/app/app/helpers/admin_helper_rb.html +52 -0
  124. data/src/admin_panel/doc/app/app/helpers/application_helper_rb.html +52 -0
  125. data/src/admin_panel/doc/app/app/helpers/application_specification_helper_rb.html +52 -0
  126. data/src/admin_panel/doc/app/app/helpers/exceptions_helper_rb.html +52 -0
  127. data/src/admin_panel/doc/app/app/helpers/graph_helper_rb.html +52 -0
  128. data/src/admin_panel/doc/app/app/helpers/headers_helper_rb.html +52 -0
  129. data/src/admin_panel/doc/app/app/helpers/mail_specification_helper_rb.html +52 -0
  130. data/src/admin_panel/doc/app/app/helpers/server_specification_helper_rb.html +52 -0
  131. data/src/admin_panel/doc/app/app/mailers/mailer_rb.html +56 -0
  132. data/src/admin_panel/doc/app/app/models/app_exception_rb.html +52 -0
  133. data/src/admin_panel/doc/app/app/models/app_rb.html +54 -0
  134. data/src/admin_panel/doc/app/app/models/app_time_sample_rb.html +52 -0
  135. data/src/admin_panel/doc/app/app/models/application_specification_rb.html +52 -0
  136. data/src/admin_panel/doc/app/app/models/exception_detail_rb.html +52 -0
  137. data/src/admin_panel/doc/app/app/models/headers_rb.html +52 -0
  138. data/src/admin_panel/doc/app/app/models/mail_specification_rb.html +52 -0
  139. data/src/admin_panel/doc/app/app/models/pseudo_model_rb.html +52 -0
  140. data/src/admin_panel/doc/app/app/models/resource_usage_rb.html +52 -0
  141. data/src/admin_panel/doc/app/app/models/server_specification_rb.html +52 -0
  142. data/src/admin_panel/doc/app/app/models/url_breakup_time_sample_rb.html +52 -0
  143. data/src/admin_panel/doc/app/app/models/url_time_sample_rb.html +52 -0
  144. data/src/admin_panel/doc/app/app/models/user_rb.html +52 -0
  145. data/src/admin_panel/doc/app/created.rid +42 -1
  146. data/src/admin_panel/doc/app/doc/README_FOR_APP.html +172 -0
  147. data/src/admin_panel/doc/app/images/brick.png +0 -0
  148. data/src/admin_panel/doc/app/images/brick_link.png +0 -0
  149. data/src/admin_panel/doc/app/images/bug.png +0 -0
  150. data/src/admin_panel/doc/app/images/bullet_black.png +0 -0
  151. data/src/admin_panel/doc/app/images/bullet_toggle_minus.png +0 -0
  152. data/src/admin_panel/doc/app/images/bullet_toggle_plus.png +0 -0
  153. data/src/admin_panel/doc/app/images/date.png +0 -0
  154. data/src/admin_panel/doc/app/images/find.png +0 -0
  155. data/src/admin_panel/doc/app/images/loadingAnimation.gif +0 -0
  156. data/src/admin_panel/doc/app/images/macFFBgHack.png +0 -0
  157. data/src/admin_panel/doc/app/images/package.png +0 -0
  158. data/src/admin_panel/doc/app/images/page_green.png +0 -0
  159. data/src/admin_panel/doc/app/images/page_white_text.png +0 -0
  160. data/src/admin_panel/doc/app/images/page_white_width.png +0 -0
  161. data/src/admin_panel/doc/app/images/plugin.png +0 -0
  162. data/src/admin_panel/doc/app/images/ruby.png +0 -0
  163. data/src/admin_panel/doc/app/images/tag_green.png +0 -0
  164. data/src/admin_panel/doc/app/images/wrench.png +0 -0
  165. data/src/admin_panel/doc/app/images/wrench_orange.png +0 -0
  166. data/src/admin_panel/doc/app/images/zoom.png +0 -0
  167. data/src/admin_panel/doc/app/index.html +564 -20
  168. data/src/admin_panel/doc/app/js/darkfish.js +116 -0
  169. data/src/admin_panel/doc/app/js/jquery.js +32 -0
  170. data/src/admin_panel/doc/app/js/quicksearch.js +114 -0
  171. data/src/admin_panel/doc/app/js/thickbox-compressed.js +10 -0
  172. data/src/admin_panel/doc/app/lib/asset_tag_helper_ext_rb.html +52 -0
  173. data/src/admin_panel/doc/app/lib/control_rb.html +58 -0
  174. data/src/admin_panel/doc/app/lib/graph_controller_extensions/database_analytics_rb.html +52 -0
  175. data/src/admin_panel/doc/app/lib/graph_controller_extensions/resource_usage_analytics_rb.html +52 -0
  176. data/src/admin_panel/doc/app/lib/graph_controller_extensions/throughput_analytics_rb.html +52 -0
  177. data/src/admin_panel/doc/app/lib/graph_controller_extensions/url_analytics_rb.html +52 -0
  178. data/src/admin_panel/doc/app/lib/graph_controller_extensions/url_breakup_analytics_rb.html +52 -0
  179. data/src/admin_panel/doc/app/lib/helper_rb.html +52 -0
  180. data/src/admin_panel/doc/app/lib/scgi_rb.html +54 -0
  181. data/src/admin_panel/doc/app/lib/yaml_writer_rb.html +52 -0
  182. data/src/admin_panel/doc/app/rdoc.css +763 -0
  183. data/src/admin_panel/lib/helper.rb +6 -2
  184. data/src/admin_panel/public/stylesheets/other/login.css +8 -4
  185. data/src/admin_panel/public/stylesheets/other/style.css +21 -17
  186. data/src/admin_panel/script/rails +6 -0
  187. data/src/admin_panel/test/test_helper.rb +2 -2
  188. data/src/admin_panel/vendor/plugins/calendar_date_select/History.txt +281 -0
  189. data/src/admin_panel/vendor/plugins/calendar_date_select/MIT-LICENSE +20 -0
  190. data/src/admin_panel/vendor/plugins/calendar_date_select/Manifest.txt +42 -0
  191. data/src/admin_panel/vendor/plugins/calendar_date_select/README.txt +17 -0
  192. data/src/admin_panel/vendor/plugins/calendar_date_select/Rakefile +37 -0
  193. data/src/admin_panel/vendor/plugins/calendar_date_select/VERSION +1 -0
  194. data/src/admin_panel/vendor/plugins/calendar_date_select/calendar_date_select.gemspec +95 -0
  195. data/src/admin_panel/vendor/plugins/calendar_date_select/init.rb +1 -0
  196. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/functional/cds_test.html +376 -0
  197. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/functional/format_iso_date_test.html +52 -0
  198. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/prototype.js +4184 -0
  199. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/test.css +40 -0
  200. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/unit/cds_helper_methods.html +46 -0
  201. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/unittest.js +564 -0
  202. data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select.rb +33 -0
  203. data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/calendar_date_select.rb +122 -0
  204. data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/form_helpers.rb +237 -0
  205. data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/includes_helper.rb +29 -0
  206. data/src/admin_panel/vendor/plugins/calendar_date_select/public/blank_iframe.html +2 -0
  207. data/src/admin_panel/vendor/plugins/calendar_date_select/public/images/calendar_date_select/calendar.gif +0 -0
  208. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/calendar_date_select.js +459 -0
  209. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_american.js +35 -0
  210. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_danish.js +31 -0
  211. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_db.js +27 -0
  212. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
  213. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +7 -0
  214. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_finnish.js +32 -0
  215. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_hyphen_ampm.js +37 -0
  216. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_iso_date.js +29 -0
  217. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_italian.js +24 -0
  218. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ar.js +10 -0
  219. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/cs.js +11 -0
  220. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/da.js +11 -0
  221. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/de.js +11 -0
  222. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/es.js +11 -0
  223. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/fi.js +10 -0
  224. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/fr.js +11 -0
  225. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/hu.js +11 -0
  226. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/it.js +9 -0
  227. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ja.js +11 -0
  228. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/nl.js +11 -0
  229. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/pl.js +11 -0
  230. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/pt.js +11 -0
  231. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ru.js +10 -0
  232. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/sl.js +11 -0
  233. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/sv.js +9 -0
  234. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/blue.css +130 -0
  235. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/default.css +135 -0
  236. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/green.css +142 -0
  237. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/plain.css +128 -0
  238. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/red.css +135 -0
  239. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/silver.css +133 -0
  240. data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/calendar_date_select_spec.rb +14 -0
  241. data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/form_helpers_spec.rb +189 -0
  242. data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/includes_helper_spec.rb +46 -0
  243. data/src/admin_panel/vendor/plugins/calendar_date_select/spec/spec_helper.rb +26 -0
  244. data/src/admin_panel/vendor/plugins/open_flash_chart_2_plugin/install.rb +2 -2
  245. data/src/admin_panel/vendor/plugins/open_flash_chart_2_plugin/uninstall.rb +2 -2
  246. data/src/admin_panel/vendor/plugins/prototype_legacy_helper/README.markdown +13 -0
  247. data/src/admin_panel/vendor/plugins/prototype_legacy_helper/init.rb +1 -0
  248. data/src/admin_panel/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +432 -0
  249. data/src/admin_panel/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +297 -0
  250. data/src/helper/wr_config.c +1 -1
  251. data/src/ruby_lib/analyzer/message_analyzer.rb +1 -0
  252. data/src/ruby_lib/analyzer/webroar_analyzer.rb +2 -2
  253. data/src/ruby_lib/profiler/message_dispatcher.rb +1 -1
  254. data/src/ruby_lib/ruby_interface/version.rb +2 -2
  255. data/src/ruby_lib/webroar_app_loader.rb +1 -1
  256. data/tasks/gem.rake +5 -7
  257. data/tasks/test.rake +1 -0
  258. data/test/spec/analytics_spec.rb +25 -24
  259. data/test/spec/test_app/README +142 -129
  260. data/test/spec/test_app/Rakefile +2 -5
  261. data/test/spec/test_app/app/controllers/application_controller.rb +3 -8
  262. data/test/spec/test_app/app/controllers/test_controller.rb +3 -3
  263. data/test/spec/test_app/app/controllers/users_controller.rb +8 -8
  264. data/test/spec/test_app/app/helpers/application_helper.rb +2 -1
  265. data/test/spec/test_app/app/helpers/test_helper.rb +2 -0
  266. data/test/spec/test_app/app/helpers/users_helper.rb +2 -0
  267. data/test/spec/test_app/app/models/user.rb +2 -0
  268. data/test/spec/test_app/app/views/layouts/{users.html.erb → application.html.erb} +6 -9
  269. data/test/spec/test_app/app/views/test/post_data.html.erb +2 -2
  270. data/test/spec/test_app/app/views/test/upload_file.html.erb +1 -1
  271. data/test/spec/test_app/{db/migrate/20090602102438_create_users.rb → app/views/users/_form.html.erb} +22 -11
  272. data/test/spec/test_app/app/views/users/edit.html.erb +19 -28
  273. data/test/spec/test_app/app/views/users/index.html.erb +23 -19
  274. data/test/spec/test_app/app/views/users/new.html.erb +19 -28
  275. data/test/spec/test_app/app/views/users/show.html.erb +21 -18
  276. data/test/spec/test_app/config/application.rb +45 -0
  277. data/test/spec/test_app/config/boot.rb +4 -112
  278. data/test/spec/test_app/config/database.yml +1 -1
  279. data/test/spec/test_app/config/environment.rb +4 -41
  280. data/test/spec/test_app/config/environments/development.rb +22 -13
  281. data/test/spec/test_app/config/environments/production.rb +41 -20
  282. data/test/spec/test_app/config/environments/test.rb +35 -28
  283. data/test/spec/test_app/config/initializers/backtrace_silencers.rb +2 -2
  284. data/test/spec/test_app/config/initializers/inflections.rb +1 -1
  285. data/test/spec/test_app/config/initializers/secret_token.rb +7 -0
  286. data/test/spec/test_app/config/initializers/session_store.rb +3 -10
  287. data/test/spec/test_app/config/locales/en.yml +5 -0
  288. data/test/spec/test_app/config/routes.rb +37 -22
  289. data/test/spec/test_app/db/migrate/20110906113329_create_users.rb +13 -0
  290. data/test/spec/test_app/db/seeds.rb +7 -0
  291. data/test/spec/test_app/public/404.html +15 -19
  292. data/test/spec/test_app/public/422.html +15 -19
  293. data/test/spec/test_app/public/500.html +14 -18
  294. data/test/spec/test_app/public/index.html +41 -77
  295. data/test/spec/test_app/public/javascripts/controls.js +5 -3
  296. data/test/spec/test_app/public/javascripts/dragdrop.js +7 -6
  297. data/test/spec/test_app/public/javascripts/effects.js +8 -13
  298. data/test/spec/test_app/public/javascripts/prototype.js +3381 -1700
  299. data/test/spec/test_app/public/javascripts/rails.js +191 -0
  300. data/test/spec/test_app/public/stylesheets/scaffold.css +15 -13
  301. data/test/spec/test_app/script/rails +6 -0
  302. metadata +340 -163
  303. data/src/admin_panel/Gemfile.lock +0 -79
  304. data/src/admin_panel/doc/app/classes/ActionView.html +0 -111
  305. data/src/admin_panel/doc/app/classes/ActionView/Helpers.html +0 -111
  306. data/src/admin_panel/doc/app/classes/ActionView/Helpers/AssetTagHelper.html +0 -149
  307. data/src/admin_panel/doc/app/classes/AdminController.html +0 -628
  308. data/src/admin_panel/doc/app/classes/AdminHelper.html +0 -482
  309. data/src/admin_panel/doc/app/classes/Analytics.html +0 -138
  310. data/src/admin_panel/doc/app/classes/Analytics/Database.html +0 -245
  311. data/src/admin_panel/doc/app/classes/Analytics/ResourceUsage.html +0 -478
  312. data/src/admin_panel/doc/app/classes/Analytics/Throughput.html +0 -316
  313. data/src/admin_panel/doc/app/classes/Analytics/Url.html +0 -314
  314. data/src/admin_panel/doc/app/classes/Analytics/UrlBreakup.html +0 -372
  315. data/src/admin_panel/doc/app/classes/App.html +0 -298
  316. data/src/admin_panel/doc/app/classes/AppException.html +0 -330
  317. data/src/admin_panel/doc/app/classes/AppTimeSample.html +0 -427
  318. data/src/admin_panel/doc/app/classes/ApplicationController.html +0 -118
  319. data/src/admin_panel/doc/app/classes/ApplicationHelper.html +0 -172
  320. data/src/admin_panel/doc/app/classes/ApplicationSpecification.html +0 -641
  321. data/src/admin_panel/doc/app/classes/ApplicationSpecificationController.html +0 -354
  322. data/src/admin_panel/doc/app/classes/Control.html +0 -273
  323. data/src/admin_panel/doc/app/classes/ExceptionsController.html +0 -612
  324. data/src/admin_panel/doc/app/classes/ExceptionsHelper.html +0 -105
  325. data/src/admin_panel/doc/app/classes/GraphController.html +0 -804
  326. data/src/admin_panel/doc/app/classes/GraphHelper.html +0 -164
  327. data/src/admin_panel/doc/app/classes/MailSpecification.html +0 -357
  328. data/src/admin_panel/doc/app/classes/MailSpecificationController.html +0 -304
  329. data/src/admin_panel/doc/app/classes/PseudoModel.html +0 -206
  330. data/src/admin_panel/doc/app/classes/ResourceUsage.html +0 -425
  331. data/src/admin_panel/doc/app/classes/SCGI.html +0 -406
  332. data/src/admin_panel/doc/app/classes/ServerSpecification.html +0 -325
  333. data/src/admin_panel/doc/app/classes/ServerSpecificationController.html +0 -273
  334. data/src/admin_panel/doc/app/classes/UrlBreakupTimeSample.html +0 -169
  335. data/src/admin_panel/doc/app/classes/UrlTimeSample.html +0 -708
  336. data/src/admin_panel/doc/app/classes/User.html +0 -165
  337. data/src/admin_panel/doc/app/classes/YAMLWriter.html +0 -159
  338. data/src/admin_panel/doc/app/files/app/controllers/admin_controller_rb.html +0 -101
  339. data/src/admin_panel/doc/app/files/app/controllers/application_controller_rb.html +0 -108
  340. data/src/admin_panel/doc/app/files/app/controllers/application_specification_controller_rb.html +0 -101
  341. data/src/admin_panel/doc/app/files/app/controllers/exceptions_controller_rb.html +0 -101
  342. data/src/admin_panel/doc/app/files/app/controllers/graph_controller_rb.html +0 -101
  343. data/src/admin_panel/doc/app/files/app/controllers/mail_specification_controller_rb.html +0 -101
  344. data/src/admin_panel/doc/app/files/app/controllers/server_specification_controller_rb.html +0 -101
  345. data/src/admin_panel/doc/app/files/app/helpers/admin_helper_rb.html +0 -101
  346. data/src/admin_panel/doc/app/files/app/helpers/application_helper_rb.html +0 -101
  347. data/src/admin_panel/doc/app/files/app/helpers/exceptions_helper_rb.html +0 -101
  348. data/src/admin_panel/doc/app/files/app/helpers/graph_helper_rb.html +0 -101
  349. data/src/admin_panel/doc/app/files/app/models/app_exception_rb.html +0 -101
  350. data/src/admin_panel/doc/app/files/app/models/app_rb.html +0 -108
  351. data/src/admin_panel/doc/app/files/app/models/app_time_sample_rb.html +0 -101
  352. data/src/admin_panel/doc/app/files/app/models/application_specification_rb.html +0 -101
  353. data/src/admin_panel/doc/app/files/app/models/mail_specification_rb.html +0 -101
  354. data/src/admin_panel/doc/app/files/app/models/pseudo_model_rb.html +0 -101
  355. data/src/admin_panel/doc/app/files/app/models/resource_usage_rb.html +0 -101
  356. data/src/admin_panel/doc/app/files/app/models/server_specification_rb.html +0 -101
  357. data/src/admin_panel/doc/app/files/app/models/url_breakup_time_sample_rb.html +0 -101
  358. data/src/admin_panel/doc/app/files/app/models/url_time_sample_rb.html +0 -101
  359. data/src/admin_panel/doc/app/files/app/models/user_rb.html +0 -101
  360. data/src/admin_panel/doc/app/files/doc/README_FOR_APP.html +0 -109
  361. data/src/admin_panel/doc/app/files/lib/asset_tag_helper_ext_rb.html +0 -101
  362. data/src/admin_panel/doc/app/files/lib/control_rb.html +0 -110
  363. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/database_analytics_rb.html +0 -101
  364. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/resource_usage_analytics_rb.html +0 -101
  365. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/throughput_analytics_rb.html +0 -101
  366. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/url_analytics_rb.html +0 -101
  367. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/url_breakup_analytics_rb.html +0 -101
  368. data/src/admin_panel/doc/app/files/lib/scgi_rb.html +0 -101
  369. data/src/admin_panel/doc/app/files/lib/yaml_writer_rb.html +0 -101
  370. data/src/admin_panel/doc/app/fr_class_index.html +0 -60
  371. data/src/admin_panel/doc/app/fr_file_index.html +0 -58
  372. data/src/admin_panel/doc/app/fr_method_index.html +0 -206
  373. data/src/admin_panel/doc/app/rdoc-style.css +0 -208
  374. data/src/admin_panel/public/dispatch.cgi +0 -10
  375. data/src/admin_panel/public/dispatch.fcgi +0 -24
  376. data/src/admin_panel/public/dispatch.rb +0 -10
  377. data/src/admin_panel/script/about +0 -4
  378. data/src/admin_panel/script/console +0 -3
  379. data/src/admin_panel/script/dbconsole +0 -3
  380. data/src/admin_panel/script/destroy +0 -3
  381. data/src/admin_panel/script/generate +0 -3
  382. data/src/admin_panel/script/performance/benchmarker +0 -3
  383. data/src/admin_panel/script/performance/profiler +0 -3
  384. data/src/admin_panel/script/performance/request +0 -3
  385. data/src/admin_panel/script/plugin +0 -3
  386. data/src/admin_panel/script/process/inspector +0 -3
  387. data/src/admin_panel/script/process/reaper +0 -3
  388. data/src/admin_panel/script/process/spawner +0 -3
  389. data/src/admin_panel/script/runner +0 -3
  390. data/src/admin_panel/script/server +0 -3
  391. data/test/spec/test_app/config/initializers/new_rails_defaults.rb +0 -19
  392. data/test/spec/test_app/script/about +0 -4
  393. data/test/spec/test_app/script/console +0 -3
  394. data/test/spec/test_app/script/dbconsole +0 -3
  395. data/test/spec/test_app/script/destroy +0 -3
  396. data/test/spec/test_app/script/generate +0 -3
  397. data/test/spec/test_app/script/performance/benchmarker +0 -3
  398. data/test/spec/test_app/script/performance/profiler +0 -3
  399. data/test/spec/test_app/script/plugin +0 -3
  400. data/test/spec/test_app/script/runner +0 -3
  401. data/test/spec/test_app/script/server +0 -3
  402. data/test/spec/test_app/vendor/.placeholder +0 -0
data/doc/user-guide.txt CHANGED
@@ -50,7 +50,7 @@ Currently it does not support Microsoft(R) Windows.
50
50
  - ruby 1.8-dev or 1.9-dev
51
51
  - openssl ruby extension (On Ubuntu/Debian it is available as libopenssl-ruby1.X)
52
52
  - zlib ruby extension
53
- - rubygems
53
+ - rubygems 1.3.6 or later
54
54
  - C build tools (gcc etc) (e.g. build-essential on Ubuntu, Xcode on MacOS)
55
55
  - libsqlite3
56
56
  - libsqlite3-dev
@@ -230,7 +230,7 @@ better.)
230
230
  rubygems version or any other reason), you can install the following dependent
231
231
  gems individually first:
232
232
 
233
- rails-2.3.9, calendar_date_select, rake, rspec, sqlite3, starling, will_paginate
233
+ rails-3.0.9, rake, rspec, sqlite3, starling, will_paginate
234
234
 
235
235
  - After successful installation of the webroar gem, any errors that occur
236
236
  during the setup are saved to the install.log created in the installed gem's
data/lib/constant.rb CHANGED
@@ -16,19 +16,26 @@
16
16
  # You should have received a copy of the GNU General Public License
17
17
  # along with WebROaR. If not, see <http://www.gnu.org/licenses/>.
18
18
 
19
- WEBROAR_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
20
- WEBROAR_LIB_DIR = File.expand_path(File.join(WEBROAR_ROOT, 'lib'))
21
- WEBROAR_TEST_DIR = File.expand_path(File.join(WEBROAR_ROOT, 'test', 'unit'))
22
- WEBROAR_BIN_DIR = File.expand_path(File.join(WEBROAR_ROOT, 'bin'))
23
- ADMIN_PANEL_DIR = File.join(WEBROAR_ROOT, 'src', 'admin_panel')
24
- ADMIN_PANEL_LIB_DIR = File.join(ADMIN_PANEL_DIR, 'lib')
25
- RAILS_ROOT = ADMIN_PANEL_DIR
26
- GEM_BIN_DIR = File.expand_path(File.join(WEBROAR_ROOT,'..','..','bin'))
27
- USR_BIN_DIR = File.join('','usr','bin')
28
- ANALYZER_DIR = File.join(WEBROAR_ROOT, 'src', 'ruby_lib', 'analyzer')
29
- INTERNAL_CONF_FILE = File.join(WEBROAR_ROOT, 'conf', 'server_internal_config.yml')
30
- ENV["PATH"] += ":/usr/bin:/usr/sbin:/sbin:/usr/local/sbin:#{WEBROAR_BIN_DIR}"
31
- WEBROAR_LOG_FILE = File.join('','var','log','webroar','webroar.log')
32
- PIDFILE = "/var/run/webroar.pid"
33
- TESTFILE = "/etc/profile"
34
- MESSAGE_DEPLOYMENT = "This command needs to be run as root. Please try again using 'sudo'.".freeze
19
+ # Directory constant
20
+ WEBROAR_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
21
+ WEBROAR_LIB_DIR = File.expand_path(File.join(WEBROAR_ROOT, 'lib'))
22
+ WEBROAR_TEST_DIR = File.expand_path(File.join(WEBROAR_ROOT, 'test', 'unit'))
23
+ WEBROAR_BIN_DIR = File.expand_path(File.join(WEBROAR_ROOT, 'bin'))
24
+ ADMIN_PANEL_DIR = File.join(WEBROAR_ROOT, 'src', 'admin_panel')
25
+ ADMIN_PANEL_LIB_DIR = File.join(ADMIN_PANEL_DIR, 'lib')
26
+ #RAILS_ROOT = ADMIN_PANEL_DIR
27
+ GEM_BIN_DIR = File.expand_path(File.join(WEBROAR_ROOT,'..','..','bin'))
28
+ USR_BIN_DIR = File.join('','usr','bin')
29
+ ANALYZER_DIR = File.join(WEBROAR_ROOT, 'src', 'ruby_lib', 'analyzer')
30
+
31
+
32
+ ENV["PATH"] += ":/usr/bin:/usr/sbin:/sbin:/usr/local/sbin:#{WEBROAR_BIN_DIR}"
33
+
34
+ # File constant
35
+ INTERNAL_CONF_FILE = File.join(WEBROAR_ROOT, 'conf', 'server_internal_config.yml')
36
+ WEBROAR_LOG_FILE = File.join('','var','log','webroar','webroar.log')
37
+ PIDFILE = "/var/run/webroar.pid"
38
+ TESTFILE = "/etc/profile"
39
+
40
+ # Message constant
41
+ MESSAGE_DEPLOYMENT = "This command needs to be run as root. Please try again using 'sudo'.".freeze
data/lib/db_connect.rb CHANGED
@@ -17,7 +17,7 @@
17
17
  # along with WebROaR. If not, see <http://www.gnu.org/licenses/>.
18
18
 
19
19
  require 'rubygems'
20
- gem 'activerecord','2.3.9'
20
+ gem 'activerecord','3.0.9'
21
21
  require 'active_record'
22
22
 
23
23
  module Webroar
@@ -38,8 +38,7 @@ module Webroar
38
38
  private
39
39
 
40
40
  def load_models
41
- models = Dir.glob(File.join(ADMIN_PANEL_DIR, 'app', 'models', "{pseudo_model,application_specification,server_specification,app,url_breakup_time_sample,app_time_sample,resource_usage,url_time_sample,app_exception,exception_detail,mailer}.rb"))
42
-
41
+ models = Dir.glob(File.join(ADMIN_PANEL_DIR, 'app', 'models', "{pseudo_model,application_specification,server_specification,app,url_breakup_time_sample,app_time_sample,resource_usage,url_time_sample,app_exception,exception_detail,../mailers/mailer}.rb"))
43
42
  models.each do |f|
44
43
  begin
45
44
  require f
data/lib/installer.rb CHANGED
@@ -211,8 +211,9 @@ module Webroar
211
211
 
212
212
  str << " zlib=yes" if @zlib
213
213
  str << " regex=yes" if(@zlib and @regex)
214
-
215
- @port, @import, gem_name = UserInteraction.new(@options).user_input
214
+
215
+ @user_interaction = UserInteraction.new(@options)
216
+ @port, @import, gem_name = @user_interaction.user_input
216
217
  @port = import_files(gem_name) if @import
217
218
  write_server_port if !@import
218
219
 
@@ -350,7 +351,7 @@ module Webroar
350
351
  def stop_server
351
352
  # Stop the server
352
353
  filename = File.join(WEBROAR_ROOT, 'conf', 'server_internal_config.yml')
353
- pid_file = YAML.load(File.open(filename))["webroar_analyzer_script"]["pid_file"]
354
+ pid_file = YAML.load_file(filename)["webroar_analyzer_script"]["pid_file"]
354
355
 
355
356
  WebroarCommand.new.operation(nil, "stop") if (File.exists?(PIDFILE) or File.exists?(pid_file))
356
357
  end
@@ -650,7 +651,7 @@ exit 0"
650
651
  return
651
652
  end
652
653
 
653
- info = YAML.load(File.open(File.join(import_dir,"conf","config.yml")))
654
+ info = YAML.load_file(File.join(import_dir,"conf","config.yml"))
654
655
  ssl = nil
655
656
  ssl = info['Server Specification']['SSL Specification'] if info and info['Server Specification'] and info['Server Specification']['SSL Specification']
656
657
 
@@ -675,18 +676,24 @@ exit 0"
675
676
  import_server_configuration(import_dir)
676
677
 
677
678
  if Webroar::SERVER.downcase == gem_name.downcase
679
+ unless File.exist?(File.join(import_dir,"src","admin_panel","config","user.yml"))
680
+ @user_interaction.setup_admin_user
681
+ end
678
682
  puts "done."
679
- return YAML.load(File.open(WEBROAR_CONFIG_FILE))["Server Specification"]["port"]
683
+ return YAML.load_file(WEBROAR_CONFIG_FILE)["Server Specification"]["port"]
680
684
  end
681
685
 
682
686
  # Copy all *.yml files from older version.
683
- Webroar::FileHelper.copy(File.join(import_dir,"src","admin_panel","config","user.yml"), ADMIN_USER_FILE)
687
+
688
+ unless Webroar::FileHelper.copy(File.join(import_dir,"src","admin_panel","config","user.yml"), ADMIN_USER_FILE)
689
+ @user_interaction.setup_admin_user
690
+ end
684
691
  Webroar::FileHelper.copy(File.join(import_dir,"src","admin_panel","config","database.yml"), DB_CONFIG_FILE)
685
692
  Webroar::FileHelper.copy(File.join(import_dir,"conf","mail_conf.yml"), File.join(WEBROAR_ROOT, "conf"))
686
693
 
687
694
  # Copy conf/server_internal_config.yml file.
688
- example = YAML.load(File.open(File.join(WEBROAR_ROOT, "conf", "server_internal_config.example.yml")))
689
- old = YAML.load(File.open(File.join(import_dir, "conf", "server_internal_config.yml")))
695
+ example = YAML.load_file(File.join(WEBROAR_ROOT, "conf", "server_internal_config.example.yml"))
696
+ old = YAML.load_file(File.join(import_dir, "conf", "server_internal_config.yml"))
690
697
  if example and old
691
698
  new = example.merge(old).delete_if{ |key, value| !example.has_key?(key)}
692
699
  dump = YAML::dump(new).gsub(/: true/, ': on').gsub(/: false/, ': off')
@@ -695,13 +702,13 @@ exit 0"
695
702
  file.close
696
703
  end
697
704
 
698
- configuration = YAML.load(File.open(DB_CONFIG_FILE))["production"]
705
+ configuration = YAML.load_file(DB_CONFIG_FILE)["production"]
699
706
  if configuration['adapter'] == 'sqlite3' and configuration['database'][0,1] != "/"
700
707
  db = File.join(import_dir, "src", "admin_panel", configuration['database'])
701
708
  Webroar::FileHelper.copy(db, File.join(ADMIN_PANEL_DIR, configuration['database']))
702
709
  end
703
710
  puts "done."
704
- return YAML.load(File.open(WEBROAR_CONFIG_FILE))["Server Specification"]["port"]
711
+ return YAML.load_file(WEBROAR_CONFIG_FILE)["Server Specification"]["port"]
705
712
  end
706
713
 
707
714
  def set_install_options
@@ -31,35 +31,46 @@ module Webroar
31
31
  def user_input
32
32
  return nil, true, @gem_name if choose_gem_version
33
33
 
34
+ setup_admin_user
35
+ puts "Setting up server specifications ..."
36
+
37
+ port = read_port
38
+ return port, false, nil
39
+ end
40
+
41
+ def setup_admin_user
34
42
  puts "Setting up server admin panel ..."
35
43
 
36
44
  username = read_user_name
37
45
  password = read_password
38
46
 
39
47
  write_user(username, password)
40
-
41
- puts "Setting up server specifications ..."
42
-
43
- port = read_port
44
-
45
- return port, false, nil
46
48
  end
47
49
 
48
50
  private
49
51
 
50
52
  def gem_exist?
51
53
  print "Checking for any previous installation of WebROaR ... "
52
- list = Gem.source_index.find_name(/^webroar$/)
54
+
55
+ if Gem::Specification.respond_to?('find_all_by_name')
56
+ list = Gem::Specification.find_all_by_name(/^webroar$/)
57
+ else
58
+ list = Gem.source_index.find_name(/^webroar$/)
59
+ end
53
60
 
54
61
  unless list
55
62
  puts "not found."
56
63
  return false
57
64
  end
58
65
 
59
- #gem_names = list.collect {|gem| gem.full_name}
60
66
  gem_list = list.collect {|gem| gem.version}
61
- gem_list.each_with_index do |item, index|
62
- gem_list.delete(item) if !File.exist?(File.join(WEBROAR_ROOT,"..","webroar-#{item}","conf","config.yml"))
67
+ index = 0
68
+ while gem_list[index]
69
+ unless File.exist?(File.join(WEBROAR_ROOT,"..","webroar-#{gem_list[index]}","conf","config.yml"))
70
+ gem_list.delete_at(index)
71
+ else
72
+ index = index + 1
73
+ end
63
74
  end
64
75
 
65
76
  if gem_list.length == 0
@@ -124,14 +124,14 @@ module Webroar
124
124
 
125
125
  if application_specification.save
126
126
  application_specification.write
127
- application_specification.errors.each_full{|msg| puts msg }
127
+ application_specification.errors.to_a.each{|msg| puts msg }
128
128
  reply, err_log = App.start(params[:name])
129
129
  #reply = nil indicate success
130
130
  puts reply ? reply : "Application '#{params[:name]}' added successfully."
131
131
  puts "\n\e[31m" + err_log + "\e[0m" if err_log
132
132
  application_specification.remove if (err_log or reply)
133
133
  else
134
- application_specification.errors.each_full{|msg| puts msg }
134
+ application_specification.errors.to_a.each{|msg| puts msg }
135
135
  end
136
136
 
137
137
  end
@@ -148,20 +148,18 @@ module Webroar
148
148
 
149
149
  #Check server status and load models
150
150
  def load_models
151
- files = [File.join(ADMIN_PANEL_DIR, 'config','initializers','application_constants.rb'),
152
- File.join(ADMIN_PANEL_DIR, 'lib','yaml_writer.rb')]
153
-
154
- files.each do |f|
155
- begin
156
- require f
157
- rescue NameError => e
158
- puts e
159
- puts e.backtrace.join("\n")
160
- end
151
+ configuration = YAML.load_file(File.join(WEBROAR_ROOT,'conf','server_internal_config.yml'))
152
+ ENV['RAILS_ENV'] = configuration["webroar_analyzer_script"]["environment"]
153
+
154
+ begin
155
+ require File.join(ADMIN_PANEL_DIR, 'config','environment.rb')
156
+ rescue NameError => e
157
+ puts e
158
+ puts e.backtrace.join("\n")
161
159
  end
162
160
 
163
- configuration = YAML.load(File.open(File.join(WEBROAR_ROOT,'conf','server_internal_config.yml')))
164
- DBConnect.db_up(configuration["webroar_analyzer_script"]["environment"])
161
+ #configuration = YAML.load_file(File.join(WEBROAR_ROOT,'conf','server_internal_config.yml'))
162
+ #DBConnect.db_up(configuration["webroar_analyzer_script"]["environment"])
165
163
  end
166
164
 
167
165
  def check_server_status
@@ -184,7 +182,7 @@ module Webroar
184
182
  if $? == 0
185
183
  @server_status = :up
186
184
  filename = File.join(WEBROAR_ROOT, 'conf', 'config.yml')
187
- apps_spec = YAML.load(File.open(filename))["Application Specification"]
185
+ apps_spec = YAML.load_file(filename)["Application Specification"]
188
186
  sleep_time = (apps_spec ? 1 + apps_spec.size : 1)
189
187
  sleep(sleep_time * 1.5)
190
188
  puts "Head process started successfully."
@@ -192,7 +190,7 @@ module Webroar
192
190
  puts "An error occurred while starting head process. Please refer '#{WEBROAR_LOG_FILE}' for details."
193
191
  if @starling_status == :up
194
192
  filename = File.join(WEBROAR_ROOT, 'conf', 'starling_server_config.yml')
195
- pid_file = YAML.load(File.open(filename))["starling"]["pid_file"]
193
+ pid_file = YAML.load_file(filename)["starling"]["pid_file"]
196
194
  puts "Aborting startup sequence"
197
195
  print "Stopping starling message queue server ..."
198
196
  pid = File.read(pid_file).chomp.to_i rescue nil
@@ -207,11 +205,11 @@ module Webroar
207
205
  return if @starling_status == :down
208
206
 
209
207
  filename = File.join(WEBROAR_ROOT, 'conf', 'server_internal_config.yml')
210
- log_file = YAML.load(File.open(filename))["webroar_analyzer_script"]["log_file"]
208
+ log_file = YAML.load_file(filename)["webroar_analyzer_script"]["log_file"]
211
209
 
212
210
  print "Starting webroar-analyzer process ..."
213
211
 
214
- pid_file = YAML.load(File.open(filename))["webroar_analyzer_script"]["pid_file"]
212
+ pid_file = YAML.load_file(filename)["webroar_analyzer_script"]["pid_file"]
215
213
  pid = File.read(pid_file).chomp.to_i rescue nil
216
214
 
217
215
  if pid
@@ -282,7 +280,7 @@ module Webroar
282
280
  analytics = true
283
281
 
284
282
 
285
- server_conf = YAML.load(File.open(INTERNAL_CONF_FILE))
283
+ server_conf = YAML.load_file(INTERNAL_CONF_FILE)
286
284
  if(server_conf and server_conf["webroar"] and !server_conf["webroar"]["analyzer"].nil?)
287
285
  analytics = server_conf["webroar"]["analyzer"]
288
286
  end
@@ -292,7 +290,7 @@ module Webroar
292
290
  print "Starting message queue server ..."
293
291
 
294
292
  starling_conf_file = File.join(WEBROAR_ROOT, 'conf', 'starling_server_config.yml')
295
- pid_file = YAML.load(File.open(starling_conf_file))["starling"]["pid_file"]
293
+ pid_file = YAML.load_file(starling_conf_file)["starling"]["pid_file"]
296
294
  pid = File.read(pid_file).chomp.to_i rescue nil
297
295
 
298
296
  if pid
@@ -304,7 +302,7 @@ module Webroar
304
302
  end
305
303
 
306
304
  filename = File.join(WEBROAR_ROOT, 'conf', 'server_internal_config.yml')
307
- log_file = YAML.load(File.open(filename))["webroar_analyzer_script"]["log_file"]
305
+ log_file = YAML.load_file(filename)["webroar_analyzer_script"]["log_file"]
308
306
 
309
307
  system("starling -f #{starling_conf_file} >> #{log_file} 2>>#{log_file}")
310
308
  if $? == 0
@@ -326,7 +324,7 @@ module Webroar
326
324
  # Stop the server
327
325
  def stop_webroar
328
326
  begin
329
- yaml_obj = YAML.load(File.open(INTERNAL_CONF_FILE))
327
+ yaml_obj = YAML.load_file(INTERNAL_CONF_FILE)
330
328
  pid_file = yaml_obj["webroar_analyzer_script"]["pid_file"]
331
329
  if !(File.exists?(PIDFILE) or File.exists?(pid_file))
332
330
  puts "WebROaR is not running."
@@ -357,7 +355,7 @@ module Webroar
357
355
  def restart_webroar
358
356
  puts "Restarting WebROaR ..."
359
357
  filename = File.join(WEBROAR_ROOT, 'conf', 'server_internal_config.yml')
360
- pid_file = YAML.load(File.open(filename))["webroar_analyzer_script"]["pid_file"]
358
+ pid_file = YAML.load_file(filename)["webroar_analyzer_script"]["pid_file"]
361
359
  if File.exists?(PIDFILE) or File.exists?(pid_file)
362
360
  stop_webroar
363
361
  system("sleep 1")
@@ -0,0 +1,8 @@
1
+ # Edit this Gemfile to bundle your application's dependencies.
2
+ # This preamble is the current preamble for Rails 3 apps; edit as needed.
3
+ source 'http://rubygems.org'
4
+
5
+ gem 'rails', '3.0.9'
6
+ gem 'sqlite3'
7
+ gem 'will_paginate','~>2.3.16'
8
+ gem 'rspec','~>1.3.1'
@@ -1,10 +1,7 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require(File.join(File.dirname(__FILE__), 'config', 'boot'))
5
-
4
+ require File.expand_path('../config/application', __FILE__)
6
5
  require 'rake'
7
- require 'rake/testtask'
8
- require 'rake/rdoctask'
9
6
 
10
- require 'tasks/rails'
7
+ AdminPanel::Application.load_tasks
@@ -23,7 +23,7 @@
23
23
  require 'digest/md5'
24
24
  class ApplicationController < ActionController::Base
25
25
  helper :all # include all helpers, all the time
26
- filter_parameter_logging :password #This is to protect the password logging in the log files.
26
+
27
27
  # See ActionController::RequestForgeryProtection for details
28
28
  # Uncomment the :secret if you're not using the cookie session store
29
29
  protect_from_forgery #:secret => '8e99f4efee54d3b72e3b675578e1403c'
@@ -104,36 +104,35 @@ class ExceptionsController < ApplicationController
104
104
 
105
105
  #Method is used to update the status for selected exceptions.
106
106
  def change_status
107
- if request.method == :put
108
- @application_name = params[:app_name]
109
- app_id = App.get_application_data(@application_name).id
110
- if params[:exception_ids] and params[:status_name]
111
- params[:exception_ids].collect! do |e|
112
- e.to_i
113
- end
114
- case params[:status_name].downcase
115
- when 'delete'
116
-
117
- when 'ignore'
118
- AppException.update_all_status_to(IGNORED_EXCEPTION, params[:exception_ids])
119
- when 'close'
120
- AppException.update_all_status_to(CLOSED_EXCEPTION, params[:exception_ids])
121
- when 'open'
122
- AppException.update_all_status_to(OPEN_EXCEPTION, params[:exception_ids])
123
- end
124
- end
125
- status = get_status_const(params[:current_status])
126
- session[:per_page] = 5 if not session[:per_page]
127
- @exceptions = AppException.get_all(status, app_id, params[:page],session[:per_page])
128
- if @exceptions.out_of_bounds? and (page = params[:page].to_i - 1) > 0
129
- @exceptions = AppException.get_all(status, app_id, page,session[:per_page])
107
+
108
+ @application_name = params[:app_name]
109
+ app_id = App.get_application_data(@application_name).id
110
+ if params[:exception_ids] and params[:status_name]
111
+ params[:exception_ids].collect! do |e|
112
+ e.to_i
130
113
  end
131
- render :update do |page|
132
- page.replace_html 'data_div', :partial => 'exception_list_partial', :locals => { :current_status => status, :status_name => params[:current_status]}
114
+ case params[:status_name].downcase
115
+ when 'delete'
116
+
117
+ when 'ignore'
118
+ AppException.update_all_status_to(IGNORED_EXCEPTION, params[:exception_ids])
119
+ when 'close'
120
+ AppException.update_all_status_to(CLOSED_EXCEPTION, params[:exception_ids])
121
+ when 'open'
122
+ AppException.update_all_status_to(OPEN_EXCEPTION, params[:exception_ids])
133
123
  end
134
124
  end
125
+ status = get_status_const(params[:current_status])
126
+ session[:per_page] = 5 if not session[:per_page]
127
+ @exceptions = AppException.get_all(status, app_id, params[:page],session[:per_page])
128
+ if @exceptions.out_of_bounds? and (page = params[:page].to_i - 1) > 0
129
+ @exceptions = AppException.get_all(status, app_id, page,session[:per_page])
130
+ end
131
+ render :update do |page|
132
+ page.replace_html 'data_div', :partial => 'exception_list_partial', :locals => { :current_status => status, :status_name => params[:current_status]}
133
+ end
135
134
  end
136
-
135
+
137
136
  # This method is used to render the add_application_class_form partial with all the exception classes
138
137
  # stored in configuration file, with respect to the selected application
139
138
  def save_exception_class_form
@@ -20,7 +20,8 @@
20
20
 
21
21
  #This controller deals with the graph plotting and retriving the data for the graphs using models.
22
22
  #This Controller additionally neads the module for each graph type saved in /lib/graph_controller_extensions.
23
- Dir["#{RAILS_ROOT}/lib/graph_controller_extensions/*.rb"].each { |extension| require extension}
23
+
24
+ Dir["#{File.dirname(__FILE__)}/../../lib/graph_controller_extensions/*.rb"].each { |extension| require extension}
24
25
  class GraphController < ApplicationController
25
26
  before_filter :login_required
26
27
  before_filter :clear_flash_notice
@@ -116,7 +116,7 @@ module AdminHelper
116
116
  #To help the configuration page to display the ssl information.
117
117
  def ssl_block(info, ssl_port, certificate, key)
118
118
  if info['Server Specification']['SSL Specification']
119
- block = "<table width = 95% >
119
+ block = "<table width = 95% align='center'>
120
120
  <tr>
121
121
  <th colspan='2' width = 80%>SSL Support</th>
122
122
  <th>"