mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-18 01:16:54 +08:00
Merge branch 'master' into extracted-group-monitor
This commit is contained in:
@@ -114,6 +114,7 @@ class UptimeKumaServer {
|
||||
UptimeKumaServer.monitorTypeList["dns"] = new DnsMonitorType();
|
||||
UptimeKumaServer.monitorTypeList["mqtt"] = new MqttMonitorType();
|
||||
UptimeKumaServer.monitorTypeList["group"] = new GroupMonitorType();
|
||||
UptimeKumaServer.monitorTypeList["mongodb"] = new MongodbMonitorType();
|
||||
|
||||
// Allow all CORS origins (polling) in development
|
||||
let cors = undefined;
|
||||
@@ -196,7 +197,7 @@ class UptimeKumaServer {
|
||||
/**
|
||||
* Send list of monitors to client
|
||||
* @param {Socket} socket Socket to send list on
|
||||
* @returns {object} List of monitors
|
||||
* @returns {Promise<object>} List of monitors
|
||||
*/
|
||||
async sendMonitorList(socket) {
|
||||
let list = await this.getMonitorJSONList(socket.userID);
|
||||
@@ -228,7 +229,7 @@ class UptimeKumaServer {
|
||||
/**
|
||||
* Send maintenance list to client
|
||||
* @param {Socket} socket Socket.io instance to send to
|
||||
* @returns {object} Maintenance list
|
||||
* @returns {Promise<object>} Maintenance list
|
||||
*/
|
||||
async sendMaintenanceList(socket) {
|
||||
return await this.sendMaintenanceListByUserID(socket.userID);
|
||||
@@ -237,7 +238,7 @@ class UptimeKumaServer {
|
||||
/**
|
||||
* Send list of maintenances to user
|
||||
* @param {number} userID User to send list to
|
||||
* @returns {object} Maintenance list
|
||||
* @returns {Promise<object>} Maintenance list
|
||||
*/
|
||||
async sendMaintenanceListByUserID(userID) {
|
||||
let list = await this.getMaintenanceJSONList(userID);
|
||||
@@ -518,3 +519,4 @@ const { TailscalePing } = require("./monitor-types/tailscale-ping");
|
||||
const { DnsMonitorType } = require("./monitor-types/dns");
|
||||
const { MqttMonitorType } = require("./monitor-types/mqtt");
|
||||
const { GroupMonitorType } = require("./monitor-types/group");
|
||||
const { MongodbMonitorType } = require("./monitor-types/mongodb");
|
||||
|
Reference in New Issue
Block a user