Add Lamassu support microsite
This commit is contained in:
parent
4f9cc88a5e
commit
d901a36f29
5 changed files with 13347 additions and 12 deletions
|
|
@ -69,6 +69,15 @@ function update (deviceId, logLines) {
|
|||
* @returns {array} Array of logs for the requested machinej
|
||||
*/
|
||||
function getMachineLogs (deviceId, until = new Date().toISOString()) {
|
||||
const defaults = {
|
||||
logs: [],
|
||||
currentMachine: {
|
||||
name: '',
|
||||
deviceId: ''
|
||||
}
|
||||
}
|
||||
if (!deviceId) return defaults
|
||||
|
||||
const sql = `select id, log_level, timestamp, message from logs
|
||||
where device_id=$1
|
||||
and timestamp <= $3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue