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
@@ -1,105 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: ExceptionsHelper</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">ExceptionsHelper</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/app/helpers/exceptions_helper_rb.html">
59
- app/helpers/exceptions_helper.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
-
76
-
77
- </div>
78
-
79
-
80
- </div>
81
-
82
-
83
- <!-- if includes -->
84
-
85
- <div id="section">
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
- <!-- if method_list -->
95
-
96
-
97
- </div>
98
-
99
-
100
- <div id="validator-badges">
101
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
102
- </div>
103
-
104
- </body>
105
- </html>
@@ -1,804 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: GraphController</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">GraphController</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/app/controllers/graph_controller_rb.html">
59
- app/controllers/graph_controller.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="ApplicationController.html">
69
- ApplicationController
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000047">bar_graph</a>&nbsp;&nbsp;
92
- <a href="#M000042">database_usage_graph</a>&nbsp;&nbsp;
93
- <a href="#M000051">draw_chart</a>&nbsp;&nbsp;
94
- <a href="#M000050">get_labels_for_graph</a>&nbsp;&nbsp;
95
- <a href="#M000049">get_legends_for_graphs</a>&nbsp;&nbsp;
96
- <a href="#M000038">get_next_app</a>&nbsp;&nbsp;
97
- <a href="#M000039">get_next_graph</a>&nbsp;&nbsp;
98
- <a href="#M000048">horizontal_graph</a>&nbsp;&nbsp;
99
- <a href="#M000037">index</a>&nbsp;&nbsp;
100
- <a href="#M000046">line_graph</a>&nbsp;&nbsp;
101
- <a href="#M000052">pie</a>&nbsp;&nbsp;
102
- <a href="#M000043">resource_usage_graph_app</a>&nbsp;&nbsp;
103
- <a href="#M000045">resource_usage_graph_server</a>&nbsp;&nbsp;
104
- <a href="#M000044">throughput_graph</a>&nbsp;&nbsp;
105
- <a href="#M000040">url_breakup_graph</a>&nbsp;&nbsp;
106
- <a href="#M000041">url_calls_graph</a>&nbsp;&nbsp;
107
- </div>
108
- </div>
109
-
110
- </div>
111
-
112
-
113
- <!-- if includes -->
114
- <div id="includes">
115
- <h3 class="section-bar">Included Modules</h3>
116
-
117
- <div id="includes-list">
118
- <span class="include-name"><a href="Analytics/ResourceUsage.html">Analytics::ResourceUsage</a></span>
119
- <span class="include-name"><a href="Analytics/UrlBreakup.html">Analytics::UrlBreakup</a></span>
120
- <span class="include-name"><a href="Analytics/Database.html">Analytics::Database</a></span>
121
- <span class="include-name"><a href="Analytics/Throughput.html">Analytics::Throughput</a></span>
122
- <span class="include-name"><a href="Analytics/Url.html">Analytics::Url</a></span>
123
- </div>
124
- </div>
125
-
126
- <div id="section">
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
- <!-- if method_list -->
136
- <div id="methods">
137
- <h3 class="section-bar">Public Instance methods</h3>
138
-
139
- <div id="method-M000047" class="method-detail">
140
- <a name="M000047"></a>
141
-
142
- <div class="method-heading">
143
- <a href="#M000047" class="method-signature">
144
- <span class="method-name">bar_graph</span><span class="method-args">(x_data, y_data, title, max=300, slab=30, x_legend=&quot;&quot;, y_legend=&quot;&quot;)</span>
145
- </a>
146
- </div>
147
-
148
- <div class="method-description">
149
- <p>
150
- This method is to plot the bar graph for the data supplied to the method.
151
- </p>
152
- <p><a class="source-toggle" href="#"
153
- onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
154
- <div class="method-source-code" id="M000047-source">
155
- <pre>
156
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 208</span>
157
- 208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bar_graph</span>(<span class="ruby-identifier">x_data</span>, <span class="ruby-identifier">y_data</span>, <span class="ruby-identifier">title</span>, <span class="ruby-identifier">max</span>=<span class="ruby-value">300</span>, <span class="ruby-identifier">slab</span>=<span class="ruby-value">30</span>, <span class="ruby-identifier">x_legend</span>=<span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-identifier">y_legend</span>=<span class="ruby-value str">&quot;&quot;</span>)
158
- 209: <span class="ruby-identifier">title</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Title</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">title</span>)
159
- 210: <span class="ruby-identifier">bar</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">BarGlass</span>.<span class="ruby-identifier">new</span>
160
- 211: <span class="ruby-identifier">bar_values</span> = []
161
- 212: <span class="ruby-identifier">count</span> = <span class="ruby-value">0</span>
162
- 213: <span class="ruby-identifier">y_data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">y</span><span class="ruby-operator">|</span>
163
- 214: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">y</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
164
- 215: <span class="ruby-identifier">bar_values</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">y</span>
165
- 216: <span class="ruby-keyword kw">else</span>
166
- 217: <span class="ruby-identifier">bar_values</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">BarValue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:top</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">y</span>, <span class="ruby-identifier">:tip</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;#{round(y)}(#{x_data[count]})&quot;</span>)
167
- 218: <span class="ruby-comment cmt">#bar_values &lt;&lt; OFC2::BarValue.new(:top =&gt; y, :colour =&gt; '#000000', :tip =&gt; &quot;#{round(y)}(#{x_data[count]})&quot;)</span>
168
- 219: <span class="ruby-keyword kw">end</span>
169
- 220: <span class="ruby-identifier">count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
170
- 221: <span class="ruby-keyword kw">end</span>
171
- 222: <span class="ruby-identifier">bar</span>.<span class="ruby-identifier">values</span> = <span class="ruby-identifier">bar_values</span>
172
- 223: <span class="ruby-identifier">bar</span>.<span class="ruby-identifier">text</span> = <span class="ruby-value str">''</span>
173
- 224: <span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span> = <span class="ruby-identifier">get_legends_for_graphs</span>(<span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span>)
174
- 225: <span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span> = <span class="ruby-identifier">get_labels_for_graph</span>(<span class="ruby-identifier">x_data</span>, <span class="ruby-identifier">max</span>, <span class="ruby-identifier">slab</span>, <span class="ruby-value">1</span>)
175
- 226: <span class="ruby-identifier">draw_chart</span>(<span class="ruby-identifier">x</span>,<span class="ruby-identifier">y</span>,<span class="ruby-identifier">x_legend</span>,<span class="ruby-identifier">y_legend</span>,<span class="ruby-identifier">title</span>,<span class="ruby-identifier">bar</span>)
176
- 227: <span class="ruby-keyword kw">end</span>
177
- </pre>
178
- </div>
179
- </div>
180
- </div>
181
-
182
- <div id="method-M000042" class="method-detail">
183
- <a name="M000042"></a>
184
-
185
- <div class="method-heading">
186
- <a href="#M000042" class="method-signature">
187
- <span class="method-name">database_usage_graph</span><span class="method-args">()</span>
188
- </a>
189
- </div>
190
-
191
- <div class="method-description">
192
- <p><a class="source-toggle" href="#"
193
- onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
194
- <div class="method-source-code" id="M000042-source">
195
- <pre>
196
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 125</span>
197
- 125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">database_usage_graph</span>
198
- 126: <span class="ruby-ivar">@app_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_id</span>]
199
- 127: <span class="ruby-comment cmt"># if date is changed from calendar popup, we would get only date</span>
200
- 128: <span class="ruby-comment cmt"># if slider is changed, we would get date and hour</span>
201
- 129: <span class="ruby-identifier">date_str</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:date</span>].<span class="ruby-identifier">strip</span>
202
- 130: <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">check_for_valid_query_date</span>(<span class="ruby-identifier">date_str</span>)
203
- 131: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rv</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
204
- 132: <span class="ruby-identifier">check_and_set_query_date</span>(<span class="ruby-identifier">rv</span>[<span class="ruby-value">0</span>])
205
- 133: <span class="ruby-ivar">@percentage_db_usage_graph</span> = <span class="ruby-identifier">get_database_usage_graph</span>(<span class="ruby-ivar">@app_id</span>)
206
- 134: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'database_usage_graph'</span>
207
- 135: <span class="ruby-comment cmt">#puts @percentage_db_usage_graph </span>
208
- 136: <span class="ruby-keyword kw">else</span>
209
- 137: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rv</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">404</span>
210
- 138: <span class="ruby-keyword kw">end</span>
211
- 139: <span class="ruby-keyword kw">end</span>
212
- </pre>
213
- </div>
214
- </div>
215
- </div>
216
-
217
- <div id="method-M000051" class="method-detail">
218
- <a name="M000051"></a>
219
-
220
- <div class="method-heading">
221
- <a href="#M000051" class="method-signature">
222
- <span class="method-name">draw_chart</span><span class="method-args">(x, y, x_legend, y_legend, title, line)</span>
223
- </a>
224
- </div>
225
-
226
- <div class="method-description">
227
- <p>
228
- This method is used to draw the line or bar graph.
229
- </p>
230
- <p><a class="source-toggle" href="#"
231
- onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
232
- <div class="method-source-code" id="M000051-source">
233
- <pre>
234
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 320</span>
235
- 320: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draw_chart</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span>, <span class="ruby-identifier">title</span>, <span class="ruby-identifier">line</span>)
236
- 321: <span class="ruby-identifier">chart</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Graph</span>.<span class="ruby-identifier">new</span>
237
- 322: <span class="ruby-identifier">title</span>.<span class="ruby-identifier">set_style</span>(<span class="ruby-value str">&quot;{font-size: 15px; color: #990B0A; text-align: center;font-weight: bold;}&quot;</span>)
238
- 323: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">title</span> = <span class="ruby-identifier">title</span>
239
- 324: <span class="ruby-identifier">chart</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">line</span>
240
- 325: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">x_axis</span> = <span class="ruby-identifier">x</span>
241
- 326: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">y_axis</span> = <span class="ruby-identifier">y</span>
242
- 327: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">bg_colour</span> = <span class="ruby-value str">'#FFFFFF'</span>
243
- 328: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">grid_colour</span> = <span class="ruby-value str">&quot;#E9EAEC&quot;</span>
244
- 329: <span class="ruby-identifier">y</span>.<span class="ruby-identifier">grid_colour</span> = <span class="ruby-value str">&quot;#E9EAEC&quot;</span>
245
- 330: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">colour</span> = <span class="ruby-value str">&quot;#000000&quot;</span>
246
- 331: <span class="ruby-identifier">y</span>.<span class="ruby-identifier">colour</span> = <span class="ruby-value str">&quot;#000000&quot;</span>
247
- 332: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">labels</span>.<span class="ruby-identifier">style</span> = <span class="ruby-value str">&quot;{font-size: 30px; color:#0000ff; font-family: Verdana;}&quot;</span>
248
- 333: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">colour</span> = <span class="ruby-value str">&quot;#990B0A&quot;</span>
249
- 334: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">set_x_legend</span>(<span class="ruby-identifier">x_legend</span>)
250
- 335: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">set_y_legend</span>(<span class="ruby-identifier">y_legend</span>)
251
- 336: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">render</span>
252
- 337: <span class="ruby-keyword kw">end</span>
253
- </pre>
254
- </div>
255
- </div>
256
- </div>
257
-
258
- <div id="method-M000050" class="method-detail">
259
- <a name="M000050"></a>
260
-
261
- <div class="method-heading">
262
- <a href="#M000050" class="method-signature">
263
- <span class="method-name">get_labels_for_graph</span><span class="method-args">(x_data, max, slab, steps)</span>
264
- </a>
265
- </div>
266
-
267
- <div class="method-description">
268
- <p>
269
- This methos is to label the X and Y axis for either of the line or bar
270
- graph.
271
- </p>
272
- <p><a class="source-toggle" href="#"
273
- onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
274
- <div class="method-source-code" id="M000050-source">
275
- <pre>
276
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 306</span>
277
- 306: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_labels_for_graph</span>(<span class="ruby-identifier">x_data</span>, <span class="ruby-identifier">max</span>, <span class="ruby-identifier">slab</span>, <span class="ruby-identifier">steps</span>)
278
- 307: <span class="ruby-identifier">x</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">XAxis</span>.<span class="ruby-identifier">new</span>
279
- 308: <span class="ruby-identifier">y</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">YAxis</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:min</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>, <span class="ruby-identifier">:max</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max</span>, <span class="ruby-identifier">:steps</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">slab</span>)
280
- 309: <span class="ruby-identifier">x_labels</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">XAxisLabels</span>.<span class="ruby-identifier">new</span>
281
- 310: <span class="ruby-identifier">x_labels</span>.<span class="ruby-identifier">rotate</span> = <span class="ruby-value str">'diagonal'</span>
282
- 311: <span class="ruby-identifier">x_labels</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-value">12</span>)
283
- 312: <span class="ruby-identifier">x_labels</span>.<span class="ruby-identifier">set_labels</span> <span class="ruby-identifier">x_data</span>
284
- 313: <span class="ruby-identifier">x_labels</span>.<span class="ruby-identifier">set_steps</span>(<span class="ruby-identifier">steps</span>)
285
- 314: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">set_labels</span> <span class="ruby-identifier">x_labels</span>
286
- 315: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">set_steps</span>(<span class="ruby-identifier">steps</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">steps</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
287
- 316: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>
288
- 317: <span class="ruby-keyword kw">end</span>
289
- </pre>
290
- </div>
291
- </div>
292
- </div>
293
-
294
- <div id="method-M000049" class="method-detail">
295
- <a name="M000049"></a>
296
-
297
- <div class="method-heading">
298
- <a href="#M000049" class="method-signature">
299
- <span class="method-name">get_legends_for_graphs</span><span class="method-args">(x_legend, y_legend)</span>
300
- </a>
301
- </div>
302
-
303
- <div class="method-description">
304
- <p>
305
- This method is to set the legends for either of the line or bar graph.
306
- </p>
307
- <p><a class="source-toggle" href="#"
308
- onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
309
- <div class="method-source-code" id="M000049-source">
310
- <pre>
311
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 297</span>
312
- 297: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_legends_for_graphs</span>(<span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span>)
313
- 298: <span class="ruby-identifier">x_legend</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">XLegend</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">x_legend</span>)
314
- 299: <span class="ruby-identifier">y_legend</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">YLegend</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">y_legend</span>)
315
- 300: <span class="ruby-identifier">x_legend</span>.<span class="ruby-identifier">set_style</span>(<span class="ruby-value str">'{font-size: 12px; color: #990B0A;}'</span>)
316
- 301: <span class="ruby-identifier">y_legend</span>.<span class="ruby-identifier">set_style</span>(<span class="ruby-value str">'{font-size: 12px; color: #990B0A;}'</span>)
317
- 302: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span>
318
- 303: <span class="ruby-keyword kw">end</span>
319
- </pre>
320
- </div>
321
- </div>
322
- </div>
323
-
324
- <div id="method-M000038" class="method-detail">
325
- <a name="M000038"></a>
326
-
327
- <div class="method-heading">
328
- <a href="#M000038" class="method-signature">
329
- <span class="method-name">get_next_app</span><span class="method-args">()</span>
330
- </a>
331
- </div>
332
-
333
- <div class="method-description">
334
- <p>
335
- This method will give the details and initial graphs for the selected
336
- application. This method is called when the application is selected from
337
- the select box for selecting application on <a
338
- href="GraphController.html#M000037">index</a> page of the graph controller.
339
- </p>
340
- <p><a class="source-toggle" href="#"
341
- onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
342
- <div class="method-source-code" id="M000038-source">
343
- <pre>
344
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 50</span>
345
- 50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_next_app</span>
346
- 51: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:application_name</span>]
347
- 52: <span class="ruby-ivar">@application_name</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:application_name</span>]
348
- 53: <span class="ruby-keyword kw">else</span>
349
- 54: <span class="ruby-ivar">@application_name</span> = <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:application_name</span>]
350
- 55: <span class="ruby-keyword kw">end</span>
351
- 56: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:application_name</span>] = <span class="ruby-ivar">@application_name</span>
352
- 57: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:graph_type</span>] = <span class="ruby-value str">&quot;URL-Breakup&quot;</span>
353
- 58: <span class="ruby-identifier">get_graphs</span>()
354
- 59: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'graph_page'</span>
355
- 60: <span class="ruby-keyword kw">end</span>
356
- </pre>
357
- </div>
358
- </div>
359
- </div>
360
-
361
- <div id="method-M000039" class="method-detail">
362
- <a name="M000039"></a>
363
-
364
- <div class="method-heading">
365
- <a href="#M000039" class="method-signature">
366
- <span class="method-name">get_next_graph</span><span class="method-args">()</span>
367
- </a>
368
- </div>
369
-
370
- <div class="method-description">
371
- <p>
372
- This method is to display the different type of graphs as per the user
373
- selection from the populated select box. This method gets its input from
374
- the select box named as &quot;Select Graph&quot;. This method call the
375
- method as per the grpah name supplied from the select box.
376
- </p>
377
- <p><a class="source-toggle" href="#"
378
- onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
379
- <div class="method-source-code" id="M000039-source">
380
- <pre>
381
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 65</span>
382
- 65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_next_graph</span>
383
- 66: <span class="ruby-identifier">app_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>]
384
- 67: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:graph_type</span>] = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:graph_name</span>]
385
- 68: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:graph_name</span>]
386
- 69: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;URL-Calls&quot;</span>
387
- 70: <span class="ruby-identifier">get_url_data</span>(<span class="ruby-identifier">app_id</span>)
388
- 71: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;Database-Usage&quot;</span>
389
- 72: <span class="ruby-identifier">get_database_data</span>(<span class="ruby-identifier">app_id</span>)
390
- 73: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;URL-Breakup&quot;</span>
391
- 74: <span class="ruby-identifier">get_url_breakup_data</span>(<span class="ruby-identifier">app_id</span>)
392
- 75: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;Throughput&quot;</span>
393
- 76: <span class="ruby-identifier">get_throughput_data</span>(<span class="ruby-identifier">app_id</span>)
394
- 77: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;Resource-Usage&quot;</span>
395
- 78: <span class="ruby-identifier">get_resource_usage_data_app</span>(<span class="ruby-identifier">app_id</span>)
396
- 79: <span class="ruby-keyword kw">end</span>
397
- 80: <span class="ruby-keyword kw">end</span>
398
- </pre>
399
- </div>
400
- </div>
401
- </div>
402
-
403
- <div id="method-M000048" class="method-detail">
404
- <a name="M000048"></a>
405
-
406
- <div class="method-heading">
407
- <a href="#M000048" class="method-signature">
408
- <span class="method-name">horizontal_graph</span><span class="method-args">(x_data, y_data, title, max=300, slab=30, x_legend=&quot;&quot;, y_legend=&quot;&quot;)</span>
409
- </a>
410
- </div>
411
-
412
- <div class="method-description">
413
- <p><a class="source-toggle" href="#"
414
- onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
415
- <div class="method-source-code" id="M000048-source">
416
- <pre>
417
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 229</span>
418
- 229: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">horizontal_graph</span>(<span class="ruby-identifier">x_data</span>, <span class="ruby-identifier">y_data</span>, <span class="ruby-identifier">title</span>, <span class="ruby-identifier">max</span>=<span class="ruby-value">300</span>, <span class="ruby-identifier">slab</span>=<span class="ruby-value">30</span>, <span class="ruby-identifier">x_legend</span>=<span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-identifier">y_legend</span>=<span class="ruby-value str">&quot;&quot;</span>)
419
- 230: <span class="ruby-identifier">title</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Title</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">title</span>)
420
- 231: <span class="ruby-identifier">data</span> = []
421
- 232: <span class="ruby-identifier">y_data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
422
- 233: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
423
- 234: <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">HBarValue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:left</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>, <span class="ruby-identifier">:right</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">i</span>)
424
- 235: <span class="ruby-keyword kw">else</span>
425
- 236: <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">i</span>
426
- 237: <span class="ruby-keyword kw">end</span>
427
- 238: <span class="ruby-keyword kw">end</span>
428
- 239: <span class="ruby-identifier">bar</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">HBar</span>.<span class="ruby-identifier">new</span>
429
- 240: <span class="ruby-identifier">bar</span>.<span class="ruby-identifier">values</span> = <span class="ruby-identifier">data</span>
430
- 241: <span class="ruby-identifier">bar</span>.<span class="ruby-identifier">set_tooltip</span>(<span class="ruby-value str">&quot;&quot;</span>)
431
- 242: <span class="ruby-identifier">bar</span>.<span class="ruby-identifier">text</span> = <span class="ruby-value str">''</span>
432
- 243: <span class="ruby-identifier">x_labels</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">XAxisLabels</span>.<span class="ruby-identifier">new</span>
433
- 244: <span class="ruby-identifier">labels</span>= []
434
- 245: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">max</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">10</span>
435
- 246: <span class="ruby-identifier">labels</span> = [<span class="ruby-value str">'0'</span>,<span class="ruby-value str">'1'</span>,<span class="ruby-value str">'2'</span>,<span class="ruby-value str">'3'</span>,<span class="ruby-value str">'4'</span>,<span class="ruby-value str">'5'</span>,<span class="ruby-value str">'6'</span>,<span class="ruby-value str">'7'</span>,<span class="ruby-value str">'8'</span>,<span class="ruby-value str">'9'</span>]
436
- 247: <span class="ruby-keyword kw">else</span>
437
- 248: <span class="ruby-comment cmt"># TODO find some way to prevent empty label creation, max could be 1,000,000 and gives unnecessary overhead to server and client</span>
438
- 249: <span class="ruby-comment cmt"># http://teethgrinder.co.uk/open-flash-chart-2/x-axis-labels-step.php </span>
439
- 250: <span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">max</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
440
- 251: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">slab</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
441
- 252: <span class="ruby-identifier">labels</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_s</span>
442
- 253: <span class="ruby-keyword kw">else</span>
443
- 254: <span class="ruby-identifier">labels</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">''</span>
444
- 255: <span class="ruby-keyword kw">end</span>
445
- 256: <span class="ruby-keyword kw">end</span>
446
- 257: <span class="ruby-identifier">x_labels</span>.<span class="ruby-identifier">steps</span> = <span class="ruby-identifier">slab</span>
447
- 258: <span class="ruby-keyword kw">end</span>
448
- 259: <span class="ruby-identifier">x_labels</span>.<span class="ruby-identifier">labels</span> = <span class="ruby-identifier">labels</span>
449
- 260: <span class="ruby-identifier">x</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">XAxis</span>.<span class="ruby-identifier">new</span>
450
- 261: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">labels</span> = <span class="ruby-identifier">x_labels</span>
451
- 262: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">steps</span> = <span class="ruby-identifier">slab</span>
452
- 263: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">offset</span> = <span class="ruby-keyword kw">false</span>
453
- 264: <span class="ruby-identifier">y</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">YAxis</span>.<span class="ruby-identifier">new</span>
454
- 265: <span class="ruby-identifier">y</span>.<span class="ruby-identifier">offset</span> = <span class="ruby-keyword kw">true</span>
455
- 266: <span class="ruby-identifier">y</span>.<span class="ruby-identifier">labels</span> = <span class="ruby-identifier">x_data</span>.<span class="ruby-identifier">reverse</span>
456
- 267: <span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span> = <span class="ruby-identifier">get_legends_for_graphs</span>(<span class="ruby-identifier">y_legend</span>, <span class="ruby-identifier">x_legend</span>.<span class="ruby-identifier">reverse</span>)
457
- 268: <span class="ruby-comment cmt">#draw_chart(x, y, x_legend, y_legend, title, bar)</span>
458
- 269:
459
- 270: <span class="ruby-identifier">tooltip</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Tooltip</span>.<span class="ruby-identifier">new</span>
460
- 271: <span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">set_hover</span>()
461
- 272: <span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">mouse</span> = <span class="ruby-value">2</span>
462
- 273: <span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">set_stroke</span>(<span class="ruby-value">1</span>)
463
- 274: <span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">set_backgroung_colour</span>(<span class="ruby-value str">&quot;#ffffff&quot;</span>)
464
- 275: <span class="ruby-identifier">tooltip</span>.<span class="ruby-identifier">set_colour</span>(<span class="ruby-value str">&quot;#000000&quot;</span>)
465
- 276:
466
- 277: <span class="ruby-identifier">chart</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Graph</span>.<span class="ruby-identifier">new</span>
467
- 278: <span class="ruby-identifier">title</span>.<span class="ruby-identifier">set_style</span>(<span class="ruby-value str">&quot;{font-size: 15px; color: #990B0A; text-align: center;font-weight: bold;}&quot;</span>)
468
- 279: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">title</span> = <span class="ruby-identifier">title</span>
469
- 280: <span class="ruby-identifier">chart</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">bar</span>
470
- 281: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">x_axis</span> = <span class="ruby-identifier">x</span>
471
- 282: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">y_axis</span> = <span class="ruby-identifier">y</span>
472
- 283: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">bg_colour</span> = <span class="ruby-value str">'#FFFFFF'</span>
473
- 284: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">grid_colour</span> = <span class="ruby-value str">&quot;#E9EAEC&quot;</span>
474
- 285: <span class="ruby-identifier">y</span>.<span class="ruby-identifier">grid_colour</span> = <span class="ruby-value str">&quot;#E9EAEC&quot;</span>
475
- 286: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">colour</span> = <span class="ruby-value str">&quot;#000000&quot;</span>
476
- 287: <span class="ruby-identifier">y</span>.<span class="ruby-identifier">colour</span> = <span class="ruby-value str">&quot;#000000&quot;</span>
477
- 288: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">labels</span>.<span class="ruby-identifier">style</span> = <span class="ruby-value str">&quot;{font-size: 30px; color:#0000ff; font-family: Verdana;}&quot;</span>
478
- 289: <span class="ruby-identifier">bar</span>.<span class="ruby-identifier">colour</span> = <span class="ruby-value str">&quot;#990B0A&quot;</span>
479
- 290: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">set_x_legend</span>(<span class="ruby-identifier">x_legend</span>)
480
- 291: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">set_y_legend</span>(<span class="ruby-identifier">y_legend</span>)
481
- 292: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">set_tooltip</span>(<span class="ruby-identifier">tooltip</span>)
482
- 293: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">render</span>
483
- 294: <span class="ruby-keyword kw">end</span>
484
- </pre>
485
- </div>
486
- </div>
487
- </div>
488
-
489
- <div id="method-M000037" class="method-detail">
490
- <a name="M000037"></a>
491
-
492
- <div class="method-heading">
493
- <a href="#M000037" class="method-signature">
494
- <span class="method-name">index</span><span class="method-args">()</span>
495
- </a>
496
- </div>
497
-
498
- <div class="method-description">
499
- <p>
500
- This action renders the <a href="Analytics.html">Analytics</a> page. This
501
- tab displayed the url breakdown information as a default if there is some
502
- application hosted in the server else it shows the server stats.
503
- </p>
504
- <p><a class="source-toggle" href="#"
505
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
506
- <div class="method-source-code" id="M000037-source">
507
- <pre>
508
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 37</span>
509
- 37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index</span>
510
- 38: <span class="ruby-ivar">@apps</span> = <span class="ruby-identifier">get_application_list</span>
511
- 39: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:graph_type</span>] = <span class="ruby-value str">&quot;URL-Breakup&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:graph_type</span>]
512
- 40: <span class="ruby-identifier">get_graphs</span>()
513
- 41: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@apps</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">SERVER_NAME</span>
514
- 42: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:exceptions_application_name</span>] = <span class="ruby-keyword kw">nil</span>
515
- 43: <span class="ruby-keyword kw">else</span>
516
- 44: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:exceptions_application_name</span>] = <span class="ruby-identifier">get_application_list_for_exceptions</span>[<span class="ruby-value">0</span>]
517
- 45: <span class="ruby-keyword kw">end</span>
518
- 46: <span class="ruby-keyword kw">end</span>
519
- </pre>
520
- </div>
521
- </div>
522
- </div>
523
-
524
- <div id="method-M000046" class="method-detail">
525
- <a name="M000046"></a>
526
-
527
- <div class="method-heading">
528
- <a href="#M000046" class="method-signature">
529
- <span class="method-name">line_graph</span><span class="method-args">(x_data, y_data, title, max=300, slab=30, step=3, x_legend=&quot;&quot;, y_legend=&quot;&quot;)</span>
530
- </a>
531
- </div>
532
-
533
- <div class="method-description">
534
- <p>
535
- This method is to plot the line graph for the data supplied to the method.
536
- </p>
537
- <p><a class="source-toggle" href="#"
538
- onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
539
- <div class="method-source-code" id="M000046-source">
540
- <pre>
541
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 187</span>
542
- 187: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">line_graph</span>(<span class="ruby-identifier">x_data</span>, <span class="ruby-identifier">y_data</span>, <span class="ruby-identifier">title</span>, <span class="ruby-identifier">max</span>=<span class="ruby-value">300</span>, <span class="ruby-identifier">slab</span>=<span class="ruby-value">30</span>, <span class="ruby-identifier">step</span>=<span class="ruby-value">3</span>, <span class="ruby-identifier">x_legend</span>=<span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-identifier">y_legend</span>=<span class="ruby-value str">&quot;&quot;</span>)
543
- 188: <span class="ruby-identifier">title</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Title</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">title</span>)
544
- 189: <span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span> = <span class="ruby-identifier">get_legends_for_graphs</span>(<span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span>)
545
- 190: <span class="ruby-identifier">line</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Line</span>.<span class="ruby-identifier">new</span>
546
- 191: <span class="ruby-identifier">line_values</span>=[]
547
- 192: <span class="ruby-identifier">count</span> = <span class="ruby-value">0</span>
548
- 193: <span class="ruby-identifier">y_data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">y</span><span class="ruby-operator">|</span>
549
- 194: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">y</span>.<span class="ruby-identifier">nil?</span>
550
- 195: <span class="ruby-identifier">line_values</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">y</span>
551
- 196: <span class="ruby-keyword kw">else</span>
552
- 197: <span class="ruby-identifier">line_values</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Dot</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">y</span>, <span class="ruby-identifier">:tip</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;At #{x_data[count]} value is #{round(y)}&quot;</span>)
553
- 198: <span class="ruby-keyword kw">end</span>
554
- 199: <span class="ruby-identifier">count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
555
- 200: <span class="ruby-keyword kw">end</span>
556
- 201: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">values</span> = <span class="ruby-identifier">line_values</span>
557
- 202: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">text</span> = <span class="ruby-value str">''</span>
558
- 203: <span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span> = <span class="ruby-identifier">get_labels_for_graph</span>(<span class="ruby-identifier">x_data</span>, <span class="ruby-identifier">max</span>, <span class="ruby-identifier">slab</span>, <span class="ruby-identifier">step</span>)
559
- 204: <span class="ruby-identifier">draw_chart</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x_legend</span>, <span class="ruby-identifier">y_legend</span>, <span class="ruby-identifier">title</span>, <span class="ruby-identifier">line</span>)
560
- 205: <span class="ruby-keyword kw">end</span>
561
- </pre>
562
- </div>
563
- </div>
564
- </div>
565
-
566
- <div id="method-M000052" class="method-detail">
567
- <a name="M000052"></a>
568
-
569
- <div class="method-heading">
570
- <a href="#M000052" class="method-signature">
571
- <span class="method-name">pie</span><span class="method-args">()</span>
572
- </a>
573
- </div>
574
-
575
- <div class="method-description">
576
- <p>
577
- This method is to plot <a href="GraphController.html#M000052">pie</a>
578
- chart.
579
- </p>
580
- <p><a class="source-toggle" href="#"
581
- onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
582
- <div class="method-source-code" id="M000052-source">
583
- <pre>
584
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 340</span>
585
- 340: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pie</span>
586
- 341: <span class="ruby-identifier">data_1</span>, <span class="ruby-identifier">title</span>, <span class="ruby-identifier">data_x</span>, <span class="ruby-identifier">data_y</span>, <span class="ruby-identifier">data_actual_time</span> = <span class="ruby-identifier">pie_data</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>], <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:url</span>])
587
- 342: <span class="ruby-identifier">color</span>=[<span class="ruby-value str">&quot;#d01f3c&quot;</span>,<span class="ruby-value str">&quot;#356aa0&quot;</span>,<span class="ruby-value str">&quot;#C79810&quot;</span>,<span class="ruby-value str">&quot;#cccccc&quot;</span>,<span class="ruby-value str">&quot;#ffcc00&quot;</span>,<span class="ruby-value str">&quot;#ff3300&quot;</span>,<span class="ruby-value str">&quot;#99cc00&quot;</span>,<span class="ruby-value str">&quot;#cc9900&quot;</span>,<span class="ruby-value str">&quot;#333300&quot;</span>,<span class="ruby-value str">&quot;#ffff00&quot;</span>,<span class="ruby-value str">&quot;#990000&quot;</span>,<span class="ruby-value str">&quot;#ffff00&quot;</span>,<span class="ruby-value str">&quot;#ff0033&quot;</span>,
588
- 343: <span class="ruby-value str">&quot;#00ffff&quot;</span>,<span class="ruby-value str">&quot;#00cc33&quot;</span>,<span class="ruby-value str">&quot;#ff66ff&quot;</span>,<span class="ruby-value str">&quot;#3300cc&quot;</span>,<span class="ruby-value str">&quot;#0033ff&quot;</span>,<span class="ruby-value str">&quot;#ffccff&quot;</span>,<span class="ruby-value str">&quot;#ccccff&quot;</span>,<span class="ruby-value str">&quot;#cc33cc&quot;</span>,<span class="ruby-value str">&quot;#ff9933&quot;</span>,<span class="ruby-value str">&quot;#ffffff&quot;</span>,<span class="ruby-value str">&quot;#000000&quot;</span>]
589
- 344: <span class="ruby-identifier">pie</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Pie</span>.<span class="ruby-identifier">new</span>
590
- 345: <span class="ruby-identifier">pie</span>.<span class="ruby-identifier">colours</span> = <span class="ruby-identifier">color</span>
591
- 346: <span class="ruby-identifier">pie</span>.<span class="ruby-identifier">start_angle</span> = <span class="ruby-value">35</span>
592
- 347: <span class="ruby-identifier">pie</span>.<span class="ruby-identifier">animate</span> = <span class="ruby-keyword kw">true</span>
593
- 348: <span class="ruby-identifier">pie</span>.<span class="ruby-identifier">radius</span> = <span class="ruby-value">130</span>
594
- 349: <span class="ruby-identifier">pie</span>.<span class="ruby-identifier">values</span> = <span class="ruby-identifier">data_1</span>
595
- 350: <span class="ruby-identifier">pie</span>.<span class="ruby-identifier">label_colour</span> = <span class="ruby-value str">&quot;#000000&quot;</span>
596
- 351: <span class="ruby-identifier">chart</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Graph</span>.<span class="ruby-identifier">new</span>
597
- 352: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">title</span> = <span class="ruby-constant">OFC2</span><span class="ruby-operator">::</span><span class="ruby-constant">Title</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">title</span>, <span class="ruby-identifier">:style</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;{font-size: 15px; color: #990B0A; text-align: center;font-weight: bold;}&quot;</span>)
598
- 353: <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">bg_colour</span> = <span class="ruby-value str">'#FFFFFF'</span>
599
- 354: <span class="ruby-identifier">chart</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">pie</span>
600
- 355: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">chart</span>.<span class="ruby-identifier">render</span>
601
- 356: <span class="ruby-keyword kw">end</span>
602
- </pre>
603
- </div>
604
- </div>
605
- </div>
606
-
607
- <div id="method-M000043" class="method-detail">
608
- <a name="M000043"></a>
609
-
610
- <div class="method-heading">
611
- <a href="#M000043" class="method-signature">
612
- <span class="method-name">resource_usage_graph_app</span><span class="method-args">()</span>
613
- </a>
614
- </div>
615
-
616
- <div class="method-description">
617
- <p><a class="source-toggle" href="#"
618
- onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
619
- <div class="method-source-code" id="M000043-source">
620
- <pre>
621
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 141</span>
622
- 141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resource_usage_graph_app</span>
623
- 142: <span class="ruby-ivar">@app_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_id</span>]
624
- 143: <span class="ruby-comment cmt"># if date is changed from calendar popup, we would get only date</span>
625
- 144: <span class="ruby-comment cmt"># if slider is changed, we would get date and hour</span>
626
- 145: <span class="ruby-identifier">date_str</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:date</span>].<span class="ruby-identifier">strip</span>
627
- 146: <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">check_for_valid_query_date</span>(<span class="ruby-identifier">date_str</span>)
628
- 147: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rv</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
629
- 148: <span class="ruby-identifier">check_and_set_query_date</span>(<span class="ruby-identifier">rv</span>[<span class="ruby-value">0</span>])
630
- 149: <span class="ruby-ivar">@app_cpu_usage_graph</span>,<span class="ruby-ivar">@app_memory_usage_graph</span> = <span class="ruby-identifier">get_resource_usage_graph_app</span>(<span class="ruby-ivar">@app_id</span>)
631
- 150: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial=</span><span class="ruby-operator">&gt;</span> <span class="ruby-value str">'resource_usage_graph_app'</span>
632
- 151: <span class="ruby-keyword kw">else</span>
633
- 152: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rv</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">404</span>
634
- 153: <span class="ruby-keyword kw">end</span>
635
- 154:
636
- 155: <span class="ruby-keyword kw">end</span>
637
- </pre>
638
- </div>
639
- </div>
640
- </div>
641
-
642
- <div id="method-M000045" class="method-detail">
643
- <a name="M000045"></a>
644
-
645
- <div class="method-heading">
646
- <a href="#M000045" class="method-signature">
647
- <span class="method-name">resource_usage_graph_server</span><span class="method-args">()</span>
648
- </a>
649
- </div>
650
-
651
- <div class="method-description">
652
- <p><a class="source-toggle" href="#"
653
- onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
654
- <div class="method-source-code" id="M000045-source">
655
- <pre>
656
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 172</span>
657
- 172: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resource_usage_graph_server</span>
658
- 173: <span class="ruby-comment cmt"># if date is changed from calendar popup, we would get only date</span>
659
- 174: <span class="ruby-comment cmt"># if slider is changed, we would get date and hour</span>
660
- 175: <span class="ruby-identifier">date_str</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:date</span>].<span class="ruby-identifier">strip</span>
661
- 176: <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">check_for_valid_query_date</span>(<span class="ruby-identifier">date_str</span>)
662
- 177: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rv</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
663
- 178: <span class="ruby-identifier">check_and_set_query_date</span>(<span class="ruby-identifier">rv</span>[<span class="ruby-value">0</span>])
664
- 179: <span class="ruby-ivar">@server_cpu_usage_graph</span>, <span class="ruby-ivar">@server_memory_usage_graph</span> = <span class="ruby-identifier">get_resource_usage_graph_server</span>()
665
- 180: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'resource_usage_graph_server'</span>
666
- 181: <span class="ruby-keyword kw">else</span>
667
- 182: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rv</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">404</span>
668
- 183: <span class="ruby-keyword kw">end</span>
669
- 184: <span class="ruby-keyword kw">end</span>
670
- </pre>
671
- </div>
672
- </div>
673
- </div>
674
-
675
- <div id="method-M000044" class="method-detail">
676
- <a name="M000044"></a>
677
-
678
- <div class="method-heading">
679
- <a href="#M000044" class="method-signature">
680
- <span class="method-name">throughput_graph</span><span class="method-args">()</span>
681
- </a>
682
- </div>
683
-
684
- <div class="method-description">
685
- <p><a class="source-toggle" href="#"
686
- onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
687
- <div class="method-source-code" id="M000044-source">
688
- <pre>
689
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 157</span>
690
- 157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">throughput_graph</span>
691
- 158: <span class="ruby-ivar">@app_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_id</span>]
692
- 159: <span class="ruby-comment cmt"># if date is changed from calendar popup, we would get only date</span>
693
- 160: <span class="ruby-comment cmt"># if slider is changed, we would get date and hour</span>
694
- 161: <span class="ruby-identifier">date_str</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:date</span>].<span class="ruby-identifier">strip</span>
695
- 162: <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">check_for_valid_query_date</span>(<span class="ruby-identifier">date_str</span>)
696
- 163: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rv</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
697
- 164: <span class="ruby-identifier">check_and_set_query_date</span>(<span class="ruby-identifier">rv</span>[<span class="ruby-value">0</span>])
698
- 165: <span class="ruby-ivar">@avg_res_time_graph</span>,<span class="ruby-ivar">@app_throughput_graph</span> = <span class="ruby-identifier">get_throughput_graph</span>(<span class="ruby-ivar">@app_id</span>)
699
- 166: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'throughput_graph'</span>
700
- 167: <span class="ruby-keyword kw">else</span>
701
- 168: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rv</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">404</span>
702
- 169: <span class="ruby-keyword kw">end</span>
703
- 170: <span class="ruby-keyword kw">end</span>
704
- </pre>
705
- </div>
706
- </div>
707
- </div>
708
-
709
- <div id="method-M000040" class="method-detail">
710
- <a name="M000040"></a>
711
-
712
- <div class="method-heading">
713
- <a href="#M000040" class="method-signature">
714
- <span class="method-name">url_breakup_graph</span><span class="method-args">()</span>
715
- </a>
716
- </div>
717
-
718
- <div class="method-description">
719
- <p>
720
- This method is called when the graphs are needed for a particular period.
721
- </p>
722
- <p><a class="source-toggle" href="#"
723
- onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
724
- <div class="method-source-code" id="M000040-source">
725
- <pre>
726
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 83</span>
727
- 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url_breakup_graph</span>
728
- 84: <span class="ruby-ivar">@urls</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
729
- 85: <span class="ruby-ivar">@app_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_id</span>]
730
- 86: <span class="ruby-identifier">from_date_str</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:from_date</span>].<span class="ruby-identifier">strip</span>
731
- 87: <span class="ruby-identifier">to_date_str</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:to_date</span>].<span class="ruby-identifier">strip</span>
732
- 88: <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">check_for_valid_period</span>(<span class="ruby-identifier">from_date_str</span>, <span class="ruby-identifier">to_date_str</span>)
733
- 89: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rv</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
734
- 90: <span class="ruby-comment cmt"># check_for_valid_period method would set Time object having hour minute and second value to zero</span>
735
- 91: <span class="ruby-comment cmt"># for entime we would change it 23:59:59 by adding 86399 seconds </span>
736
- 92: <span class="ruby-identifier">check_and_set_query_period</span>(<span class="ruby-identifier">rv</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">rv</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">+</span> <span class="ruby-value">86399</span>)
737
- 93: <span class="ruby-ivar">@urls</span> = <span class="ruby-constant">UrlTimeSample</span>.<span class="ruby-identifier">get_urls</span>(<span class="ruby-identifier">session</span>[<span class="ruby-identifier">:from_date</span>], <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:to_date</span>], <span class="ruby-ivar">@app_id</span>)
738
- 94: <span class="ruby-ivar">@start_time</span> = <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:from_date</span>].<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">&quot;%Y/%m/%d&quot;</span>)
739
- 95: <span class="ruby-ivar">@end_time</span> = <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:to_date</span>].<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">&quot;%Y/%m/%d&quot;</span>)
740
- 96: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@urls</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
741
- 97: <span class="ruby-ivar">@url_rank</span> = <span class="ruby-value">1</span>
742
- 98: <span class="ruby-ivar">@suffix</span> = <span class="ruby-identifier">get_suffix</span>(<span class="ruby-ivar">@url_rank</span>)
743
- 99: <span class="ruby-ivar">@data_x</span>,<span class="ruby-ivar">@data_y</span>,<span class="ruby-ivar">@url_breakup_graph</span>,<span class="ruby-ivar">@data_actual_time</span> = <span class="ruby-identifier">get_url_breakup_graph_data</span>(<span class="ruby-ivar">@start_time</span>, <span class="ruby-ivar">@end_time</span>, <span class="ruby-ivar">@app_id</span>, <span class="ruby-ivar">@urls</span>)
744
- 100: <span class="ruby-keyword kw">else</span>
745
- 101: <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-constant">NO_URL_HITS</span>
746
- 102: <span class="ruby-keyword kw">end</span>
747
- 103: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'url_breakup_graph'</span>
748
- 104: <span class="ruby-keyword kw">else</span>
749
- 105: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rv</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">404</span>
750
- 106: <span class="ruby-keyword kw">end</span>
751
- 107: <span class="ruby-keyword kw">end</span>
752
- </pre>
753
- </div>
754
- </div>
755
- </div>
756
-
757
- <div id="method-M000041" class="method-detail">
758
- <a name="M000041"></a>
759
-
760
- <div class="method-heading">
761
- <a href="#M000041" class="method-signature">
762
- <span class="method-name">url_calls_graph</span><span class="method-args">()</span>
763
- </a>
764
- </div>
765
-
766
- <div class="method-description">
767
- <p><a class="source-toggle" href="#"
768
- onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
769
- <div class="method-source-code" id="M000041-source">
770
- <pre>
771
- <span class="ruby-comment cmt"># File app/controllers/graph_controller.rb, line 109</span>
772
- 109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url_calls_graph</span>
773
- 110: <span class="ruby-ivar">@app_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_id</span>]
774
- 111: <span class="ruby-identifier">from_date_str</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:from_date</span>].<span class="ruby-identifier">strip</span>
775
- 112: <span class="ruby-identifier">to_date_str</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:to_date</span>].<span class="ruby-identifier">strip</span>
776
- 113: <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">check_for_valid_period</span>(<span class="ruby-identifier">from_date_str</span>, <span class="ruby-identifier">to_date_str</span>)
777
- 114: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rv</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
778
- 115: <span class="ruby-comment cmt"># check_for_valid_period method would set Time object having hour minute and second value to zero</span>
779
- 116: <span class="ruby-comment cmt"># for entime we would change it 23:59:59 by adding 86399 seconds </span>
780
- 117: <span class="ruby-identifier">check_and_set_query_period</span>(<span class="ruby-identifier">rv</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">rv</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">+</span> <span class="ruby-value">86399</span>)
781
- 118: <span class="ruby-ivar">@url_hits_graph</span>, <span class="ruby-ivar">@slowest_url_graph</span>, <span class="ruby-ivar">@time_consuming_url_graph</span>, <span class="ruby-ivar">@db_consuming_url_graph</span> = <span class="ruby-identifier">get_url_calls_graph</span>(<span class="ruby-ivar">@app_id</span>)
782
- 119: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'url_calls_graph'</span>
783
- 120: <span class="ruby-keyword kw">else</span>
784
- 121: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rv</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">404</span>
785
- 122: <span class="ruby-keyword kw">end</span>
786
- 123: <span class="ruby-keyword kw">end</span>
787
- </pre>
788
- </div>
789
- </div>
790
- </div>
791
-
792
-
793
- </div>
794
-
795
-
796
- </div>
797
-
798
-
799
- <div id="validator-badges">
800
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
801
- </div>
802
-
803
- </body>
804
- </html>