Prosperity easily lets you add a dashboard of arbitrary time series data to your rails app.
Add this line to your application's Gemfile:
gem 'prosperity'
And then execute:
bundle
bundle exec rake db:migrate
Add a route to prosperity in config/routes.rb
.
mount Prosperity::Engine => "/prosperity"
You can then generate your first metric.
rails g metric User
This will generate app/prosperity/user_metric.rb
You can add custom scopes like so:
class UsersMetric < Prosperity::Metric
scope { User }
options 'active' do |scope|
scope.where(state: 'active')
end
end
To get started with a development environment with pow, follow these instructions;
git clone https://github.com/smathieu/prosperity.git
ln -s `pwd`/prosperity/spec/dummy ~/.pow/prosperity
cd prosperity
bundle
rake db:create db:migrate RAILS_ENV=test
and to run the tests;
rspec
This project rocks and uses MIT-LICENSE.
- Better Docs
- Select data range
- Export data to CSV
- SQL support
- Graph % change since last value
- Dashboard