Feat: add notification center row in notification settings table

This commit is contained in:
Cesar 2021-01-20 12:22:02 +00:00 committed by Josh Harvey
parent 1ab4b68168
commit 34f2b84fe2
8 changed files with 109 additions and 69 deletions

View file

@ -3,7 +3,8 @@ const axios = require('axios')
const db = require('./db')
const pairing = require('./pairing')
const notifier = require('./notifier')
const checkPings = require('./notifier').checkPings
const checkStuckScreen = require('./notifier').checkStuckScreen
const dbm = require('./postgresql_interface')
const configManager = require('./new-config-manager')
const settingsLoader = require('./new-settings-loader')
@ -41,7 +42,7 @@ function getMachineNames (config) {
return Promise.all([getMachines(), getConfig(config)])
.then(([machines, config]) => Promise.all(
[machines, notifier.checkPings(machines), dbm.machineEvents(), config]
[machines, checkPings(machines), dbm.machineEvents(), config]
))
.then(([machines, pings, events, config]) => {
const getStatus = (ping, stuck) => {
@ -60,7 +61,7 @@ function getMachineNames (config) {
const statuses = [
getStatus(
_.first(pings[r.deviceId]),
_.first(notifier.checkStuckScreen(events, r.name))
_.first(checkStuckScreen(events, r.name))
)
]