UNPKG

@trusthab/composable-resources

Version:

migrating https://github.com/knetikmedia/hab-api/tree/integration/app/resources/composable

27 lines (20 loc) 462 B
const composer = require('../../mixin_loader'); module.exports = (App) => { const { underscore } = require('inflected'); class ResidentsTotalResource { static mixins() { return ['Kpi']; } getMetricId() { return 'residents_total'; } getMetricType() { return 'gauge'; } getIdentifier() { const obj = this.get('obj'); return obj.email; } } return composer(ResidentsTotalResource, App); };