dashboards
Simple and pluggable dashboards.
var Dashboards = ; var dashboards =
It's easy to get started: there's already plugins for Stripe, Helpscout, AWS, and others.
It separates data and views: make your own decisions about what to put on your dashboards.
It's dashboard agnostic: so you can use Geckoboard, Ducksboard, Leftronic, or your own internal dashboards.
It pushes you in the right direction: use Segment.io's dashboards expertise to avoid the wrong metrics.
Installation
$ npm install dashboards
How does it work?
Dashboards is super simple. You write a plugin that puts data in, and you write plugins that send data to a dashboard. Plugins that need data defer execution until that data is available.
A plugin can learn about how much you're making on Stripe, and make that data available:
var Stripe = ; { var stripe = ; return { stripecharges; };}
and another plugin can push the charge data to a geckoboard:
var geckoboard = 'api-key'; { return datacharges != null;} { ;}
and now you have your first dashboard:
var dashboards = ;
but wait! waiting for data and piping it to a dashboard gets even easier:
var dashboards =
Plugins
Existing plugins for dashboards can tell you:
- dashboards-aws-billing - how much your AWS hosting costs
- dashboards-helpscout - how many active Helpscout support tickets you have, and who they are assigned to
- dashboards-stripe-charges - how much money you're making every month (and today!)
- dashboards-stripe-subscriptions - how much subscriptions you have, and how much recurring revenue you're generating
API
new Dashboards()
Create a new Dashboards
instance.
#use(plugin)
Add a dashboard plugin
which is either a function or an object that contains a fn
plugin and a ready
function, like so:
ready: hasCharges fn: send
#when(ready, fn)
Execute the dashboard plugin fn
when the ready
function returns true. This allows you to wait until you have a piece of data before sending it to a dashboard. Read more about ready functions in parallel-ware.
#run(callback)
Run the dashboard plugins.
License
WWWWWW||WWWWWW
W W W||W W W
||
( OO )__________
/ | \
/o o| MIT \
\___/||_||__||_|| *
|| || || ||
_||_|| _||_||
(__|__|(__|__|