zrnsm / prosperity

Easiest way to create a dashboard of metrics that are relevant to your app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prosperity

Build Status

Prosperity easily lets you add a dashboard of arbitrary time series data to your rails app.

Screenshot

Install

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

Development

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

License

This project rocks and uses MIT-LICENSE.

Todo

  • Better Docs
  • Select data range
  • Export data to CSV
  • SQL support
  • Graph % change since last value
  • Dashboard

About

Easiest way to create a dashboard of metrics that are relevant to your app

License:MIT License


Languages

Language:Ruby 89.0%Language:CoffeeScript 5.9%Language:CSS 3.9%Language:JavaScript 1.2%