few bug fixes
This commit is contained in:
parent
fe1ed536c5
commit
c3cd705bc9
3 changed files with 3960 additions and 7 deletions
|
|
@ -40,11 +40,9 @@ function status () {
|
|||
|
||||
return Promise.all([db.oneOrNone(sql, ['ping']), machinesLastPing()])
|
||||
.then(([statusRow, machineStatus]) => {
|
||||
if (!statusRow) return {up: false, lastPing: null, machineStatus}
|
||||
|
||||
const age = moment.duration(statusRow.age, 'seconds')
|
||||
const up = statusRow.age < CONSIDERED_UP_SECS
|
||||
const lastPing = age.humanize()
|
||||
const age = statusRow && moment.duration(statusRow.age, 'seconds')
|
||||
const up = statusRow ? statusRow.age < CONSIDERED_UP_SECS : false
|
||||
const lastPing = statusRow && age.humanize()
|
||||
|
||||
return settingsLoader.loadLatest()
|
||||
.then(settings => {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ function loadLatestConfig () {
|
|||
order by id desc
|
||||
limit 1`
|
||||
|
||||
db.oneOrNone(sql, ['config'])
|
||||
return db.oneOrNone(sql, ['config'])
|
||||
.then(row => row ? row.data.config : [])
|
||||
}
|
||||
|
||||
|
|
|
|||
3957
public/elm.js
3957
public/elm.js
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue