A Sinatra-based plugin template for displaying a metrics dashboard in Rails applications.
This plugin provides a starting point for creating a dashboard to view important metrics about your application, inspired by other metrics dashboards.
In its current form, it is just a demo that assumes you are using Authlogic with a
User model and shows some basic information about recent sign ups and, if your
User model has a
last_request_at attribute, information about active users. Edit the plugin as necessary for your application.
$ script/plugin install git://github.com/alphabetum/app_stats.git
Add the following to
AppStats depends on Haml and Sinatra:
# config/environment.rb ... config.gem 'haml' config.gem 'sinatra' ...
or if using Bundler
# Gemfile gem 'haml' gem 'sinatra'
Last, define a
User#can_view_app_stats? instance method that returns a boolean indicating whether the user can view stats or not.
If you want to be able to reload the plugin's templates as you edit them, add the following to you development environment:
# config/environments/development.rb config.reload_plugins = true
script/server and point your browser to
Copyright (c) 2010 William Melody, released under the MIT license