Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
dashboards
Advanced tools
Readme
Simple and pluggable dashboards.
var Dashboards = require('dashboards');
var dashboards = new Dashboards()
.use(subscriptions('stripe-key'))
.use(charges('stripe-key'))
.use(support('helpscout-key'))
.use(pipe('active tickets', geckoboard('widget-id').number)
.run();
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.
$ npm install dashboards
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 = require('stripe');
function charges (key) {
var stripe = Stripe(key);
return function (data, callback) {
stripe.charges.list(function (err, charges)) {
data['charges'] = charges.reduce(function (memo, charge) {
return memo + (charge.amount / 100);
}, 0);
callback();
});
};
}
and another plugin can push the charge data to a geckoboard:
var geckoboard = require('geckobard')('api-key');
function ready (data) {
return data.charges != null;
}
function send (data, callback) {
geckoboard('widget-id').number(data.charges, callback);
}
and now you have your first dashboard:
var dashboards = new Dashboards()
.use(charges('stripe-key'))
.when(ready, send)
.run();
but wait! waiting for data and piping it to a dashboard gets even easier:
var dashboards = new Dashboards()
.use(charges('stripe-key'))
.use(pipe('charges', geckoboard('widget-id').number)
.run();
Existing plugins for dashboards can tell you:
Create a new Dashboards
instance.
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 }
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 the dashboard plugins.
WWWWWW||WWWWWW
W W W||W W W
||
( OO )__________
/ | \
/o o| MIT \
\___/||_||__||_|| *
|| || || ||
_||_|| _||_||
(__|__|(__|__|
FAQs
Simple and pluggable dashboards
The npm package dashboards receives a total of 3 weekly downloads. As such, dashboards popularity was classified as not popular.
We found that dashboards demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.