Skip to content

Commit

Permalink
remove historic field if its true
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Jun 15, 2020
1 parent ce3cc0e commit 7b09b73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/transports/WebsocketTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ export class WebsocketTransport extends EventEmitter2 implements Transport {
return this.process.axm_monitor = metrics.reduce((object, metric: InternalMetric) => {
if (typeof metric.name !== 'string') return object
object[metric.name] = {
historic: metric.historic,
unit: metric.unit,
type: metric.id,
value: metric.value
}
if (metric.historic == false)
object[metric.name] = false
return object
}, {})
}
Expand Down

0 comments on commit 7b09b73

Please sign in to comment.