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
@@ -0,0 +1,277 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Module: ActionView::Helpers::AssetTagHelper</title>
9
+
10
+ <link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="../../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="../../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="../../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="module">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="../../index.html">Home</a>
25
+ <a href="../../index.html#classes">Classes</a>
26
+ <a href="../../index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="../../lib/asset_tag_helper_ext_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="lib/asset_tag_helper_ext.rb">lib/asset_tag_helper_ext.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+ <!-- Method Quickref -->
56
+ <div id="method-list-section" class="section">
57
+ <h3 class="section-header">Methods</h3>
58
+ <ul class="link-list">
59
+
60
+ <li><a href="#method-i-link_tag">#link_tag</a></li>
61
+
62
+ </ul>
63
+ </div>
64
+
65
+
66
+
67
+ </div>
68
+
69
+ <div id="project-metadata">
70
+
71
+
72
+ <div id="fileindex-section" class="section project-section">
73
+ <h3 class="section-header">Files</h3>
74
+ <ul>
75
+
76
+ <li class="file"><a href="../../doc/README_FOR_APP.html">README_FOR_APP</a></li>
77
+
78
+ </ul>
79
+ </div>
80
+
81
+
82
+ <div id="classindex-section" class="section project-section">
83
+ <h3 class="section-header">Class/Module Index
84
+ <span class="search-toggle"><img src="../../images/find.png"
85
+ height="16" width="16" alt="[+]"
86
+ title="show/hide quicksearch" /></span></h3>
87
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
88
+ <fieldset>
89
+ <legend>Quicksearch</legend>
90
+ <input type="text" name="quicksearch" value=""
91
+ class="quicksearch-field" />
92
+ </fieldset>
93
+ </form>
94
+
95
+ <ul class="link-list">
96
+
97
+ <li><a href="../../Analytics.html">Analytics</a></li>
98
+
99
+ <li><a href="../../Analytics/Database.html">Analytics::Database</a></li>
100
+
101
+ <li><a href="../../Analytics/ResourceUsage.html">Analytics::ResourceUsage</a></li>
102
+
103
+ <li><a href="../../Analytics/Throughput.html">Analytics::Throughput</a></li>
104
+
105
+ <li><a href="../../Analytics/Url.html">Analytics::Url</a></li>
106
+
107
+ <li><a href="../../Analytics/UrlBreakup.html">Analytics::UrlBreakup</a></li>
108
+
109
+ <li><a href="../../ActionView.html">ActionView</a></li>
110
+
111
+ <li><a href="../../ActionView/Helpers.html">ActionView::Helpers</a></li>
112
+
113
+ <li><a href="../../ActionView/Helpers/AssetTagHelper.html">ActionView::Helpers::AssetTagHelper</a></li>
114
+
115
+ <li><a href="../../AdminController.html">AdminController</a></li>
116
+
117
+ <li><a href="../../AdminHelper.html">AdminHelper</a></li>
118
+
119
+ <li><a href="../../App.html">App</a></li>
120
+
121
+ <li><a href="../../AppException.html">AppException</a></li>
122
+
123
+ <li><a href="../../AppTimeSample.html">AppTimeSample</a></li>
124
+
125
+ <li><a href="../../ApplicationController.html">ApplicationController</a></li>
126
+
127
+ <li><a href="../../ApplicationHelper.html">ApplicationHelper</a></li>
128
+
129
+ <li><a href="../../ApplicationSpecification.html">ApplicationSpecification</a></li>
130
+
131
+ <li><a href="../../ApplicationSpecificationController.html">ApplicationSpecificationController</a></li>
132
+
133
+ <li><a href="../../ApplicationSpecificationHelper.html">ApplicationSpecificationHelper</a></li>
134
+
135
+ <li><a href="../../Control.html">Control</a></li>
136
+
137
+ <li><a href="../../ExceptionDetail.html">ExceptionDetail</a></li>
138
+
139
+ <li><a href="../../ExceptionsController.html">ExceptionsController</a></li>
140
+
141
+ <li><a href="../../ExceptionsHelper.html">ExceptionsHelper</a></li>
142
+
143
+ <li><a href="../../GraphController.html">GraphController</a></li>
144
+
145
+ <li><a href="../../GraphHelper.html">GraphHelper</a></li>
146
+
147
+ <li><a href="../../Headers.html">Headers</a></li>
148
+
149
+ <li><a href="../../HeadersController.html">HeadersController</a></li>
150
+
151
+ <li><a href="../../HeadersHelper.html">HeadersHelper</a></li>
152
+
153
+ <li><a href="../../MailSpecification.html">MailSpecification</a></li>
154
+
155
+ <li><a href="../../MailSpecificationController.html">MailSpecificationController</a></li>
156
+
157
+ <li><a href="../../MailSpecificationHelper.html">MailSpecificationHelper</a></li>
158
+
159
+ <li><a href="../../Mailer.html">Mailer</a></li>
160
+
161
+ <li><a href="../../Object.html">Object</a></li>
162
+
163
+ <li><a href="../../PseudoModel.html">PseudoModel</a></li>
164
+
165
+ <li><a href="../../ResourceUsage.html">ResourceUsage</a></li>
166
+
167
+ <li><a href="../../SCGI.html">SCGI</a></li>
168
+
169
+ <li><a href="../../ServerSpecification.html">ServerSpecification</a></li>
170
+
171
+ <li><a href="../../ServerSpecificationController.html">ServerSpecificationController</a></li>
172
+
173
+ <li><a href="../../ServerSpecificationHelper.html">ServerSpecificationHelper</a></li>
174
+
175
+ <li><a href="../../SignalHelper.html">SignalHelper</a></li>
176
+
177
+ <li><a href="../../UrlBreakupTimeSample.html">UrlBreakupTimeSample</a></li>
178
+
179
+ <li><a href="../../UrlTimeSample.html">UrlTimeSample</a></li>
180
+
181
+ <li><a href="../../User.html">User</a></li>
182
+
183
+ <li><a href="../../YAMLConfig.html">YAMLConfig</a></li>
184
+
185
+ <li><a href="../../YAMLWriter.html">YAMLWriter</a></li>
186
+
187
+ </ul>
188
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
189
+ </div>
190
+
191
+
192
+ </div>
193
+ </div>
194
+
195
+ <div id="documentation">
196
+ <h1 class="module">ActionView::Helpers::AssetTagHelper</h1>
197
+
198
+ <div id="description" class="description">
199
+
200
+ </div><!-- description -->
201
+
202
+
203
+
204
+
205
+ <div id="5Buntitled-5D" class="documentation-section">
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+ <!-- Methods -->
215
+
216
+ <div id="public-instance-method-details" class="method-section section">
217
+ <h3 class="section-header">Public Instance Methods</h3>
218
+
219
+
220
+ <div id="link_tag-method" class="method-detail ">
221
+ <a name="method-i-link_tag"></a>
222
+
223
+
224
+ <div class="method-heading">
225
+ <span class="method-name">link_tag</span><span
226
+ class="method-args">(url_options = {}, tag_options = {})</span>
227
+ <span class="method-click-advice">click to toggle source</span>
228
+ </div>
229
+
230
+
231
+ <div class="method-description">
232
+
233
+
234
+
235
+
236
+
237
+ <div class="method-source-code" id="link_tag-source">
238
+ <pre>
239
+ <span class="ruby-comment"># File lib/asset_tag_helper_ext.rb, line 4</span>
240
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">link_tag</span>(<span class="ruby-identifier">url_options</span> = {}, <span class="ruby-identifier">tag_options</span> = {})
241
+ <span class="ruby-identifier">href</span> = <span class="ruby-identifier">url_options</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span>
242
+ <span class="ruby-identifier">url_for</span>(<span class="ruby-identifier">url_options</span>.<span class="ruby-identifier">merge</span>(
243
+ <span class="ruby-value">:only_path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">false</span>)) <span class="ruby-operator">:</span> <span class="ruby-identifier">url_options</span>
244
+ <span class="ruby-identifier">tag</span>(
245
+ <span class="ruby-string">&quot;link&quot;</span>,
246
+ <span class="ruby-string">&quot;rel&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">tag_options</span>[<span class="ruby-value">:rel</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword">nil</span>,
247
+ <span class="ruby-string">&quot;type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">tag_options</span>[<span class="ruby-value">:type</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword">nil</span>,
248
+ <span class="ruby-string">&quot;title&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">tag_options</span>[<span class="ruby-value">:title</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword">nil</span>,
249
+ <span class="ruby-string">&quot;href&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">compute_public_path</span>(<span class="ruby-identifier">href</span>, <span class="ruby-string">&quot;&quot;</span>, <span class="ruby-string">&quot;&quot;</span>)
250
+ )
251
+ <span class="ruby-keyword">end</span></pre>
252
+ </div><!-- link_tag-source -->
253
+
254
+ </div>
255
+
256
+
257
+
258
+
259
+ </div><!-- link_tag-method -->
260
+
261
+
262
+ </div><!-- public-instance-method-details -->
263
+
264
+ </div><!-- 5Buntitled-5D -->
265
+
266
+
267
+ </div><!-- documentation -->
268
+
269
+ <div id="validator-badges">
270
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
271
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
272
+ Rdoc Generator</a> 2</small>.</p>
273
+ </div>
274
+
275
+ </body>
276
+ </html>
277
+
@@ -0,0 +1,814 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: AdminController</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="class">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="./index.html">Home</a>
25
+ <a href="./index.html#classes">Classes</a>
26
+ <a href="./index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="./app/controllers/admin_controller_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="app/controllers/admin_controller.rb">app/controllers/admin_controller.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+ <!-- Parent Class -->
50
+ <div id="parent-class-section" class="section">
51
+ <h3 class="section-header">Parent</h3>
52
+
53
+ <p class="link"><a href="ApplicationController.html">ApplicationController</a></p>
54
+
55
+ </div>
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+ <!-- Method Quickref -->
64
+ <div id="method-list-section" class="section">
65
+ <h3 class="section-header">Methods</h3>
66
+ <ul class="link-list">
67
+
68
+ <li><a href="#method-i-change_password">#change_password</a></li>
69
+
70
+ <li><a href="#method-i-change_password_form">#change_password_form</a></li>
71
+
72
+ <li><a href="#method-i-configuration">#configuration</a></li>
73
+
74
+ <li><a href="#method-i-contact_us">#contact_us</a></li>
75
+
76
+ <li><a href="#method-i-get_latest_time">#get_latest_time</a></li>
77
+
78
+ <li><a href="#method-i-get_latest_updates">#get_latest_updates</a></li>
79
+
80
+ <li><a href="#method-i-home">#home</a></li>
81
+
82
+ <li><a href="#method-i-index">#index</a></li>
83
+
84
+ <li><a href="#method-i-login">#login</a></li>
85
+
86
+ <li><a href="#method-i-logout">#logout</a></li>
87
+
88
+ <li><a href="#method-i-required_apps">#required_apps</a></li>
89
+
90
+ <li><a href="#method-i-send_feedback">#send_feedback</a></li>
91
+
92
+ <li><a href="#method-i-send_report_bug">#send_report_bug</a></li>
93
+
94
+ </ul>
95
+ </div>
96
+
97
+
98
+
99
+ </div>
100
+
101
+ <div id="project-metadata">
102
+
103
+
104
+ <div id="fileindex-section" class="section project-section">
105
+ <h3 class="section-header">Files</h3>
106
+ <ul>
107
+
108
+ <li class="file"><a href="./doc/README_FOR_APP.html">README_FOR_APP</a></li>
109
+
110
+ </ul>
111
+ </div>
112
+
113
+
114
+ <div id="classindex-section" class="section project-section">
115
+ <h3 class="section-header">Class/Module Index
116
+ <span class="search-toggle"><img src="./images/find.png"
117
+ height="16" width="16" alt="[+]"
118
+ title="show/hide quicksearch" /></span></h3>
119
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
120
+ <fieldset>
121
+ <legend>Quicksearch</legend>
122
+ <input type="text" name="quicksearch" value=""
123
+ class="quicksearch-field" />
124
+ </fieldset>
125
+ </form>
126
+
127
+ <ul class="link-list">
128
+
129
+ <li><a href="./Analytics.html">Analytics</a></li>
130
+
131
+ <li><a href="./Analytics/Database.html">Analytics::Database</a></li>
132
+
133
+ <li><a href="./Analytics/ResourceUsage.html">Analytics::ResourceUsage</a></li>
134
+
135
+ <li><a href="./Analytics/Throughput.html">Analytics::Throughput</a></li>
136
+
137
+ <li><a href="./Analytics/Url.html">Analytics::Url</a></li>
138
+
139
+ <li><a href="./Analytics/UrlBreakup.html">Analytics::UrlBreakup</a></li>
140
+
141
+ <li><a href="./ActionView.html">ActionView</a></li>
142
+
143
+ <li><a href="./ActionView/Helpers.html">ActionView::Helpers</a></li>
144
+
145
+ <li><a href="./ActionView/Helpers/AssetTagHelper.html">ActionView::Helpers::AssetTagHelper</a></li>
146
+
147
+ <li><a href="./AdminController.html">AdminController</a></li>
148
+
149
+ <li><a href="./AdminHelper.html">AdminHelper</a></li>
150
+
151
+ <li><a href="./App.html">App</a></li>
152
+
153
+ <li><a href="./AppException.html">AppException</a></li>
154
+
155
+ <li><a href="./AppTimeSample.html">AppTimeSample</a></li>
156
+
157
+ <li><a href="./ApplicationController.html">ApplicationController</a></li>
158
+
159
+ <li><a href="./ApplicationHelper.html">ApplicationHelper</a></li>
160
+
161
+ <li><a href="./ApplicationSpecification.html">ApplicationSpecification</a></li>
162
+
163
+ <li><a href="./ApplicationSpecificationController.html">ApplicationSpecificationController</a></li>
164
+
165
+ <li><a href="./ApplicationSpecificationHelper.html">ApplicationSpecificationHelper</a></li>
166
+
167
+ <li><a href="./Control.html">Control</a></li>
168
+
169
+ <li><a href="./ExceptionDetail.html">ExceptionDetail</a></li>
170
+
171
+ <li><a href="./ExceptionsController.html">ExceptionsController</a></li>
172
+
173
+ <li><a href="./ExceptionsHelper.html">ExceptionsHelper</a></li>
174
+
175
+ <li><a href="./GraphController.html">GraphController</a></li>
176
+
177
+ <li><a href="./GraphHelper.html">GraphHelper</a></li>
178
+
179
+ <li><a href="./Headers.html">Headers</a></li>
180
+
181
+ <li><a href="./HeadersController.html">HeadersController</a></li>
182
+
183
+ <li><a href="./HeadersHelper.html">HeadersHelper</a></li>
184
+
185
+ <li><a href="./MailSpecification.html">MailSpecification</a></li>
186
+
187
+ <li><a href="./MailSpecificationController.html">MailSpecificationController</a></li>
188
+
189
+ <li><a href="./MailSpecificationHelper.html">MailSpecificationHelper</a></li>
190
+
191
+ <li><a href="./Mailer.html">Mailer</a></li>
192
+
193
+ <li><a href="./Object.html">Object</a></li>
194
+
195
+ <li><a href="./PseudoModel.html">PseudoModel</a></li>
196
+
197
+ <li><a href="./ResourceUsage.html">ResourceUsage</a></li>
198
+
199
+ <li><a href="./SCGI.html">SCGI</a></li>
200
+
201
+ <li><a href="./ServerSpecification.html">ServerSpecification</a></li>
202
+
203
+ <li><a href="./ServerSpecificationController.html">ServerSpecificationController</a></li>
204
+
205
+ <li><a href="./ServerSpecificationHelper.html">ServerSpecificationHelper</a></li>
206
+
207
+ <li><a href="./SignalHelper.html">SignalHelper</a></li>
208
+
209
+ <li><a href="./UrlBreakupTimeSample.html">UrlBreakupTimeSample</a></li>
210
+
211
+ <li><a href="./UrlTimeSample.html">UrlTimeSample</a></li>
212
+
213
+ <li><a href="./User.html">User</a></li>
214
+
215
+ <li><a href="./YAMLConfig.html">YAMLConfig</a></li>
216
+
217
+ <li><a href="./YAMLWriter.html">YAMLWriter</a></li>
218
+
219
+ </ul>
220
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
221
+ </div>
222
+
223
+
224
+ </div>
225
+ </div>
226
+
227
+ <div id="documentation">
228
+ <h1 class="class">AdminController</h1>
229
+
230
+ <div id="description" class="description">
231
+
232
+ <p>This controller deals with all the actions related to the user handling and
233
+ application configuration.</p>
234
+
235
+ </div><!-- description -->
236
+
237
+
238
+
239
+
240
+ <div id="5Buntitled-5D" class="documentation-section">
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ <!-- Methods -->
250
+
251
+ <div id="public-instance-method-details" class="method-section section">
252
+ <h3 class="section-header">Public Instance Methods</h3>
253
+
254
+
255
+ <div id="change_password-method" class="method-detail ">
256
+ <a name="method-i-change_password"></a>
257
+
258
+
259
+ <div class="method-heading">
260
+ <span class="method-name">change_password</span><span
261
+ class="method-args">()</span>
262
+ <span class="method-click-advice">click to toggle source</span>
263
+ </div>
264
+
265
+
266
+ <div class="method-description">
267
+
268
+ <p>The action is to change the password of the admin panel user.</p>
269
+
270
+
271
+
272
+ <div class="method-source-code" id="change_password-source">
273
+ <pre>
274
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 96</span>
275
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_password</span>
276
+ <span class="ruby-identifier">set_application_name</span>
277
+ <span class="ruby-identifier">password_changed</span> = <span class="ruby-keyword">false</span>
278
+ <span class="ruby-identifier">users</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-constant">USERS_FILE_PATH</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-keyword">nil</span>
279
+ <span class="ruby-identifier">users</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">user</span><span class="ruby-operator">|</span>
280
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">user</span>[<span class="ruby-string">'user_name'</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">session</span>[<span class="ruby-value">:user</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">user</span>[<span class="ruby-string">'password'</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:password</span>][<span class="ruby-value">:old</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:password</span>][<span class="ruby-value">:new</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:password</span>][<span class="ruby-value">:confirm</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:password</span>][<span class="ruby-value">:new</span>].<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">5</span>
281
+ <span class="ruby-identifier">user</span>[<span class="ruby-string">'password'</span>] = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:password</span>][<span class="ruby-value">:new</span>])
282
+ <span class="ruby-identifier">password_changed</span> = <span class="ruby-keyword">true</span>
283
+ <span class="ruby-keyword">break</span>
284
+ <span class="ruby-keyword">end</span>
285
+ <span class="ruby-keyword">end</span>
286
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">password_changed</span>
287
+ <span class="ruby-constant">YAMLWriter</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">users</span>, <span class="ruby-constant">USERS_FILE_PATH</span>, <span class="ruby-constant">YAMLConfig</span><span class="ruby-operator">::</span><span class="ruby-constant">USER</span>)
288
+ <span class="ruby-identifier">reset_session</span>
289
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-constant">PASSWORD_CHANGED</span>
290
+ <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">root_path</span>
291
+ <span class="ruby-keyword">else</span>
292
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:password</span>][<span class="ruby-value">:new</span>].<span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">6</span>
293
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-constant">WRONG_PASSWORD2</span>
294
+ <span class="ruby-keyword">else</span>
295
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-constant">WRONG_PASSWORD1</span>
296
+ <span class="ruby-keyword">end</span>
297
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'change_password_form'</span>
298
+ <span class="ruby-comment">#TODO : This message is to be made more specific for old password and confirm password.</span>
299
+ <span class="ruby-keyword">end</span>
300
+ <span class="ruby-keyword">end</span></pre>
301
+ </div><!-- change_password-source -->
302
+
303
+ </div>
304
+
305
+
306
+
307
+
308
+ </div><!-- change_password-method -->
309
+
310
+
311
+ <div id="change_password_form-method" class="method-detail ">
312
+ <a name="method-i-change_password_form"></a>
313
+
314
+
315
+ <div class="method-heading">
316
+ <span class="method-name">change_password_form</span><span
317
+ class="method-args">()</span>
318
+ <span class="method-click-advice">click to toggle source</span>
319
+ </div>
320
+
321
+
322
+ <div class="method-description">
323
+
324
+ <p>This method is used to render the Admin Panel Settings Page.</p>
325
+
326
+
327
+
328
+ <div class="method-source-code" id="change_password_form-source">
329
+ <pre>
330
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 124</span>
331
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_password_form</span>
332
+ <span class="ruby-identifier">set_application_name</span>
333
+ <span class="ruby-keyword">end</span></pre>
334
+ </div><!-- change_password_form-source -->
335
+
336
+ </div>
337
+
338
+
339
+
340
+
341
+ </div><!-- change_password_form-method -->
342
+
343
+
344
+ <div id="configuration-method" class="method-detail ">
345
+ <a name="method-i-configuration"></a>
346
+
347
+
348
+ <div class="method-heading">
349
+ <span class="method-name">configuration</span><span
350
+ class="method-args">()</span>
351
+ <span class="method-click-advice">click to toggle source</span>
352
+ </div>
353
+
354
+
355
+ <div class="method-description">
356
+
357
+ <p>This function is to get the details of config file for configuration page.
358
+ This page contains the server settings and the application settings.</p>
359
+
360
+
361
+
362
+ <div class="method-source-code" id="configuration-source">
363
+ <pre>
364
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 53</span>
365
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">configuration</span>
366
+ <span class="ruby-ivar">@info</span>= <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-constant">CONFIG_FILE_PATH</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-keyword">nil</span>
367
+ <span class="ruby-ivar">@applications</span> = <span class="ruby-constant">App</span>.<span class="ruby-identifier">get_all</span>(<span class="ruby-value">1</span>)
368
+ <span class="ruby-ivar">@ssl_spec</span> = <span class="ruby-constant">Hash</span>[<span class="ruby-value">:certificate_path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:ssl</span>][<span class="ruby-value">:certificate_path</span>],
369
+ <span class="ruby-value">:key_path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:ssl</span>][<span class="ruby-value">:key_path</span>],
370
+ <span class="ruby-value">:port</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:ssl</span>][<span class="ruby-value">:port</span>]] <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:ssl</span>]
371
+ <span class="ruby-ivar">@sendmail_old</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:sendmail</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:sendmail</span>]
372
+ <span class="ruby-ivar">@smtp_old</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:smtp</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:smtp</span>]
373
+ <span class="ruby-identifier">set_application_name</span>
374
+ <span class="ruby-keyword">end</span></pre>
375
+ </div><!-- configuration-source -->
376
+
377
+ </div>
378
+
379
+
380
+
381
+
382
+ </div><!-- configuration-method -->
383
+
384
+
385
+ <div id="contact_us-method" class="method-detail ">
386
+ <a name="method-i-contact_us"></a>
387
+
388
+
389
+ <div class="method-heading">
390
+ <span class="method-name">contact_us</span><span
391
+ class="method-args">()</span>
392
+ <span class="method-click-advice">click to toggle source</span>
393
+ </div>
394
+
395
+
396
+ <div class="method-description">
397
+
398
+ <p>This method is used to render the report_bug, feedback and <a
399
+ href="AdminController.html#method-i-contact_us">contact_us</a> form on the
400
+ basis of <a href="http://:form_name">params</a></p>
401
+
402
+
403
+
404
+ <div class="method-source-code" id="contact_us-source">
405
+ <pre>
406
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 162</span>
407
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">contact_us</span>
408
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-constant">Mailer</span>.<span class="ruby-identifier">check_smtp_mail_settings</span>
409
+ <span class="ruby-ivar">@rb</span> = {<span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span> ,<span class="ruby-value">:email</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>,<span class="ruby-value">:subject</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>,<span class="ruby-value">:description</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>}
410
+ <span class="ruby-ivar">@fb</span> = {<span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span> ,<span class="ruby-value">:email</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>,<span class="ruby-value">:message</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>}
411
+ <span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:form_name</span>]
412
+ <span class="ruby-keyword">when</span> <span class="ruby-string">&quot;report_bug&quot;</span>
413
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;report_bug_partial&quot;</span>
414
+ <span class="ruby-keyword">when</span> <span class="ruby-string">&quot;feedback&quot;</span>
415
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;feedback_partial&quot;</span>
416
+ <span class="ruby-keyword">else</span>
417
+ <span class="ruby-identifier">render</span> <span class="ruby-string">&quot;contact_us&quot;</span>
418
+ <span class="ruby-keyword">end</span>
419
+ <span class="ruby-keyword">end</span></pre>
420
+ </div><!-- contact_us-source -->
421
+
422
+ </div>
423
+
424
+
425
+
426
+
427
+ </div><!-- contact_us-method -->
428
+
429
+
430
+ <div id="get_latest_time-method" class="method-detail ">
431
+ <a name="method-i-get_latest_time"></a>
432
+
433
+
434
+ <div class="method-heading">
435
+ <span class="method-name">get_latest_time</span><span
436
+ class="method-args">()</span>
437
+ <span class="method-click-advice">click to toggle source</span>
438
+ </div>
439
+
440
+
441
+ <div class="method-description">
442
+
443
+ <p>This method is to return the server time. The method refreshes the time
444
+ after every minute.</p>
445
+
446
+
447
+
448
+ <div class="method-source-code" id="get_latest_time-source">
449
+ <pre>
450
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 147</span>
451
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_latest_time</span>
452
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">&quot;%d %b %Y %H:%M&quot;</span>)
453
+ <span class="ruby-keyword">end</span></pre>
454
+ </div><!-- get_latest_time-source -->
455
+
456
+ </div>
457
+
458
+
459
+
460
+
461
+ </div><!-- get_latest_time-method -->
462
+
463
+
464
+ <div id="get_latest_updates-method" class="method-detail ">
465
+ <a name="method-i-get_latest_updates"></a>
466
+
467
+
468
+ <div class="method-heading">
469
+ <span class="method-name">get_latest_updates</span><span
470
+ class="method-args">()</span>
471
+ <span class="method-click-advice">click to toggle source</span>
472
+ </div>
473
+
474
+
475
+ <div class="method-description">
476
+
477
+ <p>Update all the dynamic values on home page</p>
478
+
479
+
480
+
481
+ <div class="method-source-code" id="get_latest_updates-source">
482
+ <pre>
483
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 129</span>
484
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_latest_updates</span>
485
+ <span class="ruby-identifier">server_usage</span> = <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_server</span>
486
+ <span class="ruby-identifier">apps_usage</span> = <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_apps_with_exceptions</span>
487
+ <span class="ruby-identifier">str</span> = <span class="ruby-node">&quot;&lt;script&gt;
488
+ loadDivs(new Array('server_cpu_usage','#{&quot;%.2f&quot; % server_usage[0]}','server_memory_usage','#{&quot;%.2f&quot; % (server_usage[1].to_f/1024)}'&quot;</span>
489
+
490
+ <span class="ruby-identifier">apps_usage</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
491
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">key</span>[<span class="ruby-string">&quot; &quot;</span>] <span class="ruby-keyword">or</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-string">'static-worker'</span>
492
+ <span class="ruby-identifier">str</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-node">&quot;,'#{key}_cpu','#{&quot;%.2f&quot; % val[0]}','#{key}_memory','#{&quot;%.2f&quot; % (val[1].to_f/1024)}','#{key}_exception','#{val[2]}'&quot;</span>
493
+ <span class="ruby-keyword">end</span>
494
+ <span class="ruby-keyword">end</span>
495
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;));&lt;/script&gt;&quot;</span>
496
+
497
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">str</span>
498
+ <span class="ruby-keyword">end</span></pre>
499
+ </div><!-- get_latest_updates-source -->
500
+
501
+ </div>
502
+
503
+
504
+
505
+
506
+ </div><!-- get_latest_updates-method -->
507
+
508
+
509
+ <div id="home-method" class="method-detail ">
510
+ <a name="method-i-home"></a>
511
+
512
+
513
+ <div class="method-heading">
514
+ <span class="method-name">home</span><span
515
+ class="method-args">()</span>
516
+ <span class="method-click-advice">click to toggle source</span>
517
+ </div>
518
+
519
+
520
+ <div class="method-description">
521
+
522
+ <p>This action is for displaying the first page i.e Home page of the Admin
523
+ Panel. This page contains the server snapshot(i.e. its cpu and memory
524
+ usgae) and the list of application deployed on the server with its cpu and
525
+ memory usgae.</p>
526
+
527
+
528
+
529
+ <div class="method-source-code" id="home-source">
530
+ <pre>
531
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 44</span>
532
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">home</span>
533
+ <span class="ruby-ivar">@info</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-constant">CONFIG_FILE_PATH</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-keyword">nil</span> <span class="ruby-comment">#To get the data of yaml file into yaml object</span>
534
+ <span class="ruby-ivar">@server_resource_usage</span> = <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_server</span> <span class="ruby-comment">#To get the resource usage by the server </span>
535
+ <span class="ruby-ivar">@apps_resource_usage</span> = <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_apps</span> <span class="ruby-comment"># to get the resource usage by the application</span>
536
+ <span class="ruby-identifier">set_application_name</span>
537
+ <span class="ruby-keyword">end</span></pre>
538
+ </div><!-- home-source -->
539
+
540
+ </div>
541
+
542
+
543
+
544
+
545
+ </div><!-- home-method -->
546
+
547
+
548
+ <div id="index-method" class="method-detail ">
549
+ <a name="method-i-index"></a>
550
+
551
+
552
+ <div class="method-heading">
553
+ <span class="method-name">index</span><span
554
+ class="method-args">()</span>
555
+ <span class="method-click-advice">click to toggle source</span>
556
+ </div>
557
+
558
+
559
+ <div class="method-description">
560
+
561
+ <p>This action is to render the login page with the layout index.html.erb. If
562
+ the user session is already created the it redirects the control to the
563
+ home page of the admin panel.</p>
564
+
565
+
566
+
567
+ <div class="method-source-code" id="index-source">
568
+ <pre>
569
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 32</span>
570
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">index</span>
571
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">session</span>[<span class="ruby-value">:user</span>]
572
+ <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">home_path</span>
573
+ <span class="ruby-keyword">else</span>
574
+ <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span>
575
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'index'</span>, <span class="ruby-value">:layout</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'index'</span>
576
+ <span class="ruby-keyword">end</span>
577
+ <span class="ruby-keyword">end</span></pre>
578
+ </div><!-- index-source -->
579
+
580
+ </div>
581
+
582
+
583
+
584
+
585
+ </div><!-- index-method -->
586
+
587
+
588
+ <div id="login-method" class="method-detail ">
589
+ <a name="method-i-login"></a>
590
+
591
+
592
+ <div class="method-heading">
593
+ <span class="method-name">login</span><span
594
+ class="method-args">()</span>
595
+ <span class="method-click-advice">click to toggle source</span>
596
+ </div>
597
+
598
+
599
+ <div class="method-description">
600
+
601
+ <p>This action is called for login authentication. For user authentication it
602
+ used a method “user_authentication” present in the application.rb. It
603
+ takes user hash as a input from the login page.</p>
604
+
605
+
606
+
607
+ <div class="method-source-code" id="login-source">
608
+ <pre>
609
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 66</span>
610
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">login</span>
611
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">post?</span>
612
+ <span class="ruby-identifier">rv</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">authenticate</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>][<span class="ruby-value">:name</span>], <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>][<span class="ruby-value">:password</span>]) <span class="ruby-keyword">rescue</span> <span class="ruby-keyword">nil</span>
613
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">rv</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">true</span>
614
+ <span class="ruby-identifier">session</span>[<span class="ruby-value">:session_time</span>] = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
615
+ <span class="ruby-identifier">session</span>[<span class="ruby-value">:user</span>] = <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>][<span class="ruby-value">:name</span>]
616
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-keyword">nil</span>
617
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">session</span>[<span class="ruby-value">:referer</span>]
618
+ <span class="ruby-identifier">referer_path</span> = <span class="ruby-identifier">session</span>[<span class="ruby-value">:referer</span>]
619
+ <span class="ruby-identifier">session</span>[<span class="ruby-value">:referer</span>] = <span class="ruby-keyword">nil</span>
620
+ <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">referer_path</span>
621
+ <span class="ruby-keyword">else</span>
622
+ <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">root_path</span>
623
+ <span class="ruby-keyword">end</span>
624
+ <span class="ruby-keyword">else</span>
625
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-identifier">rv</span>
626
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'index'</span>, <span class="ruby-value">:layout</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'index'</span>
627
+ <span class="ruby-keyword">end</span>
628
+ <span class="ruby-keyword">end</span>
629
+ <span class="ruby-keyword">end</span></pre>
630
+ </div><!-- login-source -->
631
+
632
+ </div>
633
+
634
+
635
+
636
+
637
+ </div><!-- login-method -->
638
+
639
+
640
+ <div id="logout-method" class="method-detail ">
641
+ <a name="method-i-logout"></a>
642
+
643
+
644
+ <div class="method-heading">
645
+ <span class="method-name">logout</span><span
646
+ class="method-args">()</span>
647
+ <span class="method-click-advice">click to toggle source</span>
648
+ </div>
649
+
650
+
651
+ <div class="method-description">
652
+
653
+ <p>This function is for deleting the session of a user. By clearing the
654
+ session data for a specific user it delete the sesion of a user.</p>
655
+
656
+
657
+
658
+ <div class="method-source-code" id="logout-source">
659
+ <pre>
660
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 89</span>
661
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">logout</span>
662
+ <span class="ruby-identifier">reset_session</span>
663
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-constant">SUCCESSFUL_LOGOUT</span>
664
+ <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">root_path</span>
665
+ <span class="ruby-keyword">end</span></pre>
666
+ </div><!-- logout-source -->
667
+
668
+ </div>
669
+
670
+
671
+
672
+
673
+ </div><!-- logout-method -->
674
+
675
+
676
+ <div id="required_apps-method" class="method-detail ">
677
+ <a name="method-i-required_apps"></a>
678
+
679
+
680
+ <div class="method-heading">
681
+ <span class="method-name">required_apps</span><span
682
+ class="method-args">()</span>
683
+ <span class="method-click-advice">click to toggle source</span>
684
+ </div>
685
+
686
+
687
+ <div class="method-description">
688
+
689
+ <p>Used to paginate the list of deployed applications.</p>
690
+
691
+
692
+
693
+ <div class="method-source-code" id="required_apps-source">
694
+ <pre>
695
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 152</span>
696
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">required_apps</span>
697
+ <span class="ruby-ivar">@info</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-constant">CONFIG_FILE_PATH</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-keyword">nil</span>
698
+ <span class="ruby-ivar">@applications</span> = <span class="ruby-constant">App</span>.<span class="ruby-identifier">get_all</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1</span>)
699
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:update</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">page</span><span class="ruby-operator">|</span>
700
+ <span class="ruby-identifier">page</span>.<span class="ruby-identifier">replace_html</span> <span class="ruby-string">'application_list_table'</span>, <span class="ruby-value">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'application_table'</span>
701
+ <span class="ruby-keyword">end</span>
702
+ <span class="ruby-keyword">end</span></pre>
703
+ </div><!-- required_apps-source -->
704
+
705
+ </div>
706
+
707
+
708
+
709
+
710
+ </div><!-- required_apps-method -->
711
+
712
+
713
+ <div id="send_feedback-method" class="method-detail ">
714
+ <a name="method-i-send_feedback"></a>
715
+
716
+
717
+ <div class="method-heading">
718
+ <span class="method-name">send_feedback</span><span
719
+ class="method-args">()</span>
720
+ <span class="method-click-advice">click to toggle source</span>
721
+ </div>
722
+
723
+
724
+ <div class="method-description">
725
+
726
+ <p>this method is used to send the feedback</p>
727
+
728
+
729
+
730
+ <div class="method-source-code" id="send_feedback-source">
731
+ <pre>
732
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 177</span>
733
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_feedback</span>
734
+ <span class="ruby-ivar">@fb</span> = <span class="ruby-identifier">feedback</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:feedback</span>]
735
+ <span class="ruby-identifier">message</span> = <span class="ruby-constant">MailSpecification</span>.<span class="ruby-identifier">validate_feedback_data</span>(<span class="ruby-identifier">feedback</span>)
736
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">message</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;&quot;</span>
737
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">validate_captcha_answer</span>
738
+ <span class="ruby-ivar">@fb</span> = {<span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span> ,<span class="ruby-value">:email</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>,<span class="ruby-value">:message</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>}
739
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-constant">Mailer</span>.<span class="ruby-identifier">send_feedback</span>(<span class="ruby-identifier">feedback</span>)
740
+ <span class="ruby-keyword">end</span>
741
+ <span class="ruby-keyword">else</span>
742
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-identifier">message</span>
743
+ <span class="ruby-keyword">end</span>
744
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'feedback_partial'</span>
745
+ <span class="ruby-keyword">end</span></pre>
746
+ </div><!-- send_feedback-source -->
747
+
748
+ </div>
749
+
750
+
751
+
752
+
753
+ </div><!-- send_feedback-method -->
754
+
755
+
756
+ <div id="send_report_bug-method" class="method-detail ">
757
+ <a name="method-i-send_report_bug"></a>
758
+
759
+
760
+ <div class="method-heading">
761
+ <span class="method-name">send_report_bug</span><span
762
+ class="method-args">()</span>
763
+ <span class="method-click-advice">click to toggle source</span>
764
+ </div>
765
+
766
+
767
+ <div class="method-description">
768
+
769
+ <p>this method is used to report the bug</p>
770
+
771
+
772
+
773
+ <div class="method-source-code" id="send_report_bug-source">
774
+ <pre>
775
+ <span class="ruby-comment"># File app/controllers/admin_controller.rb, line 192</span>
776
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_report_bug</span>
777
+ <span class="ruby-ivar">@rb</span> = <span class="ruby-identifier">report_bug</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:report_bug</span>]
778
+ <span class="ruby-identifier">message</span> = <span class="ruby-constant">MailSpecification</span>.<span class="ruby-identifier">validate_report_bug_data</span>(<span class="ruby-identifier">report_bug</span>)
779
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">message</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;&quot;</span>
780
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">validate_captcha_answer</span>
781
+ <span class="ruby-ivar">@rb</span> = {<span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span> ,<span class="ruby-value">:email</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>,<span class="ruby-value">:subject</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>,<span class="ruby-value">:description</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&quot;</span>}
782
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-constant">Mailer</span>.<span class="ruby-identifier">send_report_bug</span>(<span class="ruby-identifier">report_bug</span>)
783
+ <span class="ruby-keyword">end</span>
784
+ <span class="ruby-keyword">else</span>
785
+ <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-identifier">message</span>
786
+ <span class="ruby-keyword">end</span>
787
+ <span class="ruby-identifier">render</span> <span class="ruby-value">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'report_bug_partial'</span>
788
+ <span class="ruby-keyword">end</span></pre>
789
+ </div><!-- send_report_bug-source -->
790
+
791
+ </div>
792
+
793
+
794
+
795
+
796
+ </div><!-- send_report_bug-method -->
797
+
798
+
799
+ </div><!-- public-instance-method-details -->
800
+
801
+ </div><!-- 5Buntitled-5D -->
802
+
803
+
804
+ </div><!-- documentation -->
805
+
806
+ <div id="validator-badges">
807
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
808
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
809
+ Rdoc Generator</a> 2</small>.</p>
810
+ </div>
811
+
812
+ </body>
813
+ </html>
814
+