mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 09:29:31 +08:00
Feature: remote browser support (#3904)
* [empty commit] pull request for remote browser support * Remote browser: Added UI screens and DB tables. * Remote browser working * Fixing tests * Fix tests * Fix tests * fix tests * Test browser * revert init_db.js * Changed drop down to ActionSelect * Fix translations * added remote browsers toggle * revert changes package-lock * Fix bad english * Set default remote browser * Remote browsers Requested changes * fixed description.
This commit is contained in:
@@ -185,6 +185,30 @@ async function sendDockerHostList(socket) {
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send list of docker hosts to client
|
||||
* @param {Socket} socket Socket.io socket instance
|
||||
* @returns {Promise<Bean[]>} List of docker hosts
|
||||
*/
|
||||
async function sendRemoteBrowserList(socket) {
|
||||
const timeLogger = new TimeLogger();
|
||||
|
||||
let result = [];
|
||||
let list = await R.find("remote_browser", " user_id = ? ", [
|
||||
socket.userID,
|
||||
]);
|
||||
|
||||
for (let bean of list) {
|
||||
result.push(bean.toJSON());
|
||||
}
|
||||
|
||||
io.to(socket.userID).emit("remoteBrowserList", result);
|
||||
|
||||
timeLogger.print("Send Remote Browser List");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
sendNotificationList,
|
||||
sendImportantHeartbeatList,
|
||||
@@ -192,5 +216,6 @@ module.exports = {
|
||||
sendProxyList,
|
||||
sendAPIKeyList,
|
||||
sendInfo,
|
||||
sendDockerHostList
|
||||
sendDockerHostList,
|
||||
sendRemoteBrowserList,
|
||||
};
|
||||
|
Reference in New Issue
Block a user