mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
Revert "move userMonitorList out of server.js"
This reverts commit a7cf14c663
.
This commit is contained in:
parent
0f440596c8
commit
0ddbac5109
@ -4,7 +4,6 @@
|
|||||||
const { TimeLogger } = require("../src/util");
|
const { TimeLogger } = require("../src/util");
|
||||||
const { R } = require("redbean-node");
|
const { R } = require("redbean-node");
|
||||||
const { io } = require("./server");
|
const { io } = require("./server");
|
||||||
const { userMonitorList } = require("./user-monitor-list");
|
|
||||||
|
|
||||||
async function sendNotificationList(socket) {
|
async function sendNotificationList(socket) {
|
||||||
const timeLogger = new TimeLogger();
|
const timeLogger = new TimeLogger();
|
||||||
|
@ -11,7 +11,6 @@ const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalCli
|
|||||||
const { R } = require("redbean-node");
|
const { R } = require("redbean-node");
|
||||||
const { BeanModel } = require("redbean-node/dist/bean-model");
|
const { BeanModel } = require("redbean-node/dist/bean-model");
|
||||||
const { Notification } = require("../notification")
|
const { Notification } = require("../notification")
|
||||||
const { userMonitorList } = require("../user-monitor-list");
|
|
||||||
const version = require("../../package.json").version;
|
const version = require("../../package.json").version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +27,7 @@ debug("Importing Monitor");
|
|||||||
const Monitor = require("./model/monitor");
|
const Monitor = require("./model/monitor");
|
||||||
debug("Importing Settings");
|
debug("Importing Settings");
|
||||||
const { getSettings, setSettings, setting, initJWTSecret } = require("./util-server");
|
const { getSettings, setSettings, setting, initJWTSecret } = require("./util-server");
|
||||||
const { userMonitorList } = require("./user-monitor-list");
|
const UserMonitorList = require("./user-monitor-list");
|
||||||
|
|
||||||
debug("Importing Notification");
|
debug("Importing Notification");
|
||||||
const { Notification } = require("./notification");
|
const { Notification } = require("./notification");
|
||||||
@ -105,6 +105,11 @@ let totalClient = 0;
|
|||||||
*/
|
*/
|
||||||
let jwtSecret = null;
|
let jwtSecret = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main monitor list, filled by startMonitors()
|
||||||
|
*/
|
||||||
|
let userMonitorList = new UserMonitorList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show Setup Page
|
* Show Setup Page
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/**
|
|
||||||
* Main monitor list
|
|
||||||
*/
|
|
||||||
class UserMonitorList {
|
class UserMonitorList {
|
||||||
|
|
||||||
list = {};
|
list = {};
|
||||||
|
|
||||||
add(userID, monitor) {
|
add(userID, monitor) {
|
||||||
@ -48,6 +46,4 @@ class UserMonitorList {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = UserMonitorList;
|
||||||
userMonitorList: new UserMonitorList(),
|
|
||||||
};
|
|
||||||
|
Loading…
Reference in New Issue
Block a user