mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 16:57:39 -05:00
Fixed the Mongoos schema for Stats
This commit is contained in:
@@ -1,10 +1,27 @@
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
|
||||
|
||||
let decodeErrorSchema = mongoose.Schema({
|
||||
errorHistory: [Number],
|
||||
spikeHistory: [Number],
|
||||
})
|
||||
|
||||
let talkgroupStatsSchema = mongoose.Schema({
|
||||
callCountHistory: [Number],
|
||||
callAvgLenHistory: [Number]
|
||||
})
|
||||
var systemStatSchema = mongoose.Schema({
|
||||
callTotals: [Number],
|
||||
errorTotals: [Number],
|
||||
usageBytes: Number,
|
||||
usageMb: Number,
|
||||
uploadErrors: [Number],
|
||||
decodeErrorsFreq: {
|
||||
type: Map,
|
||||
of: decodeErrorSchema
|
||||
},
|
||||
talkgroupStats: {
|
||||
type: Map,
|
||||
of: talkgroupStatsSchema
|
||||
},
|
||||
shortName: String
|
||||
}, { collection: 'system_stats' });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user