1.3.0 • Published 8 years ago
hapi-dashboard v1.3.0
hapi-dashboard
Hapi plugin for displaying metrics on a dashboard
Installation
npm install --save hapi-dashboard
Usage
server.pack.register([
{ plugin: require('hapi-dashboard'), options: {
//defaults shown below
endpoint: '/dashboard'
dashboards: {},
ttl: 60*1000, //time to cache responses. 60 seconds
concurrent: 20, //max metrics to process at once
password: 'something', //password used to access dashboards
favicon: 'favicon.png' // Also used as home screen icon for ios
}}
], function(err) {
});
Dashboards Object
Dashboards object should look something like this:
{
'dashboard-1': {
name: 'Dashboard 1',
metrics: {
loggedIn: {
value: function(server, done) {
//perform some async call
server.plugins.db.metrics.loggedInCount(function(err, result) {
done(null, {
name: 'Number of times a user logged in',
value: result.total
});
}
},
ttl: 60
}
}
}
}
1.3.0
8 years ago
1.2.3
8 years ago
1.2.2
8 years ago
1.2.1
8 years ago
1.2.0
8 years ago
1.1.0
8 years ago
1.0.0
8 years ago
0.7.2
9 years ago
0.7.1
9 years ago
0.7.0
9 years ago
0.6.3
10 years ago
0.6.2
10 years ago
0.6.1
10 years ago
0.6.0
10 years ago
0.5.0
10 years ago
0.4.1
10 years ago
0.4.0
10 years ago
0.3.0
10 years ago
0.2.0
10 years ago
0.1.0
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago