new admin structure
This commit is contained in:
parent
7d82874916
commit
c2282e61b4
17 changed files with 5768 additions and 1204 deletions
|
|
@ -50,12 +50,6 @@ exports.machineEvent = function machineEvent (rec) {
|
|||
.then(() => db.none(deleteSql, [rec.deviceId, rec.eventType]))
|
||||
}
|
||||
|
||||
exports.devices = function devices () {
|
||||
const sql = 'SELECT device_id, name FROM devices'
|
||||
|
||||
return db.any(sql)
|
||||
}
|
||||
|
||||
exports.machineEvents = function machineEvents () {
|
||||
const sql = 'SELECT *, (EXTRACT(EPOCH FROM (now() - created))) * 1000 AS age FROM machine_events'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue