webroar 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/README +1 -1
- data/doc/user-guide.html +125 -85
- data/doc/user-guide.txt +2 -2
- data/lib/constant.rb +23 -16
- data/lib/db_connect.rb +2 -3
- data/lib/installer.rb +17 -10
- data/lib/user_interaction.rb +21 -10
- data/lib/webroar_command.rb +21 -23
- data/src/admin_panel/Gemfile +8 -0
- data/src/admin_panel/Rakefile +2 -5
- data/src/admin_panel/app/controllers/application_controller.rb +1 -1
- data/src/admin_panel/app/controllers/exceptions_controller.rb +25 -26
- data/src/admin_panel/app/controllers/graph_controller.rb +2 -1
- data/src/admin_panel/app/helpers/admin_helper.rb +1 -1
- data/src/admin_panel/app/{models → mailers}/mailer.rb +5 -8
- data/src/admin_panel/app/models/app.rb +1 -1
- data/src/admin_panel/app/models/app_exception.rb +15 -11
- data/src/admin_panel/app/models/app_time_sample.rb +40 -10
- data/src/admin_panel/app/models/application_specification.rb +71 -41
- data/src/admin_panel/app/models/resource_usage.rb +76 -55
- data/src/admin_panel/app/models/url_breakup_time_sample.rb +6 -11
- data/src/admin_panel/app/models/url_time_sample.rb +57 -13
- data/src/admin_panel/app/views/admin/_application_table.html.erb +5 -5
- data/src/admin_panel/app/views/admin/_feedback_partial.html.erb +4 -4
- data/src/admin_panel/app/views/admin/_report_bug_partial.html.erb +5 -5
- data/src/admin_panel/app/views/admin/change_password_form.html.erb +3 -3
- data/src/admin_panel/app/views/admin/configuration.html.erb +6 -6
- data/src/admin_panel/app/views/admin/home.html.erb +4 -4
- data/src/admin_panel/app/views/admin/index.html.erb +5 -5
- data/src/admin_panel/app/views/application_specification/_application_specification_form.html.erb +15 -6
- data/src/admin_panel/app/views/exceptions/_add_and_list_exception_classes.html.erb +7 -6
- data/src/admin_panel/app/views/exceptions/_exception_backtrace_partial.html.erb +1 -1
- data/src/admin_panel/app/views/exceptions/_exception_environment_partial.html.erb +30 -30
- data/src/admin_panel/app/views/exceptions/_exception_list_partial.html.erb +11 -11
- data/src/admin_panel/app/views/exceptions/_show.html.erb +8 -8
- data/src/admin_panel/app/views/exceptions/index.html.erb +0 -1
- data/src/admin_panel/app/views/graph/_get_database_data.html.erb +1 -1
- data/src/admin_panel/app/views/graph/_get_resource_usage_data_app.html.erb +2 -2
- data/src/admin_panel/app/views/graph/_get_resource_usage_data_server.html.erb +2 -2
- data/src/admin_panel/app/views/graph/_get_throughput_data.html.erb +2 -2
- data/src/admin_panel/app/views/graph/_get_url_data.html.erb +4 -4
- data/src/admin_panel/app/views/graph/_pie.html.erb +2 -2
- data/src/admin_panel/app/views/graph/_query_date.html.erb +1 -1
- data/src/admin_panel/app/views/graph/_query_period.html.erb +1 -1
- data/src/admin_panel/app/views/graph/_slider_partial.html.erb +5 -4
- data/src/admin_panel/app/views/graph/index.html.erb +0 -1
- data/src/admin_panel/app/views/headers/_add_expires_text_box.html.erb +5 -5
- data/src/admin_panel/app/views/headers/_expires_by_type_form.html.erb +1 -1
- data/src/admin_panel/app/views/headers/_headers_table.html.erb +12 -12
- data/src/admin_panel/app/views/layouts/application.html.erb +71 -51
- data/src/admin_panel/app/views/mail_specification/_current_spec.html.erb +4 -4
- data/src/admin_panel/app/views/mail_specification/_sendmail_form.html.erb +3 -3
- data/src/admin_panel/app/views/mail_specification/_smtp_form.html.erb +3 -3
- data/src/admin_panel/app/views/server_specification/_add_div.html.erb +4 -4
- data/src/admin_panel/app/views/server_specification/_ssl_support_form.html.erb +3 -2
- data/src/admin_panel/config.ru +4 -0
- data/src/admin_panel/config/application.rb +46 -0
- data/src/admin_panel/config/boot.rb +4 -112
- data/src/admin_panel/config/environment.rb +4 -85
- data/src/admin_panel/config/environments/development.rb +20 -13
- data/src/admin_panel/config/environments/production.rb +44 -17
- data/src/admin_panel/config/environments/test.rb +31 -18
- data/src/admin_panel/config/initializers/application_constants.rb +13 -11
- data/src/admin_panel/config/initializers/secret_token.rb +7 -0
- data/src/admin_panel/config/initializers/session_store.rb +8 -0
- data/src/admin_panel/config/initializers/ssl.rb +6 -2
- data/src/admin_panel/config/routes.rb +15 -57
- data/src/admin_panel/doc/README_FOR_APP +1 -1
- data/src/admin_panel/doc/app/ActionView.html +229 -0
- data/src/admin_panel/doc/app/ActionView/Helpers.html +229 -0
- data/src/admin_panel/doc/app/ActionView/Helpers/AssetTagHelper.html +277 -0
- data/src/admin_panel/doc/app/AdminController.html +814 -0
- data/src/admin_panel/doc/app/AdminHelper.html +495 -0
- data/src/admin_panel/doc/app/Analytics.html +272 -0
- data/src/admin_panel/doc/app/Analytics/Database.html +401 -0
- data/src/admin_panel/doc/app/Analytics/ResourceUsage.html +683 -0
- data/src/admin_panel/doc/app/Analytics/Throughput.html +488 -0
- data/src/admin_panel/doc/app/Analytics/Url.html +484 -0
- data/src/admin_panel/doc/app/Analytics/UrlBreakup.html +537 -0
- data/src/admin_panel/doc/app/App.html +489 -0
- data/src/admin_panel/doc/app/AppException.html +710 -0
- data/src/admin_panel/doc/app/AppTimeSample.html +620 -0
- data/src/admin_panel/doc/app/ApplicationController.html +239 -0
- data/src/admin_panel/doc/app/ApplicationHelper.html +296 -0
- data/src/admin_panel/doc/app/ApplicationSpecification.html +876 -0
- data/src/admin_panel/doc/app/ApplicationSpecificationController.html +552 -0
- data/src/admin_panel/doc/app/ApplicationSpecificationHelper.html +219 -0
- data/src/admin_panel/doc/app/Control.html +431 -0
- data/src/admin_panel/doc/app/ExceptionDetail.html +227 -0
- data/src/admin_panel/doc/app/ExceptionsController.html +754 -0
- data/src/admin_panel/doc/app/ExceptionsHelper.html +219 -0
- data/src/admin_panel/doc/app/GraphController.html +1101 -0
- data/src/admin_panel/doc/app/GraphHelper.html +285 -0
- data/src/admin_panel/doc/app/Headers.html +549 -0
- data/src/admin_panel/doc/app/HeadersController.html +507 -0
- data/src/admin_panel/doc/app/HeadersHelper.html +219 -0
- data/src/admin_panel/doc/app/MailSpecification.html +685 -0
- data/src/admin_panel/doc/app/MailSpecificationController.html +541 -0
- data/src/admin_panel/doc/app/MailSpecificationHelper.html +219 -0
- data/src/admin_panel/doc/app/Mailer.html +589 -0
- data/src/admin_panel/doc/app/Object.html +240 -0
- data/src/admin_panel/doc/app/PseudoModel.html +354 -0
- data/src/admin_panel/doc/app/ResourceUsage.html +656 -0
- data/src/admin_panel/doc/app/SCGI.html +674 -0
- data/src/admin_panel/doc/app/ServerSpecification.html +479 -0
- data/src/admin_panel/doc/app/ServerSpecificationController.html +500 -0
- data/src/admin_panel/doc/app/ServerSpecificationHelper.html +219 -0
- data/src/admin_panel/doc/app/SignalHelper.html +287 -0
- data/src/admin_panel/doc/app/UrlBreakupTimeSample.html +287 -0
- data/src/admin_panel/doc/app/UrlTimeSample.html +986 -0
- data/src/admin_panel/doc/app/User.html +290 -0
- data/src/admin_panel/doc/app/YAMLConfig.html +247 -0
- data/src/admin_panel/doc/app/YAMLWriter.html +284 -0
- data/src/admin_panel/doc/app/app/controllers/admin_controller_rb.html +52 -0
- data/src/admin_panel/doc/app/app/controllers/application_controller_rb.html +54 -0
- data/src/admin_panel/doc/app/app/controllers/application_specification_controller_rb.html +52 -0
- data/src/admin_panel/doc/app/app/controllers/exceptions_controller_rb.html +52 -0
- data/src/admin_panel/doc/app/app/controllers/graph_controller_rb.html +52 -0
- data/src/admin_panel/doc/app/app/controllers/headers_controller_rb.html +52 -0
- data/src/admin_panel/doc/app/app/controllers/mail_specification_controller_rb.html +52 -0
- data/src/admin_panel/doc/app/app/controllers/server_specification_controller_rb.html +52 -0
- data/src/admin_panel/doc/app/app/helpers/admin_helper_rb.html +52 -0
- data/src/admin_panel/doc/app/app/helpers/application_helper_rb.html +52 -0
- data/src/admin_panel/doc/app/app/helpers/application_specification_helper_rb.html +52 -0
- data/src/admin_panel/doc/app/app/helpers/exceptions_helper_rb.html +52 -0
- data/src/admin_panel/doc/app/app/helpers/graph_helper_rb.html +52 -0
- data/src/admin_panel/doc/app/app/helpers/headers_helper_rb.html +52 -0
- data/src/admin_panel/doc/app/app/helpers/mail_specification_helper_rb.html +52 -0
- data/src/admin_panel/doc/app/app/helpers/server_specification_helper_rb.html +52 -0
- data/src/admin_panel/doc/app/app/mailers/mailer_rb.html +56 -0
- data/src/admin_panel/doc/app/app/models/app_exception_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/app_rb.html +54 -0
- data/src/admin_panel/doc/app/app/models/app_time_sample_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/application_specification_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/exception_detail_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/headers_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/mail_specification_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/pseudo_model_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/resource_usage_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/server_specification_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/url_breakup_time_sample_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/url_time_sample_rb.html +52 -0
- data/src/admin_panel/doc/app/app/models/user_rb.html +52 -0
- data/src/admin_panel/doc/app/created.rid +42 -1
- data/src/admin_panel/doc/app/doc/README_FOR_APP.html +172 -0
- data/src/admin_panel/doc/app/images/brick.png +0 -0
- data/src/admin_panel/doc/app/images/brick_link.png +0 -0
- data/src/admin_panel/doc/app/images/bug.png +0 -0
- data/src/admin_panel/doc/app/images/bullet_black.png +0 -0
- data/src/admin_panel/doc/app/images/bullet_toggle_minus.png +0 -0
- data/src/admin_panel/doc/app/images/bullet_toggle_plus.png +0 -0
- data/src/admin_panel/doc/app/images/date.png +0 -0
- data/src/admin_panel/doc/app/images/find.png +0 -0
- data/src/admin_panel/doc/app/images/loadingAnimation.gif +0 -0
- data/src/admin_panel/doc/app/images/macFFBgHack.png +0 -0
- data/src/admin_panel/doc/app/images/package.png +0 -0
- data/src/admin_panel/doc/app/images/page_green.png +0 -0
- data/src/admin_panel/doc/app/images/page_white_text.png +0 -0
- data/src/admin_panel/doc/app/images/page_white_width.png +0 -0
- data/src/admin_panel/doc/app/images/plugin.png +0 -0
- data/src/admin_panel/doc/app/images/ruby.png +0 -0
- data/src/admin_panel/doc/app/images/tag_green.png +0 -0
- data/src/admin_panel/doc/app/images/wrench.png +0 -0
- data/src/admin_panel/doc/app/images/wrench_orange.png +0 -0
- data/src/admin_panel/doc/app/images/zoom.png +0 -0
- data/src/admin_panel/doc/app/index.html +564 -20
- data/src/admin_panel/doc/app/js/darkfish.js +116 -0
- data/src/admin_panel/doc/app/js/jquery.js +32 -0
- data/src/admin_panel/doc/app/js/quicksearch.js +114 -0
- data/src/admin_panel/doc/app/js/thickbox-compressed.js +10 -0
- data/src/admin_panel/doc/app/lib/asset_tag_helper_ext_rb.html +52 -0
- data/src/admin_panel/doc/app/lib/control_rb.html +58 -0
- data/src/admin_panel/doc/app/lib/graph_controller_extensions/database_analytics_rb.html +52 -0
- data/src/admin_panel/doc/app/lib/graph_controller_extensions/resource_usage_analytics_rb.html +52 -0
- data/src/admin_panel/doc/app/lib/graph_controller_extensions/throughput_analytics_rb.html +52 -0
- data/src/admin_panel/doc/app/lib/graph_controller_extensions/url_analytics_rb.html +52 -0
- data/src/admin_panel/doc/app/lib/graph_controller_extensions/url_breakup_analytics_rb.html +52 -0
- data/src/admin_panel/doc/app/lib/helper_rb.html +52 -0
- data/src/admin_panel/doc/app/lib/scgi_rb.html +54 -0
- data/src/admin_panel/doc/app/lib/yaml_writer_rb.html +52 -0
- data/src/admin_panel/doc/app/rdoc.css +763 -0
- data/src/admin_panel/lib/helper.rb +6 -2
- data/src/admin_panel/public/stylesheets/other/login.css +8 -4
- data/src/admin_panel/public/stylesheets/other/style.css +21 -17
- data/src/admin_panel/script/rails +6 -0
- data/src/admin_panel/test/test_helper.rb +2 -2
- data/src/admin_panel/vendor/plugins/calendar_date_select/History.txt +281 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/MIT-LICENSE +20 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/Manifest.txt +42 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/README.txt +17 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/Rakefile +37 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/VERSION +1 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/calendar_date_select.gemspec +95 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/init.rb +1 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/functional/cds_test.html +376 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/functional/format_iso_date_test.html +52 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/prototype.js +4184 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/test.css +40 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/unit/cds_helper_methods.html +46 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/unittest.js +564 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select.rb +33 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/calendar_date_select.rb +122 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/form_helpers.rb +237 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/includes_helper.rb +29 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/blank_iframe.html +2 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/images/calendar_date_select/calendar.gif +0 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/calendar_date_select.js +459 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_american.js +35 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_danish.js +31 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_db.js +27 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +7 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_finnish.js +32 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_hyphen_ampm.js +37 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_iso_date.js +29 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_italian.js +24 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ar.js +10 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/cs.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/da.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/de.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/es.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/fi.js +10 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/fr.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/hu.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/it.js +9 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ja.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/nl.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/pl.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/pt.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ru.js +10 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/sl.js +11 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/sv.js +9 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/blue.css +130 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/default.css +135 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/green.css +142 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/plain.css +128 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/red.css +135 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/silver.css +133 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/calendar_date_select_spec.rb +14 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/form_helpers_spec.rb +189 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/includes_helper_spec.rb +46 -0
- data/src/admin_panel/vendor/plugins/calendar_date_select/spec/spec_helper.rb +26 -0
- data/src/admin_panel/vendor/plugins/open_flash_chart_2_plugin/install.rb +2 -2
- data/src/admin_panel/vendor/plugins/open_flash_chart_2_plugin/uninstall.rb +2 -2
- data/src/admin_panel/vendor/plugins/prototype_legacy_helper/README.markdown +13 -0
- data/src/admin_panel/vendor/plugins/prototype_legacy_helper/init.rb +1 -0
- data/src/admin_panel/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +432 -0
- data/src/admin_panel/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +297 -0
- data/src/helper/wr_config.c +1 -1
- data/src/ruby_lib/analyzer/message_analyzer.rb +1 -0
- data/src/ruby_lib/analyzer/webroar_analyzer.rb +2 -2
- data/src/ruby_lib/profiler/message_dispatcher.rb +1 -1
- data/src/ruby_lib/ruby_interface/version.rb +2 -2
- data/src/ruby_lib/webroar_app_loader.rb +1 -1
- data/tasks/gem.rake +5 -7
- data/tasks/test.rake +1 -0
- data/test/spec/analytics_spec.rb +25 -24
- data/test/spec/test_app/README +142 -129
- data/test/spec/test_app/Rakefile +2 -5
- data/test/spec/test_app/app/controllers/application_controller.rb +3 -8
- data/test/spec/test_app/app/controllers/test_controller.rb +3 -3
- data/test/spec/test_app/app/controllers/users_controller.rb +8 -8
- data/test/spec/test_app/app/helpers/application_helper.rb +2 -1
- data/test/spec/test_app/app/helpers/test_helper.rb +2 -0
- data/test/spec/test_app/app/helpers/users_helper.rb +2 -0
- data/test/spec/test_app/app/models/user.rb +2 -0
- data/test/spec/test_app/app/views/layouts/{users.html.erb → application.html.erb} +6 -9
- data/test/spec/test_app/app/views/test/post_data.html.erb +2 -2
- data/test/spec/test_app/app/views/test/upload_file.html.erb +1 -1
- data/test/spec/test_app/{db/migrate/20090602102438_create_users.rb → app/views/users/_form.html.erb} +22 -11
- data/test/spec/test_app/app/views/users/edit.html.erb +19 -28
- data/test/spec/test_app/app/views/users/index.html.erb +23 -19
- data/test/spec/test_app/app/views/users/new.html.erb +19 -28
- data/test/spec/test_app/app/views/users/show.html.erb +21 -18
- data/test/spec/test_app/config/application.rb +45 -0
- data/test/spec/test_app/config/boot.rb +4 -112
- data/test/spec/test_app/config/database.yml +1 -1
- data/test/spec/test_app/config/environment.rb +4 -41
- data/test/spec/test_app/config/environments/development.rb +22 -13
- data/test/spec/test_app/config/environments/production.rb +41 -20
- data/test/spec/test_app/config/environments/test.rb +35 -28
- data/test/spec/test_app/config/initializers/backtrace_silencers.rb +2 -2
- data/test/spec/test_app/config/initializers/inflections.rb +1 -1
- data/test/spec/test_app/config/initializers/secret_token.rb +7 -0
- data/test/spec/test_app/config/initializers/session_store.rb +3 -10
- data/test/spec/test_app/config/locales/en.yml +5 -0
- data/test/spec/test_app/config/routes.rb +37 -22
- data/test/spec/test_app/db/migrate/20110906113329_create_users.rb +13 -0
- data/test/spec/test_app/db/seeds.rb +7 -0
- data/test/spec/test_app/public/404.html +15 -19
- data/test/spec/test_app/public/422.html +15 -19
- data/test/spec/test_app/public/500.html +14 -18
- data/test/spec/test_app/public/index.html +41 -77
- data/test/spec/test_app/public/javascripts/controls.js +5 -3
- data/test/spec/test_app/public/javascripts/dragdrop.js +7 -6
- data/test/spec/test_app/public/javascripts/effects.js +8 -13
- data/test/spec/test_app/public/javascripts/prototype.js +3381 -1700
- data/test/spec/test_app/public/javascripts/rails.js +191 -0
- data/test/spec/test_app/public/stylesheets/scaffold.css +15 -13
- data/test/spec/test_app/script/rails +6 -0
- metadata +340 -163
- data/src/admin_panel/Gemfile.lock +0 -79
- data/src/admin_panel/doc/app/classes/ActionView.html +0 -111
- data/src/admin_panel/doc/app/classes/ActionView/Helpers.html +0 -111
- data/src/admin_panel/doc/app/classes/ActionView/Helpers/AssetTagHelper.html +0 -149
- data/src/admin_panel/doc/app/classes/AdminController.html +0 -628
- data/src/admin_panel/doc/app/classes/AdminHelper.html +0 -482
- data/src/admin_panel/doc/app/classes/Analytics.html +0 -138
- data/src/admin_panel/doc/app/classes/Analytics/Database.html +0 -245
- data/src/admin_panel/doc/app/classes/Analytics/ResourceUsage.html +0 -478
- data/src/admin_panel/doc/app/classes/Analytics/Throughput.html +0 -316
- data/src/admin_panel/doc/app/classes/Analytics/Url.html +0 -314
- data/src/admin_panel/doc/app/classes/Analytics/UrlBreakup.html +0 -372
- data/src/admin_panel/doc/app/classes/App.html +0 -298
- data/src/admin_panel/doc/app/classes/AppException.html +0 -330
- data/src/admin_panel/doc/app/classes/AppTimeSample.html +0 -427
- data/src/admin_panel/doc/app/classes/ApplicationController.html +0 -118
- data/src/admin_panel/doc/app/classes/ApplicationHelper.html +0 -172
- data/src/admin_panel/doc/app/classes/ApplicationSpecification.html +0 -641
- data/src/admin_panel/doc/app/classes/ApplicationSpecificationController.html +0 -354
- data/src/admin_panel/doc/app/classes/Control.html +0 -273
- data/src/admin_panel/doc/app/classes/ExceptionsController.html +0 -612
- data/src/admin_panel/doc/app/classes/ExceptionsHelper.html +0 -105
- data/src/admin_panel/doc/app/classes/GraphController.html +0 -804
- data/src/admin_panel/doc/app/classes/GraphHelper.html +0 -164
- data/src/admin_panel/doc/app/classes/MailSpecification.html +0 -357
- data/src/admin_panel/doc/app/classes/MailSpecificationController.html +0 -304
- data/src/admin_panel/doc/app/classes/PseudoModel.html +0 -206
- data/src/admin_panel/doc/app/classes/ResourceUsage.html +0 -425
- data/src/admin_panel/doc/app/classes/SCGI.html +0 -406
- data/src/admin_panel/doc/app/classes/ServerSpecification.html +0 -325
- data/src/admin_panel/doc/app/classes/ServerSpecificationController.html +0 -273
- data/src/admin_panel/doc/app/classes/UrlBreakupTimeSample.html +0 -169
- data/src/admin_panel/doc/app/classes/UrlTimeSample.html +0 -708
- data/src/admin_panel/doc/app/classes/User.html +0 -165
- data/src/admin_panel/doc/app/classes/YAMLWriter.html +0 -159
- data/src/admin_panel/doc/app/files/app/controllers/admin_controller_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/controllers/application_controller_rb.html +0 -108
- data/src/admin_panel/doc/app/files/app/controllers/application_specification_controller_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/controllers/exceptions_controller_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/controllers/graph_controller_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/controllers/mail_specification_controller_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/controllers/server_specification_controller_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/helpers/admin_helper_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/helpers/application_helper_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/helpers/exceptions_helper_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/helpers/graph_helper_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/app_exception_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/app_rb.html +0 -108
- data/src/admin_panel/doc/app/files/app/models/app_time_sample_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/application_specification_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/mail_specification_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/pseudo_model_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/resource_usage_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/server_specification_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/url_breakup_time_sample_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/url_time_sample_rb.html +0 -101
- data/src/admin_panel/doc/app/files/app/models/user_rb.html +0 -101
- data/src/admin_panel/doc/app/files/doc/README_FOR_APP.html +0 -109
- data/src/admin_panel/doc/app/files/lib/asset_tag_helper_ext_rb.html +0 -101
- data/src/admin_panel/doc/app/files/lib/control_rb.html +0 -110
- data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/database_analytics_rb.html +0 -101
- data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/resource_usage_analytics_rb.html +0 -101
- data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/throughput_analytics_rb.html +0 -101
- data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/url_analytics_rb.html +0 -101
- data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/url_breakup_analytics_rb.html +0 -101
- data/src/admin_panel/doc/app/files/lib/scgi_rb.html +0 -101
- data/src/admin_panel/doc/app/files/lib/yaml_writer_rb.html +0 -101
- data/src/admin_panel/doc/app/fr_class_index.html +0 -60
- data/src/admin_panel/doc/app/fr_file_index.html +0 -58
- data/src/admin_panel/doc/app/fr_method_index.html +0 -206
- data/src/admin_panel/doc/app/rdoc-style.css +0 -208
- data/src/admin_panel/public/dispatch.cgi +0 -10
- data/src/admin_panel/public/dispatch.fcgi +0 -24
- data/src/admin_panel/public/dispatch.rb +0 -10
- data/src/admin_panel/script/about +0 -4
- data/src/admin_panel/script/console +0 -3
- data/src/admin_panel/script/dbconsole +0 -3
- data/src/admin_panel/script/destroy +0 -3
- data/src/admin_panel/script/generate +0 -3
- data/src/admin_panel/script/performance/benchmarker +0 -3
- data/src/admin_panel/script/performance/profiler +0 -3
- data/src/admin_panel/script/performance/request +0 -3
- data/src/admin_panel/script/plugin +0 -3
- data/src/admin_panel/script/process/inspector +0 -3
- data/src/admin_panel/script/process/reaper +0 -3
- data/src/admin_panel/script/process/spawner +0 -3
- data/src/admin_panel/script/runner +0 -3
- data/src/admin_panel/script/server +0 -3
- data/test/spec/test_app/config/initializers/new_rails_defaults.rb +0 -19
- data/test/spec/test_app/script/about +0 -4
- data/test/spec/test_app/script/console +0 -3
- data/test/spec/test_app/script/dbconsole +0 -3
- data/test/spec/test_app/script/destroy +0 -3
- data/test/spec/test_app/script/generate +0 -3
- data/test/spec/test_app/script/performance/benchmarker +0 -3
- data/test/spec/test_app/script/performance/profiler +0 -3
- data/test/spec/test_app/script/plugin +0 -3
- data/test/spec/test_app/script/runner +0 -3
- data/test/spec/test_app/script/server +0 -3
- data/test/spec/test_app/vendor/.placeholder +0 -0
@@ -1,628 +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: AdminController</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">AdminController</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/app/controllers/admin_controller_rb.html">
|
59
|
-
app/controllers/admin_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
|
-
<div id="description">
|
84
|
-
<p>
|
85
|
-
This controller deals with all the actions related to the user handling and
|
86
|
-
application <a href="AdminController.html#M000011">configuration</a>.
|
87
|
-
</p>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div id="method-list">
|
95
|
-
<h3 class="section-bar">Methods</h3>
|
96
|
-
|
97
|
-
<div class="name-list">
|
98
|
-
<a href="#M000016">add_text_box</a>
|
99
|
-
<a href="#M000017">cancel_edit</a>
|
100
|
-
<a href="#M000014">change_password</a>
|
101
|
-
<a href="#M000015">change_password_form</a>
|
102
|
-
<a href="#M000011">configuration</a>
|
103
|
-
<a href="#M000009">get_latest_app_cpu_usage</a>
|
104
|
-
<a href="#M000010">get_latest_app_memory_usage</a>
|
105
|
-
<a href="#M000007">get_latest_server_cpu_usage</a>
|
106
|
-
<a href="#M000008">get_latest_server_memory_usage</a>
|
107
|
-
<a href="#M000018">get_latest_time</a>
|
108
|
-
<a href="#M000006">home</a>
|
109
|
-
<a href="#M000005">index</a>
|
110
|
-
<a href="#M000012">login</a>
|
111
|
-
<a href="#M000013">logout</a>
|
112
|
-
<a href="#M000019">required_apps</a>
|
113
|
-
</div>
|
114
|
-
</div>
|
115
|
-
|
116
|
-
</div>
|
117
|
-
|
118
|
-
|
119
|
-
<!-- if includes -->
|
120
|
-
|
121
|
-
<div id="section">
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<!-- if method_list -->
|
131
|
-
<div id="methods">
|
132
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
133
|
-
|
134
|
-
<div id="method-M000016" class="method-detail">
|
135
|
-
<a name="M000016"></a>
|
136
|
-
|
137
|
-
<div class="method-heading">
|
138
|
-
<a href="#M000016" class="method-signature">
|
139
|
-
<span class="method-name">add_text_box</span><span class="method-args">()</span>
|
140
|
-
</a>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
<div class="method-description">
|
144
|
-
<p>
|
145
|
-
This method is to add div for changing the server specifications. This
|
146
|
-
action is called as a ajax call when user click on the edit button of the
|
147
|
-
server specification block in the <a
|
148
|
-
href="AdminController.html#M000011">configuration</a> page.
|
149
|
-
</p>
|
150
|
-
<p><a class="source-toggle" href="#"
|
151
|
-
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
152
|
-
<div class="method-source-code" id="M000016-source">
|
153
|
-
<pre>
|
154
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 160</span>
|
155
|
-
160: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text_box</span>
|
156
|
-
161: <span class="ruby-ivar">@path</span> = <span class="ruby-constant">CONFIG_FILE_PATH</span>
|
157
|
-
162: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'add_div'</span>
|
158
|
-
163: <span class="ruby-keyword kw">end</span>
|
159
|
-
</pre>
|
160
|
-
</div>
|
161
|
-
</div>
|
162
|
-
</div>
|
163
|
-
|
164
|
-
<div id="method-M000017" class="method-detail">
|
165
|
-
<a name="M000017"></a>
|
166
|
-
|
167
|
-
<div class="method-heading">
|
168
|
-
<a href="#M000017" class="method-signature">
|
169
|
-
<span class="method-name">cancel_edit</span><span class="method-args">()</span>
|
170
|
-
</a>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="method-description">
|
174
|
-
<p>
|
175
|
-
This method is to close the edit box for the server specification. This is
|
176
|
-
called if user doesnot wants to made the changes in the server
|
177
|
-
specification.
|
178
|
-
</p>
|
179
|
-
<p><a class="source-toggle" href="#"
|
180
|
-
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
181
|
-
<div class="method-source-code" id="M000017-source">
|
182
|
-
<pre>
|
183
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 167</span>
|
184
|
-
167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cancel_edit</span>
|
185
|
-
168: <span class="ruby-identifier">text</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:old_value</span>].<span class="ruby-identifier">to_s</span>
|
186
|
-
169: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">text</span>
|
187
|
-
170: <span class="ruby-keyword kw">end</span>
|
188
|
-
</pre>
|
189
|
-
</div>
|
190
|
-
</div>
|
191
|
-
</div>
|
192
|
-
|
193
|
-
<div id="method-M000014" class="method-detail">
|
194
|
-
<a name="M000014"></a>
|
195
|
-
|
196
|
-
<div class="method-heading">
|
197
|
-
<a href="#M000014" class="method-signature">
|
198
|
-
<span class="method-name">change_password</span><span class="method-args">()</span>
|
199
|
-
</a>
|
200
|
-
</div>
|
201
|
-
|
202
|
-
<div class="method-description">
|
203
|
-
<p>
|
204
|
-
The action is to change the password of the admin panel user.
|
205
|
-
</p>
|
206
|
-
<p><a class="source-toggle" href="#"
|
207
|
-
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
208
|
-
<div class="method-source-code" id="M000014-source">
|
209
|
-
<pre>
|
210
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 128</span>
|
211
|
-
128: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">change_password</span>
|
212
|
-
129: <span class="ruby-identifier">set_application_name</span>
|
213
|
-
130: <span class="ruby-identifier">password_changed</span> = <span class="ruby-keyword kw">false</span>
|
214
|
-
131: <span class="ruby-identifier">users</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-constant">USERS_FILE_PATH</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
215
|
-
132: <span class="ruby-identifier">users</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">user</span><span class="ruby-operator">|</span>
|
216
|
-
133: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">user</span>[<span class="ruby-value str">'user_name'</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:user</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">user</span>[<span class="ruby-value str">'password'</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:password</span>][<span class="ruby-identifier">:old</span>]) <span class="ruby-operator">&&</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:password</span>][<span class="ruby-identifier">:new</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:password</span>][<span class="ruby-identifier">:confirm</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:password</span>][<span class="ruby-identifier">:new</span>].<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">5</span>
|
217
|
-
134: <span class="ruby-identifier">user</span>[<span class="ruby-value str">'password'</span>] = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:password</span>][<span class="ruby-identifier">:new</span>])
|
218
|
-
135: <span class="ruby-identifier">password_changed</span> = <span class="ruby-keyword kw">true</span>
|
219
|
-
136: <span class="ruby-keyword kw">break</span>
|
220
|
-
137: <span class="ruby-keyword kw">end</span>
|
221
|
-
138: <span class="ruby-keyword kw">end</span>
|
222
|
-
139: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">password_changed</span>
|
223
|
-
140: <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-constant">PASSWORD_CHANGED</span>
|
224
|
-
141: <span class="ruby-constant">YAMLWriter</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">users</span>,<span class="ruby-constant">USERS_FILE_PATH</span>,<span class="ruby-value str">"user"</span>)
|
225
|
-
142: <span class="ruby-keyword kw">else</span>
|
226
|
-
143: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:password</span>][<span class="ruby-identifier">:new</span>].<span class="ruby-identifier">length</span> <span class="ruby-operator"><</span> <span class="ruby-value">6</span>
|
227
|
-
144: <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-constant">WRONG_PASSWORD2</span>
|
228
|
-
145: <span class="ruby-keyword kw">else</span>
|
229
|
-
146: <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-constant">WRONG_PASSWORD1</span>
|
230
|
-
147: <span class="ruby-keyword kw">end</span>
|
231
|
-
148: <span class="ruby-comment cmt">#TODO : This message is to be made more specific for old password and confirm password.</span>
|
232
|
-
149: <span class="ruby-keyword kw">end</span>
|
233
|
-
150: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'change_password_form'</span>
|
234
|
-
151: <span class="ruby-keyword kw">end</span>
|
235
|
-
</pre>
|
236
|
-
</div>
|
237
|
-
</div>
|
238
|
-
</div>
|
239
|
-
|
240
|
-
<div id="method-M000015" class="method-detail">
|
241
|
-
<a name="M000015"></a>
|
242
|
-
|
243
|
-
<div class="method-heading">
|
244
|
-
<a href="#M000015" class="method-signature">
|
245
|
-
<span class="method-name">change_password_form</span><span class="method-args">()</span>
|
246
|
-
</a>
|
247
|
-
</div>
|
248
|
-
|
249
|
-
<div class="method-description">
|
250
|
-
<p>
|
251
|
-
This method is used to render the Admin Panel Settings Page.
|
252
|
-
</p>
|
253
|
-
<p><a class="source-toggle" href="#"
|
254
|
-
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
255
|
-
<div class="method-source-code" id="M000015-source">
|
256
|
-
<pre>
|
257
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 154</span>
|
258
|
-
154: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">change_password_form</span>
|
259
|
-
155: <span class="ruby-identifier">set_application_name</span>
|
260
|
-
156: <span class="ruby-keyword kw">end</span>
|
261
|
-
</pre>
|
262
|
-
</div>
|
263
|
-
</div>
|
264
|
-
</div>
|
265
|
-
|
266
|
-
<div id="method-M000011" class="method-detail">
|
267
|
-
<a name="M000011"></a>
|
268
|
-
|
269
|
-
<div class="method-heading">
|
270
|
-
<a href="#M000011" class="method-signature">
|
271
|
-
<span class="method-name">configuration</span><span class="method-args">()</span>
|
272
|
-
</a>
|
273
|
-
</div>
|
274
|
-
|
275
|
-
<div class="method-description">
|
276
|
-
<p>
|
277
|
-
This function is to get the details of config file for <a
|
278
|
-
href="AdminController.html#M000011">configuration</a> page. This page
|
279
|
-
contains the server settings and the application settings.
|
280
|
-
</p>
|
281
|
-
<p><a class="source-toggle" href="#"
|
282
|
-
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
283
|
-
<div class="method-source-code" id="M000011-source">
|
284
|
-
<pre>
|
285
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 86</span>
|
286
|
-
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configuration</span>
|
287
|
-
87: <span class="ruby-ivar">@info</span>= <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-constant">CONFIG_FILE_PATH</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
288
|
-
88: <span class="ruby-ivar">@ssl_spec</span> = <span class="ruby-constant">Hash</span>[<span class="ruby-identifier">:certificate_path</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:ssl</span>][<span class="ruby-identifier">:certificate_path</span>],
|
289
|
-
89: <span class="ruby-identifier">:key_path</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:ssl</span>][<span class="ruby-identifier">:key_path</span>],
|
290
|
-
90: <span class="ruby-identifier">:port</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:ssl</span>][<span class="ruby-identifier">:port</span>]] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:ssl</span>]
|
291
|
-
91: <span class="ruby-ivar">@sendmail_old</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:sendmail</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:sendmail</span>]
|
292
|
-
92: <span class="ruby-ivar">@smtp_old</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:smtp</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:smtp</span>]
|
293
|
-
93: <span class="ruby-identifier">set_application_name</span>
|
294
|
-
94: <span class="ruby-keyword kw">end</span>
|
295
|
-
</pre>
|
296
|
-
</div>
|
297
|
-
</div>
|
298
|
-
</div>
|
299
|
-
|
300
|
-
<div id="method-M000009" class="method-detail">
|
301
|
-
<a name="M000009"></a>
|
302
|
-
|
303
|
-
<div class="method-heading">
|
304
|
-
<a href="#M000009" class="method-signature">
|
305
|
-
<span class="method-name">get_latest_app_cpu_usage</span><span class="method-args">()</span>
|
306
|
-
</a>
|
307
|
-
</div>
|
308
|
-
|
309
|
-
<div class="method-description">
|
310
|
-
<p>
|
311
|
-
This function is to dynamically update the application‘s CPU usage
|
312
|
-
After a minute it refreshes the cpu usage for a particalar application.
|
313
|
-
</p>
|
314
|
-
<p><a class="source-toggle" href="#"
|
315
|
-
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
316
|
-
<div class="method-source-code" id="M000009-source">
|
317
|
-
<pre>
|
318
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 64</span>
|
319
|
-
64: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_latest_app_cpu_usage</span>
|
320
|
-
65: <span class="ruby-identifier">apps_resource_usage</span> = <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_apps</span>
|
321
|
-
66: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_name</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">apps_resource_usage</span>[<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_name</span>]]
|
322
|
-
67: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">apps_resource_usage</span>[<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_name</span>]][<span class="ruby-value">0</span>].<span class="ruby-identifier">to_s</span>
|
323
|
-
68: <span class="ruby-keyword kw">else</span>
|
324
|
-
69: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"0.0"</span>
|
325
|
-
70: <span class="ruby-keyword kw">end</span>
|
326
|
-
71: <span class="ruby-keyword kw">end</span>
|
327
|
-
</pre>
|
328
|
-
</div>
|
329
|
-
</div>
|
330
|
-
</div>
|
331
|
-
|
332
|
-
<div id="method-M000010" class="method-detail">
|
333
|
-
<a name="M000010"></a>
|
334
|
-
|
335
|
-
<div class="method-heading">
|
336
|
-
<a href="#M000010" class="method-signature">
|
337
|
-
<span class="method-name">get_latest_app_memory_usage</span><span class="method-args">()</span>
|
338
|
-
</a>
|
339
|
-
</div>
|
340
|
-
|
341
|
-
<div class="method-description">
|
342
|
-
<p>
|
343
|
-
This function is to dynamically update the application‘s Memory
|
344
|
-
usage. After a minute it refreshes the memory usage for a particalar
|
345
|
-
application.
|
346
|
-
</p>
|
347
|
-
<p><a class="source-toggle" href="#"
|
348
|
-
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
349
|
-
<div class="method-source-code" id="M000010-source">
|
350
|
-
<pre>
|
351
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 75</span>
|
352
|
-
75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_latest_app_memory_usage</span>
|
353
|
-
76: <span class="ruby-identifier">apps_resource_usage</span> = <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_apps</span>
|
354
|
-
77: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_name</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">apps_resource_usage</span>[<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_name</span>]]
|
355
|
-
78: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">format</span>(<span class="ruby-value str">"%.2f"</span>,<span class="ruby-identifier">apps_resource_usage</span>[<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:app_name</span>]][<span class="ruby-value">1</span>] <span class="ruby-operator">/</span> <span class="ruby-value">1024</span>.<span class="ruby-identifier">to_f</span>)
|
356
|
-
79: <span class="ruby-keyword kw">else</span>
|
357
|
-
80: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"0.0"</span>
|
358
|
-
81: <span class="ruby-keyword kw">end</span>
|
359
|
-
82: <span class="ruby-keyword kw">end</span>
|
360
|
-
</pre>
|
361
|
-
</div>
|
362
|
-
</div>
|
363
|
-
</div>
|
364
|
-
|
365
|
-
<div id="method-M000007" class="method-detail">
|
366
|
-
<a name="M000007"></a>
|
367
|
-
|
368
|
-
<div class="method-heading">
|
369
|
-
<a href="#M000007" class="method-signature">
|
370
|
-
<span class="method-name">get_latest_server_cpu_usage</span><span class="method-args">()</span>
|
371
|
-
</a>
|
372
|
-
</div>
|
373
|
-
|
374
|
-
<div class="method-description">
|
375
|
-
<p>
|
376
|
-
This function is to dynamically update the server‘s CPU usage. After
|
377
|
-
a minute it refreshes the cpu usage.
|
378
|
-
</p>
|
379
|
-
<p><a class="source-toggle" href="#"
|
380
|
-
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
381
|
-
<div class="method-source-code" id="M000007-source">
|
382
|
-
<pre>
|
383
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 52</span>
|
384
|
-
52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_latest_server_cpu_usage</span>
|
385
|
-
53: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_server</span>[<span class="ruby-value">0</span>]
|
386
|
-
54: <span class="ruby-keyword kw">end</span>
|
387
|
-
</pre>
|
388
|
-
</div>
|
389
|
-
</div>
|
390
|
-
</div>
|
391
|
-
|
392
|
-
<div id="method-M000008" class="method-detail">
|
393
|
-
<a name="M000008"></a>
|
394
|
-
|
395
|
-
<div class="method-heading">
|
396
|
-
<a href="#M000008" class="method-signature">
|
397
|
-
<span class="method-name">get_latest_server_memory_usage</span><span class="method-args">()</span>
|
398
|
-
</a>
|
399
|
-
</div>
|
400
|
-
|
401
|
-
<div class="method-description">
|
402
|
-
<p>
|
403
|
-
This function is to dynamically update the server‘s memory usage.
|
404
|
-
After a minute it refreshes the memory usage of the server.
|
405
|
-
</p>
|
406
|
-
<p><a class="source-toggle" href="#"
|
407
|
-
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
408
|
-
<div class="method-source-code" id="M000008-source">
|
409
|
-
<pre>
|
410
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 58</span>
|
411
|
-
58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_latest_server_memory_usage</span>
|
412
|
-
59: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">format</span>(<span class="ruby-value str">"%.2f"</span>,<span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_server</span>[<span class="ruby-value">1</span>]<span class="ruby-operator">/</span><span class="ruby-value">1024</span>.<span class="ruby-identifier">to_f</span>)
|
413
|
-
60: <span class="ruby-keyword kw">end</span>
|
414
|
-
</pre>
|
415
|
-
</div>
|
416
|
-
</div>
|
417
|
-
</div>
|
418
|
-
|
419
|
-
<div id="method-M000018" class="method-detail">
|
420
|
-
<a name="M000018"></a>
|
421
|
-
|
422
|
-
<div class="method-heading">
|
423
|
-
<a href="#M000018" class="method-signature">
|
424
|
-
<span class="method-name">get_latest_time</span><span class="method-args">()</span>
|
425
|
-
</a>
|
426
|
-
</div>
|
427
|
-
|
428
|
-
<div class="method-description">
|
429
|
-
<p>
|
430
|
-
This method is to return the server time. The method refreshes the time
|
431
|
-
after every minute.
|
432
|
-
</p>
|
433
|
-
<p><a class="source-toggle" href="#"
|
434
|
-
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
435
|
-
<div class="method-source-code" id="M000018-source">
|
436
|
-
<pre>
|
437
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 174</span>
|
438
|
-
174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_latest_time</span>
|
439
|
-
175: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%d %b %Y %H:%M"</span>)
|
440
|
-
176: <span class="ruby-keyword kw">end</span>
|
441
|
-
</pre>
|
442
|
-
</div>
|
443
|
-
</div>
|
444
|
-
</div>
|
445
|
-
|
446
|
-
<div id="method-M000006" class="method-detail">
|
447
|
-
<a name="M000006"></a>
|
448
|
-
|
449
|
-
<div class="method-heading">
|
450
|
-
<a href="#M000006" class="method-signature">
|
451
|
-
<span class="method-name">home</span><span class="method-args">()</span>
|
452
|
-
</a>
|
453
|
-
</div>
|
454
|
-
|
455
|
-
<div class="method-description">
|
456
|
-
<p>
|
457
|
-
This action is for displaying the first page i.e Home page of the Admin
|
458
|
-
Panel. This page contains the server snapshot(i.e. its cpu and memory
|
459
|
-
usgae) and the list of application deployed on the server with its cpu and
|
460
|
-
memory usgae.
|
461
|
-
</p>
|
462
|
-
<p><a class="source-toggle" href="#"
|
463
|
-
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
464
|
-
<div class="method-source-code" id="M000006-source">
|
465
|
-
<pre>
|
466
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 43</span>
|
467
|
-
43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">home</span>
|
468
|
-
44: <span class="ruby-ivar">@info</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-constant">CONFIG_FILE_PATH</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt">#To get the data of yaml file into yaml object</span>
|
469
|
-
45: <span class="ruby-ivar">@server_resource_usage</span> = <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_server</span> <span class="ruby-comment cmt">#To get the resource usage by the server </span>
|
470
|
-
46: <span class="ruby-ivar">@apps_resource_usage</span> = <span class="ruby-constant">ResourceUsage</span>.<span class="ruby-identifier">get_latest_for_apps</span> <span class="ruby-comment cmt"># to get the resource usage by the application</span>
|
471
|
-
47: <span class="ruby-identifier">set_application_name</span>
|
472
|
-
48: <span class="ruby-keyword kw">end</span>
|
473
|
-
</pre>
|
474
|
-
</div>
|
475
|
-
</div>
|
476
|
-
</div>
|
477
|
-
|
478
|
-
<div id="method-M000005" class="method-detail">
|
479
|
-
<a name="M000005"></a>
|
480
|
-
|
481
|
-
<div class="method-heading">
|
482
|
-
<a href="#M000005" class="method-signature">
|
483
|
-
<span class="method-name">index</span><span class="method-args">()</span>
|
484
|
-
</a>
|
485
|
-
</div>
|
486
|
-
|
487
|
-
<div class="method-description">
|
488
|
-
<p>
|
489
|
-
This action is to render the <a
|
490
|
-
href="AdminController.html#M000012">login</a> page with the layout
|
491
|
-
index.html.erb. If the user session is already created the it redirects the
|
492
|
-
control to the <a href="AdminController.html#M000006">home</a> page of the
|
493
|
-
admin panel.
|
494
|
-
</p>
|
495
|
-
<p><a class="source-toggle" href="#"
|
496
|
-
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
497
|
-
<div class="method-source-code" id="M000005-source">
|
498
|
-
<pre>
|
499
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 31</span>
|
500
|
-
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index</span>
|
501
|
-
32: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:user</span>]
|
502
|
-
33: <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">home_path</span>
|
503
|
-
34: <span class="ruby-keyword kw">else</span>
|
504
|
-
35: <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span>
|
505
|
-
36: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'index'</span>, <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'index'</span>
|
506
|
-
37: <span class="ruby-keyword kw">end</span>
|
507
|
-
38: <span class="ruby-keyword kw">end</span>
|
508
|
-
</pre>
|
509
|
-
</div>
|
510
|
-
</div>
|
511
|
-
</div>
|
512
|
-
|
513
|
-
<div id="method-M000012" class="method-detail">
|
514
|
-
<a name="M000012"></a>
|
515
|
-
|
516
|
-
<div class="method-heading">
|
517
|
-
<a href="#M000012" class="method-signature">
|
518
|
-
<span class="method-name">login</span><span class="method-args">()</span>
|
519
|
-
</a>
|
520
|
-
</div>
|
521
|
-
|
522
|
-
<div class="method-description">
|
523
|
-
<p>
|
524
|
-
This action is called for <a href="AdminController.html#M000012">login</a>
|
525
|
-
authentication. For user authentication it used a method
|
526
|
-
"user_authentication" present in the application.rb. It takes
|
527
|
-
user hash as a input from the <a
|
528
|
-
href="AdminController.html#M000012">login</a> page.
|
529
|
-
</p>
|
530
|
-
<p><a class="source-toggle" href="#"
|
531
|
-
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
532
|
-
<div class="method-source-code" id="M000012-source">
|
533
|
-
<pre>
|
534
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 98</span>
|
535
|
-
98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">login</span>
|
536
|
-
99: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">post?</span>
|
537
|
-
100: <span class="ruby-identifier">rv</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">authenticate</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:user</span>][<span class="ruby-identifier">:name</span>], <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:user</span>][<span class="ruby-identifier">:password</span>]) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
538
|
-
101: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rv</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
|
539
|
-
102: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:session_time</span>] = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
540
|
-
103: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:user</span>] = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:user</span>][<span class="ruby-identifier">:name</span>]
|
541
|
-
104: <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-keyword kw">nil</span>
|
542
|
-
105: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:referer</span>]
|
543
|
-
106: <span class="ruby-identifier">referer_path</span> = <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:referer</span>]
|
544
|
-
107: <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:referer</span>] = <span class="ruby-keyword kw">nil</span>
|
545
|
-
108: <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">referer_path</span>
|
546
|
-
109: <span class="ruby-keyword kw">else</span>
|
547
|
-
110: <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">root_path</span>
|
548
|
-
111: <span class="ruby-keyword kw">end</span>
|
549
|
-
112: <span class="ruby-keyword kw">else</span>
|
550
|
-
113: <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-identifier">rv</span>
|
551
|
-
114: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'index'</span>, <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'index'</span>
|
552
|
-
115: <span class="ruby-keyword kw">end</span>
|
553
|
-
116: <span class="ruby-keyword kw">end</span>
|
554
|
-
117: <span class="ruby-keyword kw">end</span>
|
555
|
-
</pre>
|
556
|
-
</div>
|
557
|
-
</div>
|
558
|
-
</div>
|
559
|
-
|
560
|
-
<div id="method-M000013" class="method-detail">
|
561
|
-
<a name="M000013"></a>
|
562
|
-
|
563
|
-
<div class="method-heading">
|
564
|
-
<a href="#M000013" class="method-signature">
|
565
|
-
<span class="method-name">logout</span><span class="method-args">()</span>
|
566
|
-
</a>
|
567
|
-
</div>
|
568
|
-
|
569
|
-
<div class="method-description">
|
570
|
-
<p>
|
571
|
-
This function is for deleting the session of a user. By clearing the
|
572
|
-
session data for a specific user it delete the sesion of a user.
|
573
|
-
</p>
|
574
|
-
<p><a class="source-toggle" href="#"
|
575
|
-
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
576
|
-
<div class="method-source-code" id="M000013-source">
|
577
|
-
<pre>
|
578
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 121</span>
|
579
|
-
121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logout</span>
|
580
|
-
122: <span class="ruby-identifier">reset_session</span>
|
581
|
-
123: <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-constant">SUCCESSFUL_LOGOUT</span>
|
582
|
-
124: <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">root_path</span>
|
583
|
-
125: <span class="ruby-keyword kw">end</span>
|
584
|
-
</pre>
|
585
|
-
</div>
|
586
|
-
</div>
|
587
|
-
</div>
|
588
|
-
|
589
|
-
<div id="method-M000019" class="method-detail">
|
590
|
-
<a name="M000019"></a>
|
591
|
-
|
592
|
-
<div class="method-heading">
|
593
|
-
<a href="#M000019" class="method-signature">
|
594
|
-
<span class="method-name">required_apps</span><span class="method-args">()</span>
|
595
|
-
</a>
|
596
|
-
</div>
|
597
|
-
|
598
|
-
<div class="method-description">
|
599
|
-
<p>
|
600
|
-
Used to paginate the list of deployed applications.
|
601
|
-
</p>
|
602
|
-
<p><a class="source-toggle" href="#"
|
603
|
-
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
604
|
-
<div class="method-source-code" id="M000019-source">
|
605
|
-
<pre>
|
606
|
-
<span class="ruby-comment cmt"># File app/controllers/admin_controller.rb, line 179</span>
|
607
|
-
179: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">required_apps</span>
|
608
|
-
180: <span class="ruby-ivar">@info</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-constant">CONFIG_FILE_PATH</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
609
|
-
181: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'application_table'</span>, <span class="ruby-identifier">:locals</span> =<span class="ruby-operator">></span> {<span class="ruby-identifier">:start</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:start</span>].<span class="ruby-identifier">to_i</span>}
|
610
|
-
182: <span class="ruby-keyword kw">end</span>
|
611
|
-
</pre>
|
612
|
-
</div>
|
613
|
-
</div>
|
614
|
-
</div>
|
615
|
-
|
616
|
-
|
617
|
-
</div>
|
618
|
-
|
619
|
-
|
620
|
-
</div>
|
621
|
-
|
622
|
-
|
623
|
-
<div id="validator-badges">
|
624
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
625
|
-
</div>
|
626
|
-
|
627
|
-
</body>
|
628
|
-
</html>
|